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


C# Forms.TreeNodeMouseClickEventArgs类代码示例

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


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


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