本文整理汇总了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;
}
示例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;
}
}
}
示例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;
}
}
示例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();
}
}
示例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
}
示例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);
}
}
示例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;
}
示例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;
}
}
示例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();
}
}
示例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);
}
}
示例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;
}
}
示例12: treeView1_AfterSelect
private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
{
if(SelectedChanged!=null)
{
SelectedChanged(this, e);
}
}
示例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());
// }
//}
}
示例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();
}
示例15: OnAfterSelect
protected override void OnAfterSelect(TreeViewEventArgs e)
{
if (!only_focus)
{
base.OnAfterSelect(e);
}
}