Example #1
0
 private void ModelStateChangedEvent(object sender, ElementEventsEndedEventArgs e)
 {
     if (((IORMToolServices)sender).ProcessingVisibleTransactionItemEvents)
     {
         UpdateVerbalization();
     }
 }
Example #2
0
 /// <summary>
 /// Update cached menu status when a transaction is completed
 /// </summary>
 private void OnElementEventsEnded(object sender, ElementEventsEndedEventArgs e)
 {
     if (((IORMToolServices)sender).ProcessingVisibleTransactionItemEvents)
     {
         CommandManager.UpdateCommandStatus();
     }
 }
Example #3
0
 /// <summary>
 /// Verify tab order when events have complete
 /// </summary>
 private void ElementEventsEndedEvent(object sender, ElementEventsEndedEventArgs e)
 {
     if (myVerifyPageOrder)
     {
         myVerifyPageOrder = false;
         MultiDiagramDocViewControl control;
         Store store;
         if (null != (control = myDocViewControl) &&
             null != (store = this.Store))
         {
             if (null != store.FindDomainModel(DiagramDisplayDomainModel.DomainModelId))
             {
                 IList <DiagramDisplay> containers;
                 if (0 != (containers = store.ElementDirectory.FindElements <DiagramDisplay>(false)).Count)
                 {
                     control.VerifyDiagramOrder(containers[0].OrderedDiagramCollection);
                 }
             }
             else
             {
                 IList <Diagram> diagrams;
                 if (0 != (diagrams = store.DefaultPartition.ElementDirectory.FindElements <Diagram>(true)).Count)
                 {
                     control.VerifyDiagramOrder(diagrams);
                 }
             }
         }
     }
 }
Example #4
0
 private void ElementEventsEnded(object sender, ElementEventsEndedEventArgs e)
 {
     if (((IORMToolServices)sender).ProcessingVisibleTransactionItemEvents)
     {
         if (myDiagramView.Diagram == null)
         {
             RebuildWatermark();
         }
         else
         {
             CommandManager.UpdateCommandStatus();
         }
     }
 }
Example #5
0
        private void EventsEnding(object sender, ElementEventsEndedEventArgs e)
        {
            EventHandler <ElementEventsEndedEventArgs> endedEvents = myRegisteredEndedEvents;

            if (endedEvents != null)
            {
                endedEvents(sender, e);
            }
            Exception ex = myPendingException;

            if (ex != null)
            {
                myPendingException = null;
                DisplayException(ex);
            }
        }
Example #6
0
		private void ElementEventsEnded(object sender, ElementEventsEndedEventArgs e)
		{
			if (((IORMToolServices)sender).ProcessingVisibleTransactionItemEvents)
			{
				if (myDiagramView.Diagram == null)
				{
					RebuildWatermark();
				}
				else
				{
					CommandManager.UpdateCommandStatus();
				}
			}
		}
		private void ModelStateChangedEvent(object sender, ElementEventsEndedEventArgs e)
		{
			if (((IORMToolServices)sender).ProcessingVisibleTransactionItemEvents)
			{
				UpdateVerbalization();
			}
		}
Example #8
0
		private void ErrorEventsEnded(object sender, ElementEventsEndedEventArgs e)
		{
			if (GetFlag(PrivateFlags.ErrorDisplayModified))
			{
				SetFlag(PrivateFlags.ErrorDisplayModified, false);

				IORMToolServices toolServices = this as IORMToolServices;
				IORMToolTaskProvider taskProvider = toolServices.TaskProvider;

				//refresh diagrams
				ORMDesignerDocView.InvalidateAllDiagrams(toolServices.ServiceProvider, this);

				//refresh task list and model browser
				SurveyTree<Store> surveyTree = mySurveyTree;
				foreach (ORMModel model in this.Store.ElementDirectory.FindElements<ORMModel>(true))
				{
					ModelErrorDisplayFilter filter = model.ModelErrorDisplayFilter;

					foreach (ModelError error in model.ErrorCollection)
					{
						object taskData = error.TaskData;
						if (filter == null || filter.ShouldDisplay(error))
						{
							if (taskData == null)
							{
								ModelError.AddToTaskProvider(error);
							}
						}
						else if (taskData != null)
						{
							error.TaskData = null;
							IORMToolTaskItem taskItem = taskData as IORMToolTaskItem;
							if (taskItem != null)
							{
								taskProvider.RemoveTask(taskItem);
							}
						}
						if (surveyTree != null)
						{
							error.WalkAssociatedElements(delegate(ModelElement associatedElement)
							{
								surveyTree.UpdateErrorDisplay(associatedElement);
							});
						}
					}
					break;
				}
			}
		}
Example #9
0
		/// <summary>
		/// Update cached menu status when a transaction is completed
		/// </summary>
		private void OnElementEventsEnded(object sender, ElementEventsEndedEventArgs e)
		{
			if (((IORMToolServices)sender).ProcessingVisibleTransactionItemEvents)
			{
				CommandManager.UpdateCommandStatus();
			}
		}
Example #10
0
		/// <summary>
		/// Verify tab order when events have complete
		/// </summary>
		private void ElementEventsEndedEvent(object sender, ElementEventsEndedEventArgs e)
		{
			if (myVerifyPageOrder)
			{
				myVerifyPageOrder = false;
				MultiDiagramDocViewControl control;
				Store store;
				if (null != (control = myDocViewControl) &&
					null != (store = this.Store))
				{
					if (null != store.FindDomainModel(DiagramDisplayDomainModel.DomainModelId))
					{
						IList<DiagramDisplay> containers;
						if (0 != (containers = store.ElementDirectory.FindElements<DiagramDisplay>(false)).Count)
						{
							control.VerifyDiagramOrder(containers[0].OrderedDiagramCollection);
						}
					}
					else
					{
						IList<Diagram> diagrams;
						if (0 != (diagrams = store.DefaultPartition.ElementDirectory.FindElements<Diagram>(true)).Count)
						{
							control.VerifyDiagramOrder(diagrams);
						}
					}
				}
			}
		}