Exemple #1
0
 private void OpenDecisionInDiagrams(IEAElement decision)
 {
     IEADiagram[] diagrams = decision.GetDiagrams();
     if (diagrams.Count() == 1) // open the diagram with the decision if there is only one diagram
     {
         IEADiagram diagram = diagrams[0];
         diagram.OpenAndSelectElement(decision);
     }
     else if (diagrams.Count() >= 2) // let the user decide which diagram to open
     {
         var selectForm = new SelectDiagram(diagrams);
         if (selectForm.ShowDialog() == DialogResult.OK)
         {
             IEADiagram diagram = selectForm.GetSelectedDiagram();
             diagram.OpenAndSelectElement(decision);
         }
     }
     decision.ShowInProjectView();
 }
Exemple #2
0
 public void ShowInDiagrams()
 {
     IEADiagram[] diagrams = GetDiagrams();
     if (diagrams.Length == 1)
     {
         IEADiagram diagram = diagrams[0];
         diagram.OpenAndSelectElement(this);
     }
     else if (diagrams.Length >= 2)
     {
         var selectForm = new SelectDiagram(diagrams);
         if (selectForm.ShowDialog() == DialogResult.OK)
         {
             IEADiagram diagram = selectForm.GetSelectedDiagram();
             diagram.OpenAndSelectElement(this);
         }
     }
     ShowInProjectView();
 }