public static void InitiateInstanceWithDir(string installDir) { if (installDir == null) { throw new ArgumentException("installDir cannot be empty or null!"); } if (_instance == null) { _instance = new SasManager(installDir); } else { _instance.SetSteamInstallDir(installDir); } }
private void askUserForSteamLocation() { //No steam directory in Settings, let's find 'em! if (Properties.Settings.Default.steamInstallDir == String.Empty) { //Run this on first start string installDir = UserInteraction.selectSteamDirectory(@"C:\Program Files (x86)\Steam"); if (installDir == null) { MessageBox.Show( "You cannot use SteamAccountSwitcher without selecting your Steam.exe. Program will close now.", "Steam missing", MessageBoxButton.OK, MessageBoxImage.Error); Close(); } else { Properties.Settings.Default.steamInstallDir = installDir; SasManager.InitiateInstanceWithDir(installDir); } } }