public override bool Commit() { var profileType = SettingsProfileType.SingleMonitor; if (IsSimPitSetup.Value) { profileType = SettingsProfileType.SimPit; } if (IsVirtualRealitySetup.Value) { profileType = SettingsProfileType.VirtualReality; } if (IsHeliosSetup.Value) { profileType = SettingsProfileType.Helios; } var profile = new SettingsProfile { Name = ProfileName.Value, ProfileType = profileType, Path = Path.Combine(ApplicationPaths.ProfilesPath, $"{ProfileName.Value}.json") }; _profileSettingsService.AddProfile(profile); _profileSettingsService.SelectedProfileName = profile.Name; _profileSettingsService.SetValue(ProfileSettingsCategories.GameOptions, "options.VR.enabled", IsVirtualRealitySetup.Value); var primaryScreen = Screen.PrimaryScreen; switch (profileType) { case SettingsProfileType.SingleMonitor: Tracker.Instance.SendEvent(AnalyticsCategories.Configuration, AnalyticsEvents.ViewportSetup, "single"); _profileSettingsService.SetValue(ProfileSettingsCategories.Viewports, SettingsKeys.DeviceViewportsDisplays, new [] { primaryScreen.DeviceName }); break; case SettingsProfileType.Helios: case SettingsProfileType.SimPit: Tracker.Instance.SendEvent(AnalyticsCategories.Configuration, AnalyticsEvents.ViewportSetup, profileType == SettingsProfileType.SimPit ? "simpit" : "helios"); Controller.Steps.Add(new SelectGameViewportScreensStepViewModel(Container)); Controller.Steps.Add(new SelectUIViewportScreensStepViewModel(Container)); Controller.Steps.Add(new SelectDeviceViewportScreensStepViewModel(Container)); break; case SettingsProfileType.VirtualReality: Tracker.Instance.SendEvent(AnalyticsCategories.Configuration, AnalyticsEvents.ViewportSetup, "vr"); _profileSettingsService.SetValue(ProfileSettingsCategories.Viewports, SettingsKeys.DeviceViewportsDisplays, new[] { primaryScreen.DeviceName }); break; default: throw new ArgumentOutOfRangeException(); } return(base.Commit()); }