Beispiel #1
0
        private void ColorPalette()
        {
            ColorPaletteDialog colorPaletteDialog = new ColorPaletteDialog();

            colorPaletteDialog.DataContext = Format;
            colorPaletteDialog.ShowDialog();
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <history>
        ///     [Curtis_Beard]	   11/18/2005	Created
        /// </history>
        private void ColorButton_Click(object sender, System.EventArgs e)
        {
            Point p = new Point(this.Left, this.Top + this.Height);

            p = this.Parent.PointToScreen(p);

            ColorPaletteDialog clDlg = new ColorPaletteDialog(p, this.SelectedColor);

            clDlg.ColorChosen += new AstroGrep.Windows.Controls.ColorButton.ColorPaletteDialog.ColorChosenHandler(ColorChosen);
            clDlg.Show();
        }
Beispiel #3
0
        private void colorButton_Click(object sender, EventArgs e)
        {
            var callingButton = (ColorButton)sender;
            var p             = new Point(callingButton.Left, callingButton.Top + callingButton.Height);

            p = PointToScreen(p);

            var clDlg = new ColorPaletteDialog(p.X, p.Y);

            clDlg.ShowDialog();

            if (clDlg.DialogResult == DialogResult.OK)
            {
                _color = clDlg.Color;
            }

            callingButton.CenterColor = _color;

            Invalidate();

            clDlg.Dispose();
        }
Beispiel #4
0
        public override void Execute(object parameter)
        {
            object[]    values        = (object[])parameter;
            UserControl userControl   = (UserControl)values[0];
            int         colorPosition = (int)values[1];

            PaletteIndex paletteIndex = PaletteIndex.Palette0;

            if (values.Length > 2)
            {
                paletteIndex = (PaletteIndex)values[2];
            }

            Window window = Window.GetWindow(userControl);

            ColorPaletteDialog dialog = new ColorPaletteDialog(paletteIndex, colorPosition)
            {
                Owner = window
            };

            dialog.ShowDialog();
        }
Beispiel #5
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <history>
        /// 	[Curtis_Beard]	   11/18/2005	Created
        /// </history>
        private void ColorButton_Click(object sender, System.EventArgs e)
        {
            Point p = new Point(this.Left, this.Top + this.Height);
             p = this.Parent.PointToScreen(p);

             ColorPaletteDialog clDlg = new ColorPaletteDialog(p, this.SelectedColor);
             clDlg.ColorChosen += new AstroGrep.Windows.Controls.ColorButton.ColorPaletteDialog.ColorChosenHandler(ColorChosen);
             clDlg.Show();
        }