本文整理汇总了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;
}
示例2: OnNodeMouseDoubleClick
protected override void OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e) {
var node = e.Node as TreeNodeX;
if (node != null) {
node.OnMouseDoubleClick(e);
}
base.OnNodeMouseDoubleClick(e);
}
示例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;
}
示例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);
}
}
示例5: explorerTreeView1_NodeMouseClick
private void explorerTreeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
explorerTreeView1.SelectedNode = e.Node;
}
}
示例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();
}
示例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();
}
示例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);
}
}
}
示例9: ProjectExplorer_NodeMouseDoubleClick
private void ProjectExplorer_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
{
if (NodeIsFile(e.Node))
{
_openedProject?.OpenFile(new FileInfo(e.Node.FullPath));
}
}
示例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
{
}
}
}
示例11: ShowReportInfo
private void ShowReportInfo(object sender, TreeNodeMouseClickEventArgs e)
{
if (e.Node.Nodes.Count == 0)
{
reportInfo.Text = e.Node.Tag.ToString();
}
}
示例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)
{
//点击的表
}
}
示例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);
}
示例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);
}
示例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();
}
}