It's a function that adds nodes to a treeview.
33 {
34 view.Nodes.Clear();
35 for (int i = 0; i < Automation.Recordings.Count; i++)
36 {
37
38 }
39 foreach (Automation.Recording rec in Automation.Recordings.Values)
40 {
41 TreeNode tr = new TreeNode();
42 Node n = new Node(rec, tr, Node.Type.recording);
43 tr.Tag = n;
44 tr.Text = rec.Name;
45 foreach (Automation.Action item in rec.List)
46 {
47 try
48 {
49 TreeNode tn = new TreeNode();
50 tn.Text = item.ToString();
51
52 Node no = new Node(item, tn,Node.Type.action);
53 no.recording = rec;
54 tn.Tag = no;
55 tr.Nodes.Add(tn);
56 }
57 catch (Exception)
58 {
59
60 }
61 }
62 view.Nodes.Add(tr);
63 }
64
65 propView.Nodes.Clear();
66 foreach (Automation.Recording rec in Automation.Properties.Values)
67 {
68 TreeNode tr = new TreeNode();
69 Node n = new Node(rec, tr, Node.Type.recording);
70 tr.Tag = n;
71 tr.Text = rec.Name;
72 foreach (Automation.Action item in rec.List)
73 {
74 try
75 {
76 TreeNode tn = new TreeNode();
77 tn.Text = item.ToString();
78
79 Node no = new Node(item, tn, Node.Type.action);
80 no.recording = rec;
81 tn.Tag = no;
82 tr.Nodes.Add(tn);
83 }
84 catch (Exception)
85 {
86
87 }
88 }
89 propView.Nodes.Add(tr);
90 }
91 }