private void Btn_Click(object sender, EventArgs e) { if (ColorSelector.ShowDialog() == DialogResult.OK) { Btn.ColorFondo = ColorSelector.Color; } }
private void ColorBorder_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { var border = sender as Border; if (border == null) { return; } var color = ((SolidColorBrush)border.Background).Color; var colorPicker = new ColorSelector(color) { Owner = this }; var result = colorPicker.ShowDialog(); if (result.HasValue && result.Value) { border.Background = new SolidColorBrush(colorPicker.SelectedColor); if (border.Tag.Equals("Editor")) { CheckScheme(false); } else if (border.Tag.Equals("Recorder")) { CheckRecorderScheme(false); } else { CheckBoardScheme(false); } } }
private void ImageButton_Click(object sender, RoutedEventArgs e) { var colorDialog = new ColorSelector(Settings.Default.TransparentColor, false); colorDialog.Owner = this; var result = colorDialog.ShowDialog(); if (result.HasValue && result.Value) { Settings.Default.TransparentColor = colorDialog.SelectedColor; } }
private void BoardTipColorBorder_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { var colorPicker = new ColorSelector(Settings.Default.BoardColor) { Owner = this }; var result = colorPicker.ShowDialog(); if (result.HasValue && result.Value) { Settings.Default.BoardColor = colorPicker.SelectedColor; } }
private void FillColorButton_Click(object sender, RoutedEventArgs e) { var colorDialog = new ColorSelector(UserSettings.All.InsertFillColor, false) { Owner = this }; var result = colorDialog.ShowDialog(); if (result.HasValue && result.Value) { UserSettings.All.InsertFillColor = colorDialog.SelectedColor; } }
private void ClickColorButton_Click(object sender, RoutedEventArgs e) { var colorDialog = new ColorSelector(Settings.Default.ClickColor) { Owner = this }; var result = colorDialog.ShowDialog(); if (result.HasValue && result.Value) { Settings.Default.ClickColor = colorDialog.SelectedColor; } }
private void TransparentColorButton_Click(object sender, RoutedEventArgs e) { var window = Window.GetWindow(this); var colorDialog = new ColorSelector(UserSettings.All.ChromaKey, false) { Owner = window }; var result = colorDialog.ShowDialog(); if (result == true) { UserSettings.All.ChromaKey = colorDialog.SelectedColor; } }
void chat_ShowColorDialog(Button target, string title) { string parsed = Colors.Parse(target.Text); char col = parsed.Length == 0 ? 'f' : parsed[1]; using (ColorSelector sel = new ColorSelector(title, col)) { DialogResult result = sel.ShowDialog(); if (result == DialogResult.Cancel) { return; } target.Text = Colors.Name(sel.ColorCode); Color textCol; target.BackColor = ColorSelector.LookupColor(sel.ColorCode, out textCol); target.ForeColor = textCol; } }
private void hitboxHurtboxSelectorToolStripMenuItem_Click(object sender, EventArgs e) { ColorSelector colorSelector = new ColorSelector(); colorSelector.ShowDialog(); }