private void ChangeRectColor(object sender, EventArgs e) { var clickedRect = (Panel)sender; ColorDialog1.Color = clickedRect.BackColor; if (ColorDialog1.ShowDialog() == DialogResult.OK) { Color i = ColorDialog1.Color; int j = GetSelectedIndex(); clickedRect.BackColor = i; if (sender.Equals(DrivingLinePanel)) { if (j >= 0) { _renderer.DrivingLineColors[j] = i; } else { return; } } RenderingOptionsChanged(); } }
private void ChangeRectColor(object sender, EventArgs e) { var clickedRect = (Panel)sender; ColorDialog1.Color = clickedRect.BackColor; if (ColorDialog1.ShowDialog() == DialogResult.OK) { var color = ColorDialog1.Color; var j = GetSelectedIndex(); clickedRect.BackColor = color; if (sender.Equals(DrivingLinePanel)) { if (j >= 0) { _replayController.PlayListReplays[j].DrivingLineColor = color; } else { return; } } RenderingOptionsChanged(); } }
private void TextColorButton1_Click(object sender, EventArgs e) { if (ColorDialog1.ShowDialog() == DialogResult.OK) { TextColor = ColorDialog1.Color; } }
private void cmFormColor_Click(object sender, EventArgs e) { ColorDialog1.Color = _LSetup.BackC; ColorDialog1.ShowDialog(); _LSetup.BackC = ColorDialog1.Color; // R3.50 Added. GFX_DrawStats(); }
private void btnforecolor_Click(object sender, EventArgs e) { if (ColorDialog1.ShowDialog() == DialogResult.OK) { btnforecolor.ForeColor = ColorDialog1.Color; EaN13Barcode1.ForeColor = ColorDialog1.Color; } }
private void Button1_Click(object sender, System.EventArgs e) { Color clr; ColorDialog1.ShowDialog(); clr = ColorDialog1.Color; BackColor = clr; }
private void backColorToolStripMenuItem_Click(object sender, EventArgs e) { if (ColorDialog1.ShowDialog() == DialogResult.OK) { menuStrip1.BackColor = ColorDialog1.Color; statusStrip1.BackColor = ColorDialog1.Color; } }
private void cmShadowColor_Click(object sender, EventArgs e) { ColorDialog1.Color = _LSetup.ShadowColor; ColorDialog1.ShowDialog(); _LSetup.ShadowColor = ColorDialog1.Color; GFX_DrawStats(); lbShadowColor.BackColor = _LSetup.ShadowColor; }
private void cmB2_Click(object sender, EventArgs e) { ColorDialog1.Color = _LSetup.B2; ColorDialog1.ShowDialog(); _LSetup.B2 = ColorDialog1.Color; GFX_DrawStats(); lbB2.BackColor = _LSetup.B2; }
private void cmF1_Click(object sender, EventArgs e) { ColorDialog1.Color = _LSetup.F1; ColorDialog1.ShowDialog(); _LSetup.F1 = ColorDialog1.Color; GFX_DrawStats(); lbF1.BackColor = _LSetup.F1; }
private void cmBordPanColor_Click(object sender, EventArgs e) { // R4.40 Added Border box. ColorDialog1.Color = _LSetup.BorderPanelColor; ColorDialog1.ShowDialog(); _LSetup.BorderPanelColor = ColorDialog1.Color; // Call GFX_DrawStats() lbBordPanColor.BackColor = _LSetup.BorderPanelColor; }
private void Color2Button_Click(object sender, EventArgs e) { //Padarome antra mygtuka spalvai pasirinkti if (ColorDialog1.ShowDialog() == DialogResult.OK) { Color2 = ColorDialog1.Color; Color2Button.BackColor = Color2; } }
private void ColorBox_DoubleClick(object sender, EventArgs e) { ColorDialog1.Color = ((Panel)sender).BackColor; if (ColorDialog1.ShowDialog() != DialogResult.Cancel) { ((Panel)sender).BackColor = ColorDialog1.Color; } }
private void PanelClick(object sender, EventArgs e) { Panel clickedPanel = (Panel)sender; ColorDialog1.Color = clickedPanel.BackColor; if (ColorDialog1.ShowDialog() == DialogResult.OK) { clickedPanel.BackColor = ColorDialog1.Color; } }
private void PictureBox3_Click(object sender, EventArgs e) { ColorDialog1.ShowDialog(); if (ColorDialog1.Color == Color.Black) { MessageBox.Show("Black is not allowed", "TeleRad", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } WN_WR = ColorDialog1.Color; PictureBox3.BackColor = WN_WR; GridDesign(); }
private void PageColorToolStripMenuItem_Click(object sender, System.EventArgs e) { try { ColorDialog1.Color = rtbDoc.BackColor; if (ColorDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { rtbDoc.BackColor = ColorDialog1.Color; } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString(), "Error"); } }
private void tspColor_Click(object sender, EventArgs e) { try { ColorDialog1.Color = rtbDoc.ForeColor; if (ColorDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { rtbDoc.SelectionColor = ColorDialog1.Color; } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString(), "Error"); } }
private void FontColorToolStripMenuItem_Click(object sender, EventArgs e) { try { ColorDialog1.Color = rtbDoc.ForeColor; if (ColorDialog1.ShowDialog() == DialogResult.OK) { rtbDoc.SelectionColor = ColorDialog1.Color; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error"); } }
private void PanColor_Click(object sender, EventArgs e) { Label pan = (sender as Label); if (pan == null) { return; } ColorDialog1.FullOpen = true; ColorDialog1.Color = pan.BackColor; if (ColorDialog1.ShowDialog() == DialogResult.OK) { pan.BackColor = ColorDialog1.Color; } }
/*private void PanDefFont_Click(object sender, EventArgs e) * { * if (FontDialog1.ShowDialog() == DialogResult.OK) * { * //FOptions.ChartOptions.DefFont_Name = FontDialog1.Font.Name; * //FOptions.ChartOptions.DefFont_Size = (int)checked((long)Math.Round((double)FontDialog1.Font.Size)); * } * UpdateControls(); * }*/ private void lblColorClick(object sender, MouseEventArgs e) { Label lbl = sender as Label; if (lbl == null) { return; } ColorDialog1.Color = lbl.BackColor; if (ColorDialog1.ShowDialog() == DialogResult.OK) { lbl.BackColor = ColorDialog1.Color; } }
private void Button6_Click(dynamic sender, EventArgs e) { try { ColorDialog1.ShowDialog(); if (sender.Name == "Button6") { Button6.BackColor = ColorDialog1.Color; ControlToEdit._nListViewColumnsColor.Add(Button6.BackColor); inicls.SetIniValue("Alarm Type", "Button6.BackColor", Button6.BackColor.ToArgb().ToString(), path); } if (sender.Name == "Button7") { Button7.BackColor = ColorDialog1.Color; ControlToEdit._nListViewColumnsColor.Add(Button7.BackColor); inicls.SetIniValue("Alarm Type", "Button7.BackColor", Button7.BackColor.ToArgb().ToString(), path); } if (sender.Name == "Button8") { Button8.BackColor = ColorDialog1.Color; ControlToEdit._nListViewColumnsColor.Add(Button8.BackColor); inicls.SetIniValue("Alarm Type", "Button8.BackColor", Button8.BackColor.ToArgb().ToString(), path); } if (sender.Name == "Button9") { Button9.BackColor = ColorDialog1.Color; ControlToEdit._nListViewColumnsColor.Add(Button9.BackColor); inicls.SetIniValue("Alarm Type", "Button9.BackColor", Button9.BackColor.ToArgb().ToString(), path); } if (sender.Name == "Button5") { Button5.BackColor = ColorDialog1.Color; ControlToEdit._nListViewColumnsColor.Add(Button5.BackColor); inicls.SetIniValue("Alarm Type", "BackGround.BackColor", Button5.BackColor.ToArgb().ToString(), path); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
private void btnclr_Click(object sender, System.EventArgs e) { Color clr; ColorDialog1.ShowDialog(); clr = ColorDialog1.Color; try { foreach (Control btn in this.Controls) { //if ((btn.GetType() == Button)) { ((Button)(btn)).BackColor = clr; } } } catch (Exception ex) { MessageBox.Show("Something went wrong please try again"); } }
private void Button1_Click(System.Object sender, System.EventArgs e) { ColorDialog1.ShowDialog(); _s.Color = ColorDialog1.Color; }