Beispiel #1
0
 private void radButtonElement49_Click(object sender, EventArgs e)
 {
     using (RadColorDialog dialog = new RadColorDialog())
     {
         dialog.ShowDialog();
     }
 }
        private void radButton17_Click(object sender, EventArgs e)
        {
            RadColorDialog c = new RadColorDialog();

            if (c.ShowDialog() == DialogResult.OK)
            {
                setColor(c.SelectedColor);
            }
        }
Beispiel #3
0
        private void radBtnFontColor_Click(object sender, System.EventArgs e)
        {
            RadColorDialog colorDialog = new RadColorDialog();

            if (colorDialog.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
            {
                this.radRichTextBox1.ChangeTextForeColor(colorDialog.SelectedColor);
            }

            this.radRichTextBox1.Focus();
        }
Beispiel #4
0
        private void radButtonBackColor_Click(object sender, EventArgs e)
        {
            RadColorDialog dialog = new RadColorDialog();

            dialog.SelectedColor = this.radButtonBackColor.ButtonElement.ButtonFillElement.BackColor;
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                this.radButtonBackColor.ButtonElement.ButtonFillElement.BackColor = dialog.SelectedColor;
                this.radGridView1.TableElement.Update(GridUINotifyAction.StateChanged);
            }
        }
Beispiel #5
0
        private void radButtonAlternatingRowColor_Click(object sender, EventArgs e)
        {
            RadColorDialog dialog = new RadColorDialog();

            dialog.SelectedColor = this.radButtonAlternatingRowColor.ButtonElement.ButtonFillElement.BackColor;
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                this.radButtonAlternatingRowColor.ButtonElement.ButtonFillElement.BackColor = dialog.SelectedColor;
                this.radTreeView1.TreeViewElement.AlternatingRowColor = dialog.SelectedColor;
            }
        }
Beispiel #6
0
        private void radButtonWelcomeBackColor_Click(object sender, EventArgs e)
        {
            RadColorDialog radColorDialog = new RadColorDialog();

            if (radColorDialog.ShowDialog() == DialogResult.OK)
            {
                this.radWizard1.WelcomeImageElement.BackColor       = radColorDialog.SelectedColor;
                this.radWizard1.WelcomeImageElement.DrawFill        = true;
                this.radWizard1.WelcomeImageElement.GradientStyle   = GradientStyles.Solid;
                this.radWizard1.WelcomeImageElement.BackgroundImage = null;
            }
        }
Beispiel #7
0
        private void SetCellBackground()
        {
            int            row    = (int)this.radSpinEditorRow.Value;
            int            column = (int)this.radSpinEditorColumn.Value;
            RadColorDialog dialog = new RadColorDialog();

            dialog.SelectedColor = this.radGridView1.Rows[row].Cells[column].Style.BackColor;
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                this.radGridView1.Rows[row].Cells[column].Style.BackColor         = dialog.SelectedColor;
                this.radButtonBackColor.ButtonElement.ButtonFillElement.BackColor = dialog.SelectedColor;
            }
        }
Beispiel #8
0
        protected virtual void ButtonElement_Click(object sender, EventArgs e)
        {
            RadColorDialog colorDialog = new RadColorDialog();

            colorDialog.SelectedColor = this.value;
            DialogResult result = colorDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                string convertedColor = this.converter.ConvertToString(colorDialog.SelectedColor);
                this.Value = (Color)this.converter.ConvertFromString(convertedColor);
            }

            this.OnDialogClosed(new DialogClosedEventArgs(result));
        }
Beispiel #9
0
        private void EventButtonSettingColorSelect(object sender, EventArgs e)
        {
            RadColorDialog dialog = new RadColorDialog();

            if ((StxColor.Text.Length > 0) && (PvSettings.SelectedPage == PgSettingChange))
            {
                dialog.SelectedColor = Manager.CvManager.CvColor.FromString(StxColor.Text).Value;
            }
            DialogResult result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                StxColor.Text = Manager.CvManager.CvColor.ToString(dialog.SelectedColor);
            }
        }
Beispiel #10
0
        private void radButtonElementFontColor_Click(object sender, EventArgs e)
        {
            RadColorDialog radColorDialog = new RadColorDialog();

            if (radColorDialog.ShowDialog() == DialogResult.OK)
            {
                Color color = radColorDialog.SelectedColor;

                foreach (GridViewCellInfo cell in gridView.SelectedCells)
                {
                    GridViewCellStyle style = cell.Style;
                    if (style != null)
                    {
                        style.ForeColor = color;
                    }
                }
            }
        }
Beispiel #11
0
        private void radButtonElementColor_Click(object sender, EventArgs e)
        {
            RadColorDialog radColorDialog = new RadColorDialog();

            if (radColorDialog.ShowDialog() == DialogResult.OK)
            {
                Color color = radColorDialog.SelectedColor;

                foreach (GridViewCellInfo cell in gridView.SelectedCells)
                {
                    GridViewCellStyle style = cell.Style;
                    if (style != null)
                    {
                        style.CustomizeFill = true;
                        style.GradientStyle = GradientStyles.Solid;
                        style.BackColor     = color;
                    }
                }
            }
        }
Beispiel #12
0
 private void MyColorSelectorElement_Click(object sender, EventArgs e)
 {
     using (RadColorDialog dlg = new RadColorDialog())
     {
         if (!string.IsNullOrEmpty(this.Text))
         {
             string[] colors = this.Text.Split(",".ToCharArray());
             if (colors.Length == 3)
             {
                 Color color = GenerateColorByText();
                 dlg.SelectedColor = color;
             }
         }
         if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             this.Text = dlg.SelectedColor.R.ToString() + "," + dlg.SelectedColor.G.ToString() + "," + dlg.SelectedColor.B.ToString();
             ((FillPrimitive)this.TextBoxElement.Children[1]).BackColor = dlg.SelectedColor;
             this.TextBoxElement.TextBoxItem.BackColor = dlg.SelectedColor;
         }
     }
 }
 private void changeClassroomColorButtonClick(object sender, EventArgs e)
 {
     RadColorDialog colorDialog = new RadColorDialog();
     colorDialog.SelectedColor = panelClassroomColor.BackColor;
     colorDialog.ShowDialog();
     panelClassroomColor.BackColor = colorDialog.SelectedColor;
 }
 private void groupboxColorButtonChangeColorClick(object sender, EventArgs e)
 {
     RadColorDialog colorDialog = new RadColorDialog();
     colorDialog.SelectedColor = groupboxColorPanelColor.BackColor;
     colorDialog.ShowDialog();
     groupboxColorPanelColor.BackColor = colorDialog.SelectedColor;
 }
 private void changeColorButtonClicked(object sender, EventArgs e)
 {
     RadColorDialog colorDialog = new RadColorDialog();
     colorDialog.SelectedColor = colorPanel.BackColor;
     colorDialog.ShowDialog();
     colorPanel.BackColor = colorDialog.SelectedColor;
 }