protected void CreateStruct() { var dialog = new AddFigureDialog ("Struct", ClassType.Struct, PointerToDrawing, this); }
protected void CreateInterface() { var dialog = new AddFigureDialog ("Interface", ClassType.Interface, PointerToDrawing, this); }
protected void CreateEnum() { var dialog = new AddFigureDialog ("Enum", ClassType.Delegate, PointerToDrawing, this); }
protected void CreateDelegate() { var dialog = new AddFigureDialog ("Delegate", ClassType.Class, PointerToDrawing, this); }
protected void CreateClass() { var dialog = new AddFigureDialog ("Class", ClassType.Class, PointerToDrawing, this); }
public override void ConsumeItem(ItemToolboxNode item) { var figureItem = item as IToolboxFigure; var connectorItem = item as IToolboxConnector; if (connectorItem == null && figureItem == null) return; if (connectorItem != null) { // AbstractConnectionFigure connector; // // if (connectorItem.ConnectorType == ConnectionType.Inheritance) // connector = new InheritanceConnectionFigure (); // else // connector = new AssociationConnectionFigure (connectorItem.ConnectorType); // // Tool = new ConnectionCreationTool (this, connector.ConnectionLine); return; } int x, y; Control.GetPointer (out x, out y); var point = View.ViewToDrawing (x, y); if (figureItem.ClassType == ClassType.Unknown) { var comment = new CommentFigure (String.Empty); comment.MoveTo (point.X, point.Y); View.Add (comment); return; } var dialog = new AddFigureDialog (figureItem.Name, figureItem.ClassType, point, this); dialog.ShowAll (); }