Exemple #1
0
		/// <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)
			{
				bool stickyMode = false;
				DslDesign::ModelingToolboxItem selectedToolboxItem = activeView.Toolbox.GetSelectedToolboxItem() as DslDesign::ModelingToolboxItem;
				if (selectedToolboxItem != null && selectedToolboxItem.Id == this.stickyToolboxItemId)
				{
					stickyMode = true;
				}
				else
				{
					stickyMode = false;
					this.stickyToolboxItemId = null;
				}
		
				DslDiagrams::MouseAction action = null;
				if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.SQLEventFilterString))
				{
					if (this.sQLEventCreateAction == null)
					{
						this.sQLEventCreateAction = new global::Architect.SQLEventCreateAction(this);
						this.sQLEventCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.sQLEventCreateAction.StickyMode = stickyMode;
					action = this.sQLEventCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.SQLCostingFilterString))
				{
					if (this.sQLCostingCreateAction == null)
					{
						this.sQLCostingCreateAction = new global::Architect.SQLCostingCreateAction(this);
						this.sQLCostingCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.sQLCostingCreateAction.StickyMode = stickyMode;
					action = this.sQLCostingCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.SQLBatchStartFilterString))
				{
					if (this.sQLBatchStartCreateAction == null)
					{
						this.sQLBatchStartCreateAction = new global::Architect.SQLBatchStartCreateAction(this);
						this.sQLBatchStartCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.sQLBatchStartCreateAction.StickyMode = stickyMode;
					action = this.sQLBatchStartCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.SQLParkedFilterString))
				{
					if (this.sQLParkedCreateAction == null)
					{
						this.sQLParkedCreateAction = new global::Architect.SQLParkedCreateAction(this);
						this.sQLParkedCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.sQLParkedCreateAction.StickyMode = stickyMode;
					action = this.sQLParkedCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.SQLBatchWaitFilterString))
				{
					if (this.sQLBatchWaitCreateAction == null)
					{
						this.sQLBatchWaitCreateAction = new global::Architect.SQLBatchWaitCreateAction(this);
						this.sQLBatchWaitCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.sQLBatchWaitCreateAction.StickyMode = stickyMode;
					action = this.sQLBatchWaitCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.ClickaltellFilterString))
				{
					if (this.clickaltellCreateAction == null)
					{
						this.clickaltellCreateAction = new global::Architect.ClickaltellCreateAction(this);
						this.clickaltellCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.clickaltellCreateAction.StickyMode = stickyMode;
					action = this.clickaltellCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.PostageAppFilterString))
				{
					if (this.postageAppCreateAction == null)
					{
						this.postageAppCreateAction = new global::Architect.PostageAppCreateAction(this);
						this.postageAppCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.postageAppCreateAction.StickyMode = stickyMode;
					action = this.postageAppCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.CSharpEventFilterString))
				{
					if (this.cSharpEventCreateAction == null)
					{
						this.cSharpEventCreateAction = new global::Architect.CSharpEventCreateAction(this);
						this.cSharpEventCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.cSharpEventCreateAction.StickyMode = stickyMode;
					action = this.cSharpEventCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.CSharpCostingFilterString))
				{
					if (this.cSharpCostingCreateAction == null)
					{
						this.cSharpCostingCreateAction = new global::Architect.CSharpCostingCreateAction(this);
						this.cSharpCostingCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.cSharpCostingCreateAction.StickyMode = stickyMode;
					action = this.cSharpCostingCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.CSharpBatchStartFilterString))
				{
					if (this.cSharpBatchStartCreateAction == null)
					{
						this.cSharpBatchStartCreateAction = new global::Architect.CSharpBatchStartCreateAction(this);
						this.cSharpBatchStartCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.cSharpBatchStartCreateAction.StickyMode = stickyMode;
					action = this.cSharpBatchStartCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.CSharpParkedFilterString))
				{
					if (this.cSharpParkedCreateAction == null)
					{
						this.cSharpParkedCreateAction = new global::Architect.CSharpParkedCreateAction(this);
						this.cSharpParkedCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.cSharpParkedCreateAction.StickyMode = stickyMode;
					action = this.cSharpParkedCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.CorticonFilterString))
				{
					if (this.corticonCreateAction == null)
					{
						this.corticonCreateAction = new global::Architect.CorticonCreateAction(this);
						this.corticonCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.corticonCreateAction.StickyMode = stickyMode;
					action = this.corticonCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.BatchWaitFilterString))
				{
					if (this.batchWaitCreateAction == null)
					{
						this.batchWaitCreateAction = new global::Architect.BatchWaitCreateAction(this);
						this.batchWaitCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.batchWaitCreateAction.StickyMode = stickyMode;
					action = this.batchWaitCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.EmailFilterString))
				{
					if (this.emailCreateAction == null)
					{
						this.emailCreateAction = new global::Architect.EmailCreateAction(this);
						this.emailCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.emailCreateAction.StickyMode = stickyMode;
					action = this.emailCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.StopFilterString))
				{
					if (this.stopCreateAction == null)
					{
						this.stopCreateAction = new global::Architect.StopCreateAction(this);
						this.stopCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.stopCreateAction.StickyMode = stickyMode;
					action = this.stopCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.SubProcessConnectorFilterString))
				{
					if (this.subProcessConnectorCreateAction == null)
					{
						this.subProcessConnectorCreateAction = new global::Architect.SubProcessConnectorCreateAction(this);
						this.subProcessConnectorCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.subProcessConnectorCreateAction.StickyMode = stickyMode;
					action = this.subProcessConnectorCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.WorkflowRuleFilterString))
				{
					if (this.workflowRuleCreateAction == null)
					{
						this.workflowRuleCreateAction = new global::Architect.WorkflowRuleCreateAction(this);
						this.workflowRuleCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.workflowRuleCreateAction.StickyMode = stickyMode;
					action = this.workflowRuleCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.CloudcoreUserActivityFilterString))
				{
					if (this.cloudcoreUserActivityCreateAction == null)
					{
						this.cloudcoreUserActivityCreateAction = new global::Architect.CloudcoreUserActivityCreateAction(this);
						this.cloudcoreUserActivityCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.cloudcoreUserActivityCreateAction.StickyMode = stickyMode;
					action = this.cloudcoreUserActivityCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.CustomUserActivityFilterString))
				{
					if (this.customUserActivityCreateAction == null)
					{
						this.customUserActivityCreateAction = new global::Architect.CustomUserActivityCreateAction(this);
						this.customUserActivityCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.customUserActivityCreateAction.StickyMode = stickyMode;
					action = this.customUserActivityCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.MobileUserActivityFilterString))
				{
					if (this.mobileUserActivityCreateAction == null)
					{
						this.mobileUserActivityCreateAction = new global::Architect.MobileUserActivityCreateAction(this);
						this.mobileUserActivityCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.mobileUserActivityCreateAction.StickyMode = stickyMode;
					action = this.mobileUserActivityCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.HybridUserActivityFilterString))
				{
					if (this.hybridUserActivityCreateAction == null)
					{
						this.hybridUserActivityCreateAction = new global::Architect.HybridUserActivityCreateAction(this);
						this.hybridUserActivityCreateAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.hybridUserActivityCreateAction.StickyMode = stickyMode;
					action = this.hybridUserActivityCreateAction;
				}
				else if (SelectedToolboxItemSupportsFilterString(activeView, global::Architect.CloudCoreArchitectSubProcessToolboxHelper.FlowFilterString))
				{
					if (this.flowConnectAction == null)
					{
						this.flowConnectAction = new global::Architect.FlowConnectAction(this);
						this.flowConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnToolboxActionDeactivated);
					}
					this.flowConnectAction.StickyMode = stickyMode;
					action = this.flowConnectAction;
				} 
				else
				{
					action = null;
				}
				
				if (pointArgs.DiagramClientView.ActiveMouseAction != action)
				{
					try
					{
						this.changingMouseAction = true;
						pointArgs.DiagramClientView.ActiveMouseAction = action;
					}
					finally
					{
						this.changingMouseAction = false;
					}
				}
			}
		}
Exemple #2
0
		/// <summary>
		/// Dispose of connect actions.
		/// </summary>
		protected override void Dispose(bool disposing)
		{
			try
			{
				if(disposing)
				{
					if(this.sQLEventCreateAction != null)
					{
						this.sQLEventCreateAction.Dispose();
						this.sQLEventCreateAction = null;
					}
					if(this.sQLCostingCreateAction != null)
					{
						this.sQLCostingCreateAction.Dispose();
						this.sQLCostingCreateAction = null;
					}
					if(this.sQLBatchStartCreateAction != null)
					{
						this.sQLBatchStartCreateAction.Dispose();
						this.sQLBatchStartCreateAction = null;
					}
					if(this.sQLParkedCreateAction != null)
					{
						this.sQLParkedCreateAction.Dispose();
						this.sQLParkedCreateAction = null;
					}
					if(this.sQLBatchWaitCreateAction != null)
					{
						this.sQLBatchWaitCreateAction.Dispose();
						this.sQLBatchWaitCreateAction = null;
					}
					if(this.clickaltellCreateAction != null)
					{
						this.clickaltellCreateAction.Dispose();
						this.clickaltellCreateAction = null;
					}
					if(this.postageAppCreateAction != null)
					{
						this.postageAppCreateAction.Dispose();
						this.postageAppCreateAction = null;
					}
					if(this.cSharpEventCreateAction != null)
					{
						this.cSharpEventCreateAction.Dispose();
						this.cSharpEventCreateAction = null;
					}
					if(this.cSharpCostingCreateAction != null)
					{
						this.cSharpCostingCreateAction.Dispose();
						this.cSharpCostingCreateAction = null;
					}
					if(this.cSharpBatchStartCreateAction != null)
					{
						this.cSharpBatchStartCreateAction.Dispose();
						this.cSharpBatchStartCreateAction = null;
					}
					if(this.cSharpParkedCreateAction != null)
					{
						this.cSharpParkedCreateAction.Dispose();
						this.cSharpParkedCreateAction = null;
					}
					if(this.corticonCreateAction != null)
					{
						this.corticonCreateAction.Dispose();
						this.corticonCreateAction = null;
					}
					if(this.batchWaitCreateAction != null)
					{
						this.batchWaitCreateAction.Dispose();
						this.batchWaitCreateAction = null;
					}
					if(this.emailCreateAction != null)
					{
						this.emailCreateAction.Dispose();
						this.emailCreateAction = null;
					}
					if(this.stopCreateAction != null)
					{
						this.stopCreateAction.Dispose();
						this.stopCreateAction = null;
					}
					if(this.subProcessConnectorCreateAction != null)
					{
						this.subProcessConnectorCreateAction.Dispose();
						this.subProcessConnectorCreateAction = null;
					}
					if(this.workflowRuleCreateAction != null)
					{
						this.workflowRuleCreateAction.Dispose();
						this.workflowRuleCreateAction = null;
					}
					if(this.cloudcoreUserActivityCreateAction != null)
					{
						this.cloudcoreUserActivityCreateAction.Dispose();
						this.cloudcoreUserActivityCreateAction = null;
					}
					if(this.customUserActivityCreateAction != null)
					{
						this.customUserActivityCreateAction.Dispose();
						this.customUserActivityCreateAction = null;
					}
					if(this.mobileUserActivityCreateAction != null)
					{
						this.mobileUserActivityCreateAction.Dispose();
						this.mobileUserActivityCreateAction = null;
					}
					if(this.hybridUserActivityCreateAction != null)
					{
						this.hybridUserActivityCreateAction.Dispose();
						this.hybridUserActivityCreateAction = null;
					}
					if(this.flowConnectAction != null)
					{
						this.flowConnectAction.Dispose();
						this.flowConnectAction = null;
					}
				}
			}
			finally
			{
				base.Dispose(disposing);
			}
		}