Exemplo n.º 1
0
 internal static SecretThemDTO FromSecretTheme(SecretTheme theme) =>
 new SecretThemDTO
 {
     ForegroundColor       = theme.ForegroundColor,
     BackgroundColor       = theme.BackgroundColor,
     ButtonBackgroundColor = theme.ButtonBackgroundColor
 };
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 internal static SecretTheme ToSecretTheme(SecretThemDTO dto) =>
 SecretTheme.FromColors
     (dto.ForegroundColor, dto.BackgroundColor, dto.ButtonBackgroundColor);