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


C# Forms.TreeViewEventArgs类代码示例

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


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

示例1: OnAfterCheck

 private void OnAfterCheck(object sender, TreeViewEventArgs e)
 {
     this.AfterCheck -= OnAfterCheck;
     SetChildChecked(e.Node);
     SetParentChecked(e.Node);
     this.AfterCheck += OnAfterCheck;
 }
开发者ID:redeyedmonster,项目名称:RedEyedMonster.WindowsControls,代码行数:7,代码来源:TreeViewFileBrowser.cs

示例2: nodeTreeView_AfterCheck

 private void nodeTreeView_AfterCheck(object sender, TreeViewEventArgs e) {
     if (isFoldNode(e.Node)) {
         foreach(TreeNode node in e.Node.Nodes) {
             node.Checked = e.Node.Checked;
         }
     }
 }
开发者ID:675492062,项目名称:behaviac,代码行数:7,代码来源:FrequentlyUsedNodesDialog.cs

示例3: treeViewGroup_AfterSelect

        private void treeViewGroup_AfterSelect(object sender, TreeViewEventArgs e)
        {
            try
            {
                //Start of: Change Font of  selected node
                if (prevNode != null)
                {
                    prevNode.ForeColor = Color.Black;
                    prevNode.NodeFont = new Font(Font.FontFamily, Font.Size, FontStyle.Regular);
                }

                prevNode = treeViewGroup.SelectedNode;

                treeViewGroup.SelectedNode.ForeColor = Color.Blue;
                treeViewGroup.SelectedNode.NodeFont = new Font(Font.FontFamily.Name, Font.Size, FontStyle.Regular);
                //End of: Change Font of  selected node

                PrincipalContext ctx = new PrincipalContext(ContextType.Domain, treeViewGroup.SelectedNode.ImageKey); 
                
                GroupPrincipal grp = GroupPrincipal.FindByIdentity(ctx, IdentityType.Name, treeViewGroup.SelectedNode.Text);


                userDetails = (from u in grp.Members
                               select new UserDetails { DisplayName = u.DisplayName, UserName = u.SamAccountName,Domain = u.Context.Name }).OrderBy(x => x.DisplayName).ToList();
             
                userControlListing.DataSource = userDetails;
                
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:m12k,项目名称:Files,代码行数:33,代码来源:FormActiveDirectoryUsersList.cs

示例4: samplesTreeView_AfterSelect

 private void samplesTreeView_AfterSelect(object sender, TreeViewEventArgs e)
 {
     TreeNode currentNode = samplesTreeView.SelectedNode;
     currentSample = (Sample)currentNode.Tag;
     if (currentSample != null)
     {
         currentHarness = currentSample.Harness;
         runButton.Enabled = true;
         descriptionTextBox.Text = currentSample.Description;
         codeRichTextBox.Clear();
         codeRichTextBox.Text = currentSample.Code;
         colorizeCode(codeRichTextBox);
         outputTextBox.Clear();
     }
     else
     {
         currentHarness = null;
         runButton.Enabled = false;
         descriptionTextBox.Text = "Select a query from the tree to the left.";
         codeRichTextBox.Clear();
         outputTextBox.Clear();
         if (e.Action != TreeViewAction.Collapse && e.Action != TreeViewAction.Unknown)
             e.Node.Expand();
     }
 }
开发者ID:AlehSkamarokhau,项目名称:PrototypeApps,代码行数:25,代码来源:SampleForm.cs

示例5: testPointView_AfterSelect

 private void testPointView_AfterSelect(object sender, TreeViewEventArgs e)
 {
     TreeNode tmpNode;
     ItemObject tmpObj;
     List<ItemObject> stack;
     if (e.Node == Root) return;                     //根节点返回
     ItemObject itm = e.Node.Tag as ItemObject;
     listProperty(itm);
     #region 显示当前的item
     stack = new List<ItemObject>(10);
     tmpNode = e.Node;
     stack.Add(tmpNode.Tag as ItemObject);
     while ((tmpNode.Tag as ItemObject).type != PptType.Slide)
     {
         tmpNode = tmpNode.Parent;
         stack.Add(tmpNode.Tag as ItemObject);
     }
     while (stack.Count > 0)
     {
         try
         {
             tmpObj = stack[stack.Count - 1];
             showSomething(tmpObj);
             stack.RemoveAt(stack.Count - 1);
         }
         catch
         {
             throw;
         }
     }
     #endregion
 }
开发者ID:kaiss78,项目名称:hustoes,代码行数:32,代码来源:testPowerpoint_old.cs

示例6: trvHierarchy_AfterSelect

		private void trvHierarchy_AfterSelect(object sender, TreeViewEventArgs e)
		{
			this.XsdElementUri = null;

			if(e.Node.Tag is ProjectItem)
			{
				ProjectItem projectItem = e.Node.Tag as ProjectItem;

				if(!projectItem.Kind.Equals(Constants.vsProjectItemKindPhysicalFolder, StringComparison.OrdinalIgnoreCase))
				{
					Cursor currentCursor = this.Cursor;
					this.Cursor = Cursors.WaitCursor;
					LoadXsdElementsHierarchy(e.Node);
					this.Cursor = currentCursor;
				}
			}
			else if(e.Node is XsdElementNode)
			{
				ProjectItem parent = e.Node.Parent.Tag as ProjectItem;
				this.XsdElementUri =
					new XmlSchemaElementMoniker(DteHelper2.BuildPath(parent), e.Node.Text);
			}

			if(SelectionChanged != null)
			{
				SelectionChanged(this, EventArgs.Empty);
			}
		}
开发者ID:Phidiax,项目名称:open-wssf-2015,代码行数:28,代码来源:XsdElementBrowserControl.cs

示例7: Node_Checked

 private void Node_Checked(object sender, TreeViewEventArgs e)
 {
     this.AfterCheck -= Node_Checked;
     CheckChildren(e.Node);
     CheckParent(e.Node);
     this.AfterCheck += Node_Checked;
 }
开发者ID:chendeben,项目名称:508-Attendance,代码行数:7,代码来源:DepartmentTreeview.cs

示例8: tvwSideMenu_AfterSelect

        private void tvwSideMenu_AfterSelect(object sender, TreeViewEventArgs e)
        {
            string selectedMenu = (string)e.Node.Tag;

            this.sustentantesUserControl.Visible = false;
            this.printerQueueUserControl.Visible = false;
            this.printerLoggingUserControl.Visible = false;
            this.templateConfigUserControl.Visible = false;
            this.printerConfigUserControl.Visible = false;

            if (selectedMenu == "Sustentantes")
            {
                this.sustentantesUserControl.Visible = true;
            }
            else if (selectedMenu == "PrinterQueue")
            {
                this.printerQueueUserControl.Visible = true;
            }
            else if (selectedMenu == "PrinterLogging")
            {
                this.printerLoggingUserControl.Visible = true;
            }
            else if (selectedMenu == "TemplateConfig")
            {
                this.templateConfigUserControl.Visible = true;
            }
            else if (selectedMenu == "PrinterConfig")
            {
                this.printerConfigUserControl.Visible = true;
            }
        }
开发者ID:amiboficial,项目名称:dotNetProjects,代码行数:31,代码来源:MainForm.cs

示例9: tv_AfterSelect

        private void tv_AfterSelect(object sender, TreeViewEventArgs e)
        {
            try
            {
                data.BeginUpdate();
                data.Nodes.Clear();

                if (e != null && e.Node != null & e.Node.Tag != null)
                {
                    foreach (System.Reflection.PropertyInfo pi in e.Node.Tag.GetType().GetProperties(System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance))
                    {
                        object v = pi.GetValue(e.Node.Tag, null);
                        if (v == null)
                            v = "<null>";

                        TreeNode n = data.Nodes.Add(pi.Name + ": " + v.ToString());
                        n.ExpandAll();
                    }

                    foreach (System.Reflection.FieldInfo fi in e.Node.Tag.GetType().GetFields(System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance))
                    {
                        object v = fi.GetValue(e.Node.Tag);
                        if (v == null)
                            v = "<null>";

                        TreeNode n = data.Nodes.Add(fi.Name + ": " + v.ToString());
                        n.ExpandAll();
                    }
                }
            }
            finally
            {
                data.EndUpdate();
            }
        }
开发者ID:kenkendk,项目名称:ac3il,代码行数:35,代码来源:Visualizer.cs

示例10: treeView1_AfterSelect

 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     UserControl tag = null;
     if (this.panel.Controls.Count > 0)
     {
         foreach (Control control in this.panel.Controls)
         {
             try
             {
                 this.panel.Controls.Remove(control);
             }
             catch (Exception)
             {
             }
         }
     }
     if ((e.Node.Tag != null) && (e.Node.Tag is UserControl))
     {
         tag = e.Node.Tag as UserControl;
     }
     else if (e.Node is OptionNode)
     {
         tag = ((OptionNode)e.Node).UI;
     }
     if (tag != null)
     {
         tag.Dock = DockStyle.Fill;
         this.panel.Controls.Clear();
         this.panel.Controls.Add(tag);
     }
 }
开发者ID:sunpander,项目名称:VSDT,代码行数:31,代码来源:FormOptionPage.cs

示例11: treeView1_AfterSelect

        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {

            switch (treeView1.SelectedNode.Name)
            {
                case "n00"://仿真时间
                    showthegroupbox(groupBox6);
                    break;

                case "n10" ://发射站轨道
                    showthegroupbox(groupBox2);
                    break;
                case "n11"://发射站雷达参数
                    showthegroupbox(groupBox3);
                    break;
                case "n20"://接收站轨迹
                    showthegroupbox(groupBox1);
                    break;
                case "n21"://接收站雷达参数
                    showthegroupbox(groupBox5);
                    break;
                default:
                    showthegroupbox();
                    break;

            }
        }
开发者ID:wt201501,项目名称:STKSIMUL2,代码行数:27,代码来源:staticpara.cs

示例12: treeView1_AfterSelect

 private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if(SelectedChanged!=null)
     {
         SelectedChanged(this, e);
     }
 }
开发者ID:jsgydjq,项目名称:train,代码行数:7,代码来源:AccountListCtrl.cs

示例13: trvPdept_AfterSelect

 private void trvPdept_AfterSelect(object sender, TreeViewEventArgs e)
 {
     GetEmp();
     //txtName.Text = "";
     //lsbEmpMac.Items.Clear();
     //lsbEmpMac.Values.Clear();
     //string type;
     //if (rbtEmp.Checked)
     //{
     //    type = "人员";
     //}
     //else
     //{
     //    type = "设备";
     //}
     //if (trvPdept.SelectedNode != null)
     //{
     //    DataTable empmacdt = codebll.GetLastEmpByDept(trvPdept.SelectedNode.Name.Trim(), type,txtName.Text.Trim());
     //    empmacdt = RemoveExitsEmpMac(empmacdt);
     //    for (int i = 0; i < empmacdt.Rows.Count; i++)
     //    {
     //        lsbEmpMac.AddItem(empmacdt.Rows[i][1].ToString(), empmacdt.Rows[i][0].ToString());
     //    }
     //}
 }
开发者ID:ZoeCheck,项目名称:128_5.6_2010,代码行数:25,代码来源:A_frmCodeSenderSet.cs

示例14: BuildConfigurationsAfterCheck

 private void BuildConfigurationsAfterCheck(object sender, TreeViewEventArgs e)
 {
     if (e.Node.Tag == null) return;
     var buildDefinitionId = (string)e.Node.Tag;
     _ciEntryPointSetting.GetBuildDefinition(buildDefinitionId).Active = e.Node.Checked;
     Settings.Save();
 }
开发者ID:ramalama,项目名称:SirenOfShame,代码行数:7,代码来源:ConfigureTfs.cs

示例15: OnAfterSelect

 protected override void OnAfterSelect(TreeViewEventArgs e)
 {
     if (!only_focus)
     {
         base.OnAfterSelect(e);
     }
 }
开发者ID:vnkolt,项目名称:NetOffice,代码行数:7,代码来源:MultiSelectTreeView.cs


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