当前位置: 首页>>代码示例>>C#>>正文


C# AdvTree.Node类代码示例

本文整理汇总了C#中DevComponents.AdvTree.Node的典型用法代码示例。如果您正苦于以下问题:C# Node类的具体用法?C# Node怎么用?C# Node使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Node类属于DevComponents.AdvTree命名空间,在下文中一共展示了Node类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddCondition

 private void AddCondition(Rotation rotation, AdvTree advTree)
 {
     var node = new Node();
     node.Text = rotation.Name;
     node.Tag = rotation;
     AddNode(node, advTree);
 }
开发者ID:civicacid,项目名称:myevo,代码行数:7,代码来源:RotationManagerForm.cs

示例2: TreeDragDropEventArgs

        public TreeDragDropEventArgs(eTreeAction action, Node[] nodes, Node oldParentNode, Node newParentNode, int insertPosition)
            : base(action, nodes)
		{
			this.NewParentNode = newParentNode;
			this.OldParentNode = oldParentNode;
            this.InsertPosition = insertPosition;
		}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:7,代码来源:TreeDragDropEventArgs.cs

示例3: TreeDragFeedbackEventArgs

 /// <summary>
 /// Initializes a new instance of the TreeDragFeedbackEventArgs class.
 /// </summary>
 /// <param name="parentNode"></param>
 /// <param name="insertPosition"></param>
 public TreeDragFeedbackEventArgs(Node parentNode, int insertPosition, Node dragNode, DragDropEffects effect)
 {
     ParentNode = parentNode;
     InsertPosition = insertPosition;
     _DragNode = dragNode;
     _Effect = effect;
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:12,代码来源:TreeDragFeedbackEventArgs.cs

示例4: FormLoadSettings

        public FormLoadSettings(Tileset[] tilesets)
        {
            InitializeComponent();

            this.tilesets = tilesets;

            foreach (var tileset in tilesets)
            {
                Node node = new Node(tileset.File);

                if (String.IsNullOrEmpty(tileset.File))
                {
                    node.Text = String.Format("Not Specified [w: {0}, h: {1}]", tileset.Size.X, tileset.Size.Y);
                }

                node.Cells.Add(new Cell("<browse for file>"));

                node.Cells[0].Editable = false;
                node.Cells[1].Editable = false;

                node.NodeDoubleClick += node_NodeDoubleClick;

                tilesetFilesList.Nodes.Add(node);
            }
        }
开发者ID:AustinBrunkhorst,项目名称:XNA-World-Editor,代码行数:25,代码来源:FormLoadSettings.cs

示例5: FormSaveSettings

        public FormSaveSettings(string saveLocation, FormWorld world)
        {
            InitializeComponent();

            this.saveLocation = saveLocation;
            this.world = world;

            var saveUri = new Uri(saveLocation);

            foreach (var tileset in world.Tilesets)
            {
                string relative = saveUri.MakeRelativeUri(new Uri(tileset.Filename)).ToString();

                Node node = new Node(Path.GetFileName(tileset.Filename))
                {
                    CheckBoxVisible = true,
                    Checked = tileset.ShouldBuild
                };

                Cell cell = new Cell()
                {
                    Text = tileset.BuildLocation != null ? tileset.BuildLocation : 
                           Path.Combine(Path.GetDirectoryName(relative), Path.GetFileNameWithoutExtension(relative)),
                    Editable = true
                };

                node.Cells[0].Editable = false;

                node.Cells.Add(cell);

                tilesetFilesList.Nodes.Add(node);
            }
        }
开发者ID:AustinBrunkhorst,项目名称:XNA-World-Editor,代码行数:33,代码来源:FormSaveSettings.cs

示例6: onWorldChange

        /// <summary>
        /// Called when the selected world changes
        /// </summary>
        void onWorldChange()
        {
            // closed last world open
            if (world == null)
            {
                layersList.Nodes.Clear();
                btnAddLayer.Enabled = false;
                return;
            }

            btnAddLayer.Enabled = true;

            // cache index before it gets changed from
            // modifying the list
            int index = world.SelectedLayer;

            layersList.Nodes.Clear();

            // collision layer
            Node collision = new Node("Collision Layer")
            {
                CheckBoxVisible = true,
                Checked = true,
                ImageIndex = 1,
                Editable = false
            };

            layersList.Nodes.Add(collision);
         
            // add layers from new world
            for (int i = world.LayerCount - 2; i >= 0; i--)
                addLayer(world.GetLayerName(i), i == world.SelectedLayer, world.GetLayerVisibility(i));

            SetLayer(index);
        }
开发者ID:AustinBrunkhorst,项目名称:XNA-World-Editor,代码行数:38,代码来源:LayersPanel.cs

示例7: AddCondition

 private void AddCondition(Rule rule, AdvTree advTree)
 {
     var node = new Node();
     node.Text = rule.Name;
     node.Tag = rule;
     AddNode(node, advTree);
 }
开发者ID:civicacid,项目名称:myevo,代码行数:7,代码来源:RotationForm.cs

示例8: GetLastNode

		/// <summary>
		/// Gets the last child tree node. The LastNode is the last child Node in the NodeCollection stored in the Nodes property of the current tree node. If the Node has no child tree node, the LastNode property returns a null reference (Nothing in Visual Basic).
		/// </summary>
		/// <param name="node">Reference node.</param>
		/// <returns>Last node if found or null if there is no last node.</returns>
		public static Node GetLastNode(Node node)
		{
			if(node.Nodes.Count>0)
			{
				return node.Nodes[node.Nodes.Count-1];
			}
			return null;
		}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:13,代码来源:NodeOperations.cs

示例9: AddSchool

 private void AddSchool(string name)
 {
     var add = new Node(name);
     add.Tag = name;
     ListSchoolItems.BeginUpdate();
     ListSchoolItems.Nodes.Add(add);
     ListSchoolItems.EndUpdate();
 }
开发者ID:acidburn974,项目名称:lazybot,代码行数:8,代码来源:Settings.cs

示例10: TreeNodeMouseEventArgs

		public TreeNodeMouseEventArgs(Node node, MouseButtons button, int clicks, int delta, int x, int y)
		{
			this.Node = node;
			this.Button = button;
			this.Clicks = clicks;
			this.Delta = delta;
			this.X = x;
			this.Y = y;
		}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:9,代码来源:TreeNodeMouseEventArgs.cs

示例11: CreateControl

 public Node CreateControl(string name, string tag, Control control)
 {
     var node = new Node();
     node.Expanded = true;
     node.Name = name;
     node.Tag = tag;
     node.HostedControl = control;
     node.DragDropEnabled = false;
     return node;
 }
开发者ID:civicacid,项目名称:myevo,代码行数:10,代码来源:AbstractCondition.cs

示例12: CreateRadioButton

 public Node CreateRadioButton(string name, string text, string tag, bool selected = false)
 {
     var node = new Node();
     node.CheckBoxStyle = eCheckBoxStyle.RadioButton;
     node.CheckBoxVisible = true;
     node.Expanded = true;
     node.Name = name;
     node.Text = text;
     node.Tag = tag;
     node.Checked = selected;
     node.DragDropEnabled = false;
     return node;
 }
开发者ID:civicacid,项目名称:myevo,代码行数:13,代码来源:AbstractCondition.cs

示例13: GetFullPath

		/// <summary>
		/// Returns full path to the given node.
		/// </summary>
		/// <param name="node">Node to return path to.</param>
		/// <returns>Full path to the node.</returns>
		public static string GetFullPath(Node node,string pathSeparator)
		{
			if(node==null)
				throw new ArgumentNullException("node");
			
			StringBuilder sb=new StringBuilder(node.Text);
			node=node.Parent;
			while(node!=null)
			{
                sb.Insert(0, node.Text + pathSeparator);
				node=node.Parent;
			}

			return sb.ToString();
		}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:20,代码来源:NodeOperations.cs

示例14: addProperty

        /// <summary>
        /// Adds a temporary property to the list
        /// </summary>
        void addProperty(string name = newPropertyText, string value = "", bool valueEditable = false)
        {
            Node node = new Node(name)
            {
                ContextMenu = propertyMenu
            };

            Cell cell = new Cell(value)
            {
                Editable = valueEditable
            };

            node.Cells.Add(cell);

            propertiesList.Nodes.Add(node);
        }
开发者ID:AustinBrunkhorst,项目名称:XNA-World-Editor,代码行数:19,代码来源:FormWorldProperties.cs

示例15: Add

        /// <summary>
        /// Adds new object to the collection and provides information about the source of the command
        /// </summary>
        /// <param name="node">Node to add</param>
        /// <param name="action">Source action</param>
        /// <returns></returns>
        public override int Add(Node node, eTreeAction action)
        {
            if (this.List.Contains(node)) return -1;

            if (TreeSelectionControl.MultiSelect)
            {
                if (TreeSelectionControl.MultiSelectRule == eMultiSelectRule.SameParent && this.Count>0)
                {
                    if (this[0].Parent != node.Parent)
                        throw new InvalidOperationException("Node being added does not belong to the same parent as currently selected nodes. See AdvTree.MultiSelectRule property");
                }
                if (!SuspendEvents)
                {
                    AdvTreeNodeCancelEventArgs cancelArgs = new AdvTreeNodeCancelEventArgs(action, node);
                    TreeSelectionControl.InvokeOnBeforeNodeSelect(cancelArgs);
                    if (cancelArgs.Cancel)
                        return -1;
                }
            }
            return base.Add(node, action);
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:27,代码来源:SelectedNodesCollection.cs


注:本文中的DevComponents.AdvTree.Node类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。