private void tab_changed(object sender, TabControlEventArgs e) { Logger.Trace(e.Action.ToString(), e.TabPage.Name, e.TabPageIndex.ToString()); if (new string[] { "tab_users", "tab_avatars", "tab_worlds" }.Contains(e.TabPage.Name)) { LoginVRCAPI(); } switch (e.TabPage.Name) { case "tab_users": SetupUsers(); break; case "tab_avatars": SetupAvatarsAsync(); break; case "tab_worlds": SetupWorldsAsync(); break; case "tab_settings": if (!settingsInitialized) { SetupSettings(); } break; case "tab_mods": if (mods == null) { SetupMods(); } break; case "tab_log_game": if (logReader == null) { logReader = new LogReader(); logReader.Init(); lst_log_game.Items.Add("Initialized Log Watcher"); } break; default: break; } }