mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-11 12:15:35 +08:00
feat: #169 添加成都双流机场次要看板
This commit is contained in:
22
CRSim.ScreenSimulator/Converters/IntAddOneConverter.cs
Normal file
22
CRSim.ScreenSimulator/Converters/IntAddOneConverter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace CRSim.ScreenSimulator.Converters
|
||||
{
|
||||
public class IntAddOneConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is int intValue)
|
||||
return intValue + 1;
|
||||
return value;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is int intValue)
|
||||
return intValue - 1;
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user