/// <summary> /// Dispose of connect actions. /// </summary> protected override void Dispose(bool disposing) { try { if(disposing) { if(this.entityRelationshipConnectAction != null) { this.entityRelationshipConnectAction.Dispose(); this.entityRelationshipConnectAction = null; } if(this.entiyValueObjectRelationShipConnectAction != null) { this.entiyValueObjectRelationShipConnectAction.Dispose(); this.entiyValueObjectRelationShipConnectAction = null; } } } finally { base.Dispose(disposing); } }
/// <summary> /// Override to provide the right mouse action when trying /// to create links on the diagram /// </summary> /// <param name="pointArgs"></param> public override void OnViewMouseEnter(DslDiagrams::DiagramPointEventArgs pointArgs) { if (pointArgs == null) throw new global::System.ArgumentNullException("pointArgs"); DslDiagrams::DiagramView activeView = this.ActiveDiagramView; if(activeView != null) { DslDiagrams::MouseAction action = null; if (SelectedToolboxItemSupportsFilterString(activeView, global::Com.Lotos.BinbinDomainLanguage.BinbinDomainLanguageToolboxHelper.EntityRelationshipFilterString)) { if (this.entityRelationshipConnectAction == null) { this.entityRelationshipConnectAction = new global::Com.Lotos.BinbinDomainLanguage.EntityRelationshipConnectAction(this); this.entityRelationshipConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated); } action = this.entityRelationshipConnectAction; } else if (SelectedToolboxItemSupportsFilterString(activeView, global::Com.Lotos.BinbinDomainLanguage.BinbinDomainLanguageToolboxHelper.EntiyValueObjectRelationShipFilterString)) { if (this.entiyValueObjectRelationShipConnectAction == null) { this.entiyValueObjectRelationShipConnectAction = new global::Com.Lotos.BinbinDomainLanguage.EntiyValueObjectRelationShipConnectAction(this); this.entiyValueObjectRelationShipConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated); } action = this.entiyValueObjectRelationShipConnectAction; } else { action = null; } if (pointArgs.DiagramClientView.ActiveMouseAction != action) { try { this.changingMouseAction = true; pointArgs.DiagramClientView.ActiveMouseAction = action; } finally { this.changingMouseAction = false; } } } }