vs2010代码访问三维场景smwu时,不能完全加载,而且中途会闪退,程序终止,这是什么原因呢?
代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SuperMap.Realspace;
using SuperMap.UI;
using SuperMap.Data;
namespace _3D_Open
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
sceneControl1.Scene.Workspace = workspace1;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
sceneControl1.Dispose();
workspace1.Close();
workspace1.Dispose();
}
private void button1_Click(object sender, EventArgs e)
{
WorkspaceConnectionInfo m_wksInfo = new WorkspaceConnectionInfo();
m_wksInfo.Server = @"E:\study\超图\data\North_Area\North_Area.smwu";
m_wksInfo.Type = WorkspaceType.SMWU;
workspace1.Open(m_wksInfo);
sceneControl1.Scene.Workspace = workspace1;
sceneControl1.Scene.Open("Road@North_Area");
}
}
}