public void NodeDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { try { string MName = e.Node.Name + "_NodeDoubleClick"; MethodInfo methodInfo = this.GetType().GetMethods().Where(n => n.Name.Equals(MName)).FirstOrDefault(); if (methodInfo != null) { SENDER = sender; TNMCEA = e; TREENODE = e.Node; if (e.Node.Tag is Pin) { PIN = e.Node.Tag as Pin; NdataBaseHelper.DBFullName = PIN.DataBasePath; } methodInfo.Invoke(this, new object[] { });//调用MName名字的函数 DoubleClick_OK = true; } else { DoubleClick_OK = false; } } catch (Exception ex) { throw ex; } }
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) { //点击的表 } }
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; }
protected override void OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e) { var node = e.Node as TreeNodeX; if (node != null) { node.OnMouseDoubleClick(e); } base.OnNodeMouseDoubleClick(e); }
private void TreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { var msg = (e.Node.Tag as EntPhysicalTable)?.AllProperties; dgvProps.DataSource = msg?.ToArray(); dgvProps.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; }
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); } }
private void explorerTreeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Button == MouseButtons.Right) { explorerTreeView1.SelectedNode = e.Node; } }
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(); }
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(); }
TreeNodeSelected(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { // this call back is used for both the SymTbl and Dict tab pages, // but we need to know which so we can use the correct ListView // control. ListView lvCur = null; if (sender == m_tvSymTbls) { lvCur = m_lvSymTbl; } else if (sender == m_tvDicts) { lvCur = m_lvDict; } else { Debug.Assert(false); // Why not? } m_curObjId = (AcDb.ObjectId)e.Node.Tag; AcDb.DBObject dbObj = m_trans.Transaction.GetObject(m_curObjId, OpenMode.ForRead); // collect all the data about the object m_snoopCollector.Collect(dbObj); // now display it Snoop.Utils.Display(lvCur, m_snoopCollector); }
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); } } }
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 { } } }
//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 }
private void TViewCategorias_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (e.Node.Nodes.Count == 0) { HorizontalSplitter.ToggleState(); } }
void tvProfiles_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (_inactive) { if (e.Node == tvProfiles.SelectedNode && _inactive) { _inactive = false; TreeNode node = e.Node; if (node != null) { while (node.Parent != null) { node = node.Parent; } IProfileDefinition profile = (IProfileDefinition)node.Tag; if (ProfileSelected != null) { ProfileSelected(profile); } } } } }
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); } }
//************************************************************************************* void treeView1_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (e.Node.IsExpanded == false) { //e.Node.Expand(); } }
private void WorkspaceTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { if (e.Button != MouseButtons.Right) { return; } WorkspaceTreeView.SelectedNode = WorkspaceTreeView.GetNodeAt(e.X, e.Y); TreeNode curNode = WorkspaceTreeView.GetNodeAt(e.X, e.Y); if (curNode == null) { return; } else if (curNode == mUsersAndLicensingNode) { UserAndLicensingContextMenuStrip.Show(Cursor.Position); } else if (curNode == mColorSettingNode) { } /* if (WorkspaceTreeView.SelectedNode.Tag is TaskModel) { TaskContextMenuStrip.Show(Cursor.Position); } */ }
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); }
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(); } }
protected void OnNodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { //base.OnNodeMouseClick(e); // is the click on the checkbox? If not, discard it TreeViewHitTestInfo info = m_tree.HitTest(e.X, e.Y); if (info == null) { return; } else if (info.Location == TreeViewHitTestLocations.Label) { string key = (string)e.Node.Tag; var tNode = m_nodeDict[key]; //var title = tNode.title; //if (title == null) { return; } //avoid re display title DisplayNode(tNode); } else if (info.Location == System.Windows.Forms.TreeViewHitTestLocations.StateImage) { TreeNode tn = e.Node; var bChk = Check(tn); Check(tn, !bChk); } else { return; } }
/// <summary> /// Occurs when the <see cref="E:System.Windows.Forms.TreeView.NodeMouseClick"></see> event is fired /// -- that is, when a node in the tree view is clicked. /// </summary> /// <param name="e">A <see cref="T:System.Windows.Forms.TreeNodeMouseClickEventArgs"></see> that contains the event data.</param> protected override void OnNodeMouseClick(TreeNodeMouseClickEventArgs e) { // Are we dealing with a dropdown node? this.ShowComboBox(e.Node as DropDownTreeNode); //if (e.Node is DropDownTreeNode) //{ // this.m_CurrentNode = (DropDownTreeNode)e.Node; // this.m_CurrentSelectionIdx = this.m_CurrentNode.ComboBox.SelectedIndex; // // Need to add the node's ComboBox to the TreeView's list of controls for it to work // this.Controls.Add(this.m_CurrentNode.ComboBox); // // Set the bounds of the ComboBox, with a little adjustment to make it look right // this.m_CurrentNode.ComboBox.SetBounds( // this.m_CurrentNode.Bounds.X - 1, // this.m_CurrentNode.Bounds.Y - 2, // this.CalcualteComboBoundsWidth(this.m_CurrentNode.ComboBox), // //this.m_CurrentNode.Bounds.Width + 25, // this.m_CurrentNode.Bounds.Height); // // Listen to the SelectedValueChanged event of the node's ComboBox // this.m_CurrentNode.ComboBox.SelectedValueChanged += new EventHandler(ComboBox_SelectedValueChanged); // this.m_CurrentNode.ComboBox.DropDownClosed += new EventHandler(ComboBox_DropDownClosed); // this.m_CurrentNode.ComboBox.BackColor = Color.DeepPink; // // Now show the ComboBox // this.m_CurrentNode.ComboBox.Show(); // this.m_CurrentNode.ComboBox.DroppedDown = true; //} base.OnNodeMouseClick(e); }
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"); } }
private void leksykonATCTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { string atc = e.Node.Tag as string; leksykonDescriptionLabel.Text = "Preparaty z grupy: " + atc; Leksykon_UpdateGrid(UnitOfWork.MedicineRepository.GetMedicinesByATC(atc)); }
TreeNodeSelected(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (sender == m_tvDocs) { m_lvCur = m_lvDocs; } else if (sender == m_tvCmds) { m_lvCur = m_lvCmds; } else if (sender == m_tvClasses) { if (m_tvClasses.SelectedNode != null) { m_selNode = m_tvClasses.SelectedNode.Index; } m_lvCur = m_lvClasses; System.Type tmpClass = (System.Type)e.Node.Tag; } else { Debug.Assert(false); } m_snoopCollectorObjs.Collect(e.Node.Tag); // now display it in the list view Snoop.Utils.Display(m_lvCur, m_snoopCollectorObjs); }
public void trvTemplate_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { ToolStripItem tsItem; trvTemplate.ExpandAll(); nodeEdited = e.Node; if (e.Node.Level == 1) { //port node, filling the context menu strip with the ports numbers cmsTreeNodeEdit.Items.Clear(); for (int i = 1; i <= 4; i++) { tsItem = cmsTreeNodeEdit.Items.Add(System.Convert.ToString(i)); tsItem.Tag = i; } cmsTreeNodeEdit.Show(trvTemplate, e.X, e.Y); } if (e.Node.Level == 0) { //station node, filling the context menu strip with the available stations and showing it cmsTreeNodeEdit.Items.Clear(); //loadAvailableStations() updateConnectedStations(); foreach (ManRegGlobal.cListStation stn in stationList) { tsItem = cmsTreeNodeEdit.Items.Add(stn.Text); tsItem.Tag = stn; } cmsTreeNodeEdit.Show(trvTemplate, e.X, e.Y); } }
public void TesttreeOpcItems_NodeMouseClick01() { //using (OPCDataSelectorController oPCDataSelectorController = OPCDataSelectorControllerFactory.CreateOPCDataSelectorController01()) //{ //test1 exception case System.Windows.Forms.TreeNode node = new System.Windows.Forms.TreeNode("testing"); node.Name = "TestingName"; System.Windows.Forms.TreeNodeMouseClickEventArgs treenodeEvent = new System.Windows.Forms.TreeNodeMouseClickEventArgs(node, System.Windows.Forms.MouseButtons.Left, 1, 10, 22); //Test Procedure Call oPCDataSelectorController.treeOpcItems_NodeMouseClick(null, treenodeEvent); //test 2 node = new System.Windows.Forms.TreeNode("testing"); node.Name = "TestingName12"; node.Tag = 1.0; treenodeEvent = new System.Windows.Forms.TreeNodeMouseClickEventArgs(node, System.Windows.Forms.MouseButtons.Left, 1, 10, 22); //Test Procedure Call oPCDataSelectorController.treeOpcItems_NodeMouseClick(null, treenodeEvent); //test3 node = new System.Windows.Forms.TreeNode("testing"); node.Name = ""; treenodeEvent = new System.Windows.Forms.TreeNodeMouseClickEventArgs(node, System.Windows.Forms.MouseButtons.Left, 1, 10, 22); //Test Procedure Call oPCDataSelectorController.treeOpcItems_NodeMouseClick(null, treenodeEvent); // } }
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("没有设置匹配的事件。"); // } //} } }
private void ShowReportInfo(object sender, TreeNodeMouseClickEventArgs e) { if (e.Node.Nodes.Count == 0) { reportInfo.Text = e.Node.Tag.ToString(); } }
public void HandleNodeClick(object sender, TreeNodeMouseClickEventArgs e) { if (this.m_NodeClickEvent != null) { this.m_NodeClickEvent(sender, e); } }
void treeView1_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { foreach (TabPage tb in this.mainTabControl.Controls) { if (tb.Text == e.Node.Name) { this.mainTabControl.SelectedTab = tb; return; } } for (int i = 0; i < this.LayerArrayList.Count; i++) { if (e.Node.Name != ((EPControl.Layer) this.LayerArrayList[i]).PaperName) { continue; } EPControl.Layer temp; temp = (EPControl.Layer) this.LayerArrayList[i]; System.Windows.Forms.TabPage newtabpage = new System.Windows.Forms.TabPage(); newtabpage.Text = temp.PaperName; newtabpage.Name = temp.PaperName; this.mainTabControl.Controls.Add(newtabpage); newtabpage.Controls.Add(temp); this.currentPaper = temp; this.mainTabControl.SelectedTab = newtabpage; break; } }
void propTV_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (((TreeNode)e.Node).ImageIndex == 0) { setCheck(e.Node); } }
/// <summary> /// 左侧点击对应的树节点的控件属性在表达式显示对应的(控件名.属性) /// </summary> /// <param name="sender">事件发送者</param> /// <param name="e">事件数据</param> private void ControlTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { TreeNode SelectNode = ControlTree.SelectedNode; string ReturnValue = null; if (SelectNode != null && SelectNode.Nodes.Count == 0) { foreach (List<string> TmpControl in tempAttribute) { if (SelectNode.Parent.Text == TmpControl[0]) { ReturnValue = TmpControl[0] + "."; foreach (string Attribute in TmpControl) { if (Attribute.Split(',')[0] == SelectNode.Text) { ReturnValue += Attribute.Split(',')[1]; break; } } break; } } } ExpressBox.Text += ReturnValue; }
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); }
private void TreeNode_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { switch (this.SelectedNode.Type) { case FS.Base.UI.Controls.NodeTypeEnum.Database: if (!this.SelectedNode.OnOff) { this.mData_Connect(sender, null); } break; case FS.Base.UI.Controls.NodeTypeEnum.Tables: case FS.Base.UI.Controls.NodeTypeEnum.Views: case FS.Base.UI.Controls.NodeTypeEnum.Procedures: case FS.Base.UI.Controls.NodeTypeEnum.Functions: this.mData_Refresh(); break; case FS.Base.UI.Controls.NodeTypeEnum.Editor: case FS.Base.UI.Controls.NodeTypeEnum.Table: case FS.Base.UI.Controls.NodeTypeEnum.View: case FS.Base.UI.Controls.NodeTypeEnum.Procedure: case FS.Base.UI.Controls.NodeTypeEnum.Function: this.mData_Editor(); break; } }
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); }
private void ProjectExplorer_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (NodeIsFile(e.Node)) { _openedProject?.OpenFile(new FileInfo(e.Node.FullPath)); } }
/// <summary> /// Shows the clicked directory content in the list view /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { TreeNode newSelected = e.Node; listView1.Items.Clear(); currentDir=new Directories((DirectoryInfo)newSelected.Tag); PopulateListView(currentDir); }
protected override void OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e) { base.OnNodeMouseDoubleClick(e); if (e.Node.IsExpanded) e.Node.Collapse(); else e.Node.Expand(); }
protected override void OnNodeMouseClick(TreeNodeMouseClickEventArgs e) { base.OnNodeMouseClick(e); if (!(e.Node is IShadowNode)) { SelectedNode = e.Node; } }
protected override void OnNodeMouseClick(System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (e.Button == MouseButtons.Right) { ActiveNode = e.Node; } base.OnNodeMouseClick(e); }
protected override void OnNodeMouseClick(TreeNodeMouseClickEventArgs e) { if (!object.ReferenceEquals(this.SelectedNode, e.Node)) { this.SelectedNode = e.Node; } base.OnNodeMouseClick(e); }
private void TreeView1_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (ItemTitle != null) { ItemTitle.Text = ((nTreeNode)e.Node).Title; ItemURL.Text = ((nTreeNode)e.Node).URL; } // DelLabBT.Enabled = true; }
void m_tree_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { ModuleNode mn = e.Node as ModuleNode; if (mn != null) { OnModuleNodeDoubleClicked(mn); } }
void tvFeatures_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (_inactive) { if (TreeActivated != null) { TreeActivated(this, new EventArgs()); } } }
TreeNodeSelected(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { m_curObj = e.Node.Tag; // collect the data about this object m_snoopCollector.Collect(m_curObj); // display it Snoop.Utils.Display(m_lvData, m_snoopCollector); }
private void treeProject_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if ((e.Button == System.Windows.Forms.MouseButtons.Right) && (e.Node != null)) { if (OutlineProject == null) { return; } } }
private void TreeNode_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { oTreeView.SelectedNode = e.Node; if (e.Button == System.Windows.Forms.MouseButtons.Right) { System.Windows.Forms.ContextMenuStrip oContextMenu = this.GetContextMenu(); if (oContextMenu != null) { System.Drawing.Point oPoint = new System.Drawing.Point(e.Node.Bounds.X + oTreeView.Left + 5, e.Node.Bounds.Y + oTreeView.Top + 15); oContextMenu.Show(this, oPoint); } } }
void tvTestCases_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (_inactive) { if (e.Node == tvTestCases.SelectedNode && _inactive) { if (AfterSelect != null) { _inactive = false; AfterSelect(this, new TreeViewEventArgs(e.Node)); } } } }
// <summary> // Called when node is clicked by the mouse. Does nothing unless the image was clicked // Invokes OnAfterCheck to do the real work // </summary> protected override void OnNodeMouseClick(System.Windows.Forms.TreeNodeMouseClickEventArgs e) { base.OnNodeMouseClick(e); // is the click on the checkbox? If not, discard it System.Windows.Forms.TreeViewHitTestInfo info = HitTest(e.X, e.Y); if (info == null || info.Location != System.Windows.Forms.TreeViewHitTestLocations.StateImage) { return; } // toggle the node's checked status. This will then fire OnAfterCheck System.Windows.Forms.TreeNode tn = e.Node; tn.Checked = !tn.Checked; }
void treeView1_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { string tFx = (string)e.Node.Tag; if (File.Exists(tFx)) { if (tFx.ToLower().EndsWith(".tga")) { viewTga(tFx, true); } else { System.Diagnostics.Process.Start(tFx); } } }
private void treeProject_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { Types.SymbolInfo tokenInfo = (Types.SymbolInfo)e.Node.Tag; if (tokenInfo == null) { if (e.Node == NodeRoot) { // project node return; } //// zone node //MainForm.OpenDocumentAndGotoLine( tokenInfo.DocumentFilename, tokenInfo.LocalLineIndex ); return; } Core.Navigating.OpenDocumentAndGotoLine(OutlineProject, tokenInfo.DocumentFilename, tokenInfo.LocalLineIndex); }
void NavigatorTreeNodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { //set the selected node also with right mouse click if (e.Button == MouseButtons.Right) { this.NavigatorTree.SelectedNode = e.Node; } //show context menu UML.Extended.UMLItem selectedElement = this.NavigatorTree.SelectedNode.Tag as UML.Extended.UMLItem; if (e.Button == MouseButtons.Right && selectedElement != null) { //set enabled status this.enableDisableContexMenu(selectedElement); //then actually show the menu this.navigatorContextMenu.Show(this.NavigatorTree, e.Location); } }
private void TV_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { lV.View = View.Details; if (e.Node.Text == "Computer") { lV.Items.Clear(); lV.View = View.LargeIcon; lV.LargeImageList = iLIcon; DriveInfo[] allDrives = DriveInfo.GetDrives(); foreach (DriveInfo di in allDrives) { ListViewItem lvi = null; if (di.DriveType == DriveType.Fixed) { lvi = new ListViewItem(di.Name, (int)Drives.LocalDrive); } else if (di.DriveType == DriveType.CDRom) { lvi = new ListViewItem(di.Name, (int)Drives.DVD); } else if (di.DriveType == DriveType.Network) { lvi = new ListViewItem(di.Name, (int)Drives.NetworkDrive); } else if (di.DriveType == DriveType.Removable) { lvi = new ListViewItem(di.Name, (int)Drives.FlashDrives); } lV.Items.Add(lvi); } } else { try { GetDirectories(e.Node.Text); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error!"); } } }
void tvTestCases_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { //System.Diagnostics.Debug.WriteLine(string.Format("Click: Clicks: {0}, Delta: {1}", e.Clicks, e.Delta)); if (e.Button != System.Windows.Forms.MouseButtons.Right) { if (_inactive) { if (e.Node == tvTestCases.SelectedNode && _inactive) { if (AfterSelect != null) { _inactive = false; AfterSelect(this, new TreeViewEventArgs(e.Node)); } } } } }
//TreeViewAction m_action = TreeViewAction.Unknown; protected void OnNodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { //base.OnNodeMouseClick(e); // is the click on the checkbox? If not, discard it System.Windows.Forms.TreeViewHitTestInfo info = m_tree.HitTest(e.X, e.Y); if (info == null || info.Location != System.Windows.Forms.TreeViewHitTestLocations.StateImage) { return; } // toggle the node's checked status. This will then fire OnAfterCheck System.Windows.Forms.TreeNode tn = e.Node; //m_action = TreeViewAction.ByMouse; var bChk = Check(tn); Check(tn, !bChk); Tree_AfterCheck(this, new TreeViewEventArgs(e.Node, TreeViewAction.ByMouse)); //m_action = TreeViewAction.Unknown; }
TreeNodeSelected(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (e.Node.Tag != null) { m_curObjId = (AcDb.ObjectId)e.Node.Tag; AcDb.DBObject dbObj = m_trans.Transaction.GetObject(m_curObjId, OpenMode.ForRead); // collect the data about this object m_snoopCollector.Collect(dbObj); // display it Snoop.Utils.Display(m_lvData, m_snoopCollector); } else { m_curObjId = AcDb.ObjectId.Null; m_lvData.Items.Clear(); } }
private void treeProject_NodeMouseDoubleClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { if (e.Node.Level == 0) { // project node DoProjectProperties(e.Node); return; } Project project = ProjectFromNode(e.Node); ProjectElement element = (ProjectElement)e.Node.Tag; if (element.Document == null) { element.Document = project.ShowDocument(element); } if ((element.Document != MainForm.ActiveDocument) && (element.Document != null)) { MainForm.ActiveDocument = element.Document; } }
// <summary> // Called when node is clicked by the mouse. Does nothing unless the image was clicked // Invokes OnAfterCheck to do the real work // </summary> protected override async void OnNodeMouseClick(System.Windows.Forms.TreeNodeMouseClickEventArgs e) { base.OnNodeMouseClick(e); if (e.Button == MouseButtons.Right) { System.Windows.Forms.TreeViewHitTestInfo info = HitTest(e.X, e.Y); if (info.Location == TreeViewHitTestLocations.Label || info.Location == TreeViewHitTestLocations.RightOfLabel) { this.SelectedNode = e.Node; return; } } // toggle the node's checked status. This will then fire OnAfterCheck System.Windows.Forms.TreeNode tn = e.Node; if (tn.Tag.ToString() != "Folder") { tn.Checked = !tn.Checked; await UpdateCounters(); } else { // is the click on the checkbox? If not, discard it System.Windows.Forms.TreeViewHitTestInfo info = HitTest(e.X, e.Y); if (info == null || info.Location != System.Windows.Forms.TreeViewHitTestLocations.StateImage) { return; } else { tn.Checked = !tn.Checked; await UpdateCounters(); } } }
private void treeView1_NodeMouseClick(object sender, System.Windows.Forms.TreeNodeMouseClickEventArgs e) { treeView1.SelectedNode = e.Node; }