Пример #1
0
        // инициализация
        void MyInit()
        {
            if(comboBoxThickness.Items.Count > 0)
                comboBoxThickness.SelectedIndex = 0;
            comboBoxThickness.SelectedIndexChanged += comboBoxThickness_SelectedIndexChanged;

            butColor.BackColor = color;
            butColor.Click += butColor_Click;

            butBackColor.BackColor = SystemColors.Control;
            butBackColor.Click += butBackColor_Click;

            checkBoxTransparent.CheckedChanged += checkBoxTransparent_CheckedChanged;

            progressBar.Visible = false;
            progressBar.Minimum = 0;
            progressBar.Maximum = 100;

            myCanvas = new MyCanvas(this);
            myCanvas.ActiveTool = null;        
            this.Controls.Add(myCanvas);
            myCanvas.Left = this.ClientRectangle.Left + 10;
            myCanvas.Top = this.ClientRectangle.Top + toolStripMain.Height + menuStripMain.Height + 10;
            myCanvas.Width = this.ClientRectangle.Width - 20;
            myCanvas.Height = this.ClientRectangle.Height - toolStripMain.Height - menuStripMain.Height - 20;
            myCanvas.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
                        
            FillMainToolStrip();
        }
Пример #2
0
 public abstract void OnMouseUp(MyCanvas canvas, MouseEventArgs e);