Esempio n. 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);
            }
        }
Esempio n. 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();
        }
Esempio n. 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);
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }
Esempio n. 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));
        }
Esempio n. 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);
            }
        }
Esempio n. 10
0
 protected override void CreateChildElements()
 {
     base.CreateChildElements();
     this.converter = TypeDescriptor.GetConverter(typeof(Color));
     this.stack     = new StackLayoutElement();
     this.stack.StretchHorizontally = true;
     this.stack.StretchVertically   = true;
     this.stack.Class = "ColorBoxLayout";
     this.stack.FitInAvailableSize     = true;
     this.stack.ShouldHandleMouseInput = false;
     this.Children.Add((RadElement)this.stack);
     this.colorBox          = this.CreateColorBoxElement();
     this.colorDialog       = this.CreateColorDialog();
     this.colorPickerButton = this.CreateColorPickerButtonElement();
     this.WireEvents();
 }
Esempio n. 11
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;
                    }
                }
            }
        }
Esempio n. 12
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;
                    }
                }
            }
        }
Esempio n. 13
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;
 }
Esempio n. 15
0
 private void groupboxColorButtonChangeColorClick(object sender, EventArgs e)
 {
     RadColorDialog colorDialog = new RadColorDialog();
     colorDialog.SelectedColor = groupboxColorPanelColor.BackColor;
     colorDialog.ShowDialog();
     groupboxColorPanelColor.BackColor = colorDialog.SelectedColor;
 }
Esempio n. 16
0
 private void changeColorButtonClicked(object sender, EventArgs e)
 {
     RadColorDialog colorDialog = new RadColorDialog();
     colorDialog.SelectedColor = colorPanel.BackColor;
     colorDialog.ShowDialog();
     colorPanel.BackColor = colorDialog.SelectedColor;
 }