public void RemoveLayers() { if (CycloMediaGroupLayer != null) { GsShowInCyclorama.RemoveFromMenu(); FrmCycloMediaOptions.CloseForm(); FrmMeasurement.Close(); FrmIdentify.Close(); CycloMediaGroupLayer cycloLayer = CycloMediaGroupLayer; CycloMediaGroupLayer = null; cycloLayer.Dispose(); FrmGlobespotter.ShutDown(true); } }
private void OpenDocument() { try { CycloMediaLayer.ResetYears(); var arcEvents = ArcUtils.ActiveViewEvents; if (arcEvents != null) { arcEvents.ItemDeleted += ItemDeleted; arcEvents.AfterDraw += Afterdraw; } if (OpenDocumentEvent != null) { OpenDocumentEvent(); } if (ContainsCycloMediaLayer()) { AddLayers(); } CycloMediaLayer.LayerRemoveEvent += OnLayerRemoved; GsRecentDataLayer.AddToMenu(); GsHistoricalDataLayer.AddToMenu(); GsCycloMediaOptions.AddToMenu(); GsMeasurementDetail.AddToMenu(); FrmMeasurement.Close(); FrmIdentify.Close(); } catch (Exception ex) { Trace.WriteLine(ex.Message, "GsExtension.OpenDocument"); } }