コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
 private void TextColorButton1_Click(object sender, EventArgs e)
 {
     if (ColorDialog1.ShowDialog() == DialogResult.OK)
     {
         TextColor = ColorDialog1.Color;
     }
 }
コード例 #4
0
ファイル: frmLabelSetup.cs プロジェクト: coh2-org/MakoCelo
 private void cmFormColor_Click(object sender, EventArgs e)
 {
     ColorDialog1.Color = _LSetup.BackC;
     ColorDialog1.ShowDialog();
     _LSetup.BackC = ColorDialog1.Color;          // R3.50 Added.
     GFX_DrawStats();
 }
コード例 #5
0
 private void btnforecolor_Click(object sender, EventArgs e)
 {
     if (ColorDialog1.ShowDialog() == DialogResult.OK)
     {
         btnforecolor.ForeColor  = ColorDialog1.Color;
         EaN13Barcode1.ForeColor = ColorDialog1.Color;
     }
 }
コード例 #6
0
ファイル: frmrpsl.cs プロジェクト: hasi94/hotelManagement
        private void Button1_Click(object sender, System.EventArgs e)
        {
            Color clr;

            ColorDialog1.ShowDialog();
            clr       = ColorDialog1.Color;
            BackColor = clr;
        }
コード例 #7
0
 private void backColorToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (ColorDialog1.ShowDialog() == DialogResult.OK)
     {
         menuStrip1.BackColor   = ColorDialog1.Color;
         statusStrip1.BackColor = ColorDialog1.Color;
     }
 }
コード例 #8
0
ファイル: frmLabelSetup.cs プロジェクト: coh2-org/MakoCelo
 private void cmShadowColor_Click(object sender, EventArgs e)
 {
     ColorDialog1.Color = _LSetup.ShadowColor;
     ColorDialog1.ShowDialog();
     _LSetup.ShadowColor = ColorDialog1.Color;
     GFX_DrawStats();
     lbShadowColor.BackColor = _LSetup.ShadowColor;
 }
コード例 #9
0
ファイル: frmLabelSetup.cs プロジェクト: coh2-org/MakoCelo
 private void cmB2_Click(object sender, EventArgs e)
 {
     ColorDialog1.Color = _LSetup.B2;
     ColorDialog1.ShowDialog();
     _LSetup.B2 = ColorDialog1.Color;
     GFX_DrawStats();
     lbB2.BackColor = _LSetup.B2;
 }
コード例 #10
0
ファイル: frmLabelSetup.cs プロジェクト: coh2-org/MakoCelo
 private void cmF1_Click(object sender, EventArgs e)
 {
     ColorDialog1.Color = _LSetup.F1;
     ColorDialog1.ShowDialog();
     _LSetup.F1 = ColorDialog1.Color;
     GFX_DrawStats();
     lbF1.BackColor = _LSetup.F1;
 }
コード例 #11
0
ファイル: frmLabelSetup.cs プロジェクト: coh2-org/MakoCelo
 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;
 }
コード例 #12
0
 private void Color2Button_Click(object sender, EventArgs e)
 {
     //Padarome antra mygtuka spalvai pasirinkti
     if (ColorDialog1.ShowDialog() == DialogResult.OK)
     {
         Color2 = ColorDialog1.Color;
         Color2Button.BackColor = Color2;
     }
 }
コード例 #13
0
        private void ColorBox_DoubleClick(object sender, EventArgs e)
        {
            ColorDialog1.Color = ((Panel)sender).BackColor;

            if (ColorDialog1.ShowDialog() != DialogResult.Cancel)
            {
                ((Panel)sender).BackColor = ColorDialog1.Color;
            }
        }
コード例 #14
0
ファイル: ConfigForm.cs プロジェクト: j-masci/elmanager
        private void PanelClick(object sender, EventArgs e)
        {
            Panel clickedPanel = (Panel)sender;

            ColorDialog1.Color = clickedPanel.BackColor;
            if (ColorDialog1.ShowDialog() == DialogResult.OK)
            {
                clickedPanel.BackColor = ColorDialog1.Color;
            }
        }
コード例 #15
0
 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();
 }
コード例 #16
0
 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");
     }
 }
コード例 #17
0
 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");
     }
 }
コード例 #18
0
ファイル: RichTextEditor.cs プロジェクト: minskowl/MY
 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");
     }
 }
コード例 #19
0
        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;
            }
        }
コード例 #20
0
        /*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;
            }
        }
コード例 #21
0
        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);
            }
        }
コード例 #22
0
ファイル: frmrpsl.cs プロジェクト: hasi94/hotelManagement
        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");
            }
        }
コード例 #23
0
 private void Button1_Click(System.Object sender, System.EventArgs e)
 {
     ColorDialog1.ShowDialog();
     _s.Color = ColorDialog1.Color;
 }