本文整理汇总了C#中System.Windows.Forms.TreeView.BringToFront方法的典型用法代码示例。如果您正苦于以下问题:C# TreeView.BringToFront方法的具体用法?C# TreeView.BringToFront怎么用?C# TreeView.BringToFront使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TreeView
的用法示例。
在下文中一共展示了TreeView.BringToFront方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChannelCreated
/// <summary>
/// Handles the ChannelCreated event of Yaircc.UI.IRCMarshal.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="channel">The newly created channel.</param>
public void ChannelCreated(object sender, IRCChannel channel)
{
this.splitContainer.Panel1.InvokeAction(() =>
{
channel.NamesPopulated += new IRCChannel.NamesPopulatedHandler(this.ChannelUsersPopulated);
TreeView userTreeView = new TreeView();
userTreeView.Name = string.Format("{0}_TreeView", channel.ToString());
userTreeView.ImageList = userModeImageList;
userTreeView.TreeViewNodeSorter = new UserNodeSorter();
userTreeView.MouseDown += new MouseEventHandler(UserTreeView_MouseDown);
if (channel.TabPage.TabType == IRCTabType.Channel)
{
userTreeView.Nodes.Add("Fetching user list...");
}
else if (channel.TabPage.TabType == IRCTabType.PM)
{
TreeNode node = new TreeNode();
node.Text = channel.Name;
node.ImageKey = "user";
node.SelectedImageKey = node.ImageKey;
userTreeView.Nodes.Add(node);
}
splitContainer.Panel1.Controls.Add(userTreeView);
userTreeView.Dock = DockStyle.Fill;
channel.TabPage.UserTreeView = userTreeView;
channel.TabPage.NickNameMentioned += new IRCTabPage.NickNameMentionedHandler(this.FlashWindowInTaskBar);
if (channelsTabControl.SelectedTab == channel.TabPage)
{
userTreeView.BringToFront();
this.inputTextBox.MaxLength = this.CurrentTab.Marshal.GetChannelByTab(this.CurrentTab).MaximumMessageSize;
this.UpdateStatusBarText();
}
this.RefreshWindowsMenuItems(null);
});
}
示例2: ConfigureNewIRCMarshal
/// <summary>
/// Configures a newly created Yaircc.UI.IRCMarshal.
/// </summary>
/// <param name="sender">The source of the invocation.</param>
/// <param name="marshal">The marshal that was created.</param>
public void ConfigureNewIRCMarshal(object sender, IRCMarshal marshal)
{
TreeView treeView = new TreeView();
treeView.Name = string.Format("{0}_TreeView", marshal.Connection.ToString());
treeView.ImageList = this.userModeImageList;
TreeNode node = new TreeNode();
node.Text = marshal.Connection.ToString();
node.ImageKey = "lightning.png";
node.SelectedImageKey = node.ImageKey;
treeView.Nodes.Add(node);
this.splitContainer.Panel1.Controls.Add(treeView);
treeView.Dock = DockStyle.Fill;
marshal.ServerTab.UserTreeView = treeView;
marshal.ServerTab.NickNameMentioned += new IRCTabPage.NickNameMentionedHandler(this.FlashWindowInTaskBar);
treeView.BringToFront();
this.RefreshWindowsMenuItems(null);
this.BuildFavouriteButtons();
}
示例3: LoadListInternal
protected override void LoadListInternal(Mediator mediator, SplitterPanel parent)
{
parent.FindForm().UseWaitCursor = true;
parent.SuspendLayout();
RemovePreviousControl();
TreeView tv = new TreeView();
tv.SuspendLayout();
tv.Dock = DockStyle.Fill;
AddPossibilities(tv.Nodes, m_possibilityList.PossibilitiesOS);
tv.AfterSelect += new TreeViewEventHandler(tv_AfterSelect);
m_currentControl = tv;
tv.HideSelection = false;
parent.Controls.Add(tv);
tv.BringToFront();
tv.ResumeLayout();
parent.ResumeLayout();
parent.FindForm().UseWaitCursor = false;
base.LoadListInternal(mediator, parent);
tv.SelectedNode = tv.Nodes[0];
}