private void tvwSceneList_AfterSelect(object sender, TreeViewEventArgs e) { tvwSceneList.BeginUpdate(); #if DEBUG GxTreeNode node = (GxTreeNode)e.Node; GxNodeData data = (GxNodeData)node.Tag; Logger.Info("NodeInfo = [Path = " + data.getPath() + "]"); #endif tvwSceneList.EndUpdate(); }
/// <summary> /// 新建场景 /// </summary> /// <param name="parentNode"></param> /// <returns></returns> private bool addScene() { GxTreeNode selectedNode = (GxTreeNode)tvwSceneList.SelectedNode; if (selectedNode == null) { return(false); } if (selectedNode == null) { Logger.Error("parentNode null."); return(false); } if (selectedNode.getGxNodeType() != GXNodeType.GX_NODE_TYPE_DIRECTORY && selectedNode.getGxNodeType() != GXNodeType.GX_NODE_TYPE_PROJECT) { Logger.Error("invalid node type."); return(false); } //取得父节点路径 string parentPath = ""; GxNodeData nodeData = (GxNodeData)selectedNode.Tag; if (nodeData != null) { parentPath = nodeData.getPath(); } //取得路径 //frmNewSceneFile newSceneFile = new frmNewSceneFile(project.getSceneAutoIndent(), parentPath); //newSceneFile.ShowDialog(); return(true); }