[UI.Client]
优化Recipe保存时如果存在校验错误的参数,弹出的警告对话框的内容。 修正当RecipeEditor中某行权限设置为None时,拖拽填充时无法获取Cell对象导致引发NullReference异常的问题。
This commit is contained in:
parent
a7051a3f1b
commit
e10abebfe6
|
@ -1404,9 +1404,10 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|||
if (CurrentRecipe.Validate() == false)
|
||||
{
|
||||
var mbr = DialogBox.ShowDialog(
|
||||
DialogButton.Yes | DialogButton.No,
|
||||
DialogType.WARNING,
|
||||
$"{CurrentRecipe.ValidationErrorSummary}\r\n Are you sure to continue to save?");
|
||||
DialogButton.Yes | DialogButton.No,
|
||||
DialogType.WARNING,
|
||||
$"Are you sure to continue to save with errors?\r\n\r\n" +
|
||||
$"{CurrentRecipe.ValidationErrorSummary}");
|
||||
if (mbr == DialogButton.No)
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -211,6 +211,11 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.DGExtension
|
|||
if (itemsHost.Children[i] is EGC.DataGridRow row)
|
||||
{
|
||||
var targetCell = row.TryGetCell(_selectionAnchor.Value.Column.DisplayIndex);
|
||||
|
||||
// 如果当前行被设置为Visibility.Collapsed,则无法通过TryGetCell方法获取Cell对象
|
||||
if(targetCell == null)
|
||||
continue;
|
||||
|
||||
if (GetParamFromCell(targetCell) is IParam p)
|
||||
p.SetValue(value);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
|||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[Step{Step.StepNo}]-{Param.DisplayName} {Message}";
|
||||
return $"[Step{Step.StepNo}][{Param.DisplayName}] {Message}";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue