Skip to content

Commit

Permalink
Color picker added Apply btn
Browse files Browse the repository at this point in the history
  • Loading branch information
LIPtoH committed Jan 20, 2020
1 parent 4365c72 commit dad54ba
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 23 deletions.
2 changes: 1 addition & 1 deletion TS SE Tool/FormMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions TS SE Tool/AboutBox.cs → TS SE Tool/Forms/FormAboutBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
File renamed without changes.
36 changes: 24 additions & 12 deletions TS SE Tool/Forms/FormColorPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<TS_SE_Tool.FormMain>().Single();

public FormColorPicker(Color starting_color)
Expand Down Expand Up @@ -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;
}

/// <summary>
Expand Down Expand Up @@ -208,8 +209,8 @@ public ColorComponent DrawStyle
/// </summary>
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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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)))));
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions TS SE Tool/TS SE Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AboutBox.cs">
<Compile Include="Forms\FormAboutBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="AboutBox.Designer.cs">
<DependentUpon>AboutBox.cs</DependentUpon>
<Compile Include="Forms\FormAboutBox.Designer.cs">
<DependentUpon>FormAboutBox.cs</DependentUpon>
</Compile>
<Compile Include="CustomClasses\Cargo.cs" />
<Compile Include="CustomClasses\Country.cs" />
Expand Down Expand Up @@ -235,8 +235,8 @@
<Compile Include="RMcode\PlainTXTResourceManager.cs" />
<Compile Include="RMcode\PlainTXTResourceReader.cs" />
<Compile Include="RMcode\PlainTXTResourceSet.cs" />
<EmbeddedResource Include="AboutBox.resx">
<DependentUpon>AboutBox.cs</DependentUpon>
<EmbeddedResource Include="Forms\FormAboutBox.resx">
<DependentUpon>FormAboutBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\FormCheckUpdates.resx">
<DependentUpon>FormCheckUpdates.cs</DependentUpon>
Expand Down

0 comments on commit dad54ba

Please sign in to comment.