public override void ViewDidLoad() { base.ViewDidLoad(); rootViewController = (ViewController)NSApplication.SharedApplication.MainWindow.ContentViewController; config = rootViewController.config; settings = rootViewController.settings; settingIndex = rootViewController.settingIndex; planetIndex = (int)OrbsCombo.SelectedIndex; for (int i = 0; i < 10; i++) { NSString obj = new NSString(settings[i].dispName); SettingsCombo.Add(obj); } SettingsCombo.SelectItem(settingIndex); if (planetIndex == -1) { planetIndex = 0; OrbsCombo.SelectItem(planetIndex); } ReRender(); }
void ReleaseDesignerOutlets() { if (OrbMoonHard != null) { OrbMoonHard.Dispose(); OrbMoonHard = null; } if (OrbMoonSoft != null) { OrbMoonSoft.Dispose(); OrbMoonSoft = null; } if (OrbOtherHard != null) { OrbOtherHard.Dispose(); OrbOtherHard = null; } if (OrbOtherSoft != null) { OrbOtherSoft.Dispose(); OrbOtherSoft = null; } if (OrbsCombo != null) { OrbsCombo.Dispose(); OrbsCombo = null; } if (OrbSunHard != null) { OrbSunHard.Dispose(); OrbSunHard = null; } if (OrbSunSoft != null) { OrbSunSoft.Dispose(); OrbSunSoft = null; } if (SubmitClicked != null) { SubmitClicked.Dispose(); SubmitClicked = null; } if (SettingsCombo != null) { SettingsCombo.Dispose(); SettingsCombo = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); rootViewController = (ViewController)NSApplication.SharedApplication.MainWindow.ContentViewController; config = rootViewController.config; rootViewController = (ViewController)NSApplication.SharedApplication.MainWindow.ContentViewController; config = rootViewController.config; settings = rootViewController.settings; settingIndex = rootViewController.settingIndex; if (RingsCombo == null) { planetIndex = 0; } else { planetIndex = (int)RingsCombo.IndexOfSelectedItem; } SettingsCombo.RemoveAllItems(); for (int i = 0; i < 10; i++) { NSString obj = new NSString(settings[i].dispName); SettingsCombo.AddItem(obj); } SettingsCombo.SelectItem(settingIndex); RingsCombo.SelectItem(planetIndex); ReRender(); }