Пример #1
0
        public void ToolMouseUp(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left && canvas != null)
            {
                canvas.DeselectAllObjects();

                if (objectSource != null)
                {
                    objectDestination = canvas.SelectObjectAt(e.X, e.Y);

                    Connector connector = new Connector(objectSource, objectDestination);
                    objectSource.Attach(connector);
                    objectDestination.Attach(connector);

                    canvas.AddDrawingObjectToFront(connector);
                    connector.ChangeState(StaticState.GetInstance());
                }
            }
        }