Files
Nebula-Auth/NebulaAuth/Converters/Background/BackgroundSourceConverter.cs
T
Давид Чернопятов 1e65cd4a06 1.5.3 progress. Added multi-confirmation and code refactorings
NebulaAuth:
- Added MAAC and PortableMaClient for multi-confirmations
- Code clean-ups, removed unused classes, refactoring of old files
- SteamLib updated
- Localization and UI updates
- Dependcies updated to the last version

LegacyConverter:
 - Added mode to decrypt mafiles
2024-10-16 16:31:53 +03:00

28 lines
815 B
C#

using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;
using System.Windows.Media.Imaging;
using NebulaAuth.Model;
namespace NebulaAuth.Converters.Background;
public class BackgroundSourceConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is BackgroundMode.Custom)
{
if(File.Exists("Background.png"))
return new BitmapImage(new Uri(Path.GetFullPath("Background.png")));
}
return new BitmapImage(new Uri("pack://application:,,,/Theme/Background.jpg"));
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}