From dad54baa44ed4f5bc31977f54de8ed28a1a3bea5 Mon Sep 17 00:00:00 2001 From: Gaev Kirill Date: Mon, 20 Jan 2020 21:20:11 +0500 Subject: [PATCH] Color picker added Apply btn --- TS SE Tool/FormMethods.cs | 2 +- .../FormAboutBox.Designer.cs} | 6 ++-- .../{AboutBox.cs => Forms/FormAboutBox.cs} | 4 +-- .../FormAboutBox.resx} | 0 TS SE Tool/Forms/FormColorPicker.cs | 36 ++++++++++++------- TS SE Tool/TS SE Tool.csproj | 10 +++--- 6 files changed, 35 insertions(+), 23 deletions(-) rename TS SE Tool/{AboutBox.Designer.cs => Forms/FormAboutBox.Designer.cs} (99%) rename TS SE Tool/{AboutBox.cs => Forms/FormAboutBox.cs} (98%) rename TS SE Tool/{AboutBox.resx => Forms/FormAboutBox.resx} (100%) diff --git a/TS SE Tool/FormMethods.cs b/TS SE Tool/FormMethods.cs index 24ea43a..2e3235f 100644 --- a/TS SE Tool/FormMethods.cs +++ b/TS SE Tool/FormMethods.cs @@ -419,7 +419,7 @@ private void exitToolStripMenuItem_Click(object sender, EventArgs e) //About private void aboutToolStripMenuItem_Click(object sender, EventArgs e) { - AboutBox aboutWindow = new AboutBox(); + FormAboutBox aboutWindow = new FormAboutBox(); aboutWindow.ShowDialog(); } diff --git a/TS SE Tool/AboutBox.Designer.cs b/TS SE Tool/Forms/FormAboutBox.Designer.cs similarity index 99% rename from TS SE Tool/AboutBox.Designer.cs rename to TS SE Tool/Forms/FormAboutBox.Designer.cs index d1c5781..2103759 100644 --- a/TS SE Tool/AboutBox.Designer.cs +++ b/TS SE Tool/Forms/FormAboutBox.Designer.cs @@ -1,6 +1,6 @@ namespace TS_SE_Tool { - partial class AboutBox + partial class FormAboutBox { /// /// Required designer variable. @@ -212,7 +212,7 @@ private void InitializeComponent() this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // - // AboutBox + // FormAboutBox // this.AcceptButton = this.okButton; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -222,7 +222,7 @@ private void InitializeComponent() this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; - this.Name = "AboutBox"; + this.Name = "FormAboutBox"; this.Padding = new System.Windows.Forms.Padding(9); this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; diff --git a/TS SE Tool/AboutBox.cs b/TS SE Tool/Forms/FormAboutBox.cs similarity index 98% rename from TS SE Tool/AboutBox.cs rename to TS SE Tool/Forms/FormAboutBox.cs index 7881e9b..60e421e 100644 --- a/TS SE Tool/AboutBox.cs +++ b/TS SE Tool/Forms/FormAboutBox.cs @@ -25,9 +25,9 @@ limitations under the License. namespace TS_SE_Tool { - partial class AboutBox : Form + partial class FormAboutBox : Form { - public AboutBox() + public FormAboutBox() { InitializeComponent(); this.Icon = Properties.Resources.MainIco; diff --git a/TS SE Tool/AboutBox.resx b/TS SE Tool/Forms/FormAboutBox.resx similarity index 100% rename from TS SE Tool/AboutBox.resx rename to TS SE Tool/Forms/FormAboutBox.resx diff --git a/TS SE Tool/Forms/FormColorPicker.cs b/TS SE Tool/Forms/FormColorPicker.cs index ee01564..fb3d71a 100644 --- a/TS SE Tool/Forms/FormColorPicker.cs +++ b/TS SE Tool/Forms/FormColorPicker.cs @@ -46,6 +46,7 @@ public class FormColorPicker : Form private Panel panel1; private AdobeColors.CMYK _cmyk; private TableLayoutPanel tableLayoutPanel2; + private Button buttonApply; TS_SE_Tool.FormMain MainForm = Application.OpenForms.OfType().Single(); public FormColorPicker(Color starting_color) @@ -82,7 +83,7 @@ public FormColorPicker(Color starting_color) m_lbl_Primary_Color.BackColor = starting_color; m_lbl_Secondary_Color.BackColor = starting_color; - m_rbtn_Hue.Checked = true; + m_rbtn_Hue.Checked = true; } /// @@ -208,8 +209,8 @@ public ColorComponent DrawStyle /// private void InitializeComponent() { - OpenPainter.ColorPicker.AdobeColors.HSB hsb5 = new OpenPainter.ColorPicker.AdobeColors.HSB(); - OpenPainter.ColorPicker.AdobeColors.HSB hsb6 = new OpenPainter.ColorPicker.AdobeColors.HSB(); + OpenPainter.ColorPicker.AdobeColors.HSB hsb1 = new OpenPainter.ColorPicker.AdobeColors.HSB(); + OpenPainter.ColorPicker.AdobeColors.HSB hsb2 = new OpenPainter.ColorPicker.AdobeColors.HSB(); this.m_cmd_OK = new System.Windows.Forms.Button(); this.buttonCancel = new System.Windows.Forms.Button(); this.m_txt_Hue = new System.Windows.Forms.TextBox(); @@ -250,6 +251,7 @@ private void InitializeComponent() this.buttonClearColor = new System.Windows.Forms.Button(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.panel1 = new System.Windows.Forms.Panel(); + this.buttonApply = new System.Windows.Forms.Button(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1.SuspendLayout(); this.panel1.SuspendLayout(); @@ -590,10 +592,10 @@ private void InitializeComponent() // m_ctrl_BigBox // this.m_ctrl_BigBox.BaseColorComponent = OpenPainter.ColorPicker.ColorComponent.Hue; - hsb5.B = 1D; - hsb5.H = 0D; - hsb5.S = 1D; - this.m_ctrl_BigBox.HSB = hsb5; + hsb1.B = 1D; + hsb1.H = 0D; + hsb1.S = 1D; + this.m_ctrl_BigBox.HSB = hsb1; this.m_ctrl_BigBox.Location = new System.Drawing.Point(3, 3); this.m_ctrl_BigBox.Name = "m_ctrl_BigBox"; this.m_ctrl_BigBox.RGB = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); @@ -605,10 +607,10 @@ private void InitializeComponent() // m_ctrl_ThinBox // this.m_ctrl_ThinBox.BaseColorComponent = OpenPainter.ColorPicker.ColorComponent.Hue; - hsb6.B = 1D; - hsb6.H = 0D; - hsb6.S = 1D; - this.m_ctrl_ThinBox.HSB = hsb6; + hsb2.B = 1D; + hsb2.H = 0D; + hsb2.S = 1D; + this.m_ctrl_ThinBox.HSB = hsb2; this.m_ctrl_ThinBox.Location = new System.Drawing.Point(275, 3); this.m_ctrl_ThinBox.Name = "m_ctrl_ThinBox"; this.m_ctrl_ThinBox.RGB = System.Drawing.Color.Red; @@ -619,7 +621,7 @@ private void InitializeComponent() // // buttonClearColor // - this.buttonClearColor.Location = new System.Drawing.Point(436, 26); + this.buttonClearColor.Location = new System.Drawing.Point(439, 12); this.buttonClearColor.Name = "buttonClearColor"; this.buttonClearColor.Size = new System.Drawing.Size(79, 34); this.buttonClearColor.TabIndex = 47; @@ -646,6 +648,7 @@ private void InitializeComponent() // panel1 // this.tableLayoutPanel1.SetColumnSpan(this.panel1, 2); + this.panel1.Controls.Add(this.buttonApply); this.panel1.Controls.Add(this.tableLayoutPanel2); this.panel1.Controls.Add(this.m_ctrl_BigBox); this.panel1.Controls.Add(this.buttonClearColor); @@ -686,6 +689,15 @@ private void InitializeComponent() this.panel1.Size = new System.Drawing.Size(527, 276); this.panel1.TabIndex = 6; // + // buttonApply + // + this.buttonApply.Location = new System.Drawing.Point(439, 53); + this.buttonApply.Name = "buttonApply"; + this.buttonApply.Size = new System.Drawing.Size(79, 23); + this.buttonApply.TabIndex = 49; + this.buttonApply.Text = "Apply"; + this.buttonApply.UseVisualStyleBackColor = true; + // // tableLayoutPanel2 // this.tableLayoutPanel2.ColumnCount = 1; diff --git a/TS SE Tool/TS SE Tool.csproj b/TS SE Tool/TS SE Tool.csproj index e0343a9..191aee3 100644 --- a/TS SE Tool/TS SE Tool.csproj +++ b/TS SE Tool/TS SE Tool.csproj @@ -131,11 +131,11 @@ - + Form - - AboutBox.cs + + FormAboutBox.cs @@ -235,8 +235,8 @@ - - AboutBox.cs + + FormAboutBox.cs FormCheckUpdates.cs