當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。