Skip to content

Commit

Permalink
Add test color change dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
l0stfake7 committed Apr 3, 2017
1 parent 80de1ab commit 6c7c199
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 38 deletions.
124 changes: 86 additions & 38 deletions AntsAlgorithm/Views/MainForm.Designer.cs

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

13 changes: 13 additions & 0 deletions AntsAlgorithm/Views/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,5 +308,18 @@ private void DrawPath(Point a, Point b)
}

#endregion

private void button1_Click(object sender, EventArgs e)
{
colorDialogTheme = new ColorDialog();
// Keeps the user from selecting a custom color.
colorDialogTheme.AllowFullOpen = false;
// Allows the user to get help. (The default is false.)
colorDialogTheme.ShowHelp = true;

// Update the text box color if the user clicks OK
if (colorDialogTheme.ShowDialog() == DialogResult.OK)
label1.ForeColor = colorDialogTheme.Color;
}
}
}
3 changes: 3 additions & 0 deletions AntsAlgorithm/Views/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,7 @@
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="colorDialogTheme.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>133, 17</value>
</metadata>
</root>

0 comments on commit 6c7c199

Please sign in to comment.