/// <summary> /// Plugin entry point - All plugins must implement this function /// </summary> public override void Load() { layer = new GlobeIconLayer(LayerName, PluginDirectory, ParentApplication.WorldWindow); // Add layer visibility controller (and save it to make sure you can kill it later!) control.Visible = true; evhand = new EventHandler(control_VisibleChanged); control.VisibleChanged += evhand; string imgPath = Path.Combine(PluginDirectory, "GlobeIcon.png"); if (File.Exists(imgPath) == false) { Utility.Log.Write(new Exception("imgPath not found " + imgPath)); } m_ToolbarItem = new WorldWind.WindowsControlMenuButton( "Globe Overview", imgPath, control); ParentApplication.WorldWindow.MenuBar.AddToolsMenuButton(m_ToolbarItem); //ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.Insert(0,layer); ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.Add(layer); m_ToolbarItem.SetPushed(layer.IsOn); }
/// <summary> /// Plugin entry point - All plugins must implement this function /// </summary> public override void Load() { // Add layer visibility controller (and save it to make sure you can kill it later!) control.Visible = true; evhand = new EventHandler(control_VisibleChanged); control.VisibleChanged += evhand; // Add toolbar item m_ToolbarItem = new WorldWind.WindowsControlMenuButton("Compass", Path.Combine(this.PluginDirectory, @"Plugins\Compass\toolbar\tbcompass.png"), control); m_Application.WorldWindow.MenuBar.AddToolsMenuButton(m_ToolbarItem); layer = new CompassLayer(LayerName, PluginDirectory, ParentApplication.WorldWindow); layer.IsOn = World.Settings.ShowCompass; ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.Add(layer); m_ToolbarItem.SetPushed(World.Settings.ShowCompass); }
/// <summary> /// Plugin entry point - All plugins must implement this function /// </summary> public override void Load() { if (ParentApplication.WorldWindow.CurrentWorld != null && ParentApplication.WorldWindow.CurrentWorld.Name.IndexOf("Earth") >= 0) { // Add layer visibility controller (and save it to make sure you can kill it later!) control.Visible = true; evhand = new EventHandler(control_VisibleChanged); control.VisibleChanged += evhand; // Add toolbar item m_ToolbarItem = new WorldWind.WindowsControlMenuButton("Global Clouds", Path.Combine(Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath), @"Data\Icons\Interface\earth-eastern.png"), control); m_Application.WorldWindow.MenuBar.AddToolsMenuButton(m_ToolbarItem); layer = new GlobalCloudsLayer(LayerName, PluginDirectory, ParentApplication.WorldWindow); layer.IsOn = World.Settings.ShowClouds; //ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.Insert(0,layer); ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.Add(layer); m_ToolbarItem.SetPushed(World.Settings.ShowClouds); } }