internal static SecretThemDTO FromSecretTheme(SecretTheme theme) => new SecretThemDTO { ForegroundColor = theme.ForegroundColor, BackgroundColor = theme.BackgroundColor, ButtonBackgroundColor = theme.ButtonBackgroundColor };
public SecretTheme SwitchTheme(SecretTheme oldTheme) { var currTheme = oldTheme == SecretTheme.Light ? SecretTheme.Dark : SecretTheme.Light; var json = JsonConvert.SerializeObject(SecretThemDTO.FromSecretTheme(currTheme)); StoreSecrets(json); return currTheme; }
internal static SecretTheme ToSecretTheme(SecretThemDTO dto) => SecretTheme.FromColors (dto.ForegroundColor, dto.BackgroundColor, dto.ButtonBackgroundColor);