コード例 #1
0
ファイル: FloodLevel.cs プロジェクト: Fav/testww
 /// <summary>
 /// Constructor
 /// </summary>
 public FloodLevel(string LayerName, WorldWind.WorldWindow worldWindow) : base(LayerName)
 {
     this.world          = worldWindow.CurrentWorld;
     this.drawArgs       = worldWindow.DrawArgs;
     this.FloodColor     = Color.DarkBlue;
     this.FloodElevation = 0;
 }
コード例 #2
0
        private void AddLayerMenuButtons(WorldWindow ww, RenderableObject ro)
        {
            if (ro.MetaData.Contains("ToolBarImagePath"))
            {
                string imagePath = Path.Combine(PluginEngineGlobal.DirectoryPath, (string)ro.MetaData["ToolBarImagePath"]);
                if (File.Exists(imagePath))
                {
                    LayerShortcutMenuButton button = new LayerShortcutMenuButton(imagePath, ro);
                    //HACK: Temporary fix
                    if (ro.Name == "Placenames")
                    {
                        button.SetPushed(World.Settings.ShowPlacenames);
                    }
                    if (ro.Name == "Boundaries")
                    {
                        button.SetPushed(World.Settings.ShowBoundaries);
                    }
                }
            }

            if (ro.GetType() == typeof(RenderableObjectList))
            {
                RenderableObjectList rol = (RenderableObjectList)ro;
                foreach (RenderableObject child in rol.ChildObjects)
                {
                    AddLayerMenuButtons(ww, child);
                }
            }
        }
コード例 #3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public AtmosphereLayer(string LayerName, string pluginPath, WorldWind.WorldWindow worldWindow) : base(LayerName)
 {
     this.pluginPath     = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), @"Plugins\Atmosphere\");
     this.world          = worldWindow.CurrentWorld;
     this.drawArgs       = worldWindow.DrawArgs;
     this.RenderPriority = RenderPriority.SurfaceImages;
     ReadSettings();
 }
コード例 #4
0
ファイル: TerrainManager.cs プロジェクト: Fav/testww
 public TerrainManagerForm(WorldWindow ww, MenuItem menuItem)
 {
     InitializeComponent();
     parentMenuItem         = menuItem;
     m_worldWindow          = ww;
     m_updateTimer.Elapsed += new ElapsedEventHandler(m_updateTimerElapsed);
     m_updateTimer.Start();
 }
コード例 #5
0
        internal DAPBrowserMapBuilder(WorldWindow worldWindow, Server server, IBuilder parent, int height, int size)
            : base("Browser map for " + server.Name, worldWindow, parent)
        {
            m_oServer = server;

            m_iHeight = height;
            m_iTextureSizePixels = size;
        }
コード例 #6
0
ファイル: PlaceBuilder.cs プロジェクト: jpespartero/WorldWind
		/// <summary>
		/// Initializes a new instance of the <see cref= "T:WorldWind.PlaceBuilder"/> class.
		/// </summary>
		/// <param name="ww"></param>
		public PlaceBuilder( WorldWindow ww )
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			this.worldWindow = ww;
		}
コード例 #7
0
ファイル: Stars3D.cs プロジェクト: Fav/testww
 /// <summary>
 /// Constructor
 /// </summary>
 public Stars3DLayer(string LayerName, string pluginPath, WorldWind.WorldWindow worldWindow) : base(LayerName)
 {
     this.pluginPath     = Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), @"Plugins\stars3d\");
     this.world          = worldWindow.CurrentWorld;
     this.drawArgs       = worldWindow.DrawArgs;
     this.RenderPriority = RenderPriority.SurfaceImages;
     //this.sphereRadius = this.drawArgs.WorldCamera.WorldRadius * 20;
     ReadSettings();
 }
コード例 #8
0
ファイル: WMSBrowserNG.cs プロジェクト: jpespartero/WorldWind
        public WMSBrowserNG(WorldWindow ww)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.worldWindow = ww;
        }
コード例 #9
0
ファイル: WplIndex.cs プロジェクト: Fav/testww
        /// <summary>
        /// Computes a WorldWind URL (as string)
        /// </summary>
        /// <param name="ww"></param>
        /// <returns></returns>
        public String GotoURL(WorldWindow ww)
        {
            WorldWindUri uri = new WorldWindUri();

            uri.Latitude  = Angle.FromDegrees(this.pn.Lat);
            uri.Longitude = Angle.FromDegrees(this.pn.Lon);

            return(uri.ToString());
        }
コード例 #10
0
ファイル: WMSBrowserNG.cs プロジェクト: Fav/testww
        public WMSBrowserNG(WorldWindow ww)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.worldWindow = ww;
        }
コード例 #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref= "T:WorldWind.PlaceBuilder"/> class.
        /// </summary>
        /// <param name="ww"></param>
        public PlaceBuilder(WorldWindow ww)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.worldWindow = ww;
        }
コード例 #12
0
ファイル: VEPluginLayer.cs プロジェクト: paladin74/Dapple
 internal VeReprojectTilesLayer(string name, WorldWindow parentApplication, string datasetName, string imageExtension, int startZoomLevel, string cache)
     : base(name)
 {
     this.name = name;
     this.parentApplication = parentApplication;
     this.datasetName = datasetName;
     this.imageExtension = imageExtension;
     this.cacheDirectory = cache;
 }
コード例 #13
0
 internal GeorefImageLayerBuilder(string strFileName, bool bTmp, WorldWindow oWorldWindow, IBuilder parent)
     : base(Path.GetFileName(strFileName), oWorldWindow, parent)
 {
     if (strFileName == null) throw new ArgumentNullException("strFileName");
      m_strFileName = strFileName;
      m_bIsTmp = bTmp;
      m_strCacheFileName = Path.Combine(GetCachePath(), Path.GetFileNameWithoutExtension(strFileName) + ".png");
     m_blMissingFile = !File.Exists(m_strFileName);
 }
コード例 #14
0
ファイル: WMSZoomBuilder.cs プロジェクト: paladin74/Dapple
 public WMSZoomBuilder(WMSLayer layer, string cachePath, WorldWindow worldWindow, IBuilder parent)
 {
     m_wmsLayer = layer;
      m_WorldWindow = worldWindow;
      m_strCacheRoot = cachePath;
      m_Parent = parent;
      m_oWorld = m_WorldWindow.CurrentWorld;
      m_strName = layer.Title;
 }
コード例 #15
0
ファイル: AboutDialog.cs プロジェクト: jpespartero/WorldWind
		/// <summary>
		/// Initializes a new instance of the <see cref= "T:WorldWind.AboutDialog"/> class.
		/// </summary>
		/// <param name="ww"></param>
		public AboutDialog(WorldWindow ww)
		{
			InitializeComponent();

			this.labelVersionNumber.Text = Application.ProductVersion;
			//this.labelProductVersion.Text = WorldWind.Release;
			this.labelWorldWindowVersionNumber.Text = ww.ProductVersion;
            this.pictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
			this.pictureBox.Image = Splash.GetStartupImage();
		}
コード例 #16
0
        /// <summary>
        /// Initializes a new instance of the <see cref= "T:WorldWind.AboutDialog"/> class.
        /// </summary>
        /// <param name="ww"></param>
        public AboutDialog(WorldWindow ww)
        {
            InitializeComponent();

            this.labelVersionNumber.Text = Application.ProductVersion;
            //this.labelProductVersion.Text = WorldWind.Release;
            this.labelWorldWindowVersionNumber.Text = ww.ProductVersion;
            this.pictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            this.pictureBox.Image    = Splash.GetStartupImage();
        }
コード例 #17
0
ファイル: KMLLayerBuilder.cs プロジェクト: paladin74/Dapple
 internal KMLLayerBuilder(String strFilename, String strLayerName, WorldWindow oWorldWindow, IBuilder oParent, GeographicBoundingBox oBounds)
     : base(strLayerName, oWorldWindow, oParent)
 {
     m_strInitFilename = strFilename;
     if (File.Exists(m_strInitFilename))
     {
         m_oSourceFile = new KMLFile(strFilename);
         m_oRenderable = KMLCreation.CreateKMLLayer(m_oSourceFile, oWorldWindow.CurrentWorld, out m_oBounds);
         if (oBounds != null)
             m_oBounds = oBounds;
         m_oRenderable.RenderPriority = RenderPriority.TerrainMappedImages;
     }
 }
コード例 #18
0
ファイル: TestForm.cs プロジェクト: beginor/WorldWind
        public TestForm()
        {
            Application.DoEvents();
            InitializeComponent();

            this.SuspendLayout();
            this._worldWindow = new WorldWindow();
            this._worldWindow.Dock = System.Windows.Forms.DockStyle.Fill;
            this._worldWindow.Name = "worldWindow1";
            this.Controls.Add(this._worldWindow);
            this.ResumeLayout();

            this._worldWindow.Render();
        }
コード例 #19
0
ファイル: AddImageTile.cs プロジェクト: paladin74/Dapple
        internal AddImageTile(WorldWind.WorldWindow worldWindow, LayerGeneration.IBuilder oParent)
        {
            m_worldWind = worldWindow;
             m_oParent = oParent;
             InitializeComponent();

             // collect the pages and leave only the start page
             for (int i = 0; i < tabCtl.TabPages.Count; i++)
             {
            m_tabPages.Add(tabCtl.TabPages[i]);
             }
             tabCtl.TabPages.Clear();
             tabCtl.TabPages.Add(m_tabPages[0]);
        }
コード例 #20
0
        internal AddImageTile(WorldWind.WorldWindow worldWindow, LayerGeneration.IBuilder oParent)
        {
            m_worldWind = worldWindow;
            m_oParent   = oParent;
            InitializeComponent();

            // collect the pages and leave only the start page
            for (int i = 0; i < tabCtl.TabPages.Count; i++)
            {
                m_tabPages.Add(tabCtl.TabPages[i]);
            }
            tabCtl.TabPages.Clear();
            tabCtl.TabPages.Add(m_tabPages[0]);
        }
コード例 #21
0
 internal NltQuadLayerBuilder(string name, int height, bool isTerrainMapped, GeographicBoundingBox boundary,
     double levelZeroTileSize, int levels, int textureSize, string serverURL, string dataSetName, string imageExtension,
     byte opacity, WorldWindow worldWindow, IBuilder parent)
     : base(name, worldWindow, parent)
 {
     distAboveSurface = height;
     terrainMapped = isTerrainMapped;
     m_hBoundary = boundary;
     m_bOpacity = opacity;
      m_strWorldName = worldWindow.CurrentWorld.Name;
     m_iLevels = levels;
     m_iTextureSizePixels = textureSize;
     m_dLevelZeroTileSizeDegrees = levelZeroTileSize;
     m_strServerUrl = serverURL;
     m_strDatasetName = dataSetName;
     m_strImageExt = imageExtension;
 }
コード例 #22
0
ファイル: OverviewControl.cs プロジェクト: paladin74/Dapple
        public OverviewControl(string miniMapFilePath, WorldWindow ww, Control parent)
        {
            InitializeComponent();

            m_WorldWindow = ww;
             m_strMinimapFilePath = miniMapFilePath;

            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true);

            // The m_Device3d can't be created unless the control is at least 1 x 1 pixels in size
            this.Size = new Size(600,300);

            // Now perform the rendering m_Device3d initialization
            // Skip DirectX initialization in design mode
            if(!IsInDesignMode())
                InitializeGraphics();

             this.Parent = parent;
        }
コード例 #23
0
        internal WMSQuadLayerBuilder(WMSLayer layer, WorldWindow worldWindow, WMSServerBuilder server, IBuilder parent)
            : base(layer.Title, worldWindow, parent)
        {
            m_Server = server;
            m_wmsLayer = layer;
            distAboveSurface = 0;

            m_hBoundary = new GeographicBoundingBox((double)layer.North, (double)layer.South, (double)layer.West, (double)layer.East);

            // Determine the needed levels (function of tile size and resolution, for which we just use ~5 meters because it is not available with WMS)
            double dRes = 5.0 / 100000.0;
            if (dRes > 0)
            {
                double dTileSize = LevelZeroTileSize;
                m_iLevels = 1;
                while (dTileSize / Convert.ToDouble(TextureSizePixels) > dRes / 4.0)
                {
                    m_iLevels++;
                    dTileSize /= 2;
                }
            }
        }
コード例 #24
0
ファイル: GlobalClouds.cs プロジェクト: paladin74/Dapple
 /// <summary>
 /// Constructor
 /// </summary>
 internal GlobalCloudsLayer(string LayerName, string pluginPath, string _cachePath, WorldWindow worldWindow)
     : base(LayerName)
 {
     this.pluginPath = pluginPath;
     this.cachePath = _cachePath;
     this.world = worldWindow.CurrentWorld;
     this.drawArgs = worldWindow.DrawArgs;
     this.RenderPriority = RenderPriority.AtmosphericImages;
     //CleanupHistory();
     CleanupJpg();
     FindLatest();
     ReadSettings();
     if (textureFileName == "" && latestFileName != "") textureFileName = latestFileName;
 }
コード例 #25
0
        /// <summary>
        /// Initializes a new instance of the <see cref= "T:WorldWind.PathMaker"/> class.
        /// </summary>
        /// <param name="ww"></param>
        public PathMaker(WorldWindow ww)
        {
            InitializeComponent();

            this.worldWindow = ww;
        }
コード例 #26
0
ファイル: WMSZoomBuilder.cs プロジェクト: paladin74/Dapple
        public static WMSZoomBuilder GetBuilderFromURI(string uri, WMSCatalogBuilder provider, WorldWindow worldWindow, WMSServerBuilder wmsserver)
        {
            string strServer = "";
             string strLayer = "";
             int pixelsize = 1024;
             try
             {
            ParseURI(uri, ref strServer, ref strLayer, ref pixelsize);

            WMSList oServer = provider.FindServer(strServer);
            foreach (WMSLayer layer in oServer.Layers)
            {
               WMSLayer result = FindLayer(strLayer, layer);
               if (result != null)
               {
                  WMSZoomBuilder zoomBuilder = wmsserver.FindLayerBuilder(result);
                  if (zoomBuilder != null)
                  {
                     zoomBuilder.ImagePixelSize = pixelsize;
                     return zoomBuilder;
                  }
               }
            }
             }
             catch
             {
             }
             return null;
        }
コード例 #27
0
		/// <summary>
		/// Initializes a new instance of the <see cref= "T:WorldWind.AnimatedEarthManager"/> class.
		/// </summary>
		/// <param name="worldWindow"></param>
		public AnimatedEarthManager(WorldWindow worldWindow) 
		{
			InitializeComponent();
			this.worldWindow = worldWindow;
		}
コード例 #28
0
ファイル: TDxWWInput.cs プロジェクト: paladin74/Dapple
        public override void Load()
        {
            base.Load();

            // Add our plugin to the World Wind Tools menu
            menuItem = new System.Windows.Forms.ToolStripMenuItem();
            menuItem.Text = "3Dconnexion Input Device";
            menuItem.Click += new System.EventHandler(menuItem_Click);
            s_stopWatch = new Stopwatch();
            s_WW = m_Application.WorldWindow;

            s_TheCamera = s_WW.DrawArgs.WorldCamera;

            m_TheInputDevice = new TDconnexion.TDxDeviceWrapper();
            if (m_TheInputDevice != null)
            {
                    if (m_TheInputDevice.InitializationSuccessful)
                    {
                        // JBTODO: m_app.MenuStrip.Items.Add(menuItem);

                        s_TheSensor = m_TheInputDevice.Sensor;
                        s_TheKeyBoard = m_TheInputDevice.Keyboard;
                        s_Position = new Point3d();
                        SetCameraMode();
                        m_KeyEventHandler = new TDconnexion.TDxKeyboardEvent(KeyboardEventHandler);
                        s_TheKeyBoard.KeyboardEventDOWN += m_KeyEventHandler;
                        m_TheInputDevice.Connect();
                    }
                    else
                    {
                        m_TheInputDevice = null;
                    }
            }
        }
コード例 #29
0
ファイル: TDxWWInput.cs プロジェクト: paladin74/Dapple
        public override void Unload()
        {
            if (m_TheInputDevice != null)
                m_TheInputDevice.Disconnect();

            if ((m_KeyEventHandler != null) && (s_TheKeyBoard != null))
                s_TheKeyBoard.KeyboardEventDOWN -= m_KeyEventHandler;
            if ((m_SensorEventHandler != null) && (s_TheSensor != null))
                s_TheSensor.SensorInput -= m_SensorEventHandler;

            m_KeyEventHandler = null;
            m_SensorEventHandler = null;
            s_TheSensor = null;
            s_TheCamera = null;

            s_dLastHeight = 0;
            s_dDeltaHeight = 0;
            s_stopWatch = null;  //check event interval of the input device
            s_TheCamera = null;
            s_WW = null;

            if (m_TheInputDevice != null)
                m_TheInputDevice.Release();

            m_TheInputDevice = null;

            // Clean up, remove menu item
            // JBTODO: m_app.MenuStrip.Items.Remove(menuItem);
            base.Unload();
        }
コード例 #30
0
ファイル: GotoDialog.cs プロジェクト: jpespartero/WorldWind
      /// <summary>
			/// Initializes a new instance of the <see cref= "T:WorldWind.GotoDialog"/> class.
      /// </summary>
      /// <param name="ww"></param>
      /// <param name="currentWorld"></param>
      /// <param name="worldsXMLFilePath"></param>
      public GotoDialog(WorldWindow ww, WorldXmlDescriptor.WorldType currentWorld, string worldsXMLFilePath)
      {
         // Required for Windows Form Designer support
         InitializeComponent();

		  /*
         // manually add the search progress bar to the statusBar controls
         this.statusBar.Controls.Add(this.progressBarSearch);
         
         // keep track of our output window and the current World.
         this.worldWindow = ww;
         this.currentWorld = currentWorld;

         this.listViewResults.WorldWindow = ww;
         this.listViewFavorites.WorldWindow = ww;
         this.listViewHistory.WorldWindow = ww;

         this.listViewResults.Favorites = this.listViewFavorites;
         this.listViewResults.RecentFinds = this.listViewHistory;

         this.listViewHistory.Favorites = this.listViewFavorites;
         this.listViewFavorites.RecentFinds = this.listViewHistory;



         // create list of tiled placenamesets for this world
         if(this.currentWorld.HasLayerDirectory())
         {
            string dirPath = this.currentWorld.LayerDirectory.Value;

            // if LayerDirectory is not an absolute path, prepend worldsXMLFilePath
            if(!Path.IsPathRooted(this.currentWorld.LayerDirectory.Value)) 
            {
               dirPath = Path.Combine( worldsXMLFilePath, dirPath );
            }

            // handle all XML files in that directory
            foreach(string layerSetFileName in Directory.GetFiles(dirPath, "*.xml"))
            {
							try
							{
								LayerSet.LayerSetDoc curLayerSetDoc = new LayerSet.LayerSetDoc();
								LayerSet.Type_LayerSet curLayerSet = new LayerSet.Type_LayerSet(curLayerSetDoc.Load(layerSetFileName));
								this.collectTiledPlacenamesSets(curLayerSet);
							}
							catch (IOException caught)
							{
								Log.Write(LogCategory, "Problem reading place names: " + caught.Message);
							}
							catch (System.Xml.XmlException)
							{
								// Malformed XML (problem already reported to user on app load - ignore)
							}
            }
         }

         // fast search can be switched on only if all indices required for QuickFind are available
         this.checkBoxFastSearch.Enabled = true;

         // make fast search the default - if possible.
         this.checkBoxFastSearch.Checked = this.AllIndicesAvailable();
		 */
      }
コード例 #31
0
ファイル: WplIndex.cs プロジェクト: Fav/testww
 /// <summary>
 /// Goes to this place item at its lat/lon and altitude
 /// </summary>
 /// <param name="ww"></param>
 public void Goto(WorldWindow ww)
 {
     ww.GotoLatLonAltitude(pn.Lat, pn.Lon, this.Altitude);
 }
コード例 #32
0
ファイル: GlobalClouds.cs プロジェクト: jpespartero/WorldWind
		public int refreshHours = 3;					// How often to refresh cloud map

		/// <summary>
		/// Constructor
		/// </summary>
		public GlobalCloudsLayer(string LayerName, string pluginPath, WorldWindow worldWindow) : base(LayerName)
		{
			this.pluginPath = pluginPath;
			this.world = worldWindow.CurrentWorld;
			this.drawArgs = worldWindow.DrawArgs;
			this.RenderPriority = RenderPriority.AtmosphericImages;
			//CleanupHistory();
			CleanupJpg();
			FindLatest();
			ReadSettings();
			if(textureFileName == "" && latestFileName != "") textureFileName = latestFileName;

			//MessageBox.Show("Server url : " + GetServerUrl(),"Info.", MessageBoxButtons.OK, MessageBoxIcon.Error );
		}
コード例 #33
0
ファイル: WorldWind.cs プロジェクト: jpespartero/WorldWind
		private void AddLayerMenuButtons(WorldWindow ww, RenderableObject ro)
		{
			if(ro.MetaData.Contains("ToolBarImagePath"))
			{
				string imagePath = Path.Combine(DirectoryPath, (string)ro.MetaData["ToolBarImagePath"]);
				if(File.Exists(imagePath))
				{
					LayerShortcutMenuButton button = new LayerShortcutMenuButton(imagePath, ro);
					ww.MenuBar.AddLayersMenuButton( button );
					//HACK: Temporary fix
					if( ro.Name=="Placenames" )
						button.SetPushed( World.Settings.ShowPlacenames );
					if( ro.Name=="Boundaries" )
						button.SetPushed( World.Settings.ShowBoundaries );
				}
			}

			if(ro.GetType() == typeof(RenderableObjectList))
			{
				RenderableObjectList rol = (RenderableObjectList)ro;
				foreach(RenderableObject child in rol.ChildObjects)
					AddLayerMenuButtons(ww, child);
			}
		}
コード例 #34
0
        public override void Load()
        {
            if (ParentApplication.WorldWindow.CurrentWorld != null && ParentApplication.WorldWindow.CurrentWorld.Name.IndexOf("Earth") >= 0)
            {
                menuItem = new System.Windows.Forms.MenuItem();
                menuItem.Text = "Historical Earthquake Query";
                menuItem.Click += new System.EventHandler(menuItem_Click);
                ParentApplication.PluginsMenu.MenuItems.Add(menuItem);

                WorldWindow = m_Application.WorldWindow;
                EQIcons.IsOn = false;
                m_Application.WorldWindow.CurrentWorld.RenderableObjects.Add(EQIcons);
                base.Load();
            }
        }
コード例 #35
0
ファイル: WorldWind.cs プロジェクト: jpespartero/WorldWind
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainApplication));
			this.splitContainer = new System.Windows.Forms.SplitContainer();
			this.webBrowserPanel = new InternalWebBrowserPanel();
			this.worldWindow = new WorldWind.WorldWindow();
			this.mainMenu = new System.Windows.Forms.MainMenu();
            this.menuItemFile = new System.Windows.Forms.MenuItem();
			//this.menuItemLoadFile = new System.Windows.Forms.MenuItem();
            this.menuItemSaveScreenShot = new System.Windows.Forms.MenuItem();
            this.menuItemSpacer11 = new System.Windows.Forms.MenuItem();
            this.menuItemQuit = new System.Windows.Forms.MenuItem();
            this.menuItemEdit = new System.Windows.Forms.MenuItem();
            this.menuItemCoordsToClipboard = new System.Windows.Forms.MenuItem();
            this.menuItemEditPaste = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.menuItemRefreshCurrentView = new System.Windows.Forms.MenuItem();
            this.menuItemView = new System.Windows.Forms.MenuItem();
            this.menuItemShowToolbar = new System.Windows.Forms.MenuItem();
            this.menuItemWebBrowser = new System.Windows.Forms.MenuItem();
			this.menuItemBrowserVisible = new System.Windows.Forms.MenuItem();
			this.menuItemBrowserOrientation = new System.Windows.Forms.MenuItem();
			this.menuItemUseInternalBrowser = new System.Windows.Forms.MenuItem();
            this.menuItemLayerManager = new System.Windows.Forms.MenuItem();
            this.menuItem3 = new System.Windows.Forms.MenuItem();
            this.menuItemShowLatLonLines = new System.Windows.Forms.MenuItem();
            this.menuItemPlanetAxis = new System.Windows.Forms.MenuItem();
            this.menuItemShowCrosshairs = new System.Windows.Forms.MenuItem();
            this.menuItemShowPosition = new System.Windows.Forms.MenuItem();
            this.menuItemSpacer3 = new System.Windows.Forms.MenuItem();
            this.menuItemConstantMotion = new System.Windows.Forms.MenuItem();
            this.menuItemInertia = new System.Windows.Forms.MenuItem();
            this.menuItemPointGoTo = new System.Windows.Forms.MenuItem();
            this.menuItemLockPlanetAxis = new System.Windows.Forms.MenuItem();
            this.menuItemCameraBanks = new System.Windows.Forms.MenuItem();
            this.menuItemSpacer4 = new System.Windows.Forms.MenuItem();
            this.menuItemSunShading = new System.Windows.Forms.MenuItem();
            this.menuItemAtmosphericScattering = new System.Windows.Forms.MenuItem();
			//this.menuItemLightController = new System.Windows.Forms.MenuItem();
            this.menuItemSpacer2 = new System.Windows.Forms.MenuItem();
            this.menuItemVerticalExaggeration = new System.Windows.Forms.MenuItem();
            this.menuItemAlwaysOnTop = new System.Windows.Forms.MenuItem();
            this.menuItemFullScreen = new System.Windows.Forms.MenuItem();
            this.menuItemReset = new System.Windows.Forms.MenuItem();
            this.menuItemTools = new System.Windows.Forms.MenuItem();
            this.menuItemWMS = new System.Windows.Forms.MenuItem();
			this.menuItemWMSImporter = new System.Windows.Forms.MenuItem();
            this.menuItemAnimatedEarth = new System.Windows.Forms.MenuItem();
            this.menuItemModisHotSpots = new System.Windows.Forms.MenuItem();
            this.menuItem5 = new System.Windows.Forms.MenuItem();
            this.menuItemConfigWizard = new System.Windows.Forms.MenuItem();
            this.menuItemOptions = new System.Windows.Forms.MenuItem();
            this.menuItemPlugins = new System.Windows.Forms.MenuItem();
            this.menuItemPluginManager = new System.Windows.Forms.MenuItem();
			this.menuItemDownloadPlugins = new System.Windows.Forms.MenuItem();
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.menuItem7 = new System.Windows.Forms.MenuItem();
            this.menuItemPlayScript = new System.Windows.Forms.MenuItem();
            this.menuItemStopScript = new System.Windows.Forms.MenuItem();
            this.menuItemHelp = new System.Windows.Forms.MenuItem();
            this.menuItemFaq = new System.Windows.Forms.MenuItem();
            this.menuItemWiki = new System.Windows.Forms.MenuItem();
            this.menuItemKeyChart = new System.Windows.Forms.MenuItem();
            this.menuItemWalkthrough = new System.Windows.Forms.MenuItem();
            this.menuItem6 = new System.Windows.Forms.MenuItem();
            this.menuItemForums = new System.Windows.Forms.MenuItem();
            this.menuItemChatRoom = new System.Windows.Forms.MenuItem();
            this.menuItemSpacer10 = new System.Windows.Forms.MenuItem();
            this.menuItemWebsite = new System.Windows.Forms.MenuItem();
            this.menuItemHotspots = new System.Windows.Forms.MenuItem();
            this.menuItemSeparator3 = new System.Windows.Forms.MenuItem();
            this.menuItemAbout = new System.Windows.Forms.MenuItem();
            this.toolBarButtonAddons = new System.Windows.Forms.ToolBarButton();
            this.contextMenuAddons = new System.Windows.Forms.ContextMenu();
            this.toolBarButtonLayerManager = new System.Windows.Forms.ToolBarButton();
            this.toolBarButtonWMS = new System.Windows.Forms.ToolBarButton();
            this.toolBarButtonAnimatedEarth = new System.Windows.Forms.ToolBarButton();
            this.toolBarButtonRapidFireModis = new System.Windows.Forms.ToolBarButton();
            this.imageListFunctions = new System.Windows.Forms.ImageList(this.components);
            this.toolBarButtonKeyChart = new System.Windows.Forms.ToolBarButton();
            this.toolBarButtonWebsite = new System.Windows.Forms.ToolBarButton();
            this.toolBarButtonSearch = new System.Windows.Forms.ToolBarButton();
            this.toolBarButtonPosition = new System.Windows.Forms.ToolBarButton();
            this.toolBarButtonLatLonLines = new System.Windows.Forms.ToolBarButton();
			this.menuItemBrowserVisible = new System.Windows.Forms.MenuItem();
			//this.splitContainer.SuspendLayout();
			//this.splitContainer.Panel1.SuspendLayout();
			//this.splitContainer.Panel2.SuspendLayout();
            //this.SuspendLayout();
			//
			// splitContainer
			//
			this.splitContainer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
			this.splitContainer.Location = new System.Drawing.Point(0, 0);
			this.splitContainer.Name = "splitContainer";
			this.splitContainer.Orientation = getWebBrowserOrientationFromSetting(World.Settings.BrowserOrientationHorizontal);
			this.splitContainer.Panel1Collapsed = !World.Settings.BrowserVisible;
			// Something tries to set this to 800 several times during startup - wtf?
			//this.splitContainer.SplitterDistance = World.Settings.BrowserSize;
			this.splitContainer.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer_SplitterMoved);
			//
			// webBrowserPanel
			//
			this.webBrowserPanel.Dock = DockStyle.Fill;
			this.webBrowserPanel.Navigate += new InternalWebBrowserPanel.BrowserNavigateHandler(this.webBrowserPanel_Navigated);
			this.webBrowserPanel.Close += new InternalWebBrowserPanel.BrowserCloseHandler(webBrowserPanel_Close);

            // worldWindow
            // 
            this.worldWindow.AllowDrop = true;
            this.worldWindow.Cache = null;
            this.worldWindow.Caption = "";
            this.worldWindow.CurrentWorld = null;
            this.worldWindow.Dock = System.Windows.Forms.DockStyle.Fill;
            this.worldWindow.IsRenderDisabled = false;
            this.worldWindow.Location = new System.Drawing.Point(0, 0);
            this.worldWindow.Name = "worldWindow";
            this.worldWindow.ShowLayerManager = false;
            this.worldWindow.Size = new System.Drawing.Size(splitContainer.Panel2.Width, splitContainer.Panel2.Height);
            this.worldWindow.TabIndex = 0;
            this.worldWindow.Text = "worldWindow";
			this.worldWindow.DragEnter += new System.Windows.Forms.DragEventHandler(app_DragEnter);
			// 
            // mainMenu
            // 
            this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemFile,
            this.menuItemEdit,
            this.menuItemView,
            this.menuItemTools,
            this.menuItemPlugins,
            this.menuItemHelp});
            // 
            // menuItemFile
            // 
            this.menuItemFile.Index = 0;
            this.menuItemFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
			//this.menuItemLoadFile,
            this.menuItemSaveScreenShot,
            this.menuItemSpacer11,
            this.menuItemQuit});
            this.menuItemFile.Text = "&File";
			// 
			// menuItemLoadFile
			// 
			//this.menuItemLoadFile.Index = 0;
			//this.menuItemLoadFile.Text = "&Load file...";
			//this.menuItemLoadFile.Click += new System.EventHandler(this.menuItemLoadFile_Click);
            // 
            // menuItemSaveScreenShot
            // 
            this.menuItemSaveScreenShot.Index = 0;
            this.menuItemSaveScreenShot.Text = "&Save Screenshot...\tCtrl+S";
            this.menuItemSaveScreenShot.Click += new System.EventHandler(this.menuItemSaveScreenShot_Click);
            // 
            // menuItemSpacer11
            // 
            this.menuItemSpacer11.Index = 1;
            this.menuItemSpacer11.Text = "-";
            // 
            // menuItemQuit
            // 
            this.menuItemQuit.Index = 2;
            this.menuItemQuit.Text = "E&xit\tAlt+F4";
            this.menuItemQuit.Click += new System.EventHandler(this.menuItemQuit_Click);
            // 
            // menuItemEdit
            // 
            this.menuItemEdit.Index = 1;
            this.menuItemEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemCoordsToClipboard,
            this.menuItemEditPaste,
            this.menuItem2,
            this.menuItemRefreshCurrentView});
            this.menuItemEdit.Text = "&Edit";
            // 
            // menuItemCoordsToClipboard
            // 
            this.menuItemCoordsToClipboard.Index = 0;
            this.menuItemCoordsToClipboard.Text = "&Copy Coordinates\tCtrl+C";
            this.menuItemCoordsToClipboard.Click += new System.EventHandler(this.menuItemCoordsToClipboard_Click);
            // 
            // menuItemEditPaste
            // 
            this.menuItemEditPaste.Index = 1;
            this.menuItemEditPaste.Text = "&Paste Coordinates\tCtrl+V";
            this.menuItemEditPaste.Click += new System.EventHandler(this.menuItemEditPaste_Click);
            // 
            // menuItem2
            // 
            this.menuItem2.Index = 2;
            this.menuItem2.Text = "-";
            // 
            // menuItemRefreshCurrentView
            // 
            this.menuItemRefreshCurrentView.Index = 3;
            this.menuItemRefreshCurrentView.Text = "&Refresh View\tF5";
            this.menuItemRefreshCurrentView.Click += new System.EventHandler(this.menuItemRefreshCurrentView_Click);
            // 
            // menuItemView
            // 
            this.menuItemView.Index = 2;
            this.menuItemView.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemShowToolbar,
            this.menuItemLayerManager,
            this.menuItemWebBrowser,
            this.menuItem3,
            this.menuItemShowLatLonLines,
            this.menuItemPlanetAxis,
            this.menuItemShowCrosshairs,
            this.menuItemShowPosition,
            this.menuItemSpacer3,
            this.menuItemConstantMotion,
            this.menuItemInertia,
            this.menuItemPointGoTo,
            this.menuItemLockPlanetAxis,
            this.menuItemCameraBanks,
            this.menuItemSpacer4,
            this.menuItemSunShading,
            this.menuItemAtmosphericScattering,
			//this.menuItemLightController,
            this.menuItemSpacer2,
            this.menuItemVerticalExaggeration,
            this.menuItemAlwaysOnTop,
            this.menuItemFullScreen,
            this.menuItemReset});
            this.menuItemView.Text = "&View";
			this.menuItemView.Popup += new System.EventHandler(this.menuItemView_Popup);
            // 
            // menuItemShowToolbar
            // 
            this.menuItemShowToolbar.Checked = true;
            this.menuItemShowToolbar.Index = 0;
            this.menuItemShowToolbar.Text = "&Toolbar\tCtrl+T";
            this.menuItemShowToolbar.Click += new System.EventHandler(this.menuItemShowToolbar_Click);
            // 
            // menuItemLayerManager
            // 
			this.menuItemLayerManager.Index = 1;
            this.menuItemLayerManager.Text = "&Layer Manager\tL";
            this.menuItemLayerManager.Click += new System.EventHandler(this.menuItemLayerManager_Click);
			// 
			// menuItemWebBrowser
			// 
			this.menuItemWebBrowser.Index = 2;
			this.menuItemWebBrowser.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
			this.menuItemBrowserVisible,
			this.menuItemBrowserOrientation,
			this.menuItemUseInternalBrowser});
			this.menuItemWebBrowser.Text = "Web Browser";
			// 
			// menuItemBrowserVisible
			// 
			this.menuItemBrowserVisible.Index = 0;
			this.menuItemBrowserVisible.Text = "Browser Visible";
			this.menuItemBrowserVisible.Click += new System.EventHandler(this.webBrowserVisible_Click);// 
			//
			// menuItemBrowserOrientation
			// 
			this.menuItemBrowserOrientation.Index = 1;
			this.menuItemBrowserOrientation.Text = "Switch Orientation";
			this.menuItemBrowserOrientation.Enabled = World.Settings.BrowserVisible;
			this.menuItemBrowserOrientation.Click += new System.EventHandler(this.menuItemBrowserOrientation_Click);// 
			//
			// menuItemuseInternalBrowser
			// 
			this.menuItemUseInternalBrowser.Index = 2;
			this.menuItemUseInternalBrowser.Text = "Open links in internal browser";
			this.menuItemUseInternalBrowser.Click += new System.EventHandler(this.menuItemUseInternalBrowser_Click);// 

			// menuItem3
            // 
			this.menuItem3.Index = 3;
            this.menuItem3.Text = "-";
            // 
            // menuItemShowLatLonLines
            // 
			this.menuItemShowLatLonLines.Index = 4;
            this.menuItemShowLatLonLines.Text = "Show L&at/Lon Lines\tF7";
            this.menuItemShowLatLonLines.Click += new System.EventHandler(this.menuItemShowLatLonLines_Click);
            // 
            // menuItemPlanetAxis
            // 
			this.menuItemPlanetAxis.Index = 5;
            this.menuItemPlanetAxis.Text = "Show Planet A&xis\tF8";
            this.menuItemPlanetAxis.Click += new System.EventHandler(this.menuItemPlanetAxis_Click);
            // 
            // menuItemShowCrosshairs
            // 
			this.menuItemShowCrosshairs.Index = 6;
            this.menuItemShowCrosshairs.Text = "Show &Cross Hairs\tF9";
            this.menuItemShowCrosshairs.Click += new System.EventHandler(this.menuItemShowCrosshairs_Click);
            // 
            // menuItemShowPosition
            // 
			this.menuItemShowPosition.Index = 7;
            this.menuItemShowPosition.Text = "Show &Position\tF10";
            this.menuItemShowPosition.Click += new System.EventHandler(this.menuItemShowPosition_Click);
            // 
            // menuItemSpacer3
            // 
			this.menuItemSpacer3.Index = 8;
            this.menuItemSpacer3.Text = "-";
            // 
            // menuItemConstantMotion
            // 
			this.menuItemConstantMotion.Index = 9;
            this.menuItemConstantMotion.Text = "&Motion Momentum\tF11";
            this.menuItemConstantMotion.Click += new System.EventHandler(this.menuItemConstantMotion_Click);
            // 
            // menuItemInertia
            // 
			this.menuItemInertia.Index = 10;
            this.menuItemInertia.Text = "Planet &Inertia";
            this.menuItemInertia.Click += new System.EventHandler(this.menuItemInertia_Click);
            // 
            // menuItemPointGoTo
            // 
            this.menuItemPointGoTo.Checked = true;
			this.menuItemPointGoTo.Index = 11;
            this.menuItemPointGoTo.Text = "Point &Go-To\tF12";
            this.menuItemPointGoTo.Click += new System.EventHandler(this.menuItemPointGoTo_Click);
            // 
            // menuItemLockPlanetAxis
            // 
			this.menuItemLockPlanetAxis.Index = 12;
            this.menuItemLockPlanetAxis.Text = "Twi&st Lock";
            this.menuItemLockPlanetAxis.Click += new System.EventHandler(this.menuItemLockPlanetAxis_Click);
            // 
            // menuItemCameraBanks
            // 
			this.menuItemCameraBanks.Index = 13;
            this.menuItemCameraBanks.Text = "&Bank Lock";
            this.menuItemCameraBanks.Click += new System.EventHandler(this.menuItemCameraBanking_Click);
            //
            // menuItemSpacer4
            //
            this.menuItemSpacer4.Index = 14;
            this.menuItemSpacer4.Text = "-";
            //
            // menuItemSunShading
            //
            this.menuItemSunShading.Index = 15;
			this.menuItemSunShading.Text = "S&un Shading\tShift+S";
            this.menuItemSunShading.Click += new System.EventHandler(this.menuItemSunShading_Click);
            //
            // menuItemAtmosphericScattering
            // 
            this.menuItemAtmosphericScattering.Index = 16;
			this.menuItemAtmosphericScattering.Text = "Atm&ospheric Scattering\tShift+A";
            this.menuItemAtmosphericScattering.Click += new System.EventHandler(this.menuItemAtmosphericScattering_Click);
			//
			// menuItemLightController
			//this.menuItemLightController.Index = 17;
			//this.menuItemLightController.Text = "Sun control...";
			//this.menuItemLightController.Click +=new EventHandler(menuItemLightController_Click);

            // 
            // menuItemSpacer2
            // 
			this.menuItemSpacer2.Index = 17;
            this.menuItemSpacer2.Text = "-";
            // 
            // menuItemVerticalExaggeration
            // 
			this.menuItemVerticalExaggeration.Index = 18;
            this.menuItemVerticalExaggeration.Text = "&Vertical Exaggeration";
            // 
            // menuItemAlwaysOnTop
            // 
			this.menuItemAlwaysOnTop.Index = 19;
            this.menuItemAlwaysOnTop.Text = "Al&ways on Top\tAlt+A";
            this.menuItemAlwaysOnTop.Click += new System.EventHandler(this.menuItemAlwaysOnTop_Click);
            // 
            // menuItemFullScreen
            // 
			this.menuItemFullScreen.Index = 20;
            this.menuItemFullScreen.Text = "&Full Screen\tAlt+Enter";
            this.menuItemFullScreen.Click += new System.EventHandler(this.menuItemFullScreen_Click);
            // 
            // menuItemReset
            // 
			this.menuItemReset.Index = 21;
            this.menuItemReset.Text = "&Reset Default View\tSpace";
            this.menuItemReset.Click += new System.EventHandler(this.menuItemReset_Click);
            // 
            // menuItemTools
            // 
            this.menuItemTools.Index = 3;
            this.menuItemTools.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemWMS,
			this.menuItemWMSImporter,
            this.menuItemAnimatedEarth,
            this.menuItemModisHotSpots,
            this.menuItem5,
            this.menuItemConfigWizard,
            this.menuItemOptions});
            this.menuItemTools.Text = "&Tools";
            // 
            // menuItemWMS
            // 
            this.menuItemWMS.Index = 0;
            this.menuItemWMS.RadioCheck = true;
            this.menuItemWMS.Text = "&WMS Browser\tB";
            this.menuItemWMS.Click += new System.EventHandler(this.menuItemWMS_Click);
            // 
            // menuItemAnimatedEarth
            //
            this.menuItemAnimatedEarth.Index = 1;
            this.menuItemAnimatedEarth.RadioCheck = true;
            this.menuItemAnimatedEarth.Text = "&Scientific Visualization Studio\tF1";
            this.menuItemAnimatedEarth.Click += new System.EventHandler(this.menuItemAnimatedEarth_Click);
            // 
            // menuItemModisHotSpots
            // 
            this.menuItemModisHotSpots.Index = 2;
            this.menuItemModisHotSpots.RadioCheck = true;
            this.menuItemModisHotSpots.Text = "&Rapid Fire MODIS\tF2";
            this.menuItemModisHotSpots.Click += new System.EventHandler(this.menuItemModisHotSpots_Click);
            // 
            // menuItem5
            // 
            this.menuItem5.Index = 3;
            this.menuItem5.Text = "-";
            // 
            // menuItemConfigWizard
            // 
            this.menuItemConfigWizard.Index = 4;
            this.menuItemConfigWizard.Text = "&Configuration Wizard";
            this.menuItemConfigWizard.Click += new System.EventHandler(this.menuItemConfigWizard_Click);
            // 
            // menuItemOptions
            // 
            this.menuItemOptions.Index = 5;
            this.menuItemOptions.Text = "&Options\tAlt+W";
            this.menuItemOptions.Click += new System.EventHandler(this.menuItemOptions_Click);
			// 
			// menuItemWMSImporter
			// 
			this.menuItemWMSImporter.Index = 6;
			this.menuItemWMSImporter.Text = "&Import WMS url to layer...";
			this.menuItemWMSImporter.Click += new System.EventHandler(this.menuItemWMSImporter_Click);
            // 
            // menuItemPlugins
            // 
            this.menuItemPlugins.Index = 4;
            this.menuItemPlugins.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemPluginManager,
			this.menuItemDownloadPlugins,
            this.menuItem1,
            this.menuItem7});
            this.menuItemPlugins.Text = "&Plug-Ins";
            // 
            // menuItemPluginManager
            // 
            this.menuItemPluginManager.Index = 0;
            this.menuItemPluginManager.Text = "&Load/Unload...";
            this.menuItemPluginManager.Click += new System.EventHandler(this.menuItemPluginManager_Click);
			//
			// menuItemDownloadPlugins
			//
			this.menuItemDownloadPlugins.Index = 1;
			this.menuItemDownloadPlugins.Text = "Download additional plugins...";
			this.menuItemDownloadPlugins.Click += new System.EventHandler(this.menuItemDownloadPlugins_Click);
            // 
            // menuItem1
            // 
            this.menuItem1.Index = 2;
            this.menuItem1.Text = "-";
            // 
            // menuItem7
            // 
            this.menuItem7.Index = 3;
            this.menuItem7.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemPlayScript,
            this.menuItemStopScript});
            this.menuItem7.Text = "&Scripts";
            // 
            // menuItemPlayScript
            // 
            this.menuItemPlayScript.Index = 0;
            this.menuItemPlayScript.Text = "&Play Script...";
            this.menuItemPlayScript.Click += new System.EventHandler(this.menuItemPlayScript_Click);
            // 
            // menuItemStopScript
            // 
            this.menuItemStopScript.Enabled = false;
            this.menuItemStopScript.Index = 1;
            this.menuItemStopScript.Text = "S&top Current Script";
            this.menuItemStopScript.Click += new System.EventHandler(this.menuItemStopScript_Click);
            // 
            // menuItemHelp
            // 
            this.menuItemHelp.Index = 5;
            this.menuItemHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemFaq,
            this.menuItemWiki,
            this.menuItemKeyChart,
            this.menuItemWalkthrough,
            this.menuItem6,
            this.menuItemForums,
            this.menuItemChatRoom,
            this.menuItemSpacer10,
            this.menuItemWebsite,
            this.menuItemHotspots,
            this.menuItemSeparator3,
            this.menuItemAbout});
            this.menuItemHelp.Text = "&Help";
            // 
            // menuItemFaq
            // 
            this.menuItemFaq.Index = 0;
            this.menuItemFaq.Text = "&Frequently Asked Questions";
            this.menuItemFaq.Click += new System.EventHandler(this.menuItemFaq_Click);
            // 
            // menuItemWiki
            // 
            this.menuItemWiki.Index = 1;
            this.menuItemWiki.Text = "&Knowledge Base";
            this.menuItemWiki.Click += new System.EventHandler(this.menuItemWiki_Click);
            // 
            // menuItemKeyChart
            // 
            this.menuItemKeyChart.Index = 2;
            this.menuItemKeyChart.Text = "Keyboard &Chart";
            this.menuItemKeyChart.Click += new System.EventHandler(this.menuItemKeyChart_Click);
            // 
            // menuItemWalkthrough
            // 
            this.menuItemWalkthrough.Index = 3;
            this.menuItemWalkthrough.Text = "&Walkthrough";
            this.menuItemWalkthrough.Click += new System.EventHandler(this.menuItemWalkthrough_Click);
            // 
            // menuItem6
            // 
            this.menuItem6.Index = 4;
            this.menuItem6.Text = "-";
            // 
            // menuItemForums
            // 
            this.menuItemForums.Index = 5;
            this.menuItemForums.Text = "World Wind &Forums";
            this.menuItemForums.Click += new System.EventHandler(this.menuItemForums_Click);
            // 
            // menuItemChatRoom
            // 
            this.menuItemChatRoom.Index = 6;
            this.menuItemChatRoom.Text = "#worldwind &IRC Chat";
            this.menuItemChatRoom.Click += new System.EventHandler(this.menuItemChatRoom_Click);
            // 
            // menuItemSpacer10
            // 
            this.menuItemSpacer10.Index = 7;
            this.menuItemSpacer10.Text = "-";
            // 
            // menuItemWebsite
            // 
            this.menuItemWebsite.Index = 8;
            this.menuItemWebsite.Text = "&NASA World Wind Website";
            this.menuItemWebsite.Click += new System.EventHandler(this.menuItemWebsite_Click);
            // 
            // menuItemHotspots
            // 
            this.menuItemHotspots.Index = 9;
            this.menuItemHotspots.Text = "&Hotspot Finder";
            this.menuItemHotspots.Click += new System.EventHandler(this.menuItemHotspots_Click);
            // 
            // menuItemSeparator3
            // 
            this.menuItemSeparator3.Index = 10;
            this.menuItemSeparator3.Text = "-";
            // 
            // menuItemAbout
            // 
            this.menuItemAbout.Index = 11;
            this.menuItemAbout.Text = "&About World Wind";
            this.menuItemAbout.Click += new System.EventHandler(this.menuItemAbout_Click);
            // 
            // toolBarButtonAddons
            // 
            this.toolBarButtonAddons.DropDownMenu = this.contextMenuAddons;
            this.toolBarButtonAddons.ImageIndex = 0;
            this.toolBarButtonAddons.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
            this.toolBarButtonAddons.Text = "Add-Ons";
            this.toolBarButtonAddons.ToolTipText = "Show Add-Ons";
            // 
            // toolBarButtonLayerManager
            // 
            this.toolBarButtonLayerManager.ImageIndex = 3;
            this.toolBarButtonLayerManager.ToolTipText = "Show Layer Manager";
            // 
            // toolBarButtonWMS
            // 
            this.toolBarButtonWMS.ImageIndex = 4;
            this.toolBarButtonWMS.ToolTipText = "Show WMS Browser";
            // 
            // toolBarButtonAnimatedEarth
            // 
            this.toolBarButtonAnimatedEarth.ImageIndex = 5;
            this.toolBarButtonAnimatedEarth.ToolTipText = "Show NASA Scientific Visualization Studio";
            // 
            // toolBarButtonRapidFireModis
            // 
            this.toolBarButtonRapidFireModis.ImageIndex = 6;
            this.toolBarButtonRapidFireModis.ToolTipText = "Show Rapid Fire MODIS";
            // 
            // imageListFunctions
            // 
			this.imageListFunctions.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
			this.imageListFunctions.ImageSize = new System.Drawing.Size(48, 32);
            this.imageListFunctions.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListFunctions.ImageStream")));
            this.imageListFunctions.TransparentColor = System.Drawing.Color.Transparent;
            this.imageListFunctions.Images.SetKeyName(0, "");
            this.imageListFunctions.Images.SetKeyName(1, "");
            this.imageListFunctions.Images.SetKeyName(2, "");
            this.imageListFunctions.Images.SetKeyName(3, "");
            this.imageListFunctions.Images.SetKeyName(4, "");
            this.imageListFunctions.Images.SetKeyName(5, "");
            this.imageListFunctions.Images.SetKeyName(6, "");
            this.imageListFunctions.Images.SetKeyName(7, "");
            this.imageListFunctions.Images.SetKeyName(8, "");
            // 
            // toolBarButtonKeyChart
            // 
            this.toolBarButtonKeyChart.ImageIndex = 7;
            this.toolBarButtonKeyChart.ToolTipText = "Show Key Chart";
            // 
            // toolBarButtonWebsite
            // 
            this.toolBarButtonWebsite.ImageIndex = 8;
            this.toolBarButtonWebsite.ToolTipText = "Show World Wind Website";
            // 
            // toolBarButtonSearch
            // 
            this.toolBarButtonSearch.ImageIndex = 0;
            this.toolBarButtonSearch.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
            this.toolBarButtonSearch.ToolTipText = "Search For a Place";
            // 
            // toolBarButtonPosition
            // 
            this.toolBarButtonPosition.ImageIndex = 1;
            this.toolBarButtonPosition.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
            this.toolBarButtonPosition.ToolTipText = "Show Current Position";
            // 
            // toolBarButtonLatLonLines
            // 
            this.toolBarButtonLatLonLines.ImageIndex = 2;
            this.toolBarButtonLatLonLines.Style = System.Windows.Forms.ToolBarButtonStyle.ToggleButton;
            this.toolBarButtonLatLonLines.ToolTipText = "Show Latitude/Longitude Lines";

			// 
			// splitContainer1.Panel1
			// 
			this.splitContainer.Panel1.Controls.Add(this.webBrowserPanel);
			this.splitContainer.Panel1.Name = "webBrowserPanel";
			// 
			// splitContainer1.Panel2
			// 
			this.splitContainer.Panel2.Controls.Add(this.worldWindow);
			this.splitContainer.TabIndex = 0;
            //
			// MainApplication
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(992, 631);
			this.Controls.Add(splitContainer);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.IsMdiContainer = true;
            this.KeyPreview = true;
            this.Menu = this.mainMenu;
            this.MinimumSize = new System.Drawing.Size(200, 200);
            this.Name = "MainApplication";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "NASA World Wind";

            /*this.webBrowserPanel.ResumeLayout(false);
            this.webBrowserPanel.PerformLayout();*/
			//this.splitContainer.Panel1.ResumeLayout(false);
			//this.splitContainer.Panel1.PerformLayout();
			//this.splitContainer.Panel2.ResumeLayout(false);
			//this.splitContainer.Panel2.PerformLayout();
			//this.splitContainer.ResumeLayout(false);
            //this.ResumeLayout(false);
		}
コード例 #36
0
        public VirtualEarthForm(MainApplication parentApplication)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            try
            {
                m_WorldWindow = parentApplication.WorldWindow;

                veLayer = new VeReprojectTilesLayer("VirtualEarth Tiles", parentApplication, this);

                lock (m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.SyncRoot)
                {
                    foreach (WorldWind.Renderable.RenderableObject ro in m_WorldWindow.CurrentWorld.RenderableObjects.ChildObjects)
                    {
                        if (ro is WorldWind.Renderable.RenderableObjectList && ro.Name.IndexOf("Images") >= 0)
                        {
                            WorldWind.Renderable.RenderableObjectList imagesList = ro as WorldWind.Renderable.RenderableObjectList;
                            //imagesList.ChildObjects.Insert(0, m_RenderableList);
                            //insert it at the end of the list
                            imagesList.ChildObjects.Insert(imagesList.ChildObjects.Count - 1, veLayer);
                            break;
                        }
                    }
                }

                cacheDirectory = String.Format("{0}\\Virtual Earth", m_WorldWindow.Cache.CacheDirectory);
                if (Directory.Exists(cacheDirectory) == true)
                {
                    DirectoryInfo diCache = new DirectoryInfo(cacheDirectory);
                    //for debug, delete the entire cache
                    //diCache.Delete(true);
                }

                //#if DEBUG
                pushPinTexture = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Plugins\\VirtualEarth\\VirtualEarthPushPin.png";
                //#else
                //				pushPinTexture = VirtualEarthPlugin.PluginDir + @"\VirtualEarthPushPin.png";
                //#endif
                if (File.Exists(pushPinTexture) == false)
                {
                    Utility.Log.Write(new Exception("pushPinTexture not found " + pushPinTexture));
                }

                //check that proj.dll is installed correctly, else set plugin to off
                string projDllPath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\proj.dll";
                if (File.Exists(projDllPath) == false)
                {
                    //TODO turned off for debugging
                    veLayer.IsOn = false;
                    throw new Exception("'proj.dll' needs to be in the same directory where WorldWind.exe is installed");
                }

                //Load up settings if they exist
                string settingspath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Plugins\\VirtualEarth\\Settings.xml";
                if (File.Exists(settingspath))
                    settings = VESettings.LoadSettingsFromFile(settingspath);
                else
                    VESettings.SaveSettingsToFile(settingspath, settings);

                //Apply loaded settings
                tbZoomLevel.Value = settings.ZoomLevel;
                cbLayerIsOn.Checked = settings.LayerOn;
                //cbTerrain.Checked = settings.Terrain;
                rbRoad.Checked = settings.Road;
                rbAerial.Checked = settings.Aerial;
                rbHybrid.Checked = settings.Hybrid;
                rbDebug.Checked = settings.Debug;
            }
            catch (Exception ex)
            {
                Utility.Log.Write(ex);
                throw;
            }
        }
コード例 #37
0
        public MainApplication()
        {
            try
            {
                //配置
                if (Global.Settings.ConfigurationWizardAtStartup)
                {
                    if (!File.Exists(Global.Settings.FileName))
                    {
                        Global.Settings.ConfigurationWizardAtStartup = false;
                    }
                    ConfigurationWizard.Wizard wizard = new ConfigurationWizard.Wizard(Global.Settings);
                    wizard.TopMost       = true;
                    wizard.ShowInTaskbar = true;
                    wizard.ShowDialog();
                }

                using (this.splashScreen = new Splash())
                {
                    this.splashScreen.Owner = this;
                    this.splashScreen.Show();
                    this.splashScreen.SetText("Initializing...");

                    Application.DoEvents();
                    InitializeComponent();
                    //设置global
                    Global.worldWindow = worldWindow;
                    long CacheUpperLimit = (long)Global.Settings.CacheSizeMegaBytes * 1024L * 1024L;
                    long CacheLowerLimit = (long)Global.Settings.CacheSizeMegaBytes * 768L * 1024L;    //75% of upper limit
                                                                                                       //Set up the cache
                    worldWindow.Cache = new Cache(
                        Global.Settings.CachePath,
                        CacheLowerLimit,
                        CacheUpperLimit,
                        Global.Settings.CacheCleanupInterval,
                        Global.Settings.TotalRunTime);

                    WorldWind.Net.WebDownload.Log404Errors = World.Settings.Log404Errors;

                    DirectoryInfo worldsXmlDir = new DirectoryInfo(Global.Settings.ConfigPath);
                    if (!worldsXmlDir.Exists)
                    {
                        throw new ApplicationException(
                                  string.Format(CultureInfo.CurrentCulture,
                                                "World Wind configuration directory '{0}' could not be found.", worldsXmlDir.FullName));
                    }

                    FileInfo[] worldXmlDescriptorFiles = worldsXmlDir.GetFiles("*.xml");
                    int        worldIndex = 0;
                    foreach (FileInfo worldXmlDescriptorFile in worldXmlDescriptorFiles)
                    {
                        try
                        {
                            Log.Write(Log.Levels.Debug + 1, "CONF", "checking world " + worldXmlDescriptorFile.FullName + " ...");
                            string worldXmlSchema = null;
                            string layerSetSchema = null;
                            if (Global.Settings.ValidateXML)
                            {
                                worldXmlSchema = Global.Settings.ConfigPath + "\\WorldXmlDescriptor.xsd";
                                layerSetSchema = Global.Settings.ConfigPath + "\\Earth\\LayerSet.xsd";
                            }
                            World w = WorldWind.ConfigurationLoader.Load(
                                worldXmlDescriptorFile.FullName, worldWindow.Cache, worldXmlSchema, layerSetSchema);
                            if (!availableWorldList.Contains(w.Name))
                            {
                                this.availableWorldList.Add(w.Name, worldXmlDescriptorFile.FullName);
                            }

                            w.Dispose();
                            System.Windows.Forms.MenuItem mi = new System.Windows.Forms.MenuItem(w.Name, new System.EventHandler(OnWorldChange));
                            worldIndex++;
                        }
                        catch (Exception caught)
                        {
                            splashScreen.SetError(worldXmlDescriptorFile + ": " + caught.Message);
                            Log.Write(caught);
                        }
                    }

                    Log.Write(Log.Levels.Debug, "CONF", "loading startup world...");
                    OpenStartupWorld();

                    while (!this.splashScreen.IsDone)
                    {
                        System.Threading.Thread.Sleep(50);
                    }
                    // Force initial render to avoid showing random contents of frame buffer to user.
                    worldWindow.Render();
                    WorldWindow.Focus();
                }

                // Center the main window
                Rectangle screenBounds = Screen.GetBounds(this);
                this.Location = new Point(screenBounds.Width / 2 - this.Size.Width / 2, screenBounds.Height / 2 - this.Size.Height / 2);
            }
            catch
            {
            }
        }
コード例 #38
0
ファイル: MainForm.cs プロジェクト: paladin74/Dapple
        internal MainForm(string strView,
            string strGeoTiff, string strGeotiffName, bool bGeotiffTmp,
            string strKMLFile, string strKMLName, bool blKMLTmp,
            string strLastView, Dapple.Extract.Options.Client.ClientType eClientType, RemoteInterface oMRI, GeographicBoundingBox oAoi, string strAoiCoordinateSystem, string strMapFileName)
        {
            if (String.Compare(Path.GetExtension(strView), ViewExt, true) == 0 && File.Exists(strView))
                this.openView = strView;

            m_strOpenGeoTiffFile = strGeoTiff;
            m_strOpenGeoTiffName = strGeotiffName;
            m_blOpenGeoTiffTmp = bGeotiffTmp;

            m_strOpenKMLFile = strKMLFile;
            m_strOpenKMLName = strKMLName;
            m_blOpenKMLTmp = blKMLTmp;

            this.lastView = strLastView;
            s_oMontajRemoteInterface = oMRI;

            // Establish the version number string used for user display,
            // such as the Splash and Help->About screens.
            // To change the Application.ProductVersion make the
            // changes in \WorldWind\AssemblyInfo.cs
            // For alpha/beta versions, include " alphaN" or " betaN"
            // at the end of the format string.
            Version ver = new Version(Application.ProductVersion);
            Release = string.Format(CultureInfo.InvariantCulture, "{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
            if (ver.Build % 2 != 0)
                Release += " (BETA)";

            // Name the main thread.
            System.Threading.Thread.CurrentThread.Name = ThreadNames.EventDispatch;

            // Copy/Update any configuration files and other files if needed now
            CurrentSettingsDirectory = Path.Combine(UserPath, "Config");
            Directory.CreateDirectory(CurrentSettingsDirectory);
            Settings.CachePath = Path.Combine(UserPath, "Cache");
            Directory.CreateDirectory(Settings.CachePath);
            this.metaviewerDir = Path.Combine(UserPath, "Metadata");
            Directory.CreateDirectory(this.metaviewerDir);
            string[] cfgFiles = Directory.GetFiles(Path.Combine(DirectoryPath, "Config"), "*.xml");
            foreach (string strCfgFile in cfgFiles)
            {
                string strUserCfg = Path.Combine(CurrentSettingsDirectory, Path.GetFileName(strCfgFile));
                if (!File.Exists(strUserCfg))
                    File.Copy(strCfgFile, strUserCfg);
            }
            string[] metaFiles = Directory.GetFiles(Path.Combine(Path.Combine(DirectoryPath, "Data"), "MetaViewer"), "*.*");
            foreach (string strMetaFile in metaFiles)
            {
                string strUserMeta = Path.Combine(this.metaviewerDir, Path.GetFileName(strMetaFile));
                File.Copy(strMetaFile, strUserMeta, true);
            }

            // --- Set up a new user's favorites list and home view ---

            /*if (!File.Exists(Path.Combine(CurrentSettingsDirectory, "user.dapple_serverlist")))
            {
                File.Copy(Path.Combine(Path.Combine(DirectoryPath, "Data"), "default.dapple_serverlist"), Path.Combine(CurrentSettingsDirectory, "user.dapple_serverlist"));
            }*/
            HomeView.CreateDefault();

            InitSettings();

            if (Settings.NewCachePath.Length > 0)
            {
                try
                {
                    // We want to make sure the new cache path is writable
                    Directory.CreateDirectory(Settings.NewCachePath);
                    if (Directory.Exists(Settings.CachePath))
                        Utility.FileSystem.DeleteFolderGUI(this, Settings.CachePath, "Deleting Existing Cache");
                    Settings.CachePath = Settings.NewCachePath;
                }
                catch
                {
                }
                Settings.NewCachePath = "";
            }

            if (Settings.ConfigurationWizardAtStartup)
            {
                Wizard frm = new Wizard(Settings);
                frm.ShowDialog(this);
                Settings.ConfigurationWizardAtStartup = false;
            }

            if (Settings.ConfigurationWizardAtStartup)
            {
                // If the settings file doesn't exist, then we are using the
                // default settings, and the default is to show the Configuration
                // Wizard at startup. We only want that to happen the first time
                // World Wind is started, so change the setting to false(the user
                // can change it to true if they want).
                if (!File.Exists(Settings.FileName))
                {
                    Settings.ConfigurationWizardAtStartup = false;
                }
                ConfigurationWizard.Wizard wizard = new ConfigurationWizard.Wizard(Settings);
                wizard.TopMost = true;
                wizard.ShowInTaskbar = true;
                wizard.ShowDialog();
                // TODO: should settings be saved now, in case of program crashes,
                //	   and so that XML file on disk matches in-memory settings?
            }

            //#if !DEBUG
            using (this.splashScreen = new Splash())
            {
                this.splashScreen.Owner = this;
                this.splashScreen.Show();

                Application.DoEvents();
                //#endif

                // --- setup the list of images used for the different datatypes ---

                s_oImageList.ColorDepth = ColorDepth.Depth32Bit;
                s_oImageList.ImageSize = new Size(16, 16);
                s_oImageList.TransparentColor = Color.Transparent;

                s_oImageList.Images.Add(EnabledServerIconKey, Resources.enserver);
                s_oImageList.Images.Add(DisabledServerIconKey, Resources.disserver);
                s_oImageList.Images.Add(OfflineServerIconKey, Resources.offline);
                s_oImageList.Images.Add(DapIconKey, Resources.dap);
                s_oImageList.Images.Add(DapDatabaseIconKey, Resources.dap_database);
                s_oImageList.Images.Add(DapDocumentIconKey, Resources.dap_document);
                s_oImageList.Images.Add(DapGridIconKey, Resources.dap_grid);
                s_oImageList.Images.Add(DapMapIconKey, Resources.dap_map);
                s_oImageList.Images.Add(DapPictureIconKey, Resources.dap_picture);
                s_oImageList.Images.Add(DapPointIconKey, Resources.dap_point);
                s_oImageList.Images.Add(DapSpfIconKey, Resources.dap_spf);
                s_oImageList.Images.Add(DapVoxelIconKey, Resources.dap_voxel);
                s_oImageList.Images.Add(FolderIconKey, Resources.folder);
                s_oImageList.Images.Add(DapArcGisIconKey, global::Dapple.Properties.Resources.dap_arcgis);
                s_oImageList.Images.Add(KmlIconKey, Resources.kml);
                s_oImageList.Images.Add(ErrorIconKey, global::Dapple.Properties.Resources.error);
                s_oImageList.Images.Add(LayerIconKey, global::Dapple.Properties.Resources.layer);
                s_oImageList.Images.Add(LiveMapsIconKey, global::Dapple.Properties.Resources.live);
                s_oImageList.Images.Add(TileIconKey, global::Dapple.Properties.Resources.tile);
                s_oImageList.Images.Add(GeorefImageIconKey, global::Dapple.Properties.Resources.georef_image);
                s_oImageList.Images.Add(WmsIconKey, Resources.wms);
                s_oImageList.Images.Add(ArcImsIconKey, global::Dapple.Properties.Resources.arcims);
                s_oImageList.Images.Add(BlueMarbleIconKey, Dapple.Properties.Resources.blue_marble);
                s_oImageList.Images.Add(DesktopCatalogerIconKey, Dapple.Properties.Resources.dcat);

                c_oWorldWindow = new WorldWindow();
            #if !DEBUG
                Utility.AbortUtility.ProgramAborting += new MethodInvoker(c_oWorldWindow.KillD3DAndWorkerThread);
            #endif
                c_oWorldWindow.AllowDrop = true;
                c_oWorldWindow.DragOver += new DragEventHandler(c_oWorldWindow_DragOver);
                c_oWorldWindow.DragDrop += new DragEventHandler(c_oWorldWindow_DragDrop);
                c_oWorldWindow.Resize += new EventHandler(c_oWorldWindow_Resize);
                InitializeComponent();
                this.SuspendLayout();
                c_oLayerList.ImageList = s_oImageList;

            /*#if DEBUG
                // --- Make the server tree HOOGE ---
                this.splitContainerMain.SplitterDistance = 400;
                this.splitContainerLeftMain.SplitterDistance = 400;
            #endif*/

                this.Icon = new System.Drawing.Icon(@"app.ico");
                DappleToolStripRenderer oTSR = new DappleToolStripRenderer();
                c_tsSearch.Renderer = oTSR;
                c_tsLayers.Renderer = oTSR;
                c_tsOverview.Renderer = oTSR;
                c_tsMetadata.Renderer = oTSR;

                c_tsNavigation.Renderer = new BorderlessToolStripRenderer();

                // set Upper and Lower limits for Cache size control, in bytes
                long CacheUpperLimit = (long)Settings.CacheSizeGigaBytes * 1024L * 1024L * 1024L;
                long CacheLowerLimit = (long)Settings.CacheSizeGigaBytes * 768L * 1024L * 1024L;	//75% of upper limit

                try
                {
                    Directory.CreateDirectory(Settings.CachePath);
                }
                catch
                {
                    // We get here when people used a cache drive that since dissappeared (e.g. USB flash)
                    // Revert to default cache directory in this case

                    Settings.CachePath = Path.Combine(UserPath, "Cache");
                    Directory.CreateDirectory(Settings.CachePath);
                }

                //Set up the cache
                c_oWorldWindow.Cache = new Cache(
                    Settings.CachePath,
                    CacheLowerLimit,
                    CacheUpperLimit,
                    Settings.CacheCleanupInterval,
                    Settings.TotalRunTime);

                #region Plugin + World Init.

                WorldWind.Terrain.TerrainTileService terrainTileService = new WorldWind.Terrain.TerrainTileService("http://worldwind25.arc.nasa.gov/wwelevation/wwelevation.aspx", "srtm30pluszip", 20, 150, "bil", 12, Path.Combine(Settings.CachePath, "Earth\\TerrainAccessor\\SRTM"), TimeSpan.FromMinutes(30), "Int16");
                WorldWind.Terrain.TerrainAccessor terrainAccessor = new WorldWind.Terrain.NltTerrainAccessor("SRTM", -180, -90, 180, 90, terrainTileService, null);

                WorldWind.World world = new WorldWind.World("Earth",
                    new Point3d(0, 0, 0), Quaternion4d.RotationYawPitchRoll(0, 0, 0),
                    (float)6378137,
                    System.IO.Path.Combine(c_oWorldWindow.Cache.CacheDirectory, "Earth"),
                    terrainAccessor);

                c_oWorldWindow.CurrentWorld = world;
                c_oWorldWindow.DrawArgs.WorldCamera.CameraChanged += new EventHandler(c_oWorldWindow_CameraChanged);

                string strPluginsDir = Path.Combine(DirectoryPath, "Plugins");

                this.scalebarPlugin = new NASA.Plugins.ScaleBarLegend();
                this.scalebarPlugin.PluginLoad(this, strPluginsDir);
                this.scalebarPlugin.IsVisible = World.Settings.ShowScaleBar;

                this.starsPlugin = new Stars3D.Plugin.Stars3D();
                this.starsPlugin.PluginLoad(this, Path.Combine(strPluginsDir, "Stars3D"));

                this.compassPlugin = new Murris.Plugins.Compass();
                this.compassPlugin.PluginLoad(this, Path.Combine(strPluginsDir, "Compass"));

                String szGlobalCloudsCacheDir = Path.Combine(Settings.CachePath, @"Plugins\GlobalClouds");
                Directory.CreateDirectory(szGlobalCloudsCacheDir);
                String szGlobalCloudsPluginDir = Path.Combine(CurrentSettingsDirectory, @"Plugins\GlobalClouds");
                Directory.CreateDirectory(szGlobalCloudsPluginDir);

                if (!File.Exists(Path.Combine(szGlobalCloudsPluginDir, Murris.Plugins.GlobalCloudsLayer.serverListFileName)))
                {
                    File.Copy(Path.Combine(Path.Combine(strPluginsDir, "GlobalClouds"), Murris.Plugins.GlobalCloudsLayer.serverListFileName), Path.Combine(szGlobalCloudsPluginDir, Murris.Plugins.GlobalCloudsLayer.serverListFileName));
                }

                this.cloudsPlugin = new Murris.Plugins.GlobalClouds(szGlobalCloudsCacheDir);
                this.cloudsPlugin.PluginLoad(this, szGlobalCloudsPluginDir);

                this.skyPlugin = new Murris.Plugins.SkyGradient();
                this.skyPlugin.PluginLoad(this, Path.Combine(strPluginsDir, "SkyGradient"));

                this.threeDConnPlugin = new ThreeDconnexion.Plugin.TDxWWInput();
                this.threeDConnPlugin.PluginLoad(this, Path.Combine(strPluginsDir, "3DConnexion"));

                ThreadPool.QueueUserWorkItem(LoadPlacenames);

                c_scWorldMetadata.Panel1.Controls.Add(c_oWorldWindow);
                c_oWorldWindow.Dock = DockStyle.Fill;

                #endregion

                float[] verticalExaggerationMultipliers = { 0.0f, 1.0f, 1.5f, 2.0f, 3.0f, 5.0f, 7.0f, 10.0f };
                foreach (float multiplier in verticalExaggerationMultipliers)
                {
                    ToolStripMenuItem curItem = new ToolStripMenuItem(multiplier.ToString("f1", System.Threading.Thread.CurrentThread.CurrentCulture) + "x", null, new EventHandler(menuItemVerticalExaggerationChange));
                    c_miVertExaggeration.DropDownItems.Add(curItem);
                    curItem.CheckOnClick = true;
                    if (Math.Abs(multiplier - World.Settings.VerticalExaggeration) < 0.1f)
                        curItem.Checked = true;
                }

                this.c_miShowCompass.Checked = World.Settings.ShowCompass;
                this.c_miShowDLProgress.Checked = World.Settings.ShowDownloadIndicator;
                this.c_miShowCrosshair.Checked = World.Settings.ShowCrosshairs;
                this.c_miShowInfoOverlay.Checked = World.Settings.ShowPosition;
                this.c_miShowGridlines.Checked = World.Settings.ShowLatLonLines;
                this.c_miShowGlobalClouds.Checked = World.Settings.ShowClouds;
                if (World.Settings.EnableSunShading)
                {
                    if (!World.Settings.SunSynchedWithTime)
                        this.c_miSunshadingEnabled.Checked = true;
                    else
                        this.c_miSunshadingSync.Checked = true;
                }
                else
                    this.c_miSunshadingDisabled.Checked = true;
                this.c_miShowAtmoScatter.Checked = World.Settings.EnableAtmosphericScattering;

                this.c_miAskLastViewAtStartup.Checked = Settings.AskLastViewAtStartup;
                if (!Settings.AskLastViewAtStartup)
                    this.c_miOpenLastViewAtStartup.Checked = Settings.LastViewAtStartup;

                #region OverviewPanel

                // Fix: earlier versions of Dapple set the DataPath as an absolute reference, so if Dapple was uninstalled, OMapple could not find
                // the file for the overview control.  To fix this, switch the variable to a relative reference if the absolute one doesn't resolve.
                // Dapple will still work; the relative reference will be from whatever directory Dapple is being run.
                if (!Directory.Exists(Settings.DataPath)) Settings.DataPath = "Data";

                #endregion

                c_oWorldWindow.MouseEnter += new EventHandler(this.c_oWorldWindow_MouseEnter);
                c_oWorldWindow.MouseLeave += new EventHandler(this.c_oWorldWindow_MouseLeave);
                c_oOverview.AOISelected += new Overview.AOISelectedDelegate(c_oOverview_AOISelected);

                #region Search view setup

                this.c_oServerList = new ServerList();
                m_oModel = new DappleModel(c_oLayerList);
                m_oModel.SelectedNodeChanged += new EventHandler(m_oModel_SelectedNodeChanged);
                c_oLayerList.Attach(m_oModel);
                NewServerTree.View.ServerTree newServerTree = new NewServerTree.View.ServerTree();
                newServerTree.Attach(m_oModel);
                c_oServerList.Attach(m_oModel);
                c_oLayerList.LayerSelectionChanged += new EventHandler(c_oLayerList_LayerSelectionChanged);

                m_oMetadataDisplay = new MetadataDisplayThread(this);
                m_oMetadataDisplay.AddBuilder(null);
                c_oServerList.LayerList = c_oLayerList;
                c_oLayerList.GoTo += new LayerList.GoToHandler(this.GoTo);

                c_oLayerList.ViewMetadata += new ViewMetadataHandler(m_oMetadataDisplay.AddBuilder);
                c_oServerList.ViewMetadata += new ViewMetadataHandler(m_oMetadataDisplay.AddBuilder);
                c_oServerList.LayerSelectionChanged += new EventHandler(c_oServerList_LayerSelectionChanged);

                this.cServerViewsTab = new JanaTab();
                this.cServerViewsTab.SetImage(0, Resources.tab_tree);
                this.cServerViewsTab.SetImage(1, Resources.tab_list);
                this.cServerViewsTab.SetToolTip(0, "Server tree view");
                this.cServerViewsTab.SetToolTip(1, "Server list view");
                this.cServerViewsTab.SetNameAndText(0, "TreeView");
                this.cServerViewsTab.SetNameAndText(1, "ListView");
                this.cServerViewsTab.SetPage(0, newServerTree);
                this.cServerViewsTab.SetPage(1, this.c_oServerList);
                cServerViewsTab.PageChanged += new JanaTab.PageChangedDelegate(ServerPageChanged);

                c_oDappleSearch = new DappleSearchList();
                c_oDappleSearch.LayerSelectionChanged += new EventHandler(c_oDappleSearch_LayerSelectionChanged);
                c_oDappleSearch.Attach(m_oModel, c_oLayerList);

                c_tcSearchViews.TabPages[0].Controls.Add(cServerViewsTab);
                cServerViewsTab.Dock = DockStyle.Fill;
                c_tcSearchViews.TabPages[1].Controls.Add(c_oDappleSearch);
                c_oDappleSearch.Dock = DockStyle.Fill;

                c_oLayerList.SetBaseLayer(new BlueMarbleBuilder());

                this.ResumeLayout(false);

                #endregion

                this.PerformLayout();

                while (!this.splashScreen.IsDone)
                    System.Threading.Thread.Sleep(50);

                // Force initial render to avoid showing random contents of frame buffer to user.
                c_oWorldWindow.Render();
                WorldWindow.Focus();

                #region OM Forked Process configuration

                if (IsRunningAsDapClient)
                {
                    c_oLayerList.OMFeaturesEnabled = true;
                    this.MinimizeBox = false;

                    if (oAoi != null && !string.IsNullOrEmpty(strAoiCoordinateSystem))
                    {
                        s_oOMMapExtentNative = oAoi;
                        s_strAoiCoordinateSystem = strAoiCoordinateSystem;
                        s_strOpenMapFileName = strMapFileName;

                        s_oOMMapExtentWGS84 = s_oOMMapExtentNative.Clone() as GeographicBoundingBox;
                        s_oMontajRemoteInterface.ProjectBoundingRectangle(strAoiCoordinateSystem, ref s_oOMMapExtentWGS84.West, ref s_oOMMapExtentWGS84.South, ref s_oOMMapExtentWGS84.East, ref s_oOMMapExtentWGS84.North, Dapple.Extract.Resolution.WGS_84);
                    }
                    s_eClientType = eClientType;

                    c_miLastView.Enabled = false;
                    c_miLastView.Visible = false;
                    c_miDappleHelp.Visible = false;
                    c_miDappleHelp.Enabled = false;
                    toolStripSeparator10.Visible = false;
                    c_miOpenImage.Visible = false;
                    c_miOpenImage.Enabled = false;
                    c_miOpenKeyhole.Visible = false;
                    c_miOpenKeyhole.Enabled = false;

                    // Hide and disable the file menu
                    c_miFile.Visible = false;
                    c_miFile.Enabled = false;
                    c_miOpenSavedView.Visible = false;
                    c_miOpenSavedView.Enabled = false;
                    c_miOpenHomeView.Visible = false;
                    c_miOpenHomeView.Enabled = false;
                    c_miSetHomeView.Visible = false;
                    c_miSetHomeView.Enabled = false;
                    c_miSaveView.Visible = false;
                    c_miSaveView.Enabled = false;
                    c_miSendViewTo.Visible = false;
                    c_miSendViewTo.Enabled = false;
                    c_miOpenKeyhole.Visible = false;
                    c_miOpenKeyhole.Enabled = false;

                    // Show the OM help menu
                    c_miGetDatahelp.Enabled = true;
                    c_miGetDatahelp.Visible = true;

                    // Don't let the user check for updates.  EVER.
                    c_miCheckForUpdates.Visible = false;
                    c_miCheckForUpdates.Enabled = false;
                }
                else
                {
                    c_miExtractLayers.Visible = false;
                    c_miExtractLayers.Enabled = false;
                }

                #endregion

                loadCountryList();
                populateAoiComboBox();
                LoadMRUList();
                CenterNavigationToolStrip();
                //#if !DEBUG

                c_tbSearchKeywords.Text = NO_SEARCH;
            }
            //#endif
        }
コード例 #39
0
        internal ArcIMSQuadLayerBuilder(ArcIMSServerUri oServerUri, String strServiceName, String szLayerTitle, String szLayerID, GeographicBoundingBox oEnvelope, ArcIMSFeatureCoordSys oProjection, WorldWindow oWorldWindow, IBuilder oParent, double dMinScale, double dMaxScale, CultureInfo oInfo)
            : base(szLayerTitle, oWorldWindow, oParent)
        {
            m_oServerUri = oServerUri;
            m_oCultureInfo = oInfo;
            m_oUnprojectedEnvelope = oEnvelope;
            m_oProjection = oProjection;
            m_szLayerID = szLayerID;
            m_szServiceName = strServiceName;
            m_dMinScale = dMinScale;
            if (m_dMinScale < DefaultMinScale)
                m_dMinScale = DefaultMinScale;
            m_dMaxScale = dMaxScale;
            if (m_dMaxScale > DefaultMaxScale)
                m_dMaxScale = DefaultMaxScale;
            if (m_dMaxScale < m_dMinScale)
            {
                // --- Weird scale values, ignore them and hope for the best ---
                m_dMaxScale = DefaultMaxScale;
                m_dMinScale = DefaultMinScale;
            }

            CalculateLevels();
        }
コード例 #40
0
		/// <summary>
		/// Initializes a new instance of the <see cref= "T:WorldWind.RapidFireModisManager"/> class.
		/// </summary>
		/// <param name="ww"></param>
		public RapidFireModisManager(WorldWindow ww)
		{
			InitializeComponent();
			
			this.worldWindow1 = ww;
		}
コード例 #41
0
ファイル: SkyGradient.cs プロジェクト: jpespartero/WorldWind
               public string presetFileName;           // preset file (will overide defaults)

               /// <summary>
               /// Constructor
               /// </summary>
               public SkyGradientLayer(string LayerName, string pluginPath, WorldWindow worldWindow) : base(LayerName)
               {
                       this.pluginPath = pluginPath;
                       this.pluginName = LayerName;
                       this.world = worldWindow.CurrentWorld;
                       this.settingsFileName = this.world.Name + ".ini";
                       this.drawArgs = worldWindow.DrawArgs;
                       //this.RenderPriority = RenderPriority.AtmosphericImages;
                       this.RenderPriority = RenderPriority.SurfaceImages;
                       ReadSettings();
               }
コード例 #42
0
        bool showGlow = false;          // If shadows on, will render an atmospheric glow

        /// <summary>
        /// Constructor
        /// </summary>
        public PlanetaryRingsLayer(string LayerName, string pluginPath, WorldWindow worldWindow)
            : base(LayerName)
        {
            this.pluginPath = pluginPath;
            this.pluginName = LayerName;
            this.world = worldWindow.CurrentWorld;
            this.settingsFileName = this.world.Name + ".ini";
            this.drawArgs = worldWindow.DrawArgs;
            this.RenderPriority = RenderPriority.AtmosphericImages;
            this.IsOn = false;
            ReadSettings();
        }
コード例 #43
0
ファイル: GotoDialog.cs プロジェクト: wikey2013/WIKEYEARTH
        /// <summary>
        /// Initializes a new instance of the <see cref= "T:WorldWind.GotoDialog"/> class.
        /// </summary>
        /// <param name="ww"></param>
        /// <param name="currentWorld"></param>
        /// <param name="worldsXMLFilePath"></param>
        public GotoDialog(WorldWindow ww, WorldXmlDescriptor.WorldType currentWorld, string worldsXMLFilePath)
        {
            // Required for Windows Form Designer support
            InitializeComponent();

            /*
             * // manually add the search progress bar to the statusBar controls
             * this.statusBar.Controls.Add(this.progressBarSearch);
             *
             * // keep track of our output window and the current World.
             * this.worldWindow = ww;
             * this.currentWorld = currentWorld;
             *
             * this.listViewResults.WorldWindow = ww;
             * this.listViewFavorites.WorldWindow = ww;
             * this.listViewHistory.WorldWindow = ww;
             *
             * this.listViewResults.Favorites = this.listViewFavorites;
             * this.listViewResults.RecentFinds = this.listViewHistory;
             *
             * this.listViewHistory.Favorites = this.listViewFavorites;
             * this.listViewFavorites.RecentFinds = this.listViewHistory;
             *
             *
             *
             * // create list of tiled placenamesets for this world
             * if(this.currentWorld.HasLayerDirectory())
             * {
             * string dirPath = this.currentWorld.LayerDirectory.Value;
             *
             * // if LayerDirectory is not an absolute path, prepend worldsXMLFilePath
             * if(!Path.IsPathRooted(this.currentWorld.LayerDirectory.Value))
             * {
             * dirPath = Path.Combine( worldsXMLFilePath, dirPath );
             * }
             *
             * // handle all XML files in that directory
             * foreach(string layerSetFileName in Directory.GetFiles(dirPath, "*.xml"))
             * {
             *                                    try
             *                                    {
             *                                            LayerSet.LayerSetDoc curLayerSetDoc = new LayerSet.LayerSetDoc();
             *                                            LayerSet.Type_LayerSet curLayerSet = new LayerSet.Type_LayerSet(curLayerSetDoc.Load(layerSetFileName));
             *                                            this.collectTiledPlacenamesSets(curLayerSet);
             *                                    }
             *                                    catch (IOException caught)
             *                                    {
             *                                            Log.Write(LogCategory, "Problem reading place names: " + caught.Message);
             *                                    }
             *                                    catch (System.Xml.XmlException)
             *                                    {
             *                                            // Malformed XML (problem already reported to user on app load - ignore)
             *                                    }
             * }
             * }
             *
             * // fast search can be switched on only if all indices required for QuickFind are available
             * this.checkBoxFastSearch.Enabled = true;
             *
             * // make fast search the default - if possible.
             * this.checkBoxFastSearch.Checked = this.AllIndicesAvailable();
             */
        }
コード例 #44
-1
        internal DAPQuadLayerBuilder(DataSet dataSet, WorldWindow worldWindow, Server server, IBuilder parent, int height, int size, double lvl0tilesize, int levels)
            : base(dataSet.Title, worldWindow, parent)
        {
            m_hDataSet = dataSet;
            m_oServer = server;

            m_iHeight = height;
            m_iTextureSizePixels = size;
            this.LevelZeroTileSize = lvl0tilesize;
             m_iLevels = levels;

            m_blUseXMLMeta = !String.IsNullOrEmpty(m_hDataSet.Stylesheet);
        }