/// <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 && !String.IsNullOrEmpty(m_szCachePath)) { // 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, m_szCachePath, 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); } }
internal propertiesDialog(GlobalCloudsLayer layer) { this.layer = layer; InitializeComponent(); //this.Icon = WorldWind.PluginEngine.Plugin.Icon; // Init texture list with *.jpg and/or *.png DirectoryInfo di = new DirectoryInfo(layer.cachePath); FileInfo[] imgFiles = di.GetFiles("*.png"); cboTexture.Items.AddRange(imgFiles); // select current bitmap int i = cboTexture.FindString(layer.textureFileName); if (i != -1) { cboTexture.SelectedIndex = i; } // Save current textureFileName savedTextureFileName = layer.textureFileName; //this.Text += layer.version; }
/// <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); } }
internal propertiesDialog(GlobalCloudsLayer layer) { this.layer = layer; InitializeComponent(); //this.Icon = WorldWind.PluginEngine.Plugin.Icon; // Init texture list with *.jpg and/or *.png DirectoryInfo di = new DirectoryInfo(layer.cachePath); FileInfo[] imgFiles = di.GetFiles("*.png"); cboTexture.Items.AddRange(imgFiles); // select current bitmap int i = cboTexture.FindString(layer.textureFileName); if (i != -1) cboTexture.SelectedIndex = i; // Save current textureFileName savedTextureFileName = layer.textureFileName; //this.Text += layer.version; }