Example #1
0
 /// <summary>
 /// Plugin entry point - All plugins must implement this function
 /// </summary>
 public override void Load()
 {
     FileInfo SettingsFile = new FileInfo(Path.Combine(PluginDirectory, ParentApplication.WorldWindow.CurrentWorld.Name + ".ini"));
     if (SettingsFile.Exists)
     {
         PlanetaryRingsLayer layer = new PlanetaryRingsLayer(LayerName, PluginDirectory, ParentApplication.WorldWindow);
         //ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.ChildObjects.Insert(0,layer);
         ParentApplication.WorldWindow.CurrentWorld.RenderableObjects.Add(layer);
     }
 }
Example #2
0
 public propertiesDialog(PlanetaryRingsLayer layer)
 {
     this.layer = layer;
     InitializeComponent();
     //this.Icon = WorldWind.PluginEngine.Plugin.Icon;
     // Init texture list with *.png
     DirectoryInfo di = new DirectoryInfo(layer.pluginPath);
     FileInfo[] imgFiles = di.GetFiles(layer.world.Name + "*.png");
     cboTexture.Items.AddRange(imgFiles);
     // select current bitmap
     int i = cboTexture.FindString(layer.textureFileName);
     if (i != -1) cboTexture.SelectedIndex = i;
     // Check on
     chkOn.Checked = layer.IsOn;
     // Check shadows
     chkShadows.Checked = layer.shadowsOn;
     // Check sun locked
     chkSunLock.Checked = layer.sunLocked;
     // Check sun invert
     chkSunInvert.Checked = layer.sunInvert;
     // Check night side
     chkNightSide.Checked = layer.showNightSide;
     // Check globe shadow
     chkGlobeShadow.Checked = layer.showGlobeShadow;
     // Check rings shadow
     chkRingsShadow.Checked = layer.showRingsShadow;
     // Check unlit side of rings
     chkUnlitSide.Checked = layer.showUnlitSide;
     // Check atmospheric glow
     chkGlow.Checked = layer.showGlow;
 }