mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-24 15:35:31 +00:00
Migrate to Stylet and refactor view/view-model framework
This commit is contained in:
@@ -8,10 +8,12 @@ namespace DiscordChatExporter.Gui.Converters
|
||||
[ValueConversion(typeof(ExportFormat), typeof(string))]
|
||||
public class ExportFormatToStringConverter : IValueConverter
|
||||
{
|
||||
public static ExportFormatToStringConverter Instance { get; } = new ExportFormatToStringConverter();
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var format = (ExportFormat) value;
|
||||
return format.GetDisplayName();
|
||||
var format = (ExportFormat?) value;
|
||||
return format?.GetDisplayName();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
|
||||
Reference in New Issue
Block a user