Exemplo n.º 1
0
        public void ToolMouseDown(object sender, MouseEventArgs e)
        {
            point = e.Location;

            if (e.Button == MouseButtons.Left && drawingCanvas != null)
            {
                drawingCanvas.DeselectAll();
                objectSource = drawingCanvas.SelectObject(e.X, e.Y);
            }
        }
Exemplo n.º 2
0
        public void ToolMouseDown(object sender, MouseEventArgs e)
        {
            point = e.Location;

            if (e.Button == MouseButtons.Left && drawingCanvas != null)
            {
                if (currentObject == null)
                {
                    drawingCanvas.DeselectAll();
                    tempGroup.Clear();
                }
                else if (!multiSelect)
                {
                    currentObject.ChangeState(IdleState.GetInstance());
                }
                currentObject = drawingCanvas.SelectObject(e.X, e.Y);
                if (currentObject != null)
                {
                    currentObject.ChangeState(EditState.GetInstance());
                    if (multiSelect)
                    {
                        tempGroup.Add(currentObject);
                    }
                }
            }
        }