refactor: 将Framework库和RT、UI放在同一个解决方案中。
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using MECF.Framework.Common.Account;
|
||||
using MECF.Framework.Common.Account.Permissions;
|
||||
using MECF.Framework.UI.Client.ClientBase;
|
||||
|
||||
namespace MECF.Framework.UI.Client.RecipeEditorLib.Converters;
|
||||
|
||||
/// <summary>
|
||||
/// 配方参数权限转换为IsEnabled属性值的转换器。
|
||||
/// </summary>
|
||||
public class PermissionToIsEnabledConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is MenuPermissionEnum perm)
|
||||
return perm == MenuPermissionEnum.MP_READ_WRITE;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user