private void treeQueries_MouseDoubleClick(object sender, MouseEventArgs e) { QueryTheme node = treeQueries.GetNodeAt(e.X, e.Y) as QueryTheme; if (node != null && node.Type == QueryTheme.NodeType.query) { node.Expand(); node.BeginEdit(); } }
private void btnAddTable_Click(object sender, EventArgs e) { QueryTheme parent = treeQueries.SelectedNode as QueryTheme; if (parent == null) { return; } FormSelectLayer selLayer = new FormSelectLayer(_doc); if (selLayer.ShowDialog() == DialogResult.OK) { if (selLayer.SelectedLayer == null) { return; } QueryThemeTable node = new QueryThemeTable(selLayer.SelectedLayer, selLayer.SelectedLayerAlias); parent.Nodes.Add(node); parent.Expand(); } }