예제 #1
0
 private void Btn_Click(object sender, EventArgs e)
 {
     if (ColorSelector.ShowDialog() == DialogResult.OK)
     {
         Btn.ColorFondo = ColorSelector.Color;
     }
 }
예제 #2
0
        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);
                }
            }
        }
예제 #3
0
        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;
            }
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
    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;
        }
    }
예제 #6
0
        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;
            }
        }
예제 #7
0
        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;
            }
        }
예제 #8
0
        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;
            }
        }
예제 #9
0
        private void hitboxHurtboxSelectorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ColorSelector colorSelector = new ColorSelector();

            colorSelector.ShowDialog();
        }