示例#1
0
 protected override void OnClick()
 {
     System.Windows.Forms.DialogResult dr = System.Windows.Forms.MessageBox.Show("Are you sure you want to uninstall RMRS Raster Utility?", "Uninstall", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);
     if (dr == System.Windows.Forms.DialogResult.Yes)
     {
         string          id        = ThisAddIn.AddInID;
         string          vs        = ESRI.ArcGIS.RuntimeManager.ActiveRuntime.Version;
         string          folderLoc = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\ArcGIS\\AddIns\\Desktop" + vs + "\\" + id;
         esriUtil.update upd       = new esriUtil.update();
         upd.removeRMRSRasterUtility(folderLoc, vs);
         upd.removeOldVersion(id, vs);
         System.Windows.Forms.MessageBox.Show("RMRS Raster Utility has be uninstalled. You will need to restart ArcMap for this change to take effect.");
     }
 }
 protected override void OnClick()
 {
     System.Windows.Forms.DialogResult dr = System.Windows.Forms.MessageBox.Show("Are you sure you want to uninstall RMRS Raster Utility?", "Uninstall", System.Windows.Forms.MessageBoxButtons.YesNo, System.Windows.Forms.MessageBoxIcon.Question);
     if (dr == System.Windows.Forms.DialogResult.Yes)
     {
         string id = ThisAddIn.AddInID;
         string vs = ESRI.ArcGIS.RuntimeManager.ActiveRuntime.Version;
         string folderLoc = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\ArcGIS\\AddIns\\Desktop"+vs+"\\" + id;
         esriUtil.update upd = new esriUtil.update();
         upd.removeRMRSRasterUtility(folderLoc,vs);
         upd.removeOldVersion(id, vs);
         System.Windows.Forms.MessageBox.Show("RMRS Raster Utility has be uninstalled. You will need to restart ArcMap for this change to take effect.");
     }
 }
 protected override void OnShutdown()
 {
     try
     {
         esriUtil.rasterUtil.cleanupTempDirectories();
         esriUtil.update up = new esriUtil.update(ThisAddIn.Version);
         string id = ThisAddIn.AddInID;
         string arcMapVs = "10.2";//ESRI.ArcGIS.RuntimeManager.ActiveRuntime.Version;
         string folderLoc = System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\ArcGIS\\AddIns\\Desktop"+arcMapVs+"\\" + id;
         up.updateApp(folderLoc,arcMapVs);
         up.removeOldVersion(id, arcMapVs);//arcMapVs);
         up.updateHelp();
     }
     catch
     {
     }
 }