public DrawPad() { InitializeComponent(); Zoom = 1; _shapeDrawer = new ShapeDrawer(); _filler = new Filler(); _drawingControl = new DrawingControl(); _drawingControl.SetShapDrawer(_shapeDrawer); _drawingControl.ShapeCreated += DrawingControl_ShapeCreated; _textControl = new TextControl(gdiArea); _textControl.TextCreated += TextControl_TextCreated; _textControl.TextChanged += TextControl_TextChanged; _currentCommand = DrawPadCommand.None; _currentShape = null; _outlineWidth = 2F; _outlineColor = Color.Black; _outlineDash = DashStyle.Solid; _fillColor = Color.Transparent; _textFont = new Font("Segoe UI", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 0); _shapeArea = 0; }
public void AddVertexControlBox(DrawingControl control, Point point) { var action = new AddVertexAction(control); action.Location = point; SendAction(action); }
public void LoadControlBox(DrawingControl control) { var action = new LoadControlBoxAction(); action.ShapeType = control.ReviewShape.GetShapeType(); action.StartPoint = control.StartPoint; action.EndPoint = control.EndPoint; SendAction(action); }
public UserInfo(Socket socket, int id, Visualization.ShapeDrawer shapedrawer) { Socket = socket; Id = id; Name = "Client " + id; ControlBox = new DrawingControl(); ControlBox.SetShapDrawer(shapedrawer); ControlBox.ControlMode = ControlMode.CreateShape; ControlBox.Visible = false; }
public void SendControlBox(DrawingControl control) { var action = new UpdateControlBoxAction(control); action.ShapeType = control.ReviewShape.GetShapeType(); action.ControlVisible = control.Visible; action.StartPoint = control.StartPoint; action.EndPoint = control.EndPoint; SendAction(action); }