public void ToolMouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left && canvas != null) { canvas.DeselectAll(); if (objectSource != null) { objectDestination = canvas.SelectObject(e.X, e.Y); Include connector = new Include(objectSource, objectDestination); objectSource.Attach(connector); objectDestination.Attach(connector); canvas.AddDrawingObject(connector); connector.ChangeState(StaticState.GetInstance()); } } }