diff --git a/.vs/FTP Snipping Tool/DesignTimeBuild/.dtbcache.v2 b/.vs/FTP Snipping Tool/DesignTimeBuild/.dtbcache.v2
index c7718cb..eb7559a 100644
Binary files a/.vs/FTP Snipping Tool/DesignTimeBuild/.dtbcache.v2 and b/.vs/FTP Snipping Tool/DesignTimeBuild/.dtbcache.v2 differ
diff --git a/.vs/FTP Snipping Tool/FileContentIndex/0dbb3046-84aa-4328-a395-0e8cdab75adb.vsidx b/.vs/FTP Snipping Tool/FileContentIndex/0dbb3046-84aa-4328-a395-0e8cdab75adb.vsidx
new file mode 100644
index 0000000..a4cf4d4
Binary files /dev/null and b/.vs/FTP Snipping Tool/FileContentIndex/0dbb3046-84aa-4328-a395-0e8cdab75adb.vsidx differ
diff --git a/.vs/FTP Snipping Tool/FileContentIndex/c8adfd20-a03e-499c-ad27-d05cea5a82d5.vsidx b/.vs/FTP Snipping Tool/FileContentIndex/3943aa4a-bb33-4961-b73b-39fba750bb2a.vsidx
similarity index 99%
rename from .vs/FTP Snipping Tool/FileContentIndex/c8adfd20-a03e-499c-ad27-d05cea5a82d5.vsidx
rename to .vs/FTP Snipping Tool/FileContentIndex/3943aa4a-bb33-4961-b73b-39fba750bb2a.vsidx
index 5ab2ef7..8d894e1 100644
Binary files a/.vs/FTP Snipping Tool/FileContentIndex/c8adfd20-a03e-499c-ad27-d05cea5a82d5.vsidx and b/.vs/FTP Snipping Tool/FileContentIndex/3943aa4a-bb33-4961-b73b-39fba750bb2a.vsidx differ
diff --git a/.vs/FTP Snipping Tool/FileContentIndex/9042b200-765e-4947-bb1c-d8e648f608c1.vsidx b/.vs/FTP Snipping Tool/FileContentIndex/9042b200-765e-4947-bb1c-d8e648f608c1.vsidx
deleted file mode 100644
index a1f337d..0000000
Binary files a/.vs/FTP Snipping Tool/FileContentIndex/9042b200-765e-4947-bb1c-d8e648f608c1.vsidx and /dev/null differ
diff --git a/.vs/FTP Snipping Tool/v17/.futdcache.v1 b/.vs/FTP Snipping Tool/v17/.futdcache.v1
index 84618f8..b172576 100644
Binary files a/.vs/FTP Snipping Tool/v17/.futdcache.v1 and b/.vs/FTP Snipping Tool/v17/.futdcache.v1 differ
diff --git a/.vs/FTP Snipping Tool/v17/.suo b/.vs/FTP Snipping Tool/v17/.suo
index e73dc78..f410d9e 100644
Binary files a/.vs/FTP Snipping Tool/v17/.suo and b/.vs/FTP Snipping Tool/v17/.suo differ
diff --git a/.vs/ProjectEvaluation/ftp snipping tool.metadata.v2 b/.vs/ProjectEvaluation/ftp snipping tool.metadata.v2
index 2245daa..2557fa4 100644
Binary files a/.vs/ProjectEvaluation/ftp snipping tool.metadata.v2 and b/.vs/ProjectEvaluation/ftp snipping tool.metadata.v2 differ
diff --git a/.vs/ProjectEvaluation/ftp snipping tool.projects.v2 b/.vs/ProjectEvaluation/ftp snipping tool.projects.v2
index 49d1ec4..8a0611c 100644
Binary files a/.vs/ProjectEvaluation/ftp snipping tool.projects.v2 and b/.vs/ProjectEvaluation/ftp snipping tool.projects.v2 differ
diff --git a/Form1.Designer.cs b/Form1.Designer.cs
index 7e16752..9f1206a 100644
--- a/Form1.Designer.cs
+++ b/Form1.Designer.cs
@@ -35,9 +35,10 @@ private void InitializeComponent()
//
// pictureBox1
//
- this.pictureBox1.Location = new System.Drawing.Point(-1, -3);
+ this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(588, 265);
+ this.pictureBox1.Size = new System.Drawing.Size(587, 261);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
diff --git a/Form1.cs b/Form1.cs
index 4e429f6..af0a056 100644
--- a/Form1.cs
+++ b/Form1.cs
@@ -85,8 +85,8 @@ private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
//starts coordinates for rectangle
selectX = e.X;
selectY = e.Y;
- selectPen = new Pen(Color.Red, 1);
- selectPen.DashStyle = DashStyle.DashDotDot;
+ selectPen = new Pen(Color.Crimson, 5);
+ selectPen.DashStyle = DashStyle.Dash;
}
//refresh picture box
pictureBox1.Refresh();
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
index 36fe8d5..1a82142 100644
--- a/Properties/Resources.Designer.cs
+++ b/Properties/Resources.Designer.cs
@@ -69,5 +69,15 @@ internal static System.Drawing.Bitmap placeholder {
return ((System.Drawing.Bitmap)(obj));
}
}
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap transparent {
+ get {
+ object obj = ResourceManager.GetObject("transparent", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
}
}
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
index 708507f..23fdf85 100644
--- a/Properties/Resources.resx
+++ b/Properties/Resources.resx
@@ -121,4 +121,7 @@
..\Resources\placeholder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\transparent.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/Resources/transparent.png b/Resources/transparent.png
new file mode 100644
index 0000000..9609bda
Binary files /dev/null and b/Resources/transparent.png differ
diff --git a/bin/Debug/net6.0-windows/BETA v1.0.rar b/bin/Debug/net6.0-windows/BETA v1.0.rar
new file mode 100644
index 0000000..af9e7bc
Binary files /dev/null and b/bin/Debug/net6.0-windows/BETA v1.0.rar differ
diff --git a/bin/Debug/net6.0-windows/FTP Snipping Tool.dll b/bin/Debug/net6.0-windows/FTP Snipping Tool.dll
index 260a1d0..d332783 100644
Binary files a/bin/Debug/net6.0-windows/FTP Snipping Tool.dll and b/bin/Debug/net6.0-windows/FTP Snipping Tool.dll differ
diff --git a/bin/Debug/net6.0-windows/FTP Snipping Tool.pdb b/bin/Debug/net6.0-windows/FTP Snipping Tool.pdb
index cf77381..d3af444 100644
Binary files a/bin/Debug/net6.0-windows/FTP Snipping Tool.pdb and b/bin/Debug/net6.0-windows/FTP Snipping Tool.pdb differ
diff --git a/configure.Designer.cs b/configure.Designer.cs
index eb05066..09c1a36 100644
--- a/configure.Designer.cs
+++ b/configure.Designer.cs
@@ -31,8 +31,11 @@ private void InitializeComponent()
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(configure));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.config = new System.Windows.Forms.TabPage();
+ this.label8 = new System.Windows.Forms.Label();
+ this.checkBox1 = new System.Windows.Forms.CheckBox();
this.btnClose = new System.Windows.Forms.Button();
this.btnSave = new System.Windows.Forms.Button();
+ this.btnDefault = new System.Windows.Forms.Button();
this.btnReload = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
@@ -57,13 +60,16 @@ private void InitializeComponent()
this.tabControl1.Location = new System.Drawing.Point(12, 12);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
- this.tabControl1.Size = new System.Drawing.Size(582, 342);
+ this.tabControl1.Size = new System.Drawing.Size(582, 403);
this.tabControl1.TabIndex = 0;
//
// config
//
+ this.config.Controls.Add(this.label8);
+ this.config.Controls.Add(this.checkBox1);
this.config.Controls.Add(this.btnClose);
this.config.Controls.Add(this.btnSave);
+ this.config.Controls.Add(this.btnDefault);
this.config.Controls.Add(this.btnReload);
this.config.Controls.Add(this.label6);
this.config.Controls.Add(this.label5);
@@ -81,14 +87,37 @@ private void InitializeComponent()
this.config.Location = new System.Drawing.Point(4, 29);
this.config.Name = "config";
this.config.Padding = new System.Windows.Forms.Padding(3);
- this.config.Size = new System.Drawing.Size(574, 309);
+ this.config.Size = new System.Drawing.Size(574, 370);
this.config.TabIndex = 0;
- this.config.Text = "Configuration";
+ this.config.Text = "SFTP Setup";
this.config.UseVisualStyleBackColor = true;
//
+ // label8
+ //
+ this.label8.AutoSize = true;
+ this.label8.Location = new System.Drawing.Point(138, 250);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(395, 40);
+ this.label8.TabIndex = 1;
+ this.label8.Text = "Note: Password is not stored encrypted. Please create SFTP\r\naccount for only the " +
+ "screenshot directory with strict perms.";
+ //
+ // checkBox1
+ //
+ this.checkBox1.AutoSize = true;
+ this.checkBox1.Checked = true;
+ this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.checkBox1.Location = new System.Drawing.Point(486, 147);
+ this.checkBox1.Name = "checkBox1";
+ this.checkBox1.Size = new System.Drawing.Size(63, 24);
+ this.checkBox1.TabIndex = 107;
+ this.checkBox1.Text = "Hide";
+ this.checkBox1.UseVisualStyleBackColor = true;
+ this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
+ //
// btnClose
//
- this.btnClose.Location = new System.Drawing.Point(374, 256);
+ this.btnClose.Location = new System.Drawing.Point(374, 314);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(94, 47);
this.btnClose.TabIndex = 8;
@@ -98,7 +127,7 @@ private void InitializeComponent()
//
// btnSave
//
- this.btnSave.Location = new System.Drawing.Point(474, 256);
+ this.btnSave.Location = new System.Drawing.Point(474, 314);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(94, 47);
this.btnSave.TabIndex = 9;
@@ -106,9 +135,19 @@ private void InitializeComponent()
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
+ // btnDefault
+ //
+ this.btnDefault.Location = new System.Drawing.Point(106, 314);
+ this.btnDefault.Name = "btnDefault";
+ this.btnDefault.Size = new System.Drawing.Size(94, 47);
+ this.btnDefault.TabIndex = 7;
+ this.btnDefault.Text = "Default";
+ this.btnDefault.UseVisualStyleBackColor = true;
+ this.btnDefault.Click += new System.EventHandler(this.btnDefault_Click);
+ //
// btnReload
//
- this.btnReload.Location = new System.Drawing.Point(6, 256);
+ this.btnReload.Location = new System.Drawing.Point(6, 314);
this.btnReload.Name = "btnReload";
this.btnReload.Size = new System.Drawing.Size(94, 47);
this.btnReload.TabIndex = 7;
@@ -198,7 +237,8 @@ private void InitializeComponent()
//
this.txtPassword.Location = new System.Drawing.Point(138, 144);
this.txtPassword.Name = "txtPassword";
- this.txtPassword.Size = new System.Drawing.Size(411, 27);
+ this.txtPassword.PasswordChar = '*';
+ this.txtPassword.Size = new System.Drawing.Size(342, 27);
this.txtPassword.TabIndex = 4;
//
// txtUsername
@@ -227,13 +267,14 @@ private void InitializeComponent()
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(606, 365);
+ this.ClientSize = new System.Drawing.Size(606, 414);
this.Controls.Add(this.tabControl1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "configure";
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SFTP Snipping Tool - Configuration";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.configure_FormClosing);
this.Load += new System.EventHandler(this.configure_Load);
@@ -264,5 +305,8 @@ private void InitializeComponent()
private TextBox txtPassword;
private TextBox txtUsername;
private Button btnClose;
+ private Button btnDefault;
+ private Label label8;
+ private CheckBox checkBox1;
}
}
\ No newline at end of file
diff --git a/configure.cs b/configure.cs
index 838ecdf..5a4de84 100644
--- a/configure.cs
+++ b/configure.cs
@@ -37,6 +37,15 @@ private void btnReload_Click(object sender, EventArgs e)
txtWebURL.Text = Properties.Settings.Default.webURL;
}
+ private void btnDefault_Click(object sender, EventArgs e)
+ {
+ txtHost.Text = "IP or domain";
+ txtPort.Text = "22";
+ txtUsername.Text = "username";
+ txtPassword.Text = "password";
+ txtScreenshotpath.Text = "E.G. /var/www/screenshots.darcyjprojects.xyz/";
+ txtWebURL.Text = "E.G. https://screenshots.darcyjprojects.xyz";
+ }
private void btnSave_Click(object sender, EventArgs e)
{
if (txtPort.ForeColor == Color.Red)
@@ -78,5 +87,17 @@ private void configure_FormClosing(object sender, FormClosingEventArgs e)
{
Application.Exit();
}
+
+ private void checkBox1_CheckedChanged(object sender, EventArgs e)
+ {
+ if (checkBox1.Checked == true)
+ {
+ txtPassword.PasswordChar = '*';
+ } else
+ {
+ Char nullChar = new char();
+ txtPassword.PasswordChar = nullChar;
+ }
+ }
}
}
diff --git a/obj/Debug/net6.0-windows/FTP Snipping Tool.csproj.GenerateResource.cache b/obj/Debug/net6.0-windows/FTP Snipping Tool.csproj.GenerateResource.cache
index 11f2615..56821bb 100644
Binary files a/obj/Debug/net6.0-windows/FTP Snipping Tool.csproj.GenerateResource.cache and b/obj/Debug/net6.0-windows/FTP Snipping Tool.csproj.GenerateResource.cache differ
diff --git a/obj/Debug/net6.0-windows/FTP Snipping Tool.dll b/obj/Debug/net6.0-windows/FTP Snipping Tool.dll
index 260a1d0..d332783 100644
Binary files a/obj/Debug/net6.0-windows/FTP Snipping Tool.dll and b/obj/Debug/net6.0-windows/FTP Snipping Tool.dll differ
diff --git a/obj/Debug/net6.0-windows/FTP Snipping Tool.pdb b/obj/Debug/net6.0-windows/FTP Snipping Tool.pdb
index cf77381..d3af444 100644
Binary files a/obj/Debug/net6.0-windows/FTP Snipping Tool.pdb and b/obj/Debug/net6.0-windows/FTP Snipping Tool.pdb differ
diff --git a/obj/Debug/net6.0-windows/FTP_Snipping_Tool.Properties.Resources.resources b/obj/Debug/net6.0-windows/FTP_Snipping_Tool.Properties.Resources.resources
index f3d3bd8..4cf536e 100644
Binary files a/obj/Debug/net6.0-windows/FTP_Snipping_Tool.Properties.Resources.resources and b/obj/Debug/net6.0-windows/FTP_Snipping_Tool.Properties.Resources.resources differ
diff --git a/obj/Debug/net6.0-windows/TempPE/Properties.Resources.Designer.cs.dll b/obj/Debug/net6.0-windows/TempPE/Properties.Resources.Designer.cs.dll
index f728897..357ed6c 100644
Binary files a/obj/Debug/net6.0-windows/TempPE/Properties.Resources.Designer.cs.dll and b/obj/Debug/net6.0-windows/TempPE/Properties.Resources.Designer.cs.dll differ
diff --git a/obj/Debug/net6.0-windows/ref/FTP Snipping Tool.dll b/obj/Debug/net6.0-windows/ref/FTP Snipping Tool.dll
index 51d466f..b98bdcb 100644
Binary files a/obj/Debug/net6.0-windows/ref/FTP Snipping Tool.dll and b/obj/Debug/net6.0-windows/ref/FTP Snipping Tool.dll differ
diff --git a/obj/Debug/net6.0-windows/refint/FTP Snipping Tool.dll b/obj/Debug/net6.0-windows/refint/FTP Snipping Tool.dll
index 51d466f..b98bdcb 100644
Binary files a/obj/Debug/net6.0-windows/refint/FTP Snipping Tool.dll and b/obj/Debug/net6.0-windows/refint/FTP Snipping Tool.dll differ
diff --git a/snipped.Designer.cs b/snipped.Designer.cs
index 470f6b7..2ef0509 100644
--- a/snipped.Designer.cs
+++ b/snipped.Designer.cs
@@ -43,22 +43,47 @@ private void InitializeComponent()
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnNew = new System.Windows.Forms.Button();
+ this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.btnWhite = new System.Windows.Forms.Button();
+ this.btnPurple = new System.Windows.Forms.Button();
+ this.btnBlue = new System.Windows.Forms.Button();
+ this.btnGreen = new System.Windows.Forms.Button();
+ this.btnYellow = new System.Windows.Forms.Button();
+ this.btnOrange = new System.Windows.Forms.Button();
+ this.btnRed = new System.Windows.Forms.Button();
+ this.btnBlack = new System.Windows.Forms.Button();
+ this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.btnHL = new System.Windows.Forms.Button();
+ this.btnPen = new System.Windows.Forms.Button();
+ this.groupBox3 = new System.Windows.Forms.GroupBox();
+ this.btnClearpen = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.menuStrip1.SuspendLayout();
+ this.groupBox1.SuspendLayout();
+ this.groupBox2.SuspendLayout();
+ this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// pictureBox1
//
+ this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
+ this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.pictureBox1.Location = new System.Drawing.Point(0, 36);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(721, 357);
- this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
+ this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown);
+ this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove);
+ this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseUp);
//
// btnUpload
//
- this.btnUpload.Location = new System.Drawing.Point(12, 402);
+ this.btnUpload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+ this.btnUpload.Location = new System.Drawing.Point(6, 26);
this.btnUpload.Name = "btnUpload";
this.btnUpload.Size = new System.Drawing.Size(94, 60);
this.btnUpload.TabIndex = 1;
@@ -68,9 +93,10 @@ private void InitializeComponent()
//
// btnExit
//
- this.btnExit.Location = new System.Drawing.Point(629, 402);
+ this.btnExit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnExit.Location = new System.Drawing.Point(611, 20);
this.btnExit.Name = "btnExit";
- this.btnExit.Size = new System.Drawing.Size(81, 60);
+ this.btnExit.Size = new System.Drawing.Size(81, 70);
this.btnExit.TabIndex = 2;
this.btnExit.Text = "Exit";
this.btnExit.UseVisualStyleBackColor = true;
@@ -78,21 +104,25 @@ private void InitializeComponent()
//
// txtStatus
//
- this.txtStatus.Location = new System.Drawing.Point(167, 399);
+ this.txtStatus.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.txtStatus.Location = new System.Drawing.Point(161, 23);
this.txtStatus.Name = "txtStatus";
this.txtStatus.ReadOnly = true;
- this.txtStatus.Size = new System.Drawing.Size(369, 27);
+ this.txtStatus.Size = new System.Drawing.Size(351, 27);
this.txtStatus.TabIndex = 3;
//
// menuStrip1
//
+ this.menuStrip1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None;
this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.preferenceToolStripMenuItem,
this.informationToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(722, 28);
+ this.menuStrip1.Size = new System.Drawing.Size(155, 28);
this.menuStrip1.TabIndex = 4;
this.menuStrip1.Text = "menuStrip1";
//
@@ -136,16 +166,18 @@ private void InitializeComponent()
//
// txtURL
//
- this.txtURL.Location = new System.Drawing.Point(167, 432);
+ this.txtURL.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
+ this.txtURL.Location = new System.Drawing.Point(161, 56);
this.txtURL.Name = "txtURL";
this.txtURL.ReadOnly = true;
- this.txtURL.Size = new System.Drawing.Size(369, 27);
+ this.txtURL.Size = new System.Drawing.Size(351, 27);
this.txtURL.TabIndex = 3;
//
// label1
//
+ this.label1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(112, 402);
+ this.label1.Location = new System.Drawing.Point(106, 26);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(49, 20);
this.label1.TabIndex = 5;
@@ -153,8 +185,9 @@ private void InitializeComponent()
//
// label2
//
+ this.label2.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(126, 435);
+ this.label2.Location = new System.Drawing.Point(120, 59);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(35, 20);
this.label2.TabIndex = 5;
@@ -162,40 +195,223 @@ private void InitializeComponent()
//
// btnNew
//
- this.btnNew.Location = new System.Drawing.Point(542, 402);
+ this.btnNew.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnNew.Location = new System.Drawing.Point(524, 20);
this.btnNew.Name = "btnNew";
- this.btnNew.Size = new System.Drawing.Size(81, 60);
+ this.btnNew.Size = new System.Drawing.Size(81, 30);
this.btnNew.TabIndex = 6;
this.btnNew.Text = "New";
this.btnNew.UseVisualStyleBackColor = true;
this.btnNew.Click += new System.EventHandler(this.btnNew_Click);
//
+ // groupBox1
+ //
+ this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox1.Controls.Add(this.btnWhite);
+ this.groupBox1.Controls.Add(this.btnPurple);
+ this.groupBox1.Controls.Add(this.btnBlue);
+ this.groupBox1.Controls.Add(this.btnGreen);
+ this.groupBox1.Controls.Add(this.btnYellow);
+ this.groupBox1.Controls.Add(this.btnOrange);
+ this.groupBox1.Controls.Add(this.btnRed);
+ this.groupBox1.Controls.Add(this.btnBlack);
+ this.groupBox1.Location = new System.Drawing.Point(12, 399);
+ this.groupBox1.Name = "groupBox1";
+ this.groupBox1.Size = new System.Drawing.Size(524, 55);
+ this.groupBox1.TabIndex = 7;
+ this.groupBox1.TabStop = false;
+ this.groupBox1.Text = "Colours";
+ //
+ // btnWhite
+ //
+ this.btnWhite.BackColor = System.Drawing.Color.White;
+ this.btnWhite.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnWhite.ForeColor = System.Drawing.Color.Black;
+ this.btnWhite.Location = new System.Drawing.Point(454, 20);
+ this.btnWhite.Name = "btnWhite";
+ this.btnWhite.Size = new System.Drawing.Size(58, 29);
+ this.btnWhite.TabIndex = 0;
+ this.btnWhite.UseVisualStyleBackColor = false;
+ this.btnWhite.Click += new System.EventHandler(this.btnWhite_Click);
+ //
+ // btnPurple
+ //
+ this.btnPurple.BackColor = System.Drawing.Color.Purple;
+ this.btnPurple.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnPurple.ForeColor = System.Drawing.Color.White;
+ this.btnPurple.Location = new System.Drawing.Point(390, 20);
+ this.btnPurple.Name = "btnPurple";
+ this.btnPurple.Size = new System.Drawing.Size(58, 29);
+ this.btnPurple.TabIndex = 0;
+ this.btnPurple.TextAlign = System.Drawing.ContentAlignment.TopCenter;
+ this.btnPurple.UseVisualStyleBackColor = false;
+ this.btnPurple.Click += new System.EventHandler(this.btnPurple_Click);
+ //
+ // btnBlue
+ //
+ this.btnBlue.BackColor = System.Drawing.Color.Blue;
+ this.btnBlue.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnBlue.ForeColor = System.Drawing.Color.Black;
+ this.btnBlue.Location = new System.Drawing.Point(326, 20);
+ this.btnBlue.Name = "btnBlue";
+ this.btnBlue.Size = new System.Drawing.Size(58, 29);
+ this.btnBlue.TabIndex = 0;
+ this.btnBlue.UseVisualStyleBackColor = false;
+ this.btnBlue.Click += new System.EventHandler(this.btnBlue_Click);
+ //
+ // btnGreen
+ //
+ this.btnGreen.BackColor = System.Drawing.Color.Green;
+ this.btnGreen.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnGreen.ForeColor = System.Drawing.Color.Black;
+ this.btnGreen.Location = new System.Drawing.Point(262, 20);
+ this.btnGreen.Name = "btnGreen";
+ this.btnGreen.Size = new System.Drawing.Size(58, 29);
+ this.btnGreen.TabIndex = 0;
+ this.btnGreen.UseVisualStyleBackColor = false;
+ this.btnGreen.Click += new System.EventHandler(this.btnGreen_Click);
+ //
+ // btnYellow
+ //
+ this.btnYellow.BackColor = System.Drawing.Color.Yellow;
+ this.btnYellow.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnYellow.ForeColor = System.Drawing.Color.Black;
+ this.btnYellow.Location = new System.Drawing.Point(198, 20);
+ this.btnYellow.Name = "btnYellow";
+ this.btnYellow.Size = new System.Drawing.Size(58, 29);
+ this.btnYellow.TabIndex = 0;
+ this.btnYellow.UseVisualStyleBackColor = false;
+ this.btnYellow.Click += new System.EventHandler(this.btnYellow_Click);
+ //
+ // btnOrange
+ //
+ this.btnOrange.BackColor = System.Drawing.Color.Orange;
+ this.btnOrange.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnOrange.ForeColor = System.Drawing.Color.Black;
+ this.btnOrange.Location = new System.Drawing.Point(134, 20);
+ this.btnOrange.Name = "btnOrange";
+ this.btnOrange.Size = new System.Drawing.Size(58, 29);
+ this.btnOrange.TabIndex = 0;
+ this.btnOrange.UseVisualStyleBackColor = false;
+ this.btnOrange.Click += new System.EventHandler(this.btnOrange_Click);
+ //
+ // btnRed
+ //
+ this.btnRed.BackColor = System.Drawing.Color.Red;
+ this.btnRed.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnRed.ForeColor = System.Drawing.Color.Black;
+ this.btnRed.Location = new System.Drawing.Point(70, 20);
+ this.btnRed.Name = "btnRed";
+ this.btnRed.Size = new System.Drawing.Size(58, 29);
+ this.btnRed.TabIndex = 0;
+ this.btnRed.UseVisualStyleBackColor = false;
+ this.btnRed.Click += new System.EventHandler(this.btnRed_Click);
+ //
+ // btnBlack
+ //
+ this.btnBlack.BackColor = System.Drawing.Color.Black;
+ this.btnBlack.Font = new System.Drawing.Font("Segoe UI Black", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.btnBlack.ForeColor = System.Drawing.Color.White;
+ this.btnBlack.Location = new System.Drawing.Point(6, 20);
+ this.btnBlack.Name = "btnBlack";
+ this.btnBlack.Size = new System.Drawing.Size(58, 29);
+ this.btnBlack.TabIndex = 0;
+ this.btnBlack.UseVisualStyleBackColor = false;
+ this.btnBlack.Click += new System.EventHandler(this.btnBlack_Click);
+ //
+ // groupBox2
+ //
+ this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox2.Controls.Add(this.btnHL);
+ this.groupBox2.Controls.Add(this.btnPen);
+ this.groupBox2.Location = new System.Drawing.Point(542, 399);
+ this.groupBox2.Name = "groupBox2";
+ this.groupBox2.Size = new System.Drawing.Size(168, 55);
+ this.groupBox2.TabIndex = 7;
+ this.groupBox2.TabStop = false;
+ this.groupBox2.Text = "Type";
+ this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
+ //
+ // btnHL
+ //
+ this.btnHL.BackColor = System.Drawing.Color.White;
+ this.btnHL.ForeColor = System.Drawing.Color.Black;
+ this.btnHL.Location = new System.Drawing.Point(87, 20);
+ this.btnHL.Name = "btnHL";
+ this.btnHL.Size = new System.Drawing.Size(75, 29);
+ this.btnHL.TabIndex = 0;
+ this.btnHL.Text = "HL";
+ this.btnHL.UseVisualStyleBackColor = false;
+ this.btnHL.Click += new System.EventHandler(this.btnHL_Click);
+ //
+ // btnPen
+ //
+ this.btnPen.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+ this.btnPen.ForeColor = System.Drawing.Color.Black;
+ this.btnPen.Location = new System.Drawing.Point(6, 20);
+ this.btnPen.Name = "btnPen";
+ this.btnPen.Size = new System.Drawing.Size(75, 29);
+ this.btnPen.TabIndex = 0;
+ this.btnPen.Text = "Pen";
+ this.btnPen.UseVisualStyleBackColor = false;
+ this.btnPen.Click += new System.EventHandler(this.btnPen_Click);
+ //
+ // groupBox3
+ //
+ this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.groupBox3.Controls.Add(this.txtStatus);
+ this.groupBox3.Controls.Add(this.btnUpload);
+ this.groupBox3.Controls.Add(this.btnExit);
+ this.groupBox3.Controls.Add(this.btnClearpen);
+ this.groupBox3.Controls.Add(this.btnNew);
+ this.groupBox3.Controls.Add(this.txtURL);
+ this.groupBox3.Controls.Add(this.label2);
+ this.groupBox3.Controls.Add(this.label1);
+ this.groupBox3.Location = new System.Drawing.Point(12, 460);
+ this.groupBox3.Name = "groupBox3";
+ this.groupBox3.Size = new System.Drawing.Size(698, 96);
+ this.groupBox3.TabIndex = 8;
+ this.groupBox3.TabStop = false;
+ this.groupBox3.Text = "Controls";
+ //
+ // btnClearpen
+ //
+ this.btnClearpen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+ this.btnClearpen.Location = new System.Drawing.Point(524, 53);
+ this.btnClearpen.Name = "btnClearpen";
+ this.btnClearpen.Size = new System.Drawing.Size(81, 30);
+ this.btnClearpen.TabIndex = 6;
+ this.btnClearpen.Text = "Clear Pen";
+ this.btnClearpen.UseVisualStyleBackColor = true;
+ this.btnClearpen.Click += new System.EventHandler(this.btnClearpen_Click);
+ //
// snipped
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(722, 470);
- this.Controls.Add(this.btnNew);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.txtURL);
- this.Controls.Add(this.txtStatus);
- this.Controls.Add(this.btnExit);
- this.Controls.Add(this.btnUpload);
+ this.ClientSize = new System.Drawing.Size(722, 568);
+ this.Controls.Add(this.groupBox3);
+ this.Controls.Add(this.groupBox2);
+ this.Controls.Add(this.groupBox1);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.menuStrip1);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
- this.MaximizeBox = false;
this.Name = "snipped";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "SFTP Snipping Tool - View Screenshot";
+ this.Text = "SFTP Snipping Tool - Screenshot Workshop";
+ this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.snipped_FormClosing);
this.Load += new System.EventHandler(this.snipped_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
+ this.groupBox1.ResumeLayout(false);
+ this.groupBox2.ResumeLayout(false);
+ this.groupBox3.ResumeLayout(false);
+ this.groupBox3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -217,5 +433,19 @@ private void InitializeComponent()
private ToolStripMenuItem informationToolStripMenuItem;
private ToolStripMenuItem aboutToolStripMenuItem;
private Button btnNew;
+ private GroupBox groupBox1;
+ private Button btnWhite;
+ private Button btnPurple;
+ private Button btnBlue;
+ private Button btnGreen;
+ private Button btnYellow;
+ private Button btnOrange;
+ private Button btnRed;
+ private Button btnBlack;
+ private GroupBox groupBox2;
+ private Button btnHL;
+ private Button btnPen;
+ private GroupBox groupBox3;
+ private Button btnClearpen;
}
}
\ No newline at end of file
diff --git a/snipped.cs b/snipped.cs
index 10913e1..0026708 100644
--- a/snipped.cs
+++ b/snipped.cs
@@ -29,6 +29,21 @@ public partial class snipped : Form
string filename = "";
+ //drawing
+ int type = 0; //0 = pen, 1 = hl
+ int colour = 0;
+ Pen pen;
+ Pen hl;
+ int hlAlpha = 64;
+ int penSize = 5;
+ int hlSize = 30;
+ Image cleanImage;
+ Image cleanImage2;
+ int f = 0;
+
+ bool mouseDown;
+ Point lastPoint;
+
Image screenshot = Properties.Resources.placeholder;
public snipped()
{
@@ -59,9 +74,24 @@ private void snipped_Load(object sender, EventArgs e)
}
pictureBox1.Image = Main.img;
- screenshot = Main.img;
txtStatus.Text = "Image file copied to clipboard.";
txtURL.Text = "Please click upload to generate link.";
+
+ //set pen and hl to black
+ pen = new Pen(Color.FromArgb(255, 0, 0, 0), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 0, 0, 0), hlSize);
+ resetText();
+ btnBlack.Text = "•";
+
+ //scale
+ if (pictureBox1.Image.Width > pictureBox1.Width || pictureBox1.Image.Height > pictureBox1.Height)
+ {
+ pictureBox1.SizeMode = PictureBoxSizeMode.Zoom;
+ }
+ else
+ {
+ pictureBox1.SizeMode = PictureBoxSizeMode.Normal;
+ }
}
private void btnExit_Click(object sender, EventArgs e)
@@ -80,7 +110,7 @@ private void btnUpload_Click(object sender, EventArgs e)
filename = DateTime.Now.ToString("ddMMyyyyHHmmss") + randomInt.ToString() + ".png";
string tempDirectory = Environment.CurrentDirectory + "\\temp\\";
saveTo = tempDirectory + filename;
- screenshot.Save(saveTo, ImageFormat.Png);
+ pictureBox1.Image.Save(saveTo, ImageFormat.Png);
txtStatus.Text = "Uploading image to SFTP server...";
txtURL.Text = "Please wait...";
upload();
@@ -158,5 +188,156 @@ private void btnNew_Click(object sender, EventArgs e)
main.Show();
this.Hide();
}
+
+ private void btnHL_Click(object sender, EventArgs e)
+ {
+ if (btnPen.BackColor == Color.FromArgb(255, 128, 255, 128))
+ {
+ btnPen.BackColor = Color.White;
+ btnHL.BackColor = Color.FromArgb(255, 128, 255, 128);
+ type = 1;
+ }
+ }
+
+ private void btnPen_Click(object sender, EventArgs e)
+ {
+ if (btnHL.BackColor == Color.FromArgb(255, 128, 255, 128))
+ {
+ btnHL.BackColor = Color.White;
+ btnPen.BackColor = Color.FromArgb(255, 128, 255, 128);
+ type = 0;
+ }
+ }
+
+ public void resetText()
+ {
+ btnBlack.Text = "";
+ btnRed.Text = "";
+ btnOrange.Text = "";
+ btnYellow.Text = "";
+ btnGreen.Text = "";
+ btnBlue.Text = "";
+ btnPurple.Text = "";
+ btnWhite.Text = "";
+ }
+
+ private void btnBlack_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 0, 0, 0), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 0, 0, 0), hlSize);
+ resetText();
+ btnBlack.Text = "•";
+ }
+
+ private void btnRed_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 255, 0, 0), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 255, 0, 0), hlSize);
+ resetText();
+ btnRed.Text = "•";
+ }
+
+ private void btnOrange_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 255, 165, 0), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 255, 165, 0), hlSize);
+ resetText();
+ btnOrange.Text = "•";
+ }
+
+ private void btnYellow_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 255, 255, 0), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 255, 255, 0), hlSize);
+ resetText();
+ btnYellow.Text = "•";
+ }
+
+ private void btnGreen_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 0, 128, 0), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 0, 128, 0), hlSize);
+ resetText();
+ btnGreen.Text = "•";
+ }
+
+ private void btnBlue_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 0, 0, 255), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 0, 0, 255), hlSize);
+ resetText();
+ btnBlue.Text = "•";
+ }
+
+ private void btnPurple_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 128, 0, 128), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 128, 0, 128), hlSize);
+ resetText();
+ btnPurple.Text = "•";
+ }
+
+ private void btnWhite_Click(object sender, EventArgs e)
+ {
+ pen = new Pen(Color.FromArgb(255, 255, 255, 255), penSize);
+ hl = new Pen(Color.FromArgb(hlAlpha, 255, 255, 255), hlSize);
+ resetText();
+ btnWhite.Text = "•";
+ }
+
+ private void pictureBox1_MouseDown(object sender, MouseEventArgs e)
+ {
+ lastPoint = e.Location;
+ mouseDown = true;
+ }
+
+ private void pictureBox1_MouseUp(object sender, MouseEventArgs e)
+ {
+ lastPoint = e.Location;
+ mouseDown = false;
+ }
+
+ private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (mouseDown == true && lastPoint != null)
+ {
+ if (f == 0)
+ {
+ cleanImage = (Image)Main.img.Clone();
+ cleanImage2 = (Image)cleanImage.Clone();
+ f = 1;
+ } else if (f == 2)
+ {
+ cleanImage = (Image)cleanImage2.Clone();
+ }
+ using (Graphics g = Graphics.FromImage(pictureBox1.Image))
+ {
+ switch (type)
+ {
+ case 0:
+ g.DrawLine(pen, lastPoint, e.Location);
+ break;
+ case 1:
+ g.DrawLine(hl, lastPoint, e.Location);
+ break;
+ }
+ g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
+ }
+
+ pictureBox1.Invalidate();
+ lastPoint = e.Location;
+ }
+ }
+
+ private void btnClearpen_Click(object sender, EventArgs e)
+ {
+ pictureBox1.Image = cleanImage;
+ f = 2;
+ }
+
+ private void groupBox2_Enter(object sender, EventArgs e)
+ {
+
+ }
}
}