示例#1
0
        private void button_colorTitle2_Click(object sender, RoutedEventArgs e)
        {
            ColorSetWindow dlg = new ColorSetWindow();

            dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
            Color item = custTitleColor2;

            dlg.SetColor(item);
            if (dlg.ShowDialog() == true)
            {
                dlg.GetColor(ref item);
                custTitleColor2   = item;
                titleColor2.Color = custTitleColor2;
            }
        }
示例#2
0
        private void button17_Click(object sender, RoutedEventArgs e)
        {
            ColorSetWindow dlg = new ColorSetWindow();

            dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
            Color item = custColorList[0x14];

            dlg.SetColor(item);
            if (dlg.ShowDialog() == true)
            {
                dlg.GetColor(ref item);
                custColorList[0x14] = item;
                backColor17.Color   = custColorList[0x14];
            }
        }
示例#3
0
        private void button_Color_Click(object sender, RoutedEventArgs e)
        {
            var btn = sender as Button;

            var dlg = new ColorSetWindow();

            dlg.Owner = CommonUtil.GetTopWindow(this);
            Color item = (btn.Background as SolidColorBrush).Color;

            dlg.SetColor(item);
            if (dlg.ShowDialog() == true)
            {
                dlg.GetColor(ref item);
                (btn.Background as SolidColorBrush).Color = item;
            }
        }
示例#4
0
        private void button_Color_Click(object sender, RoutedEventArgs e)
        {
            ColorSetWindow dlg = new ColorSetWindow();

            dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
            Color item = ((SolidColorBrush)((Button)sender).Background).Color;

            dlg.A = item.A;
            dlg.R = item.R;
            dlg.G = item.G;
            dlg.B = item.B;
            if (dlg.ShowDialog() == true)
            {
                ((SolidColorBrush)((Button)sender).Background).Color = Color.FromArgb(dlg.A, dlg.R, dlg.G, dlg.B);
                OnUpdateColor();
            }
        }