예제 #1
0
        private void ButtonShadowColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(Rect_ShadowColor.Fill);

            colorp.Owner = Window.GetWindow(this);
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                Rect_ShadowColor.Fill = new SolidColorBrush(colorp.GetColor());
            }
        }
예제 #2
0
        private void ButtonLegendColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(cont.ChartLegend.Foreground);

            colorp.Owner = Window.GetWindow(this);
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                Rect_LegendColor.Fill       = new SolidColorBrush(colorp.GetColor());
                cont.ChartLegend.Foreground = new SolidColorBrush(colorp.GetColor());
            }
        }
예제 #3
0
        private void ButtonColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(Rect_BackColor.Fill);

            colorp.Owner = Window.GetWindow(this);
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                cont.Foreground = new SolidColorBrush(colorp.GetColor());
                ((Content_Answers)cont.Tag).foreground.SerializeWithKey(cont.Foreground, data, "");
                Rect_BackColor.Fill = new SolidColorBrush(colorp.GetColor());
            }
        }
예제 #4
0
        private void ButtonColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(Rect_BackColor.Fill);

            colorp.Owner = Window.GetWindow(this);
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                Rect_BackColor.Fill = new SolidColorBrush(colorp.GetColor());

                DesignCanvas.DefaultDrawingAttributes.Color = colorp.GetColor();
                Debug.WriteLine("W: " + DesignCanvas.DefaultDrawingAttributes.Width + "  H: " + DesignCanvas.DefaultDrawingAttributes.Height);
            }
        }
예제 #5
0
        private void ButtonAxisYColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(Rect_AxisYColor.Fill);

            colorp.Owner = Window.GetWindow(this);
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                cont.AxisY[0].Foreground       = new SolidColorBrush(colorp.GetColor());
                cont.AxisY[0].Separator.Stroke = new SolidColorBrush(colorp.GetColor());

                Rect_AxisYColor.Fill = new SolidColorBrush(colorp.GetColor());
            }
        }
예제 #6
0
        private void FlatButtonCustomColor_Click(object sender, MouseEventArgs e)
        {
            if (sender == FButton_CustomColorFor)
            {
                Window_ColorPicker colorp;

                if ((SolidColorBrush)ForColor.Fill == null)
                {
                    colorp = new Window_ColorPicker(Colors.White);
                }
                else
                {
                    colorp = new Window_ColorPicker(((SolidColorBrush)ForColor.Fill).Color);
                }

                colorp.Owner = Window.GetWindow(this);
                colorp.ShowDialog();
                if (colorp.IsOK() == true)
                {
                    ForColor.Fill = new SolidColorBrush(colorp.GetColor());
                    txt.Selection.ApplyPropertyValue(Inline.ForegroundProperty, new SolidColorBrush(colorp.GetColor()));
                }
            }
            else if (sender == FButton_CustomColorBack)
            {
                Window_ColorPicker colorp;

                if ((SolidColorBrush)BackColor.Fill == null)
                {
                    colorp = new Window_ColorPicker(Colors.White);
                }
                else
                {
                    colorp = new Window_ColorPicker(((SolidColorBrush)BackColor.Fill).Color);
                }

                colorp.Owner = Window.GetWindow(this);
                colorp.ShowDialog();
                if (colorp.IsOK() == true)
                {
                    BackColor.Fill = new SolidColorBrush(colorp.GetColor());
                    txt.Selection.ApplyPropertyValue(Inline.BackgroundProperty, new SolidColorBrush(colorp.GetColor()));
                }
            }
        }
예제 #7
0
        private void ButtonColor_Click(object sender, RoutedEventArgs e)
        {
            Window_ColorPicker colorp = new Window_ColorPicker(Rect_BackColor.Fill);

            colorp.Owner = Window.GetWindow(this);
            colorp.ShowDialog();
            if (colorp.IsOK() == true)
            {
                //brush = new SolidColorBrush(colorp.GetColor());
                brush = new SolidColorBrush(colorp.GetColor());
                Rect_BackColor.Fill = new SolidColorBrush(colorp.GetColor());

                if (ChangedBrush != null)
                {
                    ChangedBrush(this, brush);
                }
            }
        }