Esempio n. 1
0
 protected override void OnClick(EventArgs e)
 {
     Point p = PointToScreen(new Point(0, this.Height));
     ColorPaletteDialog clDlg = new ColorPaletteDialog(p.X, p.Y);
     clDlg.ShowDialog(FindForm());
     if(clDlg.DialogResult == DialogResult.OK) {
         _selectedColor = clDlg.Color;
         if(this.ColorChanged != null) this.ColorChanged(this, clDlg.Color);
     }
     Invalidate();
     clDlg.Dispose();
 }
Esempio n. 2
0
        protected override void OnClick(EventArgs e)
        {
            Point p = PointToScreen(new Point(0, this.Height));
            ColorPaletteDialog clDlg = new ColorPaletteDialog(p.X, p.Y);

            clDlg.ShowDialog(FindForm());
            if (clDlg.DialogResult == DialogResult.OK)
            {
                _selectedColor = clDlg.Color;
                if (this.ColorChanged != null)
                {
                    this.ColorChanged(this, clDlg.Color);
                }
            }
            Invalidate();
            clDlg.Dispose();
        }