Interaction logic for ColorSelector.xaml
Наследование: System.Windows.Window
Пример #1
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;
        }
Пример #2
0
        private void CustomColorStackPanel_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var colorPicker = new ColorSelector(Properties.Settings.Default.CreateLastSelectedColor, false);
            colorPicker.Owner = this;
            var result = colorPicker.ShowDialog();

            if (result.HasValue && result.Value)
            {
                Properties.Settings.Default.CreateLastSelectedColor = colorPicker.SelectedColor;

                BackCombo.SelectedIndex = 4;
            }
        }
Пример #3
0
        private void CustomColorStackPanel_MouseDown(object sender, MouseButtonEventArgs e)
        {
            var colorPicker = new ColorSelector(Properties.Settings.Default.CreateLastSelectedColor, false);

            colorPicker.Owner = this;
            var result = colorPicker.ShowDialog();

            if (result.HasValue && result.Value)
            {
                Properties.Settings.Default.CreateLastSelectedColor = colorPicker.SelectedColor;

                BackCombo.SelectedIndex = 4;
            }
        }
Пример #4
0
        private void FillColorButton_Click(object sender, RoutedEventArgs e)
        {
            var colorDialog = new ColorSelector(Settings.Default.InsertFillColor, false);
            colorDialog.Owner = this;
            var result = colorDialog.ShowDialog();

            if (result.HasValue && result.Value)
            {
                Settings.Default.InsertFillColor = colorDialog.SelectedColor;
            }
        }
Пример #5
0
        private void NewAnimationBackgroundColor_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var colorPicker = new ColorSelector(Settings.Default.NewImageColor);
            colorPicker.Owner = this;
            var result = colorPicker.ShowDialog();

            if (result.HasValue && result.Value)
            {
                Settings.Default.NewImageColor = colorPicker.SelectedColor;
            }
        }
Пример #6
0
        private void FreeDrawingColorBorder_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var colorPicker = new ColorSelector(Settings.Default.FreeDrawingColor);
            colorPicker.Owner = this;
            var result = colorPicker.ShowDialog();

            if (result.HasValue && result.Value)
            {
                Settings.Default.FreeDrawingColor = colorPicker.SelectedColor;
            }
        }
Пример #7
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);
            colorPicker.Owner = this;
            var result = colorPicker.ShowDialog();

            if (result.HasValue && result.Value)
            {
                border.Background = new SolidColorBrush(colorPicker.SelectedColor);

                CheckScheme(false);
            }
        }