Ejemplo n.º 1
0
 /// <summary>
 /// remove text form from list of all text forms</summary>
 public void removeTextWindow(TextForm textWindows)
 {
     this.TextWindows.Remove(textWindows);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// add text form to list of all text forms</summary>
 public void addTextWindow(TextForm textWindows)
 {
     this.TextWindows.Add(textWindows);
 }
Ejemplo n.º 3
0
        /*************************************************************************************************************************/
        // DIAGRAM EDIT FORMS

        /// <summary>
        /// add text form to list of all text forms</summary>
        public void AddTextWindow(TextForm textWindows)
        {
            this.TextWindows.Add(textWindows);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// remove text form from list of all text forms</summary>
 public void RemoveTextWindow(TextForm textWindows)
 {
     this.TextWindows.Remove(textWindows);
 }
Ejemplo n.º 5
0
        /*************************************************************************************************************************/
        // 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;
        }