public ViewModel(bool changeAcRoot, bool changeSteamId) { ChangeAcRoot = changeAcRoot; ChangeSteamId = changeSteamId; FirstRun = ValuesStorage.Get(KeyFirstRun, true); if (FirstRun) { ValuesStorage.Set(KeyFirstRun, false); } ReviewMode = !FirstRun && IsReviewNeeded(); Value = AcRootDirectory.Instance.IsReady ? AcRootDirectory.Instance.Value : AcRootDirectory.TryToFind(); #if DEBUG if (changeAcRoot) { // Value = Value?.Replace("D:", "C:"); } #endif var steamId = SteamIdHelper.Instance.Value; SteamProfiles = new BetterObservableCollection <SteamProfile>(SteamIdHelper.TryToFind().Append(SteamProfile.None)); SteamProfile = SteamProfiles.GetByIdOrDefault(steamId) ?? SteamProfiles.First(); if (steamId != null && SteamProfile.SteamId != steamId) { SetSteamId(steamId); } }
public ViewModel(bool changeAcRoot, bool changeSteamId) { ChangeAcRoot = changeAcRoot; ChangeSteamId = changeSteamId; FirstRun = ValuesStorage.GetBool(KeyFirstRun) == false; if (FirstRun) { ValuesStorage.Set(KeyFirstRun, true); } ReviewMode = !FirstRun && IsReviewNeeded(); Value = AcRootDirectory.Instance.IsReady ? AcRootDirectory.Instance.Value : AcRootDirectory.TryToFind(); #if DEBUG Value = Value?.Replace("D:", "C:"); #endif var steamId = SteamIdHelper.Instance.Value; SteamProfiles = new BetterObservableCollection<SteamProfile>(SteamIdHelper.TryToFind().Append(SteamProfile.None)); SteamProfile = SteamProfiles.GetByIdOrDefault(steamId) ?? SteamProfiles.First(); if (steamId != null && SteamProfile.SteamId != steamId) { SetSteamId(steamId); } }