public ToolMoveFigure(Button button, PaintBox paintBox_set) { paintBox = paintBox_set; cursor = Cursors.Hand; toolButton = button; toolButton.Click += new EventHandler(ToolButtonClick); }
public ToolSelection(Button button, ref List <Figure> figureArrayFrom, PaintBox paintBox_set) { paintBox = paintBox_set; figureArray = figureArrayFrom; toolButton = button; toolButton.Click += new EventHandler(ToolButtonClick); panelProp = new PanelProp(); panelProp.Text = "Selection"; }
public ToolZoom(Button button, ref List <Figure> figureArrayFrom, PaintBox paintBox_set, NumericUpDown numZoomSet) { numZoom = numZoomSet; paintBox = paintBox_set; figureArray = figureArrayFrom; toolButton = button; toolButton.Click += new EventHandler(ToolButtonClick); CreatePanelProp(); }
public static void Init(Button btnUndo, Button btnRedo, PaintBox paintBox, ref List <Figure> figureArray, MainDrawForm form) { _btnUndo = btnUndo; _btnUndo.Click += Undo; _btnRedo = btnRedo; _btnRedo.Click += Redo; _paintBox = paintBox; _figureArray = figureArray; _form = form; ringBuffer.Push(SerializerFigure.SerializeAllFigures(ref _figureArray)); }
public ToolLine(Button button, ref List <Figure> figureArrayFrom, PaintBox paintBox_set) { paintBox = paintBox_set; figureArray = figureArrayFrom; toolButton = button; toolButton.Click += new EventHandler(ToolButtonClick); panelProp = new PanelProp(); panelProp.Text = "Line"; propColor = new PropColor(Color.Black); propColor.Draw(new Point(5, 20), panelProp, "Color:"); propPenWidth = new PropPenWidth(); propPenWidth.Draw(new Point(5, 50), panelProp, "Width:"); }
public override void Draw(Point position, PanelProp panelProp, String text, PaintBox paintBox = null) { colorButton.SetButtonColor(colorButton.color); this.paintBox = paintBox; colorButton.Click += ValChanged; if (text == null) { text = "Color:"; } colorButton.Location = new Point(position.X + 60, position.Y); panelProp.Controls.Add(colorButton); label = new Label { Location = position, Text = text }; panelProp.Controls.Add(label); }
public ToolRoundedRect(Button button, ref List <Figure> figureArrayFrom, PaintBox paintBox_set) { paintBox = paintBox_set; figureArray = figureArrayFrom; toolButton = button; toolButton.Click += new EventHandler(ToolButtonClick); panelProp = new PanelProp(); panelProp.Text = "Rounded Rect"; propColor = new PropColor(Color.Black); propColor.Draw(new Point(5, 20), panelProp, "Color:"); propPenWidth = new PropPenWidth(); propPenWidth.Draw(new Point(5, 50), panelProp, "Width:"); propFill = new PropFill(Color.Black); propFill.Draw(new Point(5, 80), panelProp, "Fill:"); propRadius = new PropRadius(25); propRadius.Draw(new Point(5, 140), panelProp, "Radius:"); }
public override void Draw(Point position, PanelProp panelProp, String text, PaintBox paintBox = null) { this.paintBox = paintBox; if (text == null) { text = "Radius:"; } numeric.Location = new Point(position.X + 60, position.Y); numeric.Size = new Size(48, 26); numeric.ValueChanged += ValChanged; panelProp.Controls.Add(numeric); label = new Label { Location = position, Text = text }; panelProp.Controls.Add(label); }
public override void Draw(Point position, PanelProp panelProp, String text, PaintBox paintBox = null) { numWidthPen.Value = (decimal)numWidthPen.penWidth; this.paintBox = paintBox; numWidthPen.ValueChanged += ValChanged; if (text == null) { text = "Width:"; } numWidthPen.Location = new Point(position.X + 60, position.Y); numWidthPen.Size = new Size(48, 26); panelProp.Controls.Add(numWidthPen); label = new Label { Location = position, Text = text }; panelProp.Controls.Add(label); }
public override void Draw(Point position, PanelProp panelProp, String text, PaintBox paintBox = null) { this.paintBox = paintBox; if (text == null) { text = "Fill:"; } checkBox.Click += ValChanged; propColor.colorButton.Click += ValChanged; checkBox.Location = new Point(position.X + 60, position.Y); checkBox.Size = new Size(48, 26); checkBox.Text = ""; panelProp.Controls.Add(checkBox); label = new Label { Location = position, Text = text }; panelProp.Controls.Add(label); propColor.Draw(new Point(position.X, position.Y + 25), panelProp, "Clr fill:"); }
public virtual void Draw(Point position, PanelProp panelProp, String text = null, PaintBox paintBox = null) { }