Beispiel #1
0
 private void toolStripStatusLabel3_Click(object sender, EventArgs e)
 {
     TreeWalker.CollapseAllController();
 }
Beispiel #2
0
 private void toolStripStatusLabel2_Click(object sender, EventArgs e)
 {
     TreeWalker.ExpandAllController();
 }
Beispiel #3
0
 private void toolStripStatusLabel1_Click(object sender, EventArgs e)
 {
     TreeWalker.RefreshAllController();
 }
Beispiel #4
0
        public static void Walk(TreeNode tn, System.Windows.Forms.TreeNode tnc)
        {
            int dummy = 0;

            if (tnc != null)
            {
                System.Windows.Forms.TreeNode temp = null;
                //if (tnc.Nodes != null && !tnc.Nodes.Contains(new System.Windows.Forms.TreeNode(tn.Name))) temp = tnc.Nodes.Add(tn.Name);

                if (tn.AddedToTree == false)
                {
                    tn.AddedToTree = true; temp = tnc.Nodes.Add(tn.Name);                           // tnc.TreeView.BeginUpdate();
                }
                else
                {
                    foreach (System.Windows.Forms.TreeNode iterating in tnc.Nodes)
                    {
                        if (iterating.Name == tn.Name)
                        {
                            temp = iterating;
                        }
                    }
                }

                if (tn.Changed > 10)
                {
                    temp.ForeColor = System.Drawing.Color.Blue;
                }
                if (tn.Changed > 50)
                {
                    temp.ForeColor = System.Drawing.Color.Green;
                }
                if (tn.Changed > 100)
                {
                    temp.ForeColor = System.Drawing.Color.DarkGreen;
                }
                if (tn.Changed > 200)
                {
                    temp.ForeColor = System.Drawing.Color.DarkOrange;
                }
                if (tn.Changed > 1000)
                {
                    temp.ForeColor = System.Drawing.Color.OrangeRed;
                }
                if (tn.Changed > 2000)
                {
                    temp.ForeColor = System.Drawing.Color.Red;
                }
                if (tn.Changed > 10000)
                {
                    temp.ForeColor = System.Drawing.Color.HotPink;
                }
                if (tn.Children != null && tn.Children.Count != 0)
                {
                    foreach (TreeNode node in tn.Children)
                    {
                        TreeWalker.Walk(node, temp);
                        if (TreeWalker.iteration > 100)
                        {
                            dummy++;
                        }
                    }
                }
            }
        }
Beispiel #5
0
 public static void RefreshAllController()
 {
     TreeWalker.RefreshStats(structure);
     Refresh();
 }