2023-03-03 15:42:13 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.Windows.Data;
|
|
|
|
|
using RecipeEditorLib.RecipeModel.Params;
|
|
|
|
|
|
2023-03-13 17:37:55 +08:00
|
|
|
|
namespace MECF.Framework.UI.Client.CenterViews.Editors.Converters
|
2023-03-03 15:42:13 +08:00
|
|
|
|
{
|
2023-03-13 17:37:55 +08:00
|
|
|
|
public class StepNoToCxtMenuTitleConverter : IValueConverter
|
2023-03-03 15:42:13 +08:00
|
|
|
|
{
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
if (value is StepParam sp)
|
|
|
|
|
{
|
|
|
|
|
return $"Step No. {sp.Value}";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return "Unknown";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|