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


C# TreeView.BringToFront方法代码示例

本文整理汇总了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);
            });
        }
开发者ID:rastating,项目名称:yaircc,代码行数:46,代码来源:MainForm.cs

示例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();
        }
开发者ID:rastating,项目名称:yaircc,代码行数:27,代码来源:MainForm.cs

示例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];
			}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:23,代码来源:ConcorderControl.cs


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