Esempio n. 1
0
        /// <summary>
        /// Plugin entry point
        /// </summary>
        public override void Load()
        {
            if (Global.worldWindow.CurrentWorld != null && Global.worldWindow.CurrentWorld.Name.IndexOf("Earth") >= 0)
            {
                m_MenuItem        = new MenuItem("NRL Weather");
                m_MenuItem.Click += new EventHandler(menuItemClicked);

                m_Form = new NRLMontereyGlobal(Global.worldWindow,
                                               Path.Combine(Global.worldWindow.Cache.CacheDirectory, "NrlWeather"),
                                               Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Plugins\\NRLMonterey\\NRL_Monterey.xml");
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Unload our plugin
        /// </summary>
        public override void Unload()
        {
            if (m_MenuItem != null)
            {
                m_MenuItem.Dispose();
                m_MenuItem = null;
            }

            if (m_Form != null)
            {
                m_Form.Dispose();
                m_Form = null;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// Plugin entry point
        /// </summary>
        public override void Load()
        {
            if (ParentApplication.WorldWindow.CurrentWorld != null && ParentApplication.WorldWindow.CurrentWorld.Name.IndexOf("Earth") >= 0)
            {
                m_MenuItem        = new MenuItem("NRL Weather");
                m_MenuItem.Click += new EventHandler(menuItemClicked);
                ParentApplication.PluginsMenu.MenuItems.Add(m_MenuItem);

                m_Form = new NRLMontereyGlobal(ParentApplication.WorldWindow,
                                               Path.Combine(ParentApplication.WorldWindow.Cache.CacheDirectory, "NrlWeather"),
                                               Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Plugins\\NRLMonterey\\NRL_Monterey.xml");
                m_Form.Owner = ParentApplication;

                m_ToolbarItem = new WorldWind.WindowsControlMenuButton(
                    "Naval Research Labs, Monterey -- \"Real-Time\" Weather",
                    Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Data\\Icons\\Interface\\nrl.png",
                    m_Form);

                ParentApplication.WorldWindow.MenuBar.AddToolsMenuButton(m_ToolbarItem);
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Unload our plugin
        /// </summary>
        public override void Unload()
        {
            if (m_MenuItem != null)
            {
                ParentApplication.ToolsMenu.MenuItems.Remove(m_MenuItem);
                m_MenuItem.Dispose();
                m_MenuItem = null;
            }

            if (m_ToolbarItem != null)
            {
                ParentApplication.WorldWindow.MenuBar.RemoveToolsMenuButton(m_ToolbarItem);
                m_ToolbarItem.Dispose();
                m_ToolbarItem = null;
            }

            if (m_Form != null)
            {
                m_Form.Dispose();
                m_Form = null;
            }
        }
Esempio n. 5
0
		/// <summary>
		/// Unload our plugin
		/// </summary>
		public override void Unload() 
		{
			if(m_MenuItem!=null)
			{
				ParentApplication.ToolsMenu.MenuItems.Remove( m_MenuItem );
				m_MenuItem.Dispose();
				m_MenuItem = null;
			}

			if(m_ToolbarItem != null)
			{
				ParentApplication.WorldWindow.MenuBar.RemoveToolsMenuButton(m_ToolbarItem);
				m_ToolbarItem.Dispose();
				m_ToolbarItem = null;
			}

			if(m_Form != null)
			{
				m_Form.Dispose();
				m_Form = null;
			}
		}
Esempio n. 6
0
		/// <summary>
		/// Plugin entry point 
		/// </summary>
		public override void Load() 
		{
			if(ParentApplication.WorldWindow.CurrentWorld != null && ParentApplication.WorldWindow.CurrentWorld.Name.IndexOf("Earth") >= 0)
			{
				m_MenuItem = new MenuItem("NRL Weather");
				m_MenuItem.Click += new EventHandler(menuItemClicked);
				ParentApplication.PluginsMenu.MenuItems.Add( m_MenuItem );
			
				m_Form = new NRLMontereyGlobal(ParentApplication.WorldWindow,
					Path.Combine(ParentApplication.WorldWindow.Cache.CacheDirectory, "NrlWeather"),
					Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Plugins\\NRLMonterey\\NRL_Monterey.xml");
				m_Form.Owner = ParentApplication;
			
				m_ToolbarItem = new WorldWind.WindowsControlMenuButton(
					"Naval Research Labs, Monterey -- \"Real-Time\" Weather",
					Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "\\Data\\Icons\\Interface\\nrl.png",
					m_Form);
			
				ParentApplication.WorldWindow.MenuBar.AddToolsMenuButton(m_ToolbarItem);
			}
		}