Beispiel #1
0
        private void btnOutlineColor_Click(object sender, EventArgs e)
        {
            clrDialogOutline.ShowDialog();
            canvasView1.Canvas.OutlineColor = clrDialogOutline.Color;
            btnOutlineColor.BackColor = clrDialogOutline.Color;

            BucketTool.GetInstance().OutlineColor = canvasView1.Canvas.OutlineColor;
        }
Beispiel #2
0
        private void btnFillColor_Click(object sender, EventArgs e)
        {
            clrDialogFill.ShowDialog();
            canvasView1.Canvas.FillColor = clrDialogFill.Color;
            btnFillColor.BackColor = clrDialogFill.Color;

            BucketTool.GetInstance().FillColor = canvasView1.Canvas.FillColor;
        }
Beispiel #3
0
        private void btnBucket_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                canvasView1.Canvas.Tool = BucketTool.GetInstance(canvasView1.Canvas.OutlineColor, canvasView1.Canvas.FillColor, true, true);
            }
            else if (e.Button == MouseButtons.Right)
            {
                if (options == null)
                    options = new BucketToolOptions();

                options.ShowDialog();
                canvasView1.Canvas.Tool = BucketTool.GetInstance(options.OutlineColor, options.FillColor, options.OutlineEnabled, options.FillEnabled);
            }
        }