Ejemplo n.º 1
0
            /// <summary>
            /// Goes to icon if camera positions set.  Also opens URL if it exists
            /// </summary>
            /// <param name="drawArgs"></param>
            /// <returns></returns>
            protected virtual bool PerformLMBAction(DrawArgs drawArgs)
            {
                try
                {
                    // Goto to URL if we have one
                    if (this.Url != null && !this.Url.Contains(@"worldwind://"))
                    {
                        if (World.Settings.UseInternalBrowser && this.Url.StartsWith("http"))
                        {
                            SplitContainer          sc      = (SplitContainer)drawArgs.parentControl.Parent.Parent;
                            InternalWebBrowserPanel browser = (InternalWebBrowserPanel)sc.Panel1.Controls[0];
                            browser.NavigateTo(this.Url);
                        }
                        else
                        {
                            ProcessStartInfo psi = new ProcessStartInfo();
                            psi.FileName        = this.Url;
                            psi.Verb            = "open";
                            psi.UseShellExecute = true;

                            psi.CreateNoWindow = true;
                            Process.Start(psi);
                        }
                    }
                    return(true);
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message.ToString());
                }
                return(false);
            }
Ejemplo n.º 2
0
        void IconURLMenuItem_Click(object sender, EventArgs s)
        {
            try
            {
                if (!this.ClickableActionURL.Contains(@"worldwind://"))
                {
                    if (World.Settings.UseInternalBrowser && this.ClickableActionURL.StartsWith("http"))
                    {
                        SplitContainer          sc      = (SplitContainer)DrawArgs.ParentControl.Parent.Parent;
                        InternalWebBrowserPanel browser = (InternalWebBrowserPanel)sc.Panel1.Controls[0];
                        browser.NavigateTo(this.ClickableActionURL);
                    }
                    else
                    {
                        ProcessStartInfo psi = new ProcessStartInfo();
                        psi.FileName        = this.ClickableActionURL;
                        psi.Verb            = "open";
                        psi.UseShellExecute = true;

                        psi.CreateNoWindow = true;
                        Process.Start(psi);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message.ToString());
            }
        }
Ejemplo n.º 3
0
		/// <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);
		}
Ejemplo n.º 4
0
        public bool OnMouseUp(MouseEventArgs e)
        {
            if (e.Y < this._y)
            {
                // Above
                return(false);
            }

            if (e.Y <= this._y + 20)
            {
                if (e.X > this._x + this._itemXOffset &&
                    e.X < this._x + (this._itemXOffset + this._width) &&
                    e.Button == MouseButtons.Right)
                {
                    this.m_parent.ShowContextMenu(e.X, e.Y, this);
                }

                if (e.X > this._x + this._itemXOffset + this._expandArrowXSize + this._checkBoxXOffset &&
                    e.X < this._x + (this._itemXOffset + this._width) &&
                    e.Button == MouseButtons.Left && this.m_renderableObject != null && this.m_renderableObject.MetaData.Contains("InfoUri"))
                {
                    string infoUri = (string)this.m_renderableObject.MetaData["InfoUri"];

                    if (World.Settings.UseInternalBrowser || infoUri.StartsWith(@"worldwind://"))
                    {
                        SplitContainer          sc      = (SplitContainer)this.ParentControl.Parent.Parent;
                        InternalWebBrowserPanel browser = (InternalWebBrowserPanel)sc.Panel1.Controls[0];
                        browser.NavigateTo(infoUri);
                    }
                    else
                    {
                        ProcessStartInfo psi = new ProcessStartInfo();
                        psi.FileName        = infoUri;
                        psi.Verb            = "open";
                        psi.UseShellExecute = true;
                        psi.CreateNoWindow  = true;
                        Process.Start(psi);
                    }
                }

                if (e.X > this._x + this._itemXOffset &&
                    e.X < this._x + (this._itemXOffset + this._expandArrowXSize) && this.m_renderableObject is RenderableObjectList)
                {
                    RenderableObjectList rol = (RenderableObjectList)this.m_renderableObject;
                    if (!rol.DisableExpansion)
                    {
                        this.isExpanded = !this.isExpanded;
                        return(true);
                    }
                }

                if (e.X > this._x + this._itemXOffset + this._expandArrowXSize &&
                    e.X < this._x + (this._itemXOffset + this._expandArrowXSize + this._checkBoxXOffset))
                {
                    if (!this.m_renderableObject.IsOn && this.m_renderableObject.ParentList != null && this.m_renderableObject.ParentList.ShowOnlyOneLayer)
                    {
                        this.m_renderableObject.ParentList.TurnOffAllChildren();
                    }

                    this.m_renderableObject.IsOn = !this.m_renderableObject.IsOn;
                    return(true);
                }
            }

            if (this.isExpanded)
            {
                foreach (LayerMenuItem lmi in this.m_subItems)
                {
                    if (lmi.OnMouseUp(e))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }