1 //加载Mxd地图 2 public string OpenMxd() 3 { 4 string MxdPath = ""; 5 OpenFileDialog openMxd = new OpenFileDialog(); 6 openMxd.Title = "打开地图"; 7 openMxd.InitialDirectory = "E:"; 8 openMxd.Filter = "MapDocument (*.mxd)|*.mxd"; 9 if (openMxd.ShowDialog() == DialogResult.OK) 10 { 11 MxdPath = openMxd.FileName; 12 } 13 return MxdPath; 14 }