예제 #1
0
        ///------------------------------------------
        /// <summary>
        /// MainWindow
        /// Main program starts here
        /// </summary>
        //--------------------------------------------
        public MainWindow()
        {
            // Create the window
            InitializeComponent();
            mainWin = this;

            // Create and show start up dialog
            winStartUp = new StartUpWindow();
            winStartUp.ShowDialog();
            // winStartUp.Topmost = true;
            winStartUp.Activate();

            // Exit application if the user exited the startup window
            if (winStartUp == null)
            {
                Application.Current.Shutdown();
            }

            /*
             * else
             * {
             *  Debug.WriteLine("Latency = " + startUpVars.getLatency());
             *  Debug.WriteLine("Projection = " + startUpVars.getProjection());
             * }
             */
            // Process Starup window into meaningful URIs
            GetWmsUri();

            // Initialize the Main window model view
            startDate_DP.SelectedDate = _firstDate;
            // endDate_DP.SelectedDate = _today;    // add back in when animation is considered
            InitializeWMSLayer_VM();

            // Set map to current location
            BasemapView.LocationDisplay.IsEnabled        = true;
            BasemapView.LocationDisplay.ShowLocation     = false;
            BasemapView.LocationDisplay.AutoPanMode      = LocationDisplayAutoPanMode.Recenter;
            BasemapView.LocationDisplay.InitialZoomScale = 2000000;
            BasemapView.LocationDisplay.IsEnabled        = false;

            // Initialize AOI sketch - in AOI_draw.cs
            InitializeAOIsketch();

            // Create and hide AOI Window
            aoiWin = new AOIWindow();
            aoiWin.Hide();

            // Put the main window on top and set flags
            // mainWin.Topmost = true;
            mainWin.Activate();
            haveSketch = false;
            haveLayer  = false;
        }   // end MainWindow
예제 #2
0
        ///------------------------------------------
        /// <summary>
        /// MainWindow
        /// Main program starts here
        /// </summary>
        //--------------------------------------------
        public MainWindow()
        {
            // Create the window
            InitializeComponent();
            mainWin = this;

            /*
             * // Create and show start up dialog
             * winStartUp = new StartUpWindow();
             * winStartUp.ShowDialog();
             * winStartUp.Activate();
             *
             * // Exit application if the user exited the startup window
             * if (winStartUp == null)
             *  Application.Current.Shutdown();
             */
            // Set Wms Capability uri
            SetWmsUri();

            // Initialize the Main window model view
            startDate_DP.SelectedDate = _firstDate;
            InitializeWMSLayer_VM();

            // Set map to current location
            BasemapView.LocationDisplay.IsEnabled        = true;
            BasemapView.LocationDisplay.ShowLocation     = false;
            BasemapView.LocationDisplay.AutoPanMode      = LocationDisplayAutoPanMode.Recenter;
            BasemapView.LocationDisplay.InitialZoomScale = 2000000;
            BasemapView.LocationDisplay.IsEnabled        = false;

            // Activate main window and set flags
            mainWin.Activate();
            haveSketch = false;
            haveLayer  = false;

            // Initialize panels: AOI Win, Confirm, and Download - PANEL
            // Set panel visibility

            // Initialize AOI sketch editor - in AOI_draw.cs
            InitializeAOIsketch();

            // Create and hide AOI Window
            aoiWin = new AOIWindow();
            aoiWin.Hide();
        }   // end MainWindow