mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 21:02:08 +08:00
25 lines
677 B
C#
25 lines
677 B
C#
using System;
|
|
using System.Globalization;
|
|
using System.Windows.Data;
|
|
using Sheas_Cealer.Consts;
|
|
|
|
namespace Sheas_Cealer.Convs
|
|
{
|
|
internal class MainUpdateHostButtonIsEnabledConv : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
string? upstreamUrl = value as string;
|
|
|
|
if (MainConst.UrlRegex().IsMatch(upstreamUrl!))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
} |