private TreeViewItem AddSpecialNode(SpecialNodes nodeType) { TreeViewItem node = null; switch (nodeType) { case SpecialNodes.Wait: node = new WaitTreeNode(); break; case SpecialNodes.LoadNext: LoadNextTreeNode new_node = new LoadNextTreeNode(); new_node.MouseDoubleClick += new EventHandler <CustomEventArgs <CustomTreeNode> >(SpecialNode_MouseDoubleClick); node = new_node; break; case SpecialNodes.Error: node = new ErrorTreeNode(); break; //case SpecialNodes.LoadAll: // node = new LoadAllTreeNode(); // node.Expanded += new RoutedEventHandler(node_Expanded); // break; //case SpecialNodes.ReloadAll: // node = new ReloadAllTreeNode(); // node.Expanded += new RoutedEventHandler(node_Expanded); // break; } if (node != null) { Items.Add(node); } return(node); }
public TreeViewItem GetSpecialNode(SpecialNodes nodeType) { foreach (object obj in Items) { switch (nodeType) { case SpecialNodes.Wait: WaitTreeNode wait = obj as WaitTreeNode; if (wait != null) { return(wait); } break; case SpecialNodes.Error: ErrorTreeNode error = obj as ErrorTreeNode; if (error != null) { return(error); } break; case SpecialNodes.LoadNext: LoadNextTreeNode next = obj as LoadNextTreeNode; if (next != null) { return(next); } break; } } return(null); }
protected TreeViewItem AddSpecialNode(SpecialNodes nodeType) { TreeViewItem node = null; switch (nodeType) { case SpecialNodes.Wait: node = new WaitTreeNode(); break; case SpecialNodes.Error: node = new ErrorTreeNode(); break; case SpecialNodes.LoadNext: LoadNextTreeNode new_node = new LoadNextTreeNode(); new_node.MouseDoubleClick += new EventHandler <CustomEventArgs <CustomTreeNode> >(SpecialNode_MouseDoubleClick); node = new_node; break; } if (node != null) { Items.Add(node); } return(node); }
public TreeViewItem GetSpecialNode(SpecialNodes nodeType) { try { foreach (object obj in Items) { switch (nodeType) { case SpecialNodes.Wait: WaitTreeNode wait = obj as WaitTreeNode; if (wait != null) { return(wait); } break; case SpecialNodes.LoadNext: LoadNextTreeNode next = obj as LoadNextTreeNode; if (next != null) { return(next); } break; case SpecialNodes.Error: ErrorTreeNode error = obj as ErrorTreeNode; if (error != null) { return(error); } break; //case SpecialNodes.LoadAll: // LoadAllTreeNode all = obj as LoadAllTreeNode; // if (all != null) // return all; // break; //case SpecialNodes.ReloadAll: // ReloadAllTreeNode reload = obj as ReloadAllTreeNode; // if (reload != null) // return reload; // break; } } }catch { } return(null); }
public TreeViewItem GetSpecialNode(SpecialNodes nodeType) { try { foreach (object obj in Items) { switch (nodeType) { case SpecialNodes.Wait: WaitTreeNode wait = obj as WaitTreeNode; if (wait != null) return wait; break; case SpecialNodes.LoadNext: LoadNextTreeNode next = obj as LoadNextTreeNode; if (next != null) return next; break; case SpecialNodes.Error: ErrorTreeNode error = obj as ErrorTreeNode; if (error != null) return error; break; //case SpecialNodes.LoadAll: // LoadAllTreeNode all = obj as LoadAllTreeNode; // if (all != null) // return all; // break; //case SpecialNodes.ReloadAll: // ReloadAllTreeNode reload = obj as ReloadAllTreeNode; // if (reload != null) // return reload; // break; } } }catch { } return null; }
private TreeViewItem AddSpecialNode(SpecialNodes nodeType) { TreeViewItem node = null; switch (nodeType) { case SpecialNodes.Wait: node = new WaitTreeNode(); break; case SpecialNodes.LoadNext: LoadNextTreeNode new_node = new LoadNextTreeNode(); new_node.MouseDoubleClick += new EventHandler<CustomEventArgs<CustomTreeNode>>(SpecialNode_MouseDoubleClick); node = new_node; break; case SpecialNodes.Error: node = new ErrorTreeNode(); break; //case SpecialNodes.LoadAll: // node = new LoadAllTreeNode(); // node.Expanded += new RoutedEventHandler(node_Expanded); // break; //case SpecialNodes.ReloadAll: // node = new ReloadAllTreeNode(); // node.Expanded += new RoutedEventHandler(node_Expanded); // break; } if (node != null) { Items.Add(node); } return node; }
public TreeViewItem GetSpecialNode(SpecialNodes nodeType) { foreach (object obj in Items) { switch (nodeType) { case SpecialNodes.Wait: WaitTreeNode wait = obj as WaitTreeNode; if (wait != null) return wait; break; case SpecialNodes.Error: ErrorTreeNode error = obj as ErrorTreeNode; if (error != null) return error; break; case SpecialNodes.LoadNext: LoadNextTreeNode next = obj as LoadNextTreeNode; if (next != null) return next; break; } } return null; }
protected TreeViewItem AddSpecialNode(SpecialNodes nodeType) { TreeViewItem node = null; switch (nodeType) { case SpecialNodes.Wait: node = new WaitTreeNode(); break; case SpecialNodes.Error: node = new ErrorTreeNode(); break; case SpecialNodes.LoadNext: LoadNextTreeNode new_node = new LoadNextTreeNode(); new_node.MouseDoubleClick += new EventHandler<CustomEventArgs<CustomTreeNode>>(SpecialNode_MouseDoubleClick); node = new_node; break; } if (node != null) { Items.Add(node); } return node; }
public static void RegisterSpecialNode(Node node, SpecialNodes type) { node.specialType = type; }