2022-10-25 15:22:38 +08:00
|
|
|
|
using System.Windows.Controls;
|
2022-12-04 20:34:37 +08:00
|
|
|
|
using MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel;
|
2022-10-25 15:22:38 +08:00
|
|
|
|
using DataGridBeginningEditEventArgs = ExtendedGrid.Microsoft.Windows.Controls.DataGridBeginningEditEventArgs;
|
2022-09-19 09:16:33 +08:00
|
|
|
|
|
|
|
|
|
namespace SicUI.Models.PMs
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// PMProcessView.xaml 的交互逻辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class PMProcessView : UserControl
|
|
|
|
|
{
|
|
|
|
|
public PMProcessView()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
2022-12-04 20:34:37 +08:00
|
|
|
|
|
|
|
|
|
private void DgCustom_OnBeginningEdit(object sender, DataGridBeginningEditEventArgs e)
|
|
|
|
|
{
|
2022-12-08 10:19:53 +08:00
|
|
|
|
// 禁止编辑不显示数值的Cell,或已经完成工艺的Step
|
2022-12-04 20:34:37 +08:00
|
|
|
|
if (e.Row.Item is RecipeStep step)
|
|
|
|
|
{
|
|
|
|
|
var param = step[e.Column.DisplayIndex];
|
2022-12-08 10:19:53 +08:00
|
|
|
|
if (e.Column.IsReadOnly || param.IsHideValue || param.Parent.IsProcessed)
|
2022-12-04 20:34:37 +08:00
|
|
|
|
e.Cancel = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-09-19 09:16:33 +08:00
|
|
|
|
}
|
|
|
|
|
}
|