|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- using BPASmartClient.Model.大炒;
- 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;
-
- namespace BPASmartClient.MorkBF.Convert
- {
- public class StirToVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- Visibility visibility = Visibility.Visible;
- if (value != null && value is FryAction fryAction)
- {
- switch (fryAction)
- {
- case FryAction.冷锅加热:
- visibility = Visibility.Collapsed;
- break;
- case FryAction.热油:
- visibility = Visibility.Visible;
- break;
- case FryAction.机器人加调料:
- visibility = Visibility.Collapsed;
- break;
- case FryAction.通道出调料:
- visibility = Visibility.Collapsed;
- break;
- case FryAction.炒制菜品:
- visibility = Visibility.Visible;
- break;
- default:
- break;
- }
- }
- return visibility;
- }
-
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-
- public class FirePositionToVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- Visibility visibility = Visibility.Visible;
- if (value != null && value is FryAction fryAction)
- {
- switch (fryAction)
- {
- case FryAction.冷锅加热:
- visibility = Visibility.Visible;
- break;
- case FryAction.热油:
- visibility = Visibility.Visible;
- break;
- case FryAction.机器人加调料:
- visibility = Visibility.Collapsed;
- break;
- case FryAction.通道出调料:
- visibility = Visibility.Collapsed;
- break;
- case FryAction.炒制菜品:
- visibility = Visibility.Visible;
- break;
- default:
- break;
- }
- }
- return visibility;
- }
-
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-
- public class AccessoriesToVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- Visibility visibility = Visibility.Visible;
- if (value != null && value is FryAction fryAction)
- {
- switch (fryAction)
- {
- case FryAction.冷锅加热:
- visibility = Visibility.Collapsed;
- break;
- case FryAction.热油:
- visibility = Visibility.Collapsed;
- break;
- case FryAction.机器人加调料:
- visibility = Visibility.Visible;
- break;
- case FryAction.通道出调料:
- visibility = Visibility.Visible;
- break;
- case FryAction.炒制菜品:
- visibility = Visibility.Visible;
- break;
- default:
- break;
- }
- }
- return visibility;
- }
-
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
- }
-
|