示例#1
0
        protected virtual void OnButtonClicked(object sender, System.EventArgs e)
        {
            ColorSelectDialog colorDialog = new ColorSelectDialog();

            colorDialog.ColorSelection.CurrentColor = this.color;

            if(colorDialog.Run() == (int)ResponseType.Ok)
                this.Color = colorDialog.ColorSelection.CurrentColor;

            colorDialog.Destroy();
        }
示例#2
0
        protected virtual void ColorSelectionButtonClicked(object sender, System.EventArgs e)
        {
            ColorSelectDialog colorDialog = new ColorSelectDialog();

            int res = colorDialog.Run();

            if(res == (int)ResponseType.Ok)
                this.shapeManager.Selected.Colorize(colorDialog.ColorSelection.CurrentColor,
                                                    ((double)colorDialog.ColorSelection.CurrentAlpha)/65025);

            colorDialog.Destroy();
            this.drawingarea.QueueDraw();
        }