public object ESRI_Image_Remove(ResultBuffer rb) { object result; try { string argument = LspUtil.GetArgument(rb, 0, null); if (string.IsNullOrEmpty(argument)) { result = null; } else { MSCImageService imageService = this.GetImageService(argument); if (imageService == null) { result = null; } else if (imageService.DeleteService()) { result = LspUtil.LispTrue; } else { result = null; } } } catch { result = null; } return(result); }
private void db_ObjectErased(object sender, ObjectErasedEventArgs e) { try { if (e.DBObject.Id == this.RasterObjectId) { if (base.GetType() == typeof(MSCMapService)) { MSCMapService mSCMapService = this as MSCMapService; mSCMapService.DeleteService(); } else if (base.GetType() == typeof(MSCImageService)) { MSCImageService mSCImageService = this as MSCImageService; mSCImageService.DeleteService(); } } this.CheckForUpdates(); } catch { System.Windows.MessageBox.Show("DEBUG: Catch in MSCRasterService.db_ObjectErased"); } }