wjssong
路人甲
路人甲
  • 注册日期2005-03-10
  • 发帖数37
  • QQ
  • 铜币313枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1611回复:3

请问AE怎么实现保存SceneControl的工作区

楼主#
更多 发布于:2006-06-23 11:44
<TABLE  height="85%" width="95%" align=center border=0>

<TR>
<TD  vAlign=top width=* height="100%"><IMG src="http://www.gisempire.com/bbs/Skins/Default/topicface/face1.gif" align=absMiddle border=0> <B>请问AE怎么实现保存SceneControl的工作区</B><BR>
<P>就是我在SceneControl控件里放大等操作,我可以随时保存当前的工作区,然后重新打开文件,地图显示和我关闭前状态是一样的?</P></TD></TR></TABLE>
喜欢0 评分0
wjssong
cl991036
管理员
管理员
  • 注册日期2003-07-25
  • 发帖数5913
  • QQ14265545
  • 铜币29655枚
  • 威望213点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • GIS帝国铁杆
1楼#
发布于:2006-06-23 13:48
<P><FONT color=#0000ff>private</FONT> IMapDocument m_MapDocument;<BR></P>
<P>    <CODE><FONT color=#0000ff>private void</FONT></CODE> OpenDocument(<CODE><FONT color=#0000ff>string</FONT></CODE> sFilePath)<BR>    {<BR>      <CODE><FONT color=#008000>//Create a new map document</FONT></CODE><BR>      m_MapDocument = <CODE><FONT color=#0000ff>new</FONT></CODE> MapDocumentClass();<BR>      <CODE><FONT color=#008000>//Open the map document selected</FONT></CODE><BR>      m_MapDocument.Open(sFilePath,"");<BR>      <CODE><FONT color=#008000>//Set the PageLayoutControl page layout to the map document page layout</FONT></CODE><BR>      axPageLayoutControl1.PageLayout = m_MapDocument.PageLayout;<BR>      txtMapDocument.Text = m_MapDocument.DocumentFilename;<BR>    }<BR><BR>    <CODE><FONT color=#0000ff>private void</FONT></CODE> SaveDocument()<BR>    {<BR>      <CODE><FONT color=#008000>//Check that the document is not read only</FONT></CODE><BR>      <CODE><FONT color=#0000ff>if</FONT></CODE> (m_MapDocument.get_IsReadOnly(m_MapDocument.DocumentFilename) == <CODE><FONT color=#0000ff>true</FONT></CODE>)<BR>      {<BR>        MessageBox.Show("This map document is read only!");<BR>        return;<BR>      }<BR>      <CODE><FONT color=#008000>//Save with the current relative path setting</FONT></CODE><BR>      m_MapDocument.Save(m_MapDocument.UsesRelativePaths,<CODE><FONT color=#0000ff>true</FONT></CODE>);<BR>      MessageBox.Show("Changes saved successfully!");<BR>    }<BR><BR>Files for this sample: <your install location>/samples/Controls/SaveMapDocumentCSharp.zip </P>
没钱又丑,农村户口。头可断,发型一定不能乱。 邮箱:gisempire@qq.com
举报 回复(0) 喜欢(0)     评分
wjssong
路人甲
路人甲
  • 注册日期2005-03-10
  • 发帖数37
  • QQ
  • 铜币313枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2006-06-23 13:57
<P>谢谢:axPageLayoutControl1.PageLayout = m_MapDocument.PageLayout;</P>
<P>但是这是针对PageLayoutControl对象的吧,我需要保存SceneControl对象的工作区,请问怎么实现?<BR></P>
wjssong
举报 回复(0) 喜欢(0)     评分
lsfgis8210
路人甲
路人甲
  • 注册日期2006-08-10
  • 发帖数17
  • QQ
  • 铜币184枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2006-09-22 10:29
<P>我也想知道</P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部