//steam login private void loginOnSteam(bool auto) { //on start up if (auto && AccountController.userAccounts.Count > 0 && LaunchedViaStartup) { UserAccount account = (UserAccount)AccountController.userAccounts[0]; account = (UserAccount)AccountController.getAccount(SteamTwoProperties.jsonSetting.selectedAccountSetting); bool success = LocalSteamController.startSteam(account.username, Cryptography.Decrypt(account.password, encryptionKey)); if (account.desktopAuth) { openSteamDesktopAuthAsync(); } if (SteamTwoProperties.jsonSetting.closeStemLaunchSetting && success) { beforeClosing(); } } //normal login button click if (!auto && listView1.SelectedItem != null) { UserAccount account = (UserAccount)AccountController.userAccounts[listView1.SelectedIndex]; bool success = LocalSteamController.startSteam(account.username, Cryptography.Decrypt(account.password, encryptionKey)); if (account.desktopAuth) { openSteamDesktopAuthAsync(); } if (SteamTwoProperties.jsonSetting.closeStemLaunchSetting && success) { beforeClosing(); } } }
private void autoLoginSteam(bool auto) { if (auto && accountsArray.Length > 0 && LaunchedViaStartup) { LocalSteamController.startSteam(accountsArray[0].username, accountsArray[0].password); if (SteamTwoProperties.jsonSetting.closeStemLaunchSetting) { beforeClosing(); } } if (!auto && listView1.SelectedItem != null) { LocalSteamController.startSteam(accountsArray[listView1.SelectedIndex].username, accountsArray[listView1.SelectedIndex].password); if (SteamTwoProperties.jsonSetting.closeStemLaunchSetting) { beforeClosing(); } } }