20240301_JSEQ_upperpc/JiangsuEarthquakeNowUI/JiangsuEarthquake/Common/ConnectConvertServerImage.cs

33 lines
943 B
C#
Raw Permalink Normal View History

2024-11-01 07:54:08 +00:00
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using System.Windows.Media;
namespace JiangsuEarthquake.Common
{
public class ConnectConvertServerImage : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value.ToString() == "True")
{
return (ImageSource)System.Windows.Application.Current.FindResource("Connect");
}
else
{
return (ImageSource)System.Windows.Application.Current.FindResource("Disconnect");
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}