代码如下:
private void mnuOpenWks_Click(object sender, EventArgs e)
{
this.openFileDialog1.Title = "打开工作空间";
this.openFileDialog1.FileName = "";
this.openFileDialog1.Filter = "工作空间文件(*.sxwu)|*.sxwu|工作空间文件(*.smwu)|*.smwu";
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
{
string fileName = openFileDialog1.FileName;
WorkspaceConnectionInfo wsinfo = new WorkspaceConnectionInfo(fileName);
m_workspace.Open(wsinfo);
m_sceneControl.Scene.Workspace = m_workspace;
m_sceneControl.Scene.Open("Model");
workspaceControl1.WorkspaceTree.Workspace = m_workspace;
layer3DsTree.Scene = m_sceneControl.Scene;
}
}
上述代码只能打开名为“Model”的三维场景,我想通过点击workspacrcontrol中的三维场景从而直接打开文件,请问我的代码该怎么更改呢?我提问过相关问题,但是根据提示,没有在help文档和samplecode中找到具体的代码,这里涉及到的节点点击事件把我绕晕了,搞了好久还是弄不清该怎么实现这个功能