private void ColorPickerButton_Click(object sender, EventArgs e) { ColorDialog dialog = new ColorDialog(); dialog.Color = CurrentColor; dialog.FullOpen = true; dialog.CustomColors = ColorPickerCache.GetDialogList(); var result = dialog.ShowDialog(); CurrentColor = dialog.Color; UpdateColor(); }
public Form1() { Form.CheckForIllegalCrossThreadCalls = false; InitializeComponent(); CurrentLink = new ChainLink(0.2); ColorPickerCache.Add(Color.FromArgb(238, 238, 238)); ColorPickerCache.Add(Color.FromArgb(0, 168, 254)); ColorPickerCache.Add(Color.FromArgb(68, 68, 68)); ColorPickerCache.Add(Color.FromArgb(220, 55, 55)); PathBox.Text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures), "Linkies"); }
public void UpdateColor() { ColorDisplay.BackColor = CurrentColor; ColorPickerCache.Add(CurrentColor); }