private void btnLoad_Click(object sender, System.EventArgs e) { //Open a file dialog for selecting map documents openFileDialog1.Title = "Select Published Map Document"; openFileDialog1.Filter = "Published Map Documents (*.pmf)|*.pmf"; openFileDialog1.ShowDialog(); //Exit if no map document is selected string sFilePath = ""; sFilePath = openFileDialog1.FileName; if (sFilePath == "") { return; } //Load the specified pmf if (axArcReaderGlobeControl1.CheckDocument(sFilePath) == true) { axArcReaderGlobeControl1.LoadDocument(sFilePath); } else { MessageBox.Show("This document cannot be loaded!"); return; } //Zoom to Full Extent axArcReaderGlobeControl1.ARGlobe.ZoomToFullExtent(); //Set current tool to Globe Navigate axArcReaderGlobeControl1.CurrentARGlobeTool = ESRI.ArcGIS.PublisherControls.esriARGlobeTool.esriARGlobeToolNavigate; }
private void btnLoad_Click(object sender, System.EventArgs e) { //Open a file dialog for selecting map documents openFileDialog1.Title = "Select Published Map Document"; openFileDialog1.Filter = "Published Map Documents (*.pmf)|*.pmf"; openFileDialog1.ShowDialog(); //Exit if no map document is selected string sFilePath = openFileDialog1.FileName; if (sFilePath == "") { return; } //Load the specified pmf if (axArcReaderGlobeControl1.CheckDocument(sFilePath) == true) { axArcReaderGlobeControl1.LoadDocument(sFilePath, ""); } else { System.Windows.Forms.MessageBox.Show("This document cannot be loaded!"); return; } }