예제 #1
0
 public void RemoveLayers()
 {
     if (CycloMediaGroupLayer != null)
     {
         GsShowInCyclorama.RemoveFromMenu();
         FrmCycloMediaOptions.CloseForm();
         FrmMeasurement.Close();
         FrmIdentify.Close();
         CycloMediaGroupLayer cycloLayer = CycloMediaGroupLayer;
         CycloMediaGroupLayer = null;
         cycloLayer.Dispose();
         FrmGlobespotter.ShutDown(true);
     }
 }
예제 #2
0
        protected override void OnClick()
        {
            try
            {
                OnUpdate();

                if (Checked)
                {
                    FrmMeasurement.Close();
                }
                else
                {
                    FrmMeasurement.Open();
                }
            }
            catch (Exception ex)
            {
                _logClient.Error("GsMeasurementDetail.OnClick", ex.Message, ex);
                MessageBox.Show(ex.Message, Resources.GsCycloMediaOptions_OnClick_Globespotter_integration_Addin_Error_);
            }
        }
예제 #3
0
        protected override void OnUpdate()
        {
            try
            {
                IEditor3 editor = ArcUtils.Editor;
                Enabled = (editor.EditState == esriEditState.esriStateEditing);
                bool visible = FrmMeasurement.IsVisible();

                if (!Enabled && visible)
                {
                    FrmMeasurement.Close();
                    visible = false;
                }

                Checked = visible;
            }
            catch (Exception ex)
            {
                _logClient.Error("GsMeasurementDetail.OnUpdate", ex.Message, ex);
                Trace.WriteLine(ex.Message, "GsMeasurementDetail.OnUpdate");
            }
        }
예제 #4
0
        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");
            }
        }