mirror of
https://github.com/Tichau/FileConverter.git
synced 2026-11-20 17:42:20 +01:00
29 lines
903 B
C#
29 lines
903 B
C#
// <copyright file="ApplicationVersionToApplicationName.cs" company="AAllard">License: http://www.gnu.org/licenses/gpl.html GPL version 3.</copyright>
|
|
|
|
namespace FileConverter.ValueConverters
|
|
{
|
|
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
|
|
public class ApplicationVersionToApplicationName : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
if (!(value is FileConverter.Version))
|
|
{
|
|
return "File Converter";
|
|
}
|
|
|
|
FileConverter.Version version = (FileConverter.Version)value;
|
|
|
|
return $"File Converter v{version}";
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|