/// <summary> /// remove text form from list of all text forms</summary> public void removeTextWindow(TextForm textWindows) { this.TextWindows.Remove(textWindows); }
/// <summary> /// add text form to list of all text forms</summary> public void addTextWindow(TextForm textWindows) { this.TextWindows.Add(textWindows); }
/*************************************************************************************************************************/ // DIAGRAM EDIT FORMS /// <summary> /// add text form to list of all text forms</summary> public void AddTextWindow(TextForm textWindows) { this.TextWindows.Add(textWindows); }
/// <summary> /// remove text form from list of all text forms</summary> public void RemoveTextWindow(TextForm textWindows) { this.TextWindows.Remove(textWindows); }
/*************************************************************************************************************************/ // NODES EDIT // NODE Editovanie vlastnosti nody public TextForm EditNode(Node rec) { bool found = false; for (int i = TextWindows.Count() - 1; i >= 0; i--) // Loop through List with foreach { if (TextWindows[i].node == rec) { Media.bringToFront(TextWindows[i]); found = true; return TextWindows[i]; } } if (!found) { TextForm textf = new TextForm(main); textf.setDiagram(this); textf.node = rec; string[] lines = rec.name.Split(Environment.NewLine.ToCharArray()).ToArray(); if(lines.Count()>0) textf.Text = lines[0]; this.TextWindows.Add(textf); main.addTextWindow(textf); textf.Show(); Media.bringToFront(textf); return textf; } return null; }