李禧亮
路人甲
路人甲
  • 注册日期2012-03-08
  • 发帖数8
  • QQ
  • 铜币143枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1764回复:2

engine保存mxd

楼主#
更多 发布于:2012-03-24 21:45
我想问一下 c#编写engine怎样使用对话框保存mxd文件。就是使用savefiledialog对话框保存的代码。
喜欢0 评分0
happyGISer
路人甲
路人甲
  • 注册日期2011-09-02
  • 发帖数59
  • QQ
  • 铜币300枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
1楼#
发布于:2012-03-28 18:08
 
[br]1  //保存地图文档[br]2         private void saveDocument()[br]3         {[br]4             if (mapDocument.get_IsReadOnly(mapDocument.DocumentFilename) == true)[br]5             {[br]6                 MessageBox.Show("地图文档是只读的无法保存");[br]7             }[br]8             string fileSavePath = @"e:\new.mxd";[br]9             try[br]10             {[br]11                 mapDocument.Save(mapDocument.UsesRelativePaths, true);[br]12                 MessageBox.Show("保存地图文档成功");[br]13             }[br]14             catch (Exception e)[br]15             {[br]16                 MessageBox.Show("保存地图文档失败!!!" + e.ToString());[br]17             }[br]18         }
举报 回复(0) 喜欢(0)     评分
happyGISer
路人甲
路人甲
  • 注册日期2011-09-02
  • 发帖数59
  • QQ
  • 铜币300枚
  • 威望0点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
2楼#
发布于:2012-03-28 18:10
里边的<span style="font-family: monospace;"> </span>mapDocument 是表示当前文档的IMapdocument对象<br/>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部