保存当前地图为MXD文件
//当前地图存为MXD
public void StoreSHP(AxMapControl e, AxTOCControl a)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = "ArcMap文档(*.mxd)|*.mxd";
sfd.Title = "保存文档";
sfd.RestoreDirectory = true;
if (sfd.ShowDialog() == DialogResult.OK)
{
string sFilePath = sfd.FileName;
IMapDocument pMapDocument = new MapDocumentClass();
pMapDocument.New(sFilePath);
pMapDocument.ReplaceContents(e.Map as IMxdContents);
//根据相对的路径保存地图文档
pMapDocument.Save(true, true);
pMapDocument.Close();
}
}