private TreeNodeCollection CreateCollection() { Tree = new TreeView(); Root = new TreeNode("root"); Tree.Nodes.Add(Root); return Root.Nodes; }
public SelectionSetMode(TreeView tree) : base(tree) { proc_NamedSelSetCreated = new GlobalDelegates.Delegate5(this.NamedSelSetCreated); proc_NamedSelSetDeleted = new GlobalDelegates.Delegate5(this.NamedSelSetDeleted); proc_NamedSelSetPreModify = new GlobalDelegates.Delegate5(this.NamedSelSetPreModify); proc_NamedSelSetPostModify = new GlobalDelegates.Delegate5(this.NamedSelSetPostModify); proc_NamedSelSetRenamed = new GlobalDelegates.Delegate5(this.NamedSelSetRenamed); this.allObjectsSelSet = new AllObjectsSelectionSetWrapper(); this.Tree.DragDropHandler = new TreeViewDragDropHandler(); }
public void GetNodeAtExceptionalTest() { TreeView tree = new TreeView(); tree.Width = 100; tree.Height = 100; Assert.IsNull(tree.GetNodeAt(0, 0), "Empty tree"); Assert.IsNull(tree.GetNodeAt(-5, 0), "Outside bounds left"); Assert.IsNull(tree.GetNodeAt(200, 0), "Outside bounds right"); Assert.IsNull(tree.GetNodeAt(0, -5), "Outside bounds top"); Assert.IsNull(tree.GetNodeAt(0, 200), "Outside bounds bottom"); }
public TreeView CreateTree() { TreeView tree = new TreeView(); tree.Width = 100; tree.Height = 100; TreeNode tn1 = new TreeNode("tn1"); tn1.IsExpanded = true; tree.Nodes.Add(tn1); tn1.Nodes.Add(new TreeNode("tn2")); tn1.Nodes.Add(new TreeNode("tn3")); tree.Nodes.Add(new TreeNode("tn4")); return tree; }
/// <summary> /// Initializes a new instance of the LayerMode class. /// </summary> /// <param name="tree">The TreeView control to fill.</param> public LayerMode(TreeView tree) : base(tree) { LayerModeConfigurationSection configuration = OutlinerGUP.Instance.Configuration.GetSection<LayerModeConfigurationSection>("LayerMode"); this.showGroupContents = configuration.ShowGroupContents; proc_LayerRenamed = new GlobalDelegates.Delegate5(this.LayerRenamed); proc_LayerCreated = new GlobalDelegates.Delegate5(this.LayerCreated); proc_LayerDeleted = new GlobalDelegates.Delegate5(this.LayerDeleted); proc_LayerParented = new GlobalDelegates.Delegate5(this.LayerParented); proc_LayerCurrentChanged = new GlobalDelegates.Delegate5(this.LayerCurrentChanged); this.Tree.DragDropHandler = new TreeViewDragDropHandler(); }
public FlatObjectListMode(TreeView tree) : base(tree) { }
internal TreeNode(TreeView tree, String text) : this(text) { this.TreeView = tree; }
/// <summary> /// Creates a new TreeMode from this Preset. /// </summary> /// <param name="tree">The TreeView control to associate the TreeMode with.</param> public TreeMode CreateTreeMode(TreeView tree) { Throw.IfNull(tree, "tree"); Type treeModeType = OutlinerPlugins.GetPluginType( OutlinerPluginType.TreeMode , this.TreeModeTypeName); if (treeModeType == null) treeModeType = typeof(NullTreeMode); TreeMode mode = Activator.CreateInstance(treeModeType, new object[] { tree }) as TreeMode; foreach (Filter<IMaxNode> filter in this.Filters.Filters) { mode.AddPermanentFilter(filter); } String contextMenuFile = Path.Combine(OutlinerPaths.ContextMenusDir, this.ContextMenuFile); if (File.Exists(contextMenuFile)) mode.ContextMenu = XmlSerialization.Deserialize<Outliner.Controls.ContextMenu.ContextMenuModel>(contextMenuFile); return mode; }
public NullTreeMode(TreeView tree) : base(tree) { }
/// <summary> /// Initializes a new instance of the MaterialMode class. /// </summary> /// <param name="tree">The TreeView control to fill.</param> public MaterialMode(TreeView tree) : base(tree) { this.unassignedMaterialWrapper = new UnassignedMaterialWrapper(); base.AddPermanentFilter(new UnassignedMaterialFilter()); }
public void TreeViewTest() { TreeView tree = new TreeView(); TreeNode tn1 = new TreeNode("tn1"); Assert.IsNull(tn1.TreeView); tree.Nodes.Add(tn1); Assert.AreEqual(tree, tn1.TreeView); TreeNode tn2 = new TreeNode("tn2"); tn1.Nodes.Add(tn2); Assert.AreEqual(tree, tn2.TreeView); }
public XRefMode(TreeView tree) : base(tree) { proc_XrefSceneFlagsChanged = new GlobalDelegates.Delegate5(this.XrefSceneFlagsChanged); proc_XrefSceneDeleted = new GlobalDelegates.Delegate5(this.XrefSceneDeleted); proc_XrefObjectRecordDeleted = new GlobalDelegates.Delegate5(this.XrefObjectRecordDeleted); }
public HierarchyMode(TreeView tree) : base(tree) { Throw.IfNull(tree, "tree"); tree.DragDropHandler = new TreeViewDragDropHandler(); }