[UI.Client]

ParamBaseWithGenericValue的GetValue和SetValue方法中,如果没有操作权限,则直接结束操作,而不是抛出异常。
This commit is contained in:
Liang Su 2023-06-16 17:40:56 +08:00
parent 8e36056995
commit 92524557c8
1 changed files with 5 additions and 3 deletions

View File

@ -137,15 +137,17 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel.Params
public virtual object GetValue()
{
if (Permission == MenuPermissionEnum.MP_NONE)
throw new PermissionException(Permission);
//throw new PermissionException(Permission);
return null;
return Value;
}
public void SetValue(object value)
{
if (Permission != MenuPermissionEnum.MP_READ_WRITE)
throw new PermissionException(Permission);
//throw new PermissionException(Permission);
return;
HandleSetValue(value);
OnValueChanged?.Invoke(this, value);