1退货包裹收费逻辑调整 2插旗隐藏功能
This commit is contained in:
1 parent
dacacb352c
commit
2ecc120c5d
13 files changed
+161
-27
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace _29WxOrderWpf.Converters
|
||||
{
|
||||
public class FlagColorConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value.ParseToInt() == 2)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagRedBrush"];
|
||||
if (value.ParseToInt() == 3)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagOrangeBrush"];
|
||||
if (value.ParseToInt() == 4)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagGreenBrush"];
|
||||
if (value.ParseToInt() == 5)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagBlueBrush"];
|
||||
if (value.ParseToInt() == 5)
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagPurpleBrush"];
|
||||
|
||||
return (SolidColorBrush)Application.Current.Resources["FlagGrayBrush"];
|
||||
}
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException(); // 单向绑定可不实现
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user