public void SaveTheme(TerminalTheme theme) { _themes.WriteValueAsJson(theme.Id.ToString(), theme); if (theme.Id == GetCurrentThemeId()) { CurrentThemeChanged?.Invoke(this, theme.Id); } }
public SettingsService(IDefaultValueProvider defaultValueProvider) { _defaultValueProvider = defaultValueProvider; _localSettings = ApplicationData.Current.LocalSettings; _roamingSettings = ApplicationData.Current.RoamingSettings; _themes = _roamingSettings.CreateContainer(ThemesContainerName, ApplicationDataCreateDisposition.Always); foreach (var theme in _defaultValueProvider.GetPreInstalledThemes()) { _themes.WriteValueAsJson(theme.Id.ToString(), theme); } }
public void SaveShellProfile(ShellProfile shellProfile) { _shellProfiles.WriteValueAsJson(shellProfile.Id.ToString(), shellProfile); }
public void SaveKeyBindings(Command command, ICollection <KeyBinding> keyBindings) { _keyBindings.WriteValueAsJson(command.ToString(), keyBindings); _roamingSettings.WriteValueAsJson(nameof(KeyBindings), keyBindings); KeyBindingsChanged?.Invoke(this, EventArgs.Empty); }
public void SaveTerminalOptions(TerminalOptions terminalOptions) { _roamingSettings.WriteValueAsJson(nameof(TerminalOptions), terminalOptions); TerminalOptionsChanged?.Invoke(this, terminalOptions); }
public void SaveShellConfiguration(ShellConfiguration shellConfiguration) { _localSettings.WriteValueAsJson(nameof(ShellConfiguration), shellConfiguration); }