private void RefreshParents(GoalNode node) { GoalNode parent = node.Parent as GoalNode; while (parent != null) { parent.RefreshProgress(); parent = parent.Parent as GoalNode; } }
public void InsertSubNode(TreeListNode parent, GoalNode node) { int index = 0; foreach (TreeListNode entry in parent.Nodes) { if (string.Compare(node.Text, entry.Text, true) < 0) { parent.Nodes.Insert(index, node); node.RefreshProgress(); return; } else { index++; } } parent.Nodes.Insert(index, node); node.RefreshProgress(); }
public void InsertSubNode(TreeListNode parent, GoalNode node) { int index = 0; foreach (TreeListNode entry in parent.Nodes) if (string.Compare(node.Text, entry.Text, true) < 0) { parent.Nodes.Insert(index, node); node.RefreshProgress(); return; } else index++; parent.Nodes.Insert(index, node); node.RefreshProgress(); }