public Form1(bool loggedIn) { InitializeComponent(); Session.OnLoggedOut += Session_OnLoggedOut; LoggedIn = loggedIn; AppConfig config = AppConfig.Load(); Config = config; configCtrl = new ConfigControl(config); if (config == null) { LoadConfig(); } else { if (loggedIn) { LoadMain(); } else { LoadLogin(); } } }