• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.TreeNodeMouseClickEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: treeViewFiles_NodeMouseDoubleClick

        public void treeViewFiles_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            Console.WriteLine("Double Click");
            Console.WriteLine("Full path: " + e.Node.FullPath);
            //pop the save file dialog
            saveFileDialog1.FileOk += saveFileDialog1_FileOk;
            saveFileDialog1.FileName = e.Node.Text;
            saveFileDialog1.ShowDialog();

            //we need the path of the file we want to save
            IList<int> path = GetNodePathIndexes(e.Node);

            StringBuilder fullPath = new StringBuilder("treeview");
            foreach (int index in path)
            {
                fullPath.AppendFormat(".Nodes[{0}]", index);
            }
            Console.WriteLine("After showdialog Full path: " + fullPath);

            //implement the save...
            string fixedpath = e.Node.FullPath.Replace("\\", "/");
            Console.WriteLine("fixed path: " + fixedpath);
            Console.WriteLine("from teh dialog: " + saveFileDialog1.FileName);

            Cursor.Current = Cursors.WaitCursor;
            download_file(fixedpath, txtToken.Text, gbl_TeamObject.members[gbl_current_member_index].profile.member_id, saveFileDialog1.FileName);
            Cursor.Current = Cursors.Default;
        }
开发者ID:chadduffey,项目名称:hackweekExplorer,代码行数:28,代码来源:Form1.cs


示例2: OnNodeMouseDoubleClick

		protected override void OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e) {
			var node = e.Node as TreeNodeX;
			if (node != null) {
				node.OnMouseDoubleClick(e);
			}
			base.OnNodeMouseDoubleClick(e);
		}
开发者ID:mamingxiu,项目名称:dnExplorer,代码行数:7,代码来源:TreeViewX.cs


示例3: TreeView_NodeMouseClick

        private void TreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            var msg = (e.Node.Tag as EntPhysicalTable)?.AllProperties;

            dgvProps.DataSource = msg?.ToArray();
            dgvProps.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
        }
开发者ID:celery94,项目名称:EntPhysicalTableTree,代码行数:7,代码来源:FormMain.cs


示例4: treeView1_NodeMouseClick

 private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) {
     if (e.Node.Text == "New User") {
         loadControls(newUserControl);
     } else if (e.Node.Text == "Change Password") {
         loadControls(changePasswordControl);
     }
 }
开发者ID:samuelagm,项目名称:indigeneApp,代码行数:7,代码来源:AccountForm.cs


示例5: explorerTreeView1_NodeMouseClick

 private void explorerTreeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         explorerTreeView1.SelectedNode = e.Node;
     }
 }
开发者ID:TGOSeraph,项目名称:StUtils.Renamer,代码行数:7,代码来源:SelectFilesPage.cs


示例6: tvProjectFolders_NodeMouseClick

 private void tvProjectFolders_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     ProjectFolder pf = project.GetProductFolderFromLinkReference(e.Node);
     lvProjectFiles.Items.Clear();
     ListViewProjectFiles lvpf = new ListViewProjectFiles(lvProjectFiles, pf);
     lvpf.Fill();
 }
开发者ID:dmarijanovic,项目名称:uber-tools,代码行数:7,代码来源:Main.cs


示例7: OnTreeViewNodeMouseDoubleClick

        private void OnTreeViewNodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs eventArgs)
        {
            FindResult? findResult = eventArgs.Node.Tag as FindResult?;

            if (findResult == null || !findResult.HasValue) {
                return;
            }

            // フォームがnullまたは破棄されている場合
            if (findResult.Value.mTextEditorForm == null || findResult.Value.mTextEditorForm.IsDisposed) {
                return;
            }

            // フォームが見つからなかった場合
            if (!this.mMainForm.TextEditorForms.Contains(findResult.Value.mTextEditorForm)) {
                return;
            }

            findResult.Value.mTextEditorForm.Activate();

            // 指定されたファイルの場所にジャンプ
            Scintilla scintilla = findResult.Value.mTextEditorForm.Scintilla;
            scintilla.SelectionStart = (int)findResult.Value.mPosition;
            scintilla.SelectionEnd = scintilla.SelectionStart;
            scintilla.ScrollCaret();
        }
开发者ID:drksugi,项目名称:HspEditorPlus,代码行数:26,代码来源:FindResultForm.cs


示例8: workspaceTree_NodeMouseDoubleClick

        void workspaceTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (GisApp.ActiveApp.SelectNode != null)
            {
                WorkspaceTreeNodeBase node = GisApp.ActiveApp.SelectNode;
                if (node.NodeType == WorkspaceTreeNodeDataType.SceneName)
                {
                    string sceneName = node.Text;
                    //打开场景,假如说已经打开,则激活
                    //否则,直接新建这个场景
                    var document = GisApp.ActiveApp.FormMain.DocumentManager.View.Documents.Where(s =>
                        {
                            bool result = false;
                            IFormScene form = s.Form as IFormScene;
                            result = s.Caption == sceneName && form != null;
                            return result;
                        }).FirstOrDefault();

                    IFormScene formScene = null;
                    if (document != null)
                    {
                        formScene = document.Form as IFormScene;
                        GisApp.ActiveApp.FormMain.DocumentManager.View.ActivateDocument(document.Control);
                    }
                    else
                    {
                        formScene = GisApp.ActiveApp.CreateFormScene(sceneName);
                    }
                    formScene.SceneControl.Scene.Workspace = GisApp.ActiveApp.Workspace;
                    formScene.SceneControl.Scene.Open(sceneName);
                }
            }
        }
开发者ID:cosmokaya,项目名称:HuaBo.Gis.Desktop,代码行数:33,代码来源:ControlWorkspaceTree.cs


示例9: ProjectExplorer_NodeMouseDoubleClick

		private void ProjectExplorer_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
		{
			if (NodeIsFile(e.Node))
			{
				_openedProject?.OpenFile(new FileInfo(e.Node.FullPath));
			}
		}
开发者ID:rokn,项目名称:REAL-Editor,代码行数:7,代码来源:ProjectExplorer.cs


示例10: treeView1_NodeMouseClick

        private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                try
                {
                    //重置颜色和字体
                    richTextBox1.SelectAll();
                    richTextBox1.SelectionColor = Color.Black;
                    richTextBox1.SelectionFont = new Font(richTextBox1.Font.FontFamily, richTextBox1.Font.Size);

                    string tag = e.Node.Tag == null ? "" : e.Node.Tag.ToString();
                    int index = richTextBox1.Text.IndexOf(tag);

                    richTextBox1.SelectionStart = index;
                    richTextBox1.SelectionLength = tag.Length;
                    richTextBox1.SelectionColor = Color.FromArgb(0, 128, 0);
                    richTextBox1.SelectionFont = new Font(richTextBox1.Font.FontFamily, richTextBox1.Font.Size, FontStyle.Bold);
                    richTextBox1.ScrollToCaret();
                }
                catch
                {
                }
            }
        }
开发者ID:0611163,项目名称:ScientificCalculator,代码行数:25,代码来源:Help.cs


示例11: ShowReportInfo

 private void ShowReportInfo(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Node.Nodes.Count == 0)
     {
         reportInfo.Text = e.Node.Tag.ToString();
     }
 }
开发者ID:Vallerious,项目名称:OOP-Homeworks,代码行数:7,代码来源:BusinessReportForm.cs


示例12: treeView1_NodeMouseDoubleClick

        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Level == 0)
            {
                //点击的数据库节点
                TabPage page = tabControl1.TabPages[e.Node.Text];
                if (page == null)
                {
                    page = new TabPage(e.Node.Text);
                    page.Name = e.Node.Text;
                    page.BackColor = Color.White;
                    TableControl tc = new TableControl();
                    tc.DataBaseName = e.Node.Text;
                    tc.Server = server;
                    tc.Dock = DockStyle.Fill;
                    page.Controls.Add(tc);
                    tabControl1.TabPages.Add(page);
                }
                tabControl1.SelectTab(page);
                //e.Node.Nodes.Clear();
                //List<string> tables = DbHelper.GetTables(server, e.Node.Text);
                //foreach (var table in tables)
                //{
                //    e.Node.Nodes.Add(table);
                //}
                //e.Node.Expand();
            }
            else if (e.Node.Level == 1)
            {
                //点击的表

            }
        }
开发者ID:dusdong,项目名称:BaseComponent,代码行数:33,代码来源:MainForm.cs


示例13: treeView1_NodeMouseDoubleClick

 private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (_dc == null) return;
     var method = e.Node.Tag as ModelMethod;
     if (method != null)
         textBox1.Text = _dc.GetText(method);
 }
开发者ID:airbrush,项目名称:CSD,代码行数:7,代码来源:Form1.cs


示例14: snapShotDataTree_NodeMouseClick

        private void snapShotDataTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Button != MouseButtons.Right) { return; }
            snapShotDataTree.SelectedNode = e.Node;
            if (!(e.Node is CallNode)) return;
            CallNode tmpNode = (CallNode)e.Node;
            Csta.ConnectionID_t selectedConnId = tmpNode.connection;
            ContextMenuStrip snapShotDataTreeContextMenu = new ContextMenuStrip();
            ToolStripItem cstaClearCallContextMenuItem = snapShotDataTreeContextMenu.Items.Add("cstaClearCall");
            ToolStripItem cstaClearConnectionContextMenuItem = snapShotDataTreeContextMenu.Items.Add("cstaClearConnection");
            cstaClearCallContextMenuItem.Click += (s, ev) =>
            {
                Csta.EventBuffer_t evtbuf = Csta.clearCall(this.parentForm.acsHandle, selectedConnId);
                if (evtbuf.evt.eventHeader.eventClass.eventClass == Csta.CSTACONFIRMATION && evtbuf.evt.eventHeader.eventType.eventType == Csta.CSTA_CLEAR_CALL_CONF)
                {
                    snapShotDataTree.Nodes.Remove(tmpNode);
                }
            };

            cstaClearConnectionContextMenuItem.Click += (s, ev) =>
            {
                Csta.EventBuffer_t evtbuf = Csta.clearConnection(parentForm.acsHandle, parentForm.privData, selectedConnId);
                if (evtbuf.evt.eventHeader.eventClass.eventClass == Csta.CSTACONFIRMATION && evtbuf.evt.eventHeader.eventType.eventType == Csta.CSTA_CLEAR_CONNECTION_CONF)
                {
                    snapShotDataTree.Nodes.Remove(tmpNode);
                }
            };

            snapShotDataTreeContextMenu.Show(Cursor.Position);
        }
开发者ID:shizenghua,项目名称:TSAPIDemo,代码行数:30,代码来源:SnapShotDevicePopup.cs


示例15: treeView1_NodeMouseClick

        private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            //if (__frmComposite != null) __frmComposite.Close();
            //if (__frmSwitch != null) __frmSwitch.Close();
            //if (__gerPlus != null) __gerPlus.Close();

            if (e.Node.Name == "Node0")
            {               
                if (__gerPlus == null) __gerPlus = new GerenalPlus.Form1();
                LoadActiveForm(__gerPlus);
            }
            else if (e.Node.Name == "Node1")
            {
                if (__frmSwitch == null) __frmSwitch = new SwitchDemo.Form3();
                LoadActiveForm(__frmSwitch);
            }
            else if (e.Node.Name == "Node2")
            {
                if (__frmComposite == null) __frmComposite = new SwitchDemo.Form4();
                LoadActiveForm(__frmComposite);
            }
            else if (e.Node.Name == "Node3")
            {
                if (__S12Debug == null) __S12Debug = new S21Debug.Form1();
                LoadActiveForm(__S12Debug);        
                //System.Diagnostics.Process proc = new System.Diagnostics.Process();
                //ZNE_100TL_Factory_Config.ZConfig.Run();            
            }
        }
开发者ID:SanHot,项目名称:JcMatrixSwitch,代码行数:29,代码来源:Form1.cs


示例16: treeView1_NodeMouseDoubleClick

        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {

            try
            {
                TreeNode parentnode = e.Node;
                while (parentnode.Parent != null)
                {
                    parentnode = parentnode.Parent;
                }

                if (parentnode.Text.Equals("Match Result"))
                //if (e.Node.Level == 3 || e.Node.Level == 5)
                {
                    OddsCheckerCrawler parent = this.MdiParent as OddsCheckerCrawler;
                    if (!parent.IsProcessRunning)
                    {
                        //if (!string.IsNullOrEmpty(parent.SelectedBookies()))
                        //{

                        //parent.SetProgress(true);
                        //parent.IsProcessRunning = true;
                        string info = e.Node.Text;
                        string[] info1 = info.Split(':');
                        CrawlAllMarkets crawl = new CrawlAllMarkets();
                        string[] match = crawl.GetChampionMatchInfo(Convert.ToInt32(info1[1].ToString()));
                        //match[0]=link;match[1]=time;
                        if (match[0] != null)
                        {
                            parent.IsProcessRunning = true;
                            parent.SetProgress(true);
                            flowLayoutPanel1.Controls.Clear();

                            //    lblsportid.Text = info1[3];
                            countthread = 0;

                            Task taskA = Task.Factory.StartNew(() =>
                            {
                                FillMatchInfo(info1[1], match[0], match[1],1);

                            }, TaskCreationOptions.LongRunning);
                        }
                        //}
                        //else
                        //{
                        //    MessageBox.Show("Please select atleast one bookie from Select Bookies menu");
                        //}
                    }
                    else
                    {
                        MessageBox.Show("A process is already running");
                    }

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("An internal error occured while processing the request");
            }
        }
开发者ID:gmahajan604,项目名称:OddsCompilerCode,代码行数:60,代码来源:ChampLeagueResult.cs


示例17: treeView1_NodeMouseClick

        void treeView1_NodeMouseClick(object sender,
    TreeNodeMouseClickEventArgs e)
        {
            TreeNode newSelected = e.Node;
            listView1.Items.Clear();
            DirectoryInfo nodeDirInfo = (DirectoryInfo)newSelected.Tag;
            ListViewItem.ListViewSubItem[] subItems;
            ListViewItem item = null;

            foreach (DirectoryInfo dir in nodeDirInfo.GetDirectories())
            {
                item = new ListViewItem(dir.Name, 0);
                subItems = new ListViewItem.ListViewSubItem[]
                          {new ListViewItem.ListViewSubItem(item, "Directory"),
                   new ListViewItem.ListViewSubItem(item,
                dir.LastAccessTime.ToShortDateString())};
                item.SubItems.AddRange(subItems);
                listView1.Items.Add(item);
            }
            foreach (FileInfo file in nodeDirInfo.GetFiles())
            {
                item = new ListViewItem(file.Name, 1);
                subItems = new ListViewItem.ListViewSubItem[]
                          { new ListViewItem.ListViewSubItem(item, "File"),
                   new ListViewItem.ListViewSubItem(item,
                file.LastAccessTime.ToShortDateString())};

                item.SubItems.AddRange(subItems);
                listView1.Items.Add(item);
            }

            listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
        }
开发者ID:StefanGovedarski,项目名称:HackBulgariaHomeworks,代码行数:33,代码来源:Form1.cs


示例18: tvTrees_NodeMouseClick

        private void tvTrees_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            //点击一级菜单栏
            if (e.Node.Level == 0)
            {
                this.tvTrees.CollapseAll();//收缩

                var databaseName = e.Node.Name;

                List<TableContext> tableContexts =
                    GlobalContext.DataBaseContexts.First(p => p.DataBaseName.Equals(databaseName)).TableList;

                //加载对应表
                foreach (var tableNode in tableContexts.Select(tableContext => new TreeNode() { Text = tableContext.Name+(string.IsNullOrEmpty(tableContext.Description) ? string.Empty :"【"+tableContext.Description+"】"), Name = tableContext.Name }))
                {
                    e.Node.Nodes.Add(tableNode);
                }

                e.Node.ExpandAll();
            }
            else if (e.Node.Level == 1)//点击表
            {
                var databaseName = e.Node.Parent.Name;
                var tableName = e.Node.Name;

                this.dgvColumn.DataSource = DAOHelper.GetColumnContextListByTableName(databaseName, tableName);

            }
        }
开发者ID:test123test111,项目名称:Tools,代码行数:29,代码来源:Main.cs


示例19: NodeClick

 public void NodeClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         //if (e.Node is BaseNode)
         //{
         //    this.TNMCEA = e;
         //    e.Node.ContextMenuStrip = GetRightMenu((e.Node as BaseNode).RightMenu);
         //}
     }
     else
     {
         //if (e.Node is BaseNode)
         //{
         //    string MName = (e.Node as BaseNode).Name + "_" + (e.Node as BaseNode).Click;
         //    MethodInfo methodInfo = this.GetType().GetMethods().Where(n => n.Name.Equals(MName)).FirstOrDefault();
         //    if (methodInfo != null)
         //    {
         //        methodInfo.Invoke(this, new object[] { e });
         //    }
         //    else
         //    {
         //        //MessageBox.Show("没有设置匹配的事件。");
         //    }
         //}
     }
 }
开发者ID:haoxinqing,项目名称:DataVerification,代码行数:27,代码来源:EventClass.cs


示例20: TreeView_NodeMouseClick

 //declara método para alterar tela de ajuda
 private void TreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     //método executado cada vez que é precionada uma opção na TreeView
     richTextBox1.BackColor = System.Drawing.Color.White; //altera a cor de fundo do mesmo para branco(dando um aspecto de em funcionalidade)
     string caminho = Convert.ToString(e.Node.Tag); //converte o valor da tag da opção de TreeView para string, e depois armazena em caminho
     richTextBox1.LoadFile(caminho, RichTextBoxStreamType.PlainText); //carrega arquivo referentea a opção selecionada
 }
开发者ID:FabioCaue,项目名称:ChatServidor,代码行数:8,代码来源:Help.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.TreeView类代码示例发布时间:2022-05-26
下一篇:
C# Forms.TreeNodeCollection类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap