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


C# TreeView.ExpandAll方法代码示例

本文整理汇总了C#中System.Windows.Forms.TreeView.ExpandAll方法的典型用法代码示例。如果您正苦于以下问题:C# TreeView.ExpandAll方法的具体用法?C# TreeView.ExpandAll怎么用?C# TreeView.ExpandAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.TreeView的用法示例。


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

示例1: FCM

        /// <summary>
        /// Populate an FCE Ultra movie file's header information
        /// </summary>
        public static void FCM(ref TreeView tv, ref TASMovie fcm)
        {
            FCEU movie = (FCEU)fcm;
            tv.Nodes.Clear();

            tv.Nodes.Add("Header");
            tv.Nodes[0].Nodes.Add("Signature:        " + movie.Header.Signature);
            tv.Nodes[0].Nodes.Add("Version:          " + movie.Header.Version.ToString());
            tv.Nodes[0].Nodes.Add("Frame Count:      " + String.Format("{0:0,0}", movie.Header.FrameCount));
            tv.Nodes[0].Nodes.Add("Rerecord Count:   " + String.Format("{0:0,0}", movie.Header.RerecordCount));
            tv.Nodes[0].Nodes.Add("Emulator Version: " + movie.Header.EmulatorID);
            tv.Nodes[0].Nodes.Add("Movie Start:      " + movie.Options.MovieStart);
            tv.Nodes[0].Nodes.Add("Movie Timing:     " + movie.Options.MovieTiming);

            tv.Nodes.Add("Metadata");
            tv.Nodes[1].Nodes.Add("Author: " + movie.Extra.Author);

            tv.Nodes.Add("ROM Information");
            tv.Nodes[2].Nodes.Add("ROM Title: " + movie.Extra.ROM);
            tv.Nodes[2].Nodes.Add("ROM CRC:   " + movie.Extra.CRC);

            tv.Nodes.Add("Controllers");
            tv.Nodes[3].Nodes.Add("Controller 1: " + movie.Input.Controllers[0].ToString());
            tv.Nodes[3].Nodes.Add("Controller 2: " + movie.Input.Controllers[1].ToString());
            tv.Nodes[3].Nodes.Add("Controller 3: " + movie.Input.Controllers[2].ToString());
            tv.Nodes[3].Nodes.Add("Controller 4: " + movie.Input.Controllers[3].ToString());

            movie = null; tv.ExpandAll(); tv.Nodes[0].EnsureVisible();
        }
开发者ID:alexbevi,项目名称:tas-editor,代码行数:32,代码来源:PopulateMovieInfo.cs

示例2: getTreeViewByPathDir

 /// <summary>
 /// 
 /// </summary>
 /// <param name="tv"></param>
 /// <param name="dtDocList"></param>
 public void getTreeViewByPathDir(TreeView tv)
 {
     HYDocumentMS.IFileHelper filehelper = new HYDocumentMS.FileHelper();
     dtDirList = filehelper.getDocFileDir(true);//获取文档目录的清单
     CreatTree(tv.Nodes, "0", dtDirList);
     tv.ExpandAll();
 }
开发者ID:huayancreate,项目名称:HYPDM,代码行数:12,代码来源:ToolsHelper.cs

示例3: Bind

        public void Bind(MapperGenerator.Library.Model.TemplateSource.FileModel model, Dictionary<TreeNode, object> templateFileModelMap, TreeView treeFileTemplateModel)
        {
            treeFileTemplateModel.Nodes.Clear();

            templateFileModelMap.Clear();
            var fileNode = new TreeNode("File");
            templateFileModelMap.Add(fileNode, model);

            foreach (var ns in model.Namespaces)
            {
                var nsNode = new TreeNode(ns.Name.PascalCase);
                templateFileModelMap.Add(nsNode, ns);

                foreach (var cs in ns.Entities)
                {
                    var csNode = new TreeNode(cs.Name.PascalCase);
                    templateFileModelMap.Add(csNode, cs);

                    foreach (var ps in cs.Properties)
                    {
                        var psNode = new TreeNode(ps.Name.PascalCase);
                        templateFileModelMap.Add(psNode, ps);

                        csNode.Nodes.Add(psNode);
                    }

                    nsNode.Nodes.Add(csNode);
                }

                fileNode.Nodes.Add(nsNode);
            }
            treeFileTemplateModel.Nodes.Add(fileNode);
            treeFileTemplateModel.SelectedNode = fileNode;
            treeFileTemplateModel.ExpandAll();
        }
开发者ID:fendy3002,项目名称:MapperGenerator,代码行数:35,代码来源:TemplateFileModelToTreeViewBinder.cs

示例4: EditHighlightingDialog

		public EditHighlightingDialog(TreeNode topNode)
		{
			SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.EditDialog.xfrm"));
			acceptBtn = (Button)ControlDictionary["acceptBtn"];
			nodeTree  = (TreeView)ControlDictionary["nodeTree"];
			propPanel = (Panel)ControlDictionary["propPanel"];
			optionPanel = (Panel)ControlDictionary["optionPanel"];
			
			// Form editor does not work properly with the custom control
			this.gradientLabel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
			this.gradientLabel.BorderStyle = BorderStyle.Fixed3D;
			this.gradientLabel.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.gradientLabel.Location = new System.Drawing.Point(0, 0);
			this.gradientLabel.Size = new System.Drawing.Size(propPanel.Width, 30);
			this.gradientLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.propPanel.Controls.Add(gradientLabel);

			this.bottomLabel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
			this.bottomLabel.BorderStyle = BorderStyle.Fixed3D;
			this.bottomLabel.Location = new System.Drawing.Point(0, propPanel.Height - 2);
			this.bottomLabel.Size = new System.Drawing.Size(propPanel.Width, 2);
			this.propPanel.Controls.Add(bottomLabel);
			
			this.ClientSize = new Size(660, 530);
			this.acceptBtn.Click += new EventHandler(acceptClick);
			ControlDictionary["cancelBtn"].Click += new EventHandler(cancelClick);
			
			this.nodeTree.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.NodeTreeAfterSelect);
			this.nodeTree.BeforeSelect += new System.Windows.Forms.TreeViewCancelEventHandler(this.NodeTreeBeforeSelect);
			
			nodeTree.Nodes.Add(topNode);
			nodeTree.ExpandAll();
			
			nodeTree.SelectedNode = topNode;
		}
开发者ID:kingjiang,项目名称:SharpDevelopLite,代码行数:35,代码来源:EditHighlightingDialog.cs

示例5: Show

        protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            try
            {
                var obj = objectProvider.GetData();
                var modelNode = new M2ModelDialogDebuggerVisualizerService().DeserializeDataFromStream<ModelNode>(obj);

                var form = new Form
                {
                    ClientSize = new Size(800, 600),
                    FormBorderStyle = FormBorderStyle.FixedToolWindow,
                };

                var treeView = new TreeView();
                treeView.Parent = form;
                treeView.Dock = DockStyle.Fill;

                InitNodes(treeView.Nodes, modelNode);
                treeView.ExpandAll();

                windowService.ShowDialog(form);
            }
            catch (Exception e)
            {
                // TODO
                throw;
            }
        }
开发者ID:SubPointSolutions,项目名称:spmeta2-vsixextensions,代码行数:28,代码来源:M2ModelDialogDebuggerVisualizer.cs

示例6: EditValue

        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
              if (editorService == null)
            return value;

              FmodEventShape Shape = context.Instance as FmodEventShape;
              System.Diagnostics.Debug.Assert(Shape != null, "EventGroupSelectionEditor only valid for FmodEventShapes!");

              // Create a TreeView and populate it
              treeView = new TreeView();
              treeView.ImageList = EditorManager.GUI.ShapeTreeImages.ImageList;
              treeView.Bounds = new Rectangle(0, 0, 400, 500);
              treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseClick);
              FmodManaged.ManagedModule.GetEventGroupTree(Shape.EventProject, treeView);
              treeView.ExpandAll();

              // Show our listbox as a DropDownControl.
              // This methods returns, when the DropDownControl is closed.
              editorService.DropDownControl(treeView);

              TreeNode selectedNode = treeView.SelectedNode;
              if (selectedNode != null)
              {
            string fullPath = selectedNode.FullPath;
            return fullPath.Replace("\\", "/");
              }
              else
            return Shape.EventGroup;
        }
开发者ID:romance-ii,项目名称:projectanarchy,代码行数:30,代码来源:FmodEventShape.cs

示例7: Fill

        public static void Fill(this ISnmpMessage message, TreeView tree)
        {
            var messageNode = tree.Nodes.Add(string.Format("Version {0}", message.Version));
            if (message.Version == VersionCode.V3)
            {
                var header = messageNode.Nodes.Add("header");
                header.Nodes.Add(string.Format("message id {0}", message.Header.MessageId));
                header.Nodes.Add(string.Format("max size {0}", message.Header.MaxSize));
                header.Nodes.Add(string.Format("security level {0}", message.Header.SecurityLevel.GetString()));
            }

            var parameter = messageNode.Nodes.Add("parameters");
            if (message.Version == VersionCode.V3)
            {
                parameter.Nodes.Add(string.Format("user {0}", message.Parameters.UserName));
                parameter.Nodes.Add(string.Format("engine id {0}", message.Parameters.EngineId.ToHexString()));
                parameter.Nodes.Add(string.Format("engine boots {0}", message.Parameters.EngineBoots));
                parameter.Nodes.Add(string.Format("engine time {0}", message.Parameters.EngineTime));
                parameter.Nodes.Add(string.Format("checksum {0}", message.Parameters.AuthenticationParameters.ToHexString()));
                parameter.Nodes.Add(string.Format("checksum broken {0}", message.Parameters.IsInvalid));
                parameter.Nodes.Add(string.Format("encryption token {0}", message.Parameters.PrivacyParameters.ToHexString()));
            }
            else
            {
                parameter.Nodes.Add(string.Format("community {0}", message.Parameters.UserName));
            }

            var scope = messageNode.Nodes.Add("scope");
            if (message.TypeCode() == SnmpType.Unknown)
            {
                scope.Nodes.Add("decryption error");
            }
            else if (OctetString.IsNullOrEmpty(message.Parameters.PrivacyParameters))
            {
                if (message.Version == VersionCode.V3)
                {
                    scope.Nodes.Add(string.Format("context name {0}", message.Scope.ContextName));
                    scope.Nodes.Add(string.Format("context engine id {0}", message.Scope.ContextEngineId.ToHexString()));
                }

                var pdu = scope.Nodes.Add(string.Format("pdu type {0}", message.Scope.Pdu.TypeCode));
                pdu.Nodes.Add(string.Format("request id {0}", message.Scope.Pdu.RequestId));
                pdu.Nodes.Add(string.Format("error status {0}", message.Scope.Pdu.ErrorStatus.ToErrorCode()));
                pdu.Nodes.Add(string.Format("error index {0}", message.Scope.Pdu.ErrorIndex));
                var variables = pdu.Nodes.Add(string.Format("variable count {0}", message.Scope.Pdu.Variables.Count));
                foreach (var variable in message.Scope.Pdu.Variables)
                {
                    variables.Nodes.Add(variable.ToString());
                }
            }
            else
            {
                scope.Nodes.Add("encrypted data");
            }

            tree.ExpandAll();
        }
开发者ID:bleissem,项目名称:sharpsnmplib,代码行数:57,代码来源:MessageExtensions.cs

示例8: RecordStep

 public static void RecordStep(TreeView tree, string step)
 {
     if (tree.Nodes[0] != null)
     {
         tree.BeginUpdate();
         tree.Nodes[0].Nodes.Insert(tree.Nodes[0].Nodes.Count, step);
         tree.EndUpdate();
         tree.ExpandAll();
     }
 }
开发者ID:krishnakanthms,项目名称:recordanywhere,代码行数:10,代码来源:StepRecorder.cs

示例9: BindTableNameList

 public void BindTableNameList(TreeView tv)
 {
     List<TableModel> list = idb.GetTableModelList(Utils.dbName);
     tv.Nodes.Clear();
     foreach (var item in list)
     {
         tv.Nodes.Add(item.TableName);
     }
     tv.ExpandAll();
 }
开发者ID:jack-tmac,项目名称:LCLFramework,代码行数:10,代码来源:BLLFactory.cs

示例10: InitTreeView

        //public static void InitTreeView(TreeView treeView, DataRow row)
        //{

        //    treeView.Nodes.Clear();
        //    if (row != null)
        //    {
        //        SetTreeViewData(treeView.Nodes, row);
        //        treeView.ExpandAll();
        //        if (treeView.Nodes.Count > 0) treeView.SelectedNode = treeView.Nodes[0];
        //    }
        //}
		#endregion

        public static void InitTreeView(TreeView treeView, XElement e)
        {

            treeView.Nodes.Clear();
            if (e != null)
            {
                SetTreeViewData(treeView.Nodes, e);
                treeView.ExpandAll();
                if (treeView.Nodes.Count > 0) treeView.SelectedNode = treeView.Nodes[0];
            }
        }
开发者ID:labeuze,项目名称:source,代码行数:24,代码来源:TreeView.cs

示例11: loadLoadBindableFieldsIntoTreeView

 public void loadLoadBindableFieldsIntoTreeView(TreeView tvTargetTreeView, bool bHideGetAndSetStrings, bool clearPreviousList)
 {
     numberOfItemsProcessed = 0;
     cirClassMapped = new List<ICirClass>();
     if (clearPreviousList)
         tvTargetTreeView.Nodes.Clear();
     // make the first char upper case
     addBindableFieldsIntoTreeView_Recursive(tvTargetTreeView.Nodes, cirRootClass, bHideGetAndSetStrings);
     tvTargetTreeView.ExpandAll();
     Callbacks.raiseRegistedCallbacks(onMapClassComplete);
 }
开发者ID:pusp,项目名称:o2platform,代码行数:11,代码来源:ascx_SpringMvcAutoBindClassesView.Controllers.cs

示例12: BuildFieldTree

 public static void BuildFieldTree(TreeView treeview, IEnumerable<IField> rootFields)
 {
     treeview.Nodes.Clear();
     foreach (var rootField in rootFields)
     {
         var node = new TreeNode(rootField.FieldName);
         node.Tag = rootField;
         BuildFieldNode(node,rootField);
         treeview.Nodes.Add(node);
     }
     treeview.ExpandAll();
 }
开发者ID:alpagas,项目名称:outlook-addin,代码行数:12,代码来源:FieldManager.cs

示例13: CreateTreeView

 public static void CreateTreeView(TreeView treeView1,DataTable dt)
 {
     TreeViewSchema tvwSchema = new TreeViewSchema();
     tvwSchema.DataSource = dt;
     tvwSchema.KeyMember = "Id";
     tvwSchema.DisplayMember = "Node";
     tvwSchema.ValueMember = "Id";
     tvwSchema.ParentMember = "ParentId";
     Helper.PopulateTree(treeView1, tvwSchema);
     treeView1.ExpandAll();
     treeView1.CheckBoxes = true;
     treeView1.Nodes[0].Checked = true;
 }
开发者ID:arunagiritm,项目名称:AngularUtilities,代码行数:13,代码来源:Helper.cs

示例14: N_LoadDept

        /*
         * 外部调用
         */ 

        #region [ 方法: 给TreeView控件加载部门 ]

        public void N_LoadDept(TreeView tvDep)
        {
            //加载部门
            using (ds = new DataSet())
            {
                ds = this.N_GetDeptInfo();
                TreeNode tnDept = new TreeNode();
                tnDept.Text = "所有部门";
                tvDep.Nodes.Add(tnDept);
                this.N_LoadChildDept(tnDept, 0, 0, ds.Tables[0].Rows.Count);
                tvDep.ExpandAll();
            }
        }
开发者ID:ZoeCheck,项目名称:128_5.6_2010,代码行数:19,代码来源:RealTimeDirectionalBLL.cs

示例15: BindReceipts

        public void BindReceipts(TreeView ctrl)
        {
            var dir = this._cfg.GetReceiptDirectory();
            ctrl.Nodes[0].Nodes.Clear();
            for (var i = 0; i < dir.GetLength(1); i++)
            {
                TreeNode node = null;
                node = new TreeNode(dir[0, i]);
                node.Tag = dir[1, i];
                ctrl.Nodes[0].Nodes.Add(node);
            }

            ctrl.ExpandAll();
        }
开发者ID:pengmin,项目名称:BlueCloud,代码行数:14,代码来源:Controller.cs


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