mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 14:15:00 +00:00
code_style: remove all IDE warnings
This commit is contained in:
parent
24ca3eaf8c
commit
f4eca45754
79 changed files with 1462 additions and 1378 deletions
|
@ -18,7 +18,7 @@ namespace SourceGit.Converters
|
|||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (value as Models.Locale).Key;
|
||||
return (value as Models.Locale)?.Key;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,18 +29,21 @@ namespace SourceGit.Converters
|
|||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var theme = (string)value;
|
||||
if (string.IsNullOrEmpty(theme))
|
||||
return ThemeVariant.Default;
|
||||
|
||||
if (theme.Equals("Light", StringComparison.OrdinalIgnoreCase))
|
||||
return ThemeVariant.Light;
|
||||
else if (theme.Equals("Dark", StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
if (theme.Equals("Dark", StringComparison.OrdinalIgnoreCase))
|
||||
return ThemeVariant.Dark;
|
||||
else
|
||||
return ThemeVariant.Default;
|
||||
|
||||
return ThemeVariant.Default;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var theme = (ThemeVariant)value;
|
||||
return theme.Key;
|
||||
return (value as ThemeVariant)?.Key;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue