コード例 #1
0
        private void butNext_Click(object sender, EventArgs e)
        {
            if (ValidateChildren(ValidationConstraints.Enabled) && Validate())
            {
                // if there are screens to go to....
                if (butNext.Text.StartsWith("&N"))
                {
                    tabCtl.TabPages.Clear();
                    tabCtl.TabPages.Add(m_tabPages[m_intCurrentTab]);
                }
                // otherwise
                else
                {
                    // Make result available and close
                    if (m_intCurrentTab == 3)
                    {
                        m_oServer     = null;
                        m_oTileServer = null;
                        m_WmsURL      = txtWmsServeURL.Text;
                    }
                    else if (m_intCurrentTab == 2)
                    {
                        //DAP
                        m_oTileServer = null;
                        m_WmsURL      = "";
                    }
                    else if (m_intCurrentTab == 1)
                    {
                        m_oServer = null;
                        m_WmsURL  = "";

                        string           cacheDir         = System.IO.Path.Combine(m_worldWind.WorldWindSettings.CachePath, txtName.Text);
                        ImageTileService imageTileService = new ImageTileService(txtDatabaseName.Text, txtServerURL.Text, txtServerURL.Text);

                        GeographicBoundingBox geoBox = new GeographicBoundingBox(
                            Math.Round(Convert.ToDouble(numN.Value), 0),
                            Math.Round(Convert.ToDouble(numS.Value), 0),
                            Math.Round(Convert.ToDouble(numW.Value), 0),
                            Math.Round(Convert.ToDouble(numE.Value), 0));
                        m_oTileServer = new LayerGeneration.QuadLayerBuilder(
                            txtName.Text,
                            Convert.ToInt32(numHeight.Value),
                            chkTileServerUseTerrainMap.Checked,
                            geoBox, numTileSize.Value, Convert.ToInt32(numLevels.Value), Convert.ToInt32(numImagePixelSize.Value),
                            imageTileService, cmbTileServerFileExtension.Text, Convert.ToByte(chkShowOnAdd.Checked ? 255 : 0),
                            m_worldWind.CurrentWorld, m_worldWind.WorldWindSettings.CachePath, m_worldWind.WorldWindSettings.CachePath, m_oParent);
                    }

                    Close();
                }
            }
            // Change next to finish for those screens that end the wizard
            if (m_intCurrentTab != 0)
            {
                butNext.Text = "&OK";
            }
        }
コード例 #2
0
ファイル: AddImageTile.cs プロジェクト: paladin74/Dapple
        private void butNext_Click(object sender, EventArgs e)
        {
            if (ValidateChildren(ValidationConstraints.Enabled) && Validate())
             {
            // if there are screens to go to....
            if (butNext.Text.StartsWith("&N"))
            {
               tabCtl.TabPages.Clear();
               tabCtl.TabPages.Add(m_tabPages[m_intCurrentTab]);
            }
            // otherwise
            else
            {
               // Make result available and close
               if (m_intCurrentTab == 3)
               {
                  m_oServer = null;
                  m_oTileServer = null;
                  m_WmsURL = txtWmsServeURL.Text;
               }
               else if (m_intCurrentTab == 2)
               {
                  //DAP
                  m_oTileServer = null;
                  m_WmsURL = "";
               }
               else if (m_intCurrentTab == 1)
               {
                  m_oServer = null;
                  m_WmsURL = "";

                  string cacheDir = System.IO.Path.Combine(m_worldWind.WorldWindSettings.CachePath, txtName.Text);
                  ImageTileService imageTileService = new ImageTileService(txtDatabaseName.Text, txtServerURL.Text, txtServerURL.Text);

                  GeographicBoundingBox geoBox = new GeographicBoundingBox(
                     Math.Round(Convert.ToDouble(numN.Value), 0),
                     Math.Round(Convert.ToDouble(numS.Value), 0),
                     Math.Round(Convert.ToDouble(numW.Value), 0),
                     Math.Round(Convert.ToDouble(numE.Value), 0));
                  m_oTileServer = new LayerGeneration.QuadLayerBuilder(
                     txtName.Text,
                     Convert.ToInt32(numHeight.Value),
                     chkTileServerUseTerrainMap.Checked,
                     geoBox, numTileSize.Value, Convert.ToInt32(numLevels.Value), Convert.ToInt32(numImagePixelSize.Value),
                     imageTileService,cmbTileServerFileExtension.Text, Convert.ToByte(chkShowOnAdd.Checked ? 255 : 0),
                     m_worldWind.CurrentWorld, m_worldWind.WorldWindSettings.CachePath, m_worldWind.WorldWindSettings.CachePath, m_oParent);
               }

               Close();
            }
             }
             // Change next to finish for those screens that end the wizard
             if (m_intCurrentTab != 0)
             {
            butNext.Text = "&OK";
             }
        }