mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-25 06:14:31 +00:00
1e65cd4a06
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
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
using AchiesUtilities.Web.Proxy;
|
|
using NebulaAuth.Model.Entities;
|
|
|
|
namespace NebulaAuth.Converters;
|
|
|
|
public class ProxyTextConverter : IValueConverter
|
|
{
|
|
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
{
|
|
if (value is not MaProxy p)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
return $"{p.Id}: {p.Data.Address}:{p.Data.Port}";
|
|
}
|
|
|
|
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
}
|
|
|
|
public class ProxyDataTextConverter : IValueConverter
|
|
{
|
|
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
{
|
|
if (value is not ProxyData p)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
return $"{p.Address}:{p.Port}";
|
|
}
|
|
|
|
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
} |