private async void OnMapViewInitialized(MapViewEventArgs args)
        {
            CycloMediaLayer.ResetYears();
            LayersRemovedEvent.Subscribe(OnLayerRemoved);
            DrawCompleteEvent.Subscribe(OnDrawComplete);

            if (ContainsCycloMediaLayer(args.MapView))
            {
                await AddLayersAsync(args.MapView);
            }

            Settings settings = Settings.Instance;
            Login    login    = Login.Instance;

            settings.PropertyChanged += OnSettingsPropertyChanged;
            login.PropertyChanged    += OnLoginPropertyChanged;

            if (settings.CycloramaViewerCoordinateSystem != null)
            {
                await CoordSystemUtils.CheckInAreaCycloramaSpatialReferenceAsync();
            }

            if (!_agreement.Value)
            {
                PropertySheet.ShowDialog("streetSmartArcGISPro_optionsPropertySheet", "streetSmartArcGISPro_agreementPage");
            }
        }
Beispiel #2
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");
            }
        }