From 35b3fe0f1dc9e095b8260d7e8aacf0bb2ee8150a Mon Sep 17 00:00:00 2001 From: maxluli Date: Wed, 8 Jun 2022 13:25:04 +0200 Subject: [PATCH] Fixed the Ui a bit --- Paint_2/ColorPicker.Designer.cs | 1 + Paint_2/Form1.Designer.cs | 424 ++++++++++++++++++-------------- Paint_2/Form1.cs | 6 +- Paint_2/Form1.resx | 4 +- 4 files changed, 252 insertions(+), 183 deletions(-) diff --git a/Paint_2/ColorPicker.Designer.cs b/Paint_2/ColorPicker.Designer.cs index ad7a56b..a48bc58 100644 --- a/Paint_2/ColorPicker.Designer.cs +++ b/Paint_2/ColorPicker.Designer.cs @@ -67,6 +67,7 @@ // pbxSelectedColor // this.pbxSelectedColor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); + this.pbxSelectedColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.pbxSelectedColor.Location = new System.Drawing.Point(326, 205); this.pbxSelectedColor.Name = "pbxSelectedColor"; this.pbxSelectedColor.Size = new System.Drawing.Size(100, 100); diff --git a/Paint_2/Form1.Designer.cs b/Paint_2/Form1.Designer.cs index 666d37a..9bb4157 100644 --- a/Paint_2/Form1.Designer.cs +++ b/Paint_2/Form1.Designer.cs @@ -33,14 +33,11 @@ this.btnSave = new System.Windows.Forms.Button(); this.canvas = new System.Windows.Forms.PictureBox(); this.btnSaveCopy = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); this.lblSelectedColor = new System.Windows.Forms.Label(); this.panelFile = new System.Windows.Forms.Panel(); - this.label10 = new System.Windows.Forms.Label(); this.panelDrawing = new System.Windows.Forms.Panel(); this.lblHeight = new System.Windows.Forms.Label(); this.lblWidth = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); this.panelSelectedColor = new System.Windows.Forms.Panel(); this.btnSelectedColor = new System.Windows.Forms.Button(); this.label14 = new System.Windows.Forms.Label(); @@ -50,23 +47,29 @@ this.label15 = new System.Windows.Forms.Label(); this.tmrRefresh = new System.Windows.Forms.Timer(this.components); this.nupPencilWidth = new System.Windows.Forms.NumericUpDown(); - this.label9 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); this.btnColorHistory4 = new System.Windows.Forms.Button(); this.btnColorHistory3 = new System.Windows.Forms.Button(); this.btnColorHistory2 = new System.Windows.Forms.Button(); this.label4 = new System.Windows.Forms.Label(); this.btnColorHistory1 = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button(); - this.label13 = new System.Windows.Forms.Label(); this.panelTools = new System.Windows.Forms.Panel(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.btnRandomColor = new System.Windows.Forms.Button(); this.btnColorPicker = new System.Windows.Forms.Button(); this.btnRedo = new System.Windows.Forms.Button(); this.btnUndo = new System.Windows.Forms.Button(); - this.btnRandomColor = new System.Windows.Forms.Button(); - this.label2 = new System.Windows.Forms.Label(); this.lsbTools = new System.Windows.Forms.ListBox(); - this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.button1 = new System.Windows.Forms.Button(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.label3 = new System.Windows.Forms.Label(); + this.btnLoadFile = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.canvas)).BeginInit(); this.panelFile.SuspendLayout(); this.panelDrawing.SuspendLayout(); @@ -74,17 +77,22 @@ this.panelHoverColor.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nupPencilWidth)).BeginInit(); this.panelTools.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel3.SuspendLayout(); this.SuspendLayout(); // // tbxProjectName // this.tbxProjectName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.tbxProjectName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbxProjectName.Font = new System.Drawing.Font("Verdana", 15F); this.tbxProjectName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.tbxProjectName.Location = new System.Drawing.Point(10, 24); + this.tbxProjectName.Location = new System.Drawing.Point(11, 9); this.tbxProjectName.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.tbxProjectName.Name = "tbxProjectName"; - this.tbxProjectName.Size = new System.Drawing.Size(230, 27); + this.tbxProjectName.Size = new System.Drawing.Size(253, 38); this.tbxProjectName.TabIndex = 0; this.tbxProjectName.Text = "Untitled Project"; // @@ -93,10 +101,10 @@ this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnSave.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.btnSave.Location = new System.Drawing.Point(244, 18); + this.btnSave.Location = new System.Drawing.Point(269, 8); this.btnSave.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.btnSave.Name = "btnSave"; - this.btnSave.Size = new System.Drawing.Size(75, 38); + this.btnSave.Size = new System.Drawing.Size(82, 39); this.btnSave.TabIndex = 1; this.btnSave.Text = "Save"; this.btnSave.UseVisualStyleBackColor = false; @@ -105,10 +113,10 @@ // canvas // this.canvas.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.canvas.Location = new System.Drawing.Point(12, 73); + this.canvas.Location = new System.Drawing.Point(11, 72); this.canvas.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.canvas.Name = "canvas"; - this.canvas.Size = new System.Drawing.Size(909, 527); + this.canvas.Size = new System.Drawing.Size(900, 500); this.canvas.TabIndex = 2; this.canvas.TabStop = false; this.canvas.MouseDown += new System.Windows.Forms.MouseEventHandler(this.canvas_MouseDown); @@ -119,94 +127,64 @@ this.btnSaveCopy.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.btnSaveCopy.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnSaveCopy.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.btnSaveCopy.Location = new System.Drawing.Point(323, 18); + this.btnSaveCopy.Location = new System.Drawing.Point(355, 8); this.btnSaveCopy.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); this.btnSaveCopy.Name = "btnSaveCopy"; - this.btnSaveCopy.Size = new System.Drawing.Size(156, 38); + this.btnSaveCopy.Size = new System.Drawing.Size(135, 39); this.btnSaveCopy.TabIndex = 2; this.btnSaveCopy.Text = "Save a copy"; this.btnSaveCopy.UseVisualStyleBackColor = false; this.btnSaveCopy.Click += new System.EventHandler(this.btnSaveCopy_Click); // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(6, 22); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(110, 22); - this.label1.TabIndex = 5; - this.label1.Text = "Dimensions"; - // // lblSelectedColor // this.lblSelectedColor.AutoSize = true; - this.lblSelectedColor.Location = new System.Drawing.Point(6, 22); + this.lblSelectedColor.Location = new System.Drawing.Point(7, 28); this.lblSelectedColor.Name = "lblSelectedColor"; - this.lblSelectedColor.Size = new System.Drawing.Size(290, 22); + this.lblSelectedColor.Size = new System.Drawing.Size(288, 20); this.lblSelectedColor.TabIndex = 1; this.lblSelectedColor.Text = "Hex:FFFFFF R:255 G:255 B:255"; // // panelFile // this.panelFile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.panelFile.Controls.Add(this.label10); + this.panelFile.Controls.Add(this.btnLoadFile); this.panelFile.Controls.Add(this.btnSaveCopy); this.panelFile.Controls.Add(this.tbxProjectName); this.panelFile.Controls.Add(this.btnSave); - this.panelFile.Location = new System.Drawing.Point(12, 7); + this.panelFile.Location = new System.Drawing.Point(12, 6); this.panelFile.Name = "panelFile"; - this.panelFile.Size = new System.Drawing.Size(493, 60); + this.panelFile.Size = new System.Drawing.Size(644, 55); this.panelFile.TabIndex = 8; // - // label10 - // - this.label10.AutoSize = true; - this.label10.Font = new System.Drawing.Font("Cascadia Code", 10F); - this.label10.Location = new System.Drawing.Point(6, 0); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(50, 22); - this.label10.TabIndex = 29; - this.label10.Text = "File"; - // // panelDrawing // + this.panelDrawing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.panelDrawing.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); this.panelDrawing.Controls.Add(this.lblHeight); - this.panelDrawing.Controls.Add(this.label1); this.panelDrawing.Controls.Add(this.lblWidth); - this.panelDrawing.Controls.Add(this.label11); - this.panelDrawing.Location = new System.Drawing.Point(511, 7); + this.panelDrawing.Location = new System.Drawing.Point(829, 580); this.panelDrawing.Name = "panelDrawing"; - this.panelDrawing.Size = new System.Drawing.Size(228, 47); + this.panelDrawing.Size = new System.Drawing.Size(82, 72); this.panelDrawing.TabIndex = 30; // // lblHeight // this.lblHeight.AutoSize = true; - this.lblHeight.Location = new System.Drawing.Point(100, 24); + this.lblHeight.Location = new System.Drawing.Point(3, 40); this.lblHeight.Name = "lblHeight"; - this.lblHeight.Size = new System.Drawing.Size(130, 22); + this.lblHeight.Size = new System.Drawing.Size(74, 20); this.lblHeight.TabIndex = 34; - this.lblHeight.Text = "Height: 2000"; + this.lblHeight.Text = "H:2000"; // // lblWidth // this.lblWidth.AutoSize = true; - this.lblWidth.Location = new System.Drawing.Point(100, 6); + this.lblWidth.Location = new System.Drawing.Point(3, 8); this.lblWidth.Name = "lblWidth"; - this.lblWidth.Size = new System.Drawing.Size(120, 22); + this.lblWidth.Size = new System.Drawing.Size(77, 20); this.lblWidth.TabIndex = 33; - this.lblWidth.Text = "width: 2000"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Font = new System.Drawing.Font("Cascadia Code", 10F); - this.label11.Location = new System.Drawing.Point(6, 0); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(80, 22); - this.label11.TabIndex = 29; - this.label11.Text = "Drawing"; + this.lblWidth.Text = "W:2000"; // // panelSelectedColor // @@ -215,9 +193,9 @@ this.panelSelectedColor.Controls.Add(this.btnSelectedColor); this.panelSelectedColor.Controls.Add(this.lblSelectedColor); this.panelSelectedColor.Controls.Add(this.label14); - this.panelSelectedColor.Location = new System.Drawing.Point(382, 645); + this.panelSelectedColor.Location = new System.Drawing.Point(424, 580); this.panelSelectedColor.Name = "panelSelectedColor"; - this.panelSelectedColor.Size = new System.Drawing.Size(363, 50); + this.panelSelectedColor.Size = new System.Drawing.Size(399, 72); this.panelSelectedColor.TabIndex = 31; // // btnSelectedColor @@ -225,9 +203,9 @@ this.btnSelectedColor.BackColor = System.Drawing.Color.Green; this.btnSelectedColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnSelectedColor.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnSelectedColor.Location = new System.Drawing.Point(302, -2); + this.btnSelectedColor.Location = new System.Drawing.Point(327, 6); this.btnSelectedColor.Name = "btnSelectedColor"; - this.btnSelectedColor.Size = new System.Drawing.Size(55, 55); + this.btnSelectedColor.Size = new System.Drawing.Size(60, 60); this.btnSelectedColor.TabIndex = 31; this.btnSelectedColor.UseVisualStyleBackColor = false; // @@ -235,7 +213,7 @@ // this.label14.AutoSize = true; this.label14.Font = new System.Drawing.Font("Cascadia Code", 10F); - this.label14.Location = new System.Drawing.Point(6, 0); + this.label14.Location = new System.Drawing.Point(7, 6); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(150, 22); this.label14.TabIndex = 29; @@ -248,9 +226,9 @@ this.panelHoverColor.Controls.Add(this.btnHoveringColor); this.panelHoverColor.Controls.Add(this.lblHoveringColor); this.panelHoverColor.Controls.Add(this.label15); - this.panelHoverColor.Location = new System.Drawing.Point(12, 645); + this.panelHoverColor.Location = new System.Drawing.Point(11, 580); this.panelHoverColor.Name = "panelHoverColor"; - this.panelHoverColor.Size = new System.Drawing.Size(370, 50); + this.panelHoverColor.Size = new System.Drawing.Size(407, 72); this.panelHoverColor.TabIndex = 32; // // btnHoveringColor @@ -258,18 +236,18 @@ this.btnHoveringColor.BackColor = System.Drawing.Color.Green; this.btnHoveringColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnHoveringColor.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnHoveringColor.Location = new System.Drawing.Point(309, -2); + this.btnHoveringColor.Location = new System.Drawing.Point(335, 6); this.btnHoveringColor.Name = "btnHoveringColor"; - this.btnHoveringColor.Size = new System.Drawing.Size(55, 55); + this.btnHoveringColor.Size = new System.Drawing.Size(60, 60); this.btnHoveringColor.TabIndex = 30; this.btnHoveringColor.UseVisualStyleBackColor = false; // // lblHoveringColor // this.lblHoveringColor.AutoSize = true; - this.lblHoveringColor.Location = new System.Drawing.Point(6, 22); + this.lblHoveringColor.Location = new System.Drawing.Point(8, 28); this.lblHoveringColor.Name = "lblHoveringColor"; - this.lblHoveringColor.Size = new System.Drawing.Size(290, 22); + this.lblHoveringColor.Size = new System.Drawing.Size(288, 20); this.lblHoveringColor.TabIndex = 1; this.lblHoveringColor.Text = "Hex:FFFFFF R:255 G:255 B:255"; // @@ -277,7 +255,7 @@ // this.label15.AutoSize = true; this.label15.Font = new System.Drawing.Font("Cascadia Code", 10F); - this.label15.Location = new System.Drawing.Point(6, 0); + this.label15.Location = new System.Drawing.Point(8, 6); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(150, 22); this.label15.TabIndex = 29; @@ -292,16 +270,16 @@ // this.nupPencilWidth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.nupPencilWidth.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.nupPencilWidth.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.nupPencilWidth.Font = new System.Drawing.Font("Cascadia Code", 15F); this.nupPencilWidth.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.nupPencilWidth.Location = new System.Drawing.Point(9, 161); + this.nupPencilWidth.Location = new System.Drawing.Point(117, 161); this.nupPencilWidth.Maximum = new decimal(new int[] { 255, 0, 0, 0}); this.nupPencilWidth.Name = "nupPencilWidth"; - this.nupPencilWidth.Size = new System.Drawing.Size(141, 21); + this.nupPencilWidth.Size = new System.Drawing.Size(71, 33); this.nupPencilWidth.TabIndex = 17; this.nupPencilWidth.Value = new decimal(new int[] { 10, @@ -310,34 +288,14 @@ 0}); this.nupPencilWidth.ValueChanged += new System.EventHandler(this.nupPencilWidth_ValueChanged); // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.Location = new System.Drawing.Point(7, 142); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(99, 20); - this.label9.TabIndex = 19; - this.label9.Text = "Tool width"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label5.Location = new System.Drawing.Point(10, 73); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(90, 20); - this.label5.TabIndex = 9; - this.label5.Text = "Set color"; - // // btnColorHistory4 // this.btnColorHistory4.BackColor = System.Drawing.Color.Red; this.btnColorHistory4.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnColorHistory4.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnColorHistory4.Location = new System.Drawing.Point(101, 45); + this.btnColorHistory4.Location = new System.Drawing.Point(148, 26); this.btnColorHistory4.Name = "btnColorHistory4"; - this.btnColorHistory4.Size = new System.Drawing.Size(25, 25); + this.btnColorHistory4.Size = new System.Drawing.Size(40, 40); this.btnColorHistory4.TabIndex = 4; this.btnColorHistory4.UseVisualStyleBackColor = false; this.btnColorHistory4.Click += new System.EventHandler(this.BtnColor_Click); @@ -347,9 +305,9 @@ this.btnColorHistory3.BackColor = System.Drawing.Color.Red; this.btnColorHistory3.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnColorHistory3.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnColorHistory3.Location = new System.Drawing.Point(70, 45); + this.btnColorHistory3.Location = new System.Drawing.Point(102, 26); this.btnColorHistory3.Name = "btnColorHistory3"; - this.btnColorHistory3.Size = new System.Drawing.Size(25, 25); + this.btnColorHistory3.Size = new System.Drawing.Size(40, 40); this.btnColorHistory3.TabIndex = 3; this.btnColorHistory3.UseVisualStyleBackColor = false; this.btnColorHistory3.Click += new System.EventHandler(this.BtnColor_Click); @@ -359,9 +317,9 @@ this.btnColorHistory2.BackColor = System.Drawing.Color.Red; this.btnColorHistory2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnColorHistory2.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnColorHistory2.Location = new System.Drawing.Point(39, 45); + this.btnColorHistory2.Location = new System.Drawing.Point(56, 26); this.btnColorHistory2.Name = "btnColorHistory2"; - this.btnColorHistory2.Size = new System.Drawing.Size(25, 25); + this.btnColorHistory2.Size = new System.Drawing.Size(40, 40); this.btnColorHistory2.TabIndex = 2; this.btnColorHistory2.UseVisualStyleBackColor = false; this.btnColorHistory2.Click += new System.EventHandler(this.BtnColor_Click); @@ -370,7 +328,7 @@ // this.label4.AutoSize = true; this.label4.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label4.Location = new System.Drawing.Point(10, 25); + this.label4.Location = new System.Drawing.Point(7, 3); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(135, 20); this.label4.TabIndex = 1; @@ -381,9 +339,9 @@ this.btnColorHistory1.BackColor = System.Drawing.Color.Green; this.btnColorHistory1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; this.btnColorHistory1.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnColorHistory1.Location = new System.Drawing.Point(10, 45); + this.btnColorHistory1.Location = new System.Drawing.Point(10, 26); this.btnColorHistory1.Name = "btnColorHistory1"; - this.btnColorHistory1.Size = new System.Drawing.Size(25, 25); + this.btnColorHistory1.Size = new System.Drawing.Size(40, 40); this.btnColorHistory1.TabIndex = 0; this.btnColorHistory1.UseVisualStyleBackColor = false; this.btnColorHistory1.Click += new System.EventHandler(this.BtnColor_Click); @@ -393,60 +351,65 @@ this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnClear.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.btnClear.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.btnClear.Font = new System.Drawing.Font("Cascadia Code", 10.5F); + this.btnClear.Font = new System.Drawing.Font("Cascadia Code", 10.2F); this.btnClear.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.btnClear.Location = new System.Drawing.Point(942, 645); + this.btnClear.Location = new System.Drawing.Point(6, 40); this.btnClear.Name = "btnClear"; - this.btnClear.Size = new System.Drawing.Size(163, 48); + this.btnClear.Size = new System.Drawing.Size(190, 29); this.btnClear.TabIndex = 27; this.btnClear.Text = "Clear"; this.btnClear.UseVisualStyleBackColor = false; this.btnClear.Click += new System.EventHandler(this.btnClear_Click); // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Cascadia Code", 10F); - this.label13.Location = new System.Drawing.Point(6, 0); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(60, 22); - this.label13.TabIndex = 29; - this.label13.Text = "Tools"; - // // panelTools // this.panelTools.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panelTools.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); - this.panelTools.Controls.Add(this.btnColorPicker); - this.panelTools.Controls.Add(this.btnRedo); - this.panelTools.Controls.Add(this.btnUndo); + this.panelTools.Controls.Add(this.pictureBox1); this.panelTools.Controls.Add(this.btnRandomColor); - this.panelTools.Controls.Add(this.label2); - this.panelTools.Controls.Add(this.lsbTools); - this.panelTools.Controls.Add(this.label13); + this.panelTools.Controls.Add(this.btnColorPicker); this.panelTools.Controls.Add(this.btnColorHistory1); this.panelTools.Controls.Add(this.label4); this.panelTools.Controls.Add(this.btnColorHistory2); this.panelTools.Controls.Add(this.btnColorHistory3); this.panelTools.Controls.Add(this.btnColorHistory4); - this.panelTools.Controls.Add(this.label5); - this.panelTools.Controls.Add(this.label9); this.panelTools.Controls.Add(this.nupPencilWidth); - this.panelTools.Location = new System.Drawing.Point(943, 7); + this.panelTools.Location = new System.Drawing.Point(920, 6); this.panelTools.Name = "panelTools"; - this.panelTools.Size = new System.Drawing.Size(163, 593); + this.panelTools.Size = new System.Drawing.Size(200, 204); this.panelTools.TabIndex = 31; // + // pictureBox1 + // + this.pictureBox1.Location = new System.Drawing.Point(10, 161); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(101, 33); + this.pictureBox1.TabIndex = 35; + this.pictureBox1.TabStop = false; + // + // btnRandomColor + // + this.btnRandomColor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); + this.btnRandomColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.btnRandomColor.Font = new System.Drawing.Font("Cascadia Code", 10.2F); + this.btnRandomColor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); + this.btnRandomColor.Location = new System.Drawing.Point(11, 113); + this.btnRandomColor.Name = "btnRandomColor"; + this.btnRandomColor.Size = new System.Drawing.Size(178, 33); + this.btnRandomColor.TabIndex = 34; + this.btnRandomColor.Text = "Random "; + this.btnRandomColor.UseVisualStyleBackColor = false; + this.btnRandomColor.Click += new System.EventHandler(this.btnRandomColor_Click); + // // btnColorPicker // - this.btnColorPicker.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnColorPicker.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.btnColorPicker.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.btnColorPicker.Font = new System.Drawing.Font("Cascadia Code", 10.5F); + this.btnColorPicker.Font = new System.Drawing.Font("Cascadia Code", 10.2F); this.btnColorPicker.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.btnColorPicker.Location = new System.Drawing.Point(9, 92); + this.btnColorPicker.Location = new System.Drawing.Point(10, 72); this.btnColorPicker.Name = "btnColorPicker"; - this.btnColorPicker.Size = new System.Drawing.Size(141, 31); + this.btnColorPicker.Size = new System.Drawing.Size(177, 35); this.btnColorPicker.TabIndex = 33; this.btnColorPicker.Text = "ColorPicker"; this.btnColorPicker.UseVisualStyleBackColor = false; @@ -456,11 +419,11 @@ // this.btnRedo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.btnRedo.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.btnRedo.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnRedo.Font = new System.Drawing.Font("Cascadia Code", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnRedo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.btnRedo.Location = new System.Drawing.Point(85, 547); + this.btnRedo.Location = new System.Drawing.Point(6, 6); this.btnRedo.Name = "btnRedo"; - this.btnRedo.Size = new System.Drawing.Size(75, 43); + this.btnRedo.Size = new System.Drawing.Size(90, 28); this.btnRedo.TabIndex = 36; this.btnRedo.Text = "Redo"; this.btnRedo.UseVisualStyleBackColor = false; @@ -470,71 +433,167 @@ // this.btnUndo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.btnUndo.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.btnUndo.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnUndo.Font = new System.Drawing.Font("Cascadia Code", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnUndo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.btnUndo.Location = new System.Drawing.Point(4, 547); + this.btnUndo.Location = new System.Drawing.Point(106, 6); this.btnUndo.Name = "btnUndo"; - this.btnUndo.Size = new System.Drawing.Size(75, 43); + this.btnUndo.Size = new System.Drawing.Size(90, 28); this.btnUndo.TabIndex = 35; this.btnUndo.Text = "Undo"; this.btnUndo.UseVisualStyleBackColor = false; this.btnUndo.Click += new System.EventHandler(this.btnUndo_Click); // - // btnRandomColor - // - this.btnRandomColor.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); - this.btnRandomColor.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.btnRandomColor.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnRandomColor.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); - this.btnRandomColor.Location = new System.Drawing.Point(131, 45); - this.btnRandomColor.Name = "btnRandomColor"; - this.btnRandomColor.Size = new System.Drawing.Size(25, 25); - this.btnRandomColor.TabIndex = 34; - this.btnRandomColor.Text = "Rnd"; - this.btnRandomColor.UseVisualStyleBackColor = false; - this.btnRandomColor.Click += new System.EventHandler(this.btnRandomColor_Click); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label2.Location = new System.Drawing.Point(6, 181); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(54, 20); - this.label2.TabIndex = 33; - this.label2.Text = "Tools"; - // // lsbTools // this.lsbTools.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); this.lsbTools.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lsbTools.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); this.lsbTools.FormattingEnabled = true; - this.lsbTools.ItemHeight = 22; - this.lsbTools.Location = new System.Drawing.Point(10, 204); + this.lsbTools.ItemHeight = 20; + this.lsbTools.Location = new System.Drawing.Point(10, 33); this.lsbTools.Name = "lsbTools"; - this.lsbTools.Size = new System.Drawing.Size(141, 156); + this.lsbTools.Size = new System.Drawing.Size(179, 122); this.lsbTools.TabIndex = 32; this.lsbTools.SelectedIndexChanged += new System.EventHandler(this.lsbTools_SelectedIndexChanged); // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); + this.panel1.Controls.Add(this.btnClear); + this.panel1.Controls.Add(this.btnRedo); + this.panel1.Controls.Add(this.btnUndo); + this.panel1.Location = new System.Drawing.Point(920, 580); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(200, 72); + this.panel1.TabIndex = 35; + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); + this.panel2.Controls.Add(this.label1); + this.panel2.Controls.Add(this.button2); + this.panel2.Controls.Add(this.lsbTools); + this.panel2.Location = new System.Drawing.Point(920, 216); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(200, 175); + this.panel2.TabIndex = 36; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label1.Location = new System.Drawing.Point(8, 10); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(108, 20); + this.label1.TabIndex = 36; + this.label1.Text = "Paint tools"; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button2.Font = new System.Drawing.Font("Cascadia Code", 10.2F); + this.button2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); + this.button2.Location = new System.Drawing.Point(11, -193); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(177, 35); + this.button2.TabIndex = 33; + this.button2.Text = "ColorPicker"; + this.button2.UseVisualStyleBackColor = false; + // + // panel3 + // + this.panel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(31)))), ((int)(((byte)(31))))); + this.panel3.Controls.Add(this.label3); + this.panel3.Controls.Add(this.label2); + this.panel3.Controls.Add(this.button1); + this.panel3.Controls.Add(this.listBox1); + this.panel3.Location = new System.Drawing.Point(920, 397); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(200, 175); + this.panel3.TabIndex = 37; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label2.Location = new System.Drawing.Point(8, 10); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(0, 20); + this.label2.TabIndex = 36; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.button1.Font = new System.Drawing.Font("Cascadia Code", 10.2F); + this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); + this.button1.Location = new System.Drawing.Point(11, -193); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(177, 35); + this.button1.TabIndex = 33; + this.button1.Text = "ColorPicker"; + this.button1.UseVisualStyleBackColor = false; + // + // listBox1 + // + this.listBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); + this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.listBox1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); + this.listBox1.FormattingEnabled = true; + this.listBox1.ItemHeight = 20; + this.listBox1.Location = new System.Drawing.Point(10, 33); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(179, 122); + this.listBox1.TabIndex = 32; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Cascadia Code", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label3.Location = new System.Drawing.Point(8, 10); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(135, 20); + this.label3.TabIndex = 37; + this.label3.Text = "Drawing Layers"; + // + // btnLoadFile + // + this.btnLoadFile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); + this.btnLoadFile.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.btnLoadFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); + this.btnLoadFile.Location = new System.Drawing.Point(494, 8); + this.btnLoadFile.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3); + this.btnLoadFile.Name = "btnLoadFile"; + this.btnLoadFile.Size = new System.Drawing.Size(143, 39); + this.btnLoadFile.TabIndex = 3; + this.btnLoadFile.Text = "Load Project"; + this.btnLoadFile.UseVisualStyleBackColor = false; + // // PaintForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F); + this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18))))); - this.ClientSize = new System.Drawing.Size(1111, 702); + this.ClientSize = new System.Drawing.Size(1132, 660); + this.Controls.Add(this.panel3); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); this.Controls.Add(this.panelHoverColor); this.Controls.Add(this.panelSelectedColor); this.Controls.Add(this.panelTools); this.Controls.Add(this.panelDrawing); this.Controls.Add(this.panelFile); - this.Controls.Add(this.btnClear); this.Controls.Add(this.canvas); this.DoubleBuffered = true; - this.Font = new System.Drawing.Font("Cascadia Code", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Font = new System.Drawing.Font("Verdana", 10.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(214)))), ((int)(((byte)(214)))), ((int)(((byte)(214))))); this.Margin = new System.Windows.Forms.Padding(4); - this.MinimumSize = new System.Drawing.Size(1111, 702); this.Name = "PaintForm"; this.Text = "Paint 2"; this.Load += new System.EventHandler(this.PaintForm_Load); @@ -551,6 +610,12 @@ ((System.ComponentModel.ISupportInitialize)(this.nupPencilWidth)).EndInit(); this.panelTools.ResumeLayout(false); this.panelTools.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); this.ResumeLayout(false); } @@ -561,12 +626,9 @@ private System.Windows.Forms.Button btnSave; private System.Windows.Forms.PictureBox canvas; private System.Windows.Forms.Button btnSaveCopy; - private System.Windows.Forms.Label label1; private System.Windows.Forms.Label lblSelectedColor; private System.Windows.Forms.Panel panelFile; - private System.Windows.Forms.Label label10; private System.Windows.Forms.Panel panelDrawing; - private System.Windows.Forms.Label label11; private System.Windows.Forms.Panel panelSelectedColor; private System.Windows.Forms.Label label14; private System.Windows.Forms.Panel panelHoverColor; @@ -576,17 +638,13 @@ private System.Windows.Forms.Button btnHoveringColor; private System.Windows.Forms.Button btnSelectedColor; private System.Windows.Forms.NumericUpDown nupPencilWidth; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.Label label5; private System.Windows.Forms.Button btnColorHistory4; private System.Windows.Forms.Button btnColorHistory3; private System.Windows.Forms.Button btnColorHistory2; private System.Windows.Forms.Label label4; private System.Windows.Forms.Button btnColorHistory1; private System.Windows.Forms.Button btnClear; - private System.Windows.Forms.Label label13; private System.Windows.Forms.Panel panelTools; - private System.Windows.Forms.Label label2; private System.Windows.Forms.ListBox lsbTools; private System.Windows.Forms.Label lblHeight; private System.Windows.Forms.Label lblWidth; @@ -594,7 +652,17 @@ private System.Windows.Forms.Button btnUndo; private System.Windows.Forms.Button btnRedo; private System.Windows.Forms.Button btnColorPicker; - private System.Windows.Forms.ColorDialog colorDialog1; + private System.Windows.Forms.PictureBox pictureBox1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Button btnLoadFile; } } diff --git a/Paint_2/Form1.cs b/Paint_2/Form1.cs index d5e36f6..88ec227 100644 --- a/Paint_2/Form1.cs +++ b/Paint_2/Form1.cs @@ -20,7 +20,7 @@ namespace Paint_2 { public partial class PaintForm : Form { - const int WINDOW_OFFSET = 10; + const int WINDOW_OFFSET = 15; const string DEFAULT_FILEPATH = "C:/Paint2/Drawings/"; public Sketch sketch; List toolList; @@ -111,8 +111,8 @@ namespace Paint_2 lsbTools.DataSource = toolList; - lblWidth.Text = "Width: " + canvas.Width.ToString(); - lblHeight.Text = "Height: " + canvas.Height.ToString(); + lblWidth.Text = "W: " + canvas.Width.ToString(); + lblHeight.Text = "H: " + canvas.Height.ToString(); if (randomColor) { diff --git a/Paint_2/Form1.resx b/Paint_2/Form1.resx index a28610b..9f66eb4 100644 --- a/Paint_2/Form1.resx +++ b/Paint_2/Form1.resx @@ -120,7 +120,7 @@ 17, 17 - - 128, 17 + + 47 \ No newline at end of file