コード例 #1
0
ファイル: Diagram.cs プロジェクト: ralungei/OneClickWeb
 /// <summary>
 /// Dispose of connect actions.
 /// </summary>
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (disposing)
         {
             if (this.relAtribConnectAction != null)
             {
                 this.relAtribConnectAction.Dispose();
                 this.relAtribConnectAction = null;
             }
             if (this.relIzqConnectAction != null)
             {
                 this.relIzqConnectAction.Dispose();
                 this.relIzqConnectAction = null;
             }
             if (this.relDerConnectAction != null)
             {
                 this.relDerConnectAction.Dispose();
                 this.relDerConnectAction = null;
             }
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
コード例 #2
0
ファイル: Diagram.cs プロジェクト: ralungei/OneClickWeb
        /// <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::UPM_IPS.RAARMAPMCWeberMDD.RAARMAPMCWeberMDDToolboxHelper.RelAtribFilterString))
                {
                    if (this.relAtribConnectAction == null)
                    {
                        this.relAtribConnectAction = new global::UPM_IPS.RAARMAPMCWeberMDD.RelAtribConnectAction(this);
                        this.relAtribConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
                    }
                    action = this.relAtribConnectAction;
                }
                else if (SelectedToolboxItemSupportsFilterString(activeView, global::UPM_IPS.RAARMAPMCWeberMDD.RAARMAPMCWeberMDDToolboxHelper.RelIzqFilterString))
                {
                    if (this.relIzqConnectAction == null)
                    {
                        this.relIzqConnectAction = new global::UPM_IPS.RAARMAPMCWeberMDD.RelIzqConnectAction(this);
                        this.relIzqConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
                    }
                    action = this.relIzqConnectAction;
                }
                else if (SelectedToolboxItemSupportsFilterString(activeView, global::UPM_IPS.RAARMAPMCWeberMDD.RAARMAPMCWeberMDDToolboxHelper.RelDerFilterString))
                {
                    if (this.relDerConnectAction == null)
                    {
                        this.relDerConnectAction = new global::UPM_IPS.RAARMAPMCWeberMDD.RelDerConnectAction(this);
                        this.relDerConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
                    }
                    action = this.relDerConnectAction;
                }
                else
                {
                    action = null;
                }

                if (pointArgs.DiagramClientView.ActiveMouseAction != action)
                {
                    try
                    {
                        this.changingMouseAction = true;
                        pointArgs.DiagramClientView.ActiveMouseAction = action;
                    }
                    finally
                    {
                        this.changingMouseAction = false;
                    }
                }
            }
        }