Beispiel #1
0
        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;
        }
Beispiel #2
0
        public void AddVertexControlBox(DrawingControl control, Point point)
        {
            var action = new AddVertexAction(control);

            action.Location = point;

            SendAction(action);
        }
Beispiel #3
0
        public void LoadControlBox(DrawingControl control)
        {
            var action = new LoadControlBoxAction();

            action.ShapeType  = control.ReviewShape.GetShapeType();
            action.StartPoint = control.StartPoint;
            action.EndPoint   = control.EndPoint;

            SendAction(action);
        }
Beispiel #4
0
        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;
        }
Beispiel #5
0
        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;
        }
Beispiel #6
0
        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);
        }