Ejemplo n.º 1
0
 private void EditElement(object sender, EventArgs e)
 {
     if (ClickItem is Node)
     {
         if (NodeEditor == null)
         {
             NodeEditor = new NodeEditor(this, ClickItem as Node);
             NodeEditor.Show();
         }
         else
         {
             NodeEditor.LoadNode(ClickItem as Node);
         }
     }
     else if (ClickItem is Link)
     {
         if (LinkEditor == null)
         {
             LinkEditor = new LinkEditor(this, ClickItem as Link);
             LinkEditor.Show();
         }
         else
         {
             LinkEditor.LoadLink(ClickItem as Link);
         }
     }
     else if (ClickItem is Stream)
     {
         if (StreamEditor == null)
         {
             StreamEditor = new StreamEditor(this, ClickItem as Stream);
             StreamEditor.Show();
         }
         else
         {
             StreamEditor.LoadStream(ClickItem as Stream);
         }
     }
     else if (ClickItem is Domain)
     {
         if (DomainEditor == null)
         {
             DomainEditor = new DomainEditor(this, ClickItem as Domain);
             DomainEditor.Show();
         }
         else
         {
             DomainEditor.LoadDomain(ClickItem as Domain);
         }
     }
 }
Ejemplo n.º 2
0
 public void ChildClosing(Form Child)
 {
     if (Child is Traces)
     {
         Traces = null;
     }
     else if (Child is Plots)
     {
         Plots = null;
     }
     else if (Child is NodeEditor)
     {
         NodeEditor = null;
     }
     else if (Child is StreamEditor)
     {
         StreamEditor = null;
     }
     else if (Child is LinkEditor)
     {
         LinkEditor = null;
     }
     else if (Child is DomainEditor)
     {
         DomainEditor = null;
     }
     else if (Child is NetworkPropertiesEditor)
     {
         NetworkPropertiesEditor = null;
     }
     else if (Child is DisplayPropertiesEditor)
     {
         DisplayPropertiesEditor = null;
     }
     else if (Child is Console)
     {
         Console = null;
     }
 }