Browse Source

1. 添加新建模板配方的功能。2. 工艺添加部分默认参数值。

煮面机(新)
ZhaoGang 1 year ago
parent
commit
ab9f3d8cfd
9 changed files with 220 additions and 115 deletions
  1. +36
    -34
      BPASmartClient.MorkCL/Control_MorkCL.cs
  2. +5
    -5
      BPASmartClient.MorkCL/Model/Func/EFunc.cs
  3. +14
    -14
      BPASmartClient.MorkCL/Model/Func/InitData.cs
  4. +37
    -16
      BPASmartClient.MorkCL/View/Debug.xaml
  5. +11
    -1
      BPASmartClient.MorkCL/View/EditRecipeView.xaml
  6. +1
    -1
      BPASmartClient.MorkCL/View/ParSet.xaml
  7. +13
    -3
      BPASmartClient.MorkCL/View/RecipeManageView.xaml
  8. +59
    -37
      BPASmartClient.MorkCL/ViewModel/EditRecipeViewModel.cs
  9. +44
    -4
      BPASmartClient.MorkCL/ViewModel/RecipeManageViewModel.cs

+ 36
- 34
BPASmartClient.MorkCL/Control_MorkCL.cs View File

@@ -517,9 +517,9 @@ namespace BPASmartClient.MorkCL
GoStirFryLoc(stirFryLoc);

//炒制
if (int.TryParse(fm.funcPars.ElementAt(3).ParValue.ToString(), out int time))
if (int.TryParse(fm.funcPars.ElementAt(3).ParValue.ToString(), out int time1))
{
StirFry(time);
StirFry(time1);
}
}
else
@@ -580,9 +580,9 @@ namespace BPASmartClient.MorkCL
GoStirFryLoc(stirFryLoc);

//炒制
if (int.TryParse(fm.funcPars.ElementAt(3).ParValue.ToString(), out int time))
if (int.TryParse(fm.funcPars.ElementAt(3).ParValue.ToString(), out int time2))
{
StirFry(time);
StirFry(time2);
}
}
else
@@ -653,9 +653,9 @@ namespace BPASmartClient.MorkCL
GoStirFryLoc(stirFryLoc);

//炒制
if (int.TryParse(fm.funcPars.ElementAt(2).ParValue.ToString(), out int time))
if (int.TryParse(fm.funcPars.ElementAt(2).ParValue.ToString(), out int time3))
{
StirFry(time);
StirFry(time3);
}

}
@@ -667,9 +667,11 @@ namespace BPASmartClient.MorkCL
}
break;
#endregion
//case EFunc.炒锅回原点位:
case EFunc.炒锅回原点位:
GoHome();

break;

// break;
#region 出餐启动
case EFunc.出餐启动:

@@ -713,38 +715,38 @@ namespace BPASmartClient.MorkCL
break;
#endregion
#region 炒锅清洗--基本没用
//case EFunc.炒锅清洗:
// device.FryingPanClear = false;
// //DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-设置炒锅清洗。");
// await Task.Delay(400);
// device.FryingPanClear = true;
// DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-炒锅清洗已写入,等待炒锅清洗完成。");
// Thread.Sleep(500);
// device.CleanFinish.Wait(Cts: TaskList[et].Cts);
// await Task.Delay(400);
// device.FryingPanClear = false;
// DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-炒锅清洗完成。");
// break;
case EFunc.炒锅清洗:
device.FryingPanClear = false;
//DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-设置炒锅清洗。");
await Task.Delay(400);
device.FryingPanClear = true;
DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-炒锅清洗已写入,等待炒锅清洗完成。");
Thread.Sleep(500);
device.CleanFinish.Wait(Cts: TaskList[et].Cts);
await Task.Delay(400);
device.FryingPanClear = false;
DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-炒锅清洗完成。");
break;
#endregion

#region 2023-11-16改进 废弃代码
//case EFunc.去指定炒制位:
// //DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-设置去指定炒制位。");
// string loc = fm.funcPars.ElementAt(0).ParValue.ToString();
// GoStirFryLoc(loc);
#region
case EFunc.去指定炒制位:
//DeviceProcessLogShow($"{cd.Name}-【{et}#】任务执行-{fm.eFunc.ToString()}-设置去指定炒制位。");
string loc = fm.funcPars.ElementAt(0).ParValue.ToString();
GoStirFryLoc(loc);


// break;
//case EFunc.炒制:
break;
case EFunc.炒制:

// if (int.TryParse(fm.funcPars.ElementAt(0).ParValue.ToString(), out int time))
// {
// StirFry(time);
// }
if (int.TryParse(fm.funcPars.ElementAt(0).ParValue.ToString(), out int time))
{
StirFry(time);
}

// break;
break;
#endregion
default:
break;


+ 5
- 5
BPASmartClient.MorkCL/Model/Func/EFunc.cs View File

@@ -18,11 +18,11 @@ namespace BPASmartClient.MorkCL.Model.Func
添加调料=4,
添加主料=5,
添加辅料=6,
//炒锅回原点位=7,
炒锅回原点位=7,
出餐启动=8,
//炒锅清洗=9,
//炒锅回调料投料位置=10,
//去指定炒制位=11,
//炒制=12
炒锅清洗=9,
// 炒锅回调料投料位置=10,
去指定炒制位=11,
炒制=12
}
}

+ 14
- 14
BPASmartClient.MorkCL/Model/Func/InitData.cs View File

@@ -10,38 +10,38 @@ namespace BPASmartClient.MorkCL.Model.Func
{
public static Dictionary<EFunc, FuncPar[]> FunParInit { get; private set; } = new()
{
{ EFunc.搅拌启动,new FuncPar[] { new FuncPar() { ParName="搅拌速度", ParUnit ="HZ", ParDescribe="请输入 0 -- 60 HZ的频率"} } },
{ EFunc.搅拌启动,new FuncPar[] { new FuncPar() { ParName="搅拌速度", ParUnit ="HZ", ParDescribe="请输入 0 -- 60 HZ的频率", ParValue =60} } },
{ EFunc.搅拌停止,new FuncPar[0] },
{ EFunc.加热启动,new FuncPar[] { new FuncPar() { ParName="加热档位", ParUnit ="挡", ParDescribe="请输入 1 -- 8 挡的档位"} } },
{ EFunc.加热启动,new FuncPar[] { new FuncPar() { ParName="加热档位", ParUnit ="挡", ParDescribe="请输入 1 -- 8 挡的档位", ParValue =8} } },
{ EFunc.加热停止,new FuncPar[0] },
{ EFunc.添加主料,new FuncPar[]
{
new FuncPar() { ParName="主料名称", ParDescribe="请选择一种主料"} ,
new FuncPar() { ParName="主料份量", ParUnit ="KG", ParDescribe="请输入主料的份量"} ,
new FuncPar() { ParName="设置炒制位", ParDescribe="请输入 1--3 选择一个合适的炒制位置"},
new FuncPar() { ParName="设置炒制时间",ParUnit="秒", ParDescribe="请设置一个合适的炒制时间"}
new FuncPar() { ParName="主料份量", ParUnit ="KG", ParDescribe="请输入主料的份量",ParValue=2} ,
new FuncPar() { ParName="设置炒制位", ParDescribe="请输入 1--3 选择一个合适的炒制位置",ParValue=3},
new FuncPar() { ParName="设置炒制时间",ParUnit="秒", ParDescribe="请设置一个合适的炒制时间",ParValue=60}
}
},
{ EFunc.添加调料,new FuncPar[]
{
new FuncPar() { ParName="调料名称", ParDescribe="请选择一种调料"} ,
new FuncPar() { ParName="调料需求值", ParUnit ="g", ParDescribe="请输入调料的需求量"} ,
new FuncPar() { ParName="设置炒制位", ParDescribe="请输入 1--3 选择一个合适的炒制位置"},
new FuncPar() { ParName="设置炒制时间",ParUnit="秒", ParDescribe="请设置一个合适的炒制时间"}
new FuncPar() { ParName="调料需求值", ParUnit ="g", ParDescribe="请输入调料的需求量",ParValue=100} ,
new FuncPar() { ParName="设置炒制位", ParDescribe="请输入 1--3 选择一个合适的炒制位置",ParValue=3},
new FuncPar() { ParName="设置炒制时间",ParUnit="秒", ParDescribe="请设置一个合适的炒制时间",ParValue=30}
}
},

{ EFunc.添加辅料,new FuncPar[] {
new FuncPar() { ParName="辅料名称", ParDescribe= "请选择一种辅料" },
new FuncPar() { ParName="设置炒制位", ParDescribe="请输入 1--3 选择一个合适的炒制位置"},
new FuncPar() { ParName="设置炒制时间",ParUnit="秒", ParDescribe="请设置一个合适的炒制时间"}
new FuncPar() { ParName="设置炒制位", ParDescribe="请输入 1--3 选择一个合适的炒制位置",ParValue=3},
new FuncPar() { ParName="设置炒制时间",ParUnit="秒", ParDescribe="请设置一个合适的炒制时间",ParValue=30}
} },
//{ EFunc.炒锅回原点位,new FuncPar[0] },
{ EFunc.炒锅回原点位,new FuncPar[0] },
{ EFunc.出餐启动,new FuncPar[0] },
//{ EFunc.炒锅清洗,new FuncPar[0] },
{ EFunc.炒锅清洗,new FuncPar[0] },
//{ EFunc.炒锅回调料投料位置,new FuncPar[0] },
//{ EFunc.去指定炒制位,new FuncPar[] { } },
//{ EFunc.炒制,new FuncPar[] { } },
{ EFunc.去指定炒制位,new FuncPar[] { new FuncPar() { ParName = "设置炒制位", ParDescribe = "请输入 1--3 选择一个合适的炒制位置" , ParValue =3} } },
{ EFunc.炒制,new FuncPar[] { new FuncPar() { ParName = "设置炒制时间", ParUnit = "秒", ParDescribe = "请设置一个合适的炒制时间" , ParValue =60} } },
};
}
}

+ 37
- 16
BPASmartClient.MorkCL/View/Debug.xaml View File

@@ -37,8 +37,11 @@
<!--#region 1#炒锅控制-->
<pry:ImageBorder Margin="10" />
<StackPanel Margin="30" Orientation="Vertical">
<StackPanel Margin="0,0,0,20" Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="1#炒锅控制" FontSize="26" />
<StackPanel
Margin="0,0,0,20"
HorizontalAlignment="Center"
Orientation="Horizontal">
<TextBlock FontSize="26" Text="1#炒锅控制" />
<!--<ComboBox
Width="150"
Height="50"
@@ -49,17 +52,20 @@
</StackPanel>
<StackPanel Margin="5" Orientation="Horizontal">
<Button
Height="50" Width="150"
Width="150"
Height="50"
Margin="0,0,20,0"
Command="{Binding SetAutoModeCommand}"
Content="设为自动模式" />
<Button
Height="50" Width="150"
Width="150"
Height="50"
Margin="10,0"
Command="{Binding SetManualModeCommand}"
Content="设为手动模式" />
<Button
Height="50" Width="150"
Width="150"
Height="50"
Margin="10,0"
Command="{Binding InitalDeviceCommand}"
Content="初始化设备" />
@@ -212,10 +218,16 @@
<!--#endregion-->

<!--#region 2#炒锅控制-->
<pry:ImageBorder Margin="10" Grid.Column="1"/>
<StackPanel Margin="30" Orientation="Vertical" Grid.Column="1" >
<StackPanel Margin="0,0,0,20" Orientation="Horizontal" HorizontalAlignment="Center">
<TextBlock Text="2#炒锅控制" FontSize="26"/>
<pry:ImageBorder Grid.Column="1" Margin="10" />
<StackPanel
Grid.Column="1"
Margin="30"
Orientation="Vertical">
<StackPanel
Margin="0,0,0,20"
HorizontalAlignment="Center"
Orientation="Horizontal">
<TextBlock FontSize="26" Text="2#炒锅控制" />
<!--<ComboBox
Width="150"
Height="50"
@@ -226,17 +238,20 @@
</StackPanel>
<StackPanel Margin="5" Orientation="Horizontal">
<Button
Height="50" Width="150"
Width="150"
Height="50"
Margin="0,0,20,0"
Command="{Binding SetAutoModeCommand2}"
Content="设为自动模式" />
<Button
Height="50" Width="150"
Width="150"
Height="50"
Margin="10,0"
Command="{Binding SetManualModeCommand2}"
Content="设为手动模式" />
<Button
Height="50" Width="150"
Width="150"
Height="50"
Margin="10,0"
Command="{Binding InitalDeviceCommand2}"
Content="初始化设备" />
@@ -388,11 +403,14 @@
<!--#endregion-->

<!--#region 机器人控制-->
<pry:ImageBorder Grid.Row="1" Margin="10" Grid.ColumnSpan="2"/>
<pry:ImageBorder
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="10" />
<StackPanel
Grid.Row="1"
Margin="15"
Grid.ColumnSpan="2"
Margin="15"
Orientation="Horizontal">
<Button
Width="200"
@@ -421,11 +439,14 @@
<!--#endregion-->

<!--#region 系统任务控制-->
<pry:ImageBorder Grid.Row="2" Margin="10" Grid.ColumnSpan="2"/>
<pry:ImageBorder
Grid.Row="2"
Grid.ColumnSpan="2"
Margin="10" />
<StackPanel
Grid.Row="2"
Margin="15"
Grid.ColumnSpan="2"
Margin="15"
Orientation="Horizontal">
<Button
Width="150"


+ 11
- 1
BPASmartClient.MorkCL/View/EditRecipeView.xaml View File

@@ -173,7 +173,10 @@
ItemsSource="{Binding Functions}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Name="gr" Height="40" Margin="0,5">
<Grid
Name="gr"
Height="40"
Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="50" />
<ColumnDefinition Width="230" />
@@ -207,7 +210,14 @@
<Behaviors:EventTrigger EventName="DropDownClosed">
<Behaviors:InvokeCommandAction Command="{Binding DataContext.FuncChangeCommand, ElementName=contentControl}" CommandParameter="{Binding}" />
</Behaviors:EventTrigger>
<Behaviors:EventTrigger EventName="DropDownOpened">
<Behaviors:InvokeCommandAction Command="{Binding DataContext.DropDownOenCommand, ElementName=contentControl}" CommandParameter="{Binding eFunc}" />
</Behaviors:EventTrigger>
<!--<Behaviors:EventTrigger EventName="PreviewMouseLeftButtonDown">
<Behaviors:ChangePropertyAction PropertyName="IsDropDownOpen" Value="True"/>
</Behaviors:EventTrigger>-->
</Behaviors:Interaction.Triggers>

</ComboBox>
<Border
BorderBrush="{StaticResource bordColor}"


+ 1
- 1
BPASmartClient.MorkCL/View/ParSet.xaml View File

@@ -74,7 +74,7 @@
FontSize="24"
IsChecked="{Binding Param.OtherDeviceConnect}" />
</StackPanel>
<!--分位逻辑有问题,暂时不开放 -->
<!-- 分位逻辑有问题,暂时不开放 -->
<!--<StackPanel Grid.Row="1" Grid.Column="2" >
<CheckBox
Margin="5"


+ 13
- 3
BPASmartClient.MorkCL/View/RecipeManageView.xaml View File

@@ -83,15 +83,23 @@
FlowDirection="RightToLeft"
Orientation="Horizontal">
<Button
Margin="0,0,50,0"
Height="35"
Margin="10,0,50,0"
VerticalAlignment="Center"
Command="{Binding ClearAllRecipeCommand}"
Content="清除所有配方" />
<Button
Height="35"
Margin="5,0"
VerticalAlignment="Center"
Command="{Binding AddRecipeCommand}"
Content="添加配方" />
<Button
Height="35"
Margin="5,0"
VerticalAlignment="Center"
Command="{Binding AddTemplateRecipeCommand}"
Content="添加模板配方" />
<!--<Button
Margin="5,0"
VerticalAlignment="Center"
@@ -187,15 +195,17 @@
</Grid.ColumnDefinitions>

<TextBlock
Grid.Column="0" FontSize="26"
Grid.Column="0"
HorizontalAlignment="Center"
FontSize="26"
Style="{StaticResource TextBlockStyle}"
Text="{Binding Name}"
TextAlignment="Center" />

<Grid Grid.Column="1">
<TextBox FontSize="26"
<TextBox
MinWidth="400"
FontSize="26"
Style="{StaticResource DataShowTextBoxStyle}"
Text="{Binding DishType}"
TextAlignment="Center" />


+ 59
- 37
BPASmartClient.MorkCL/ViewModel/EditRecipeViewModel.cs View File

@@ -10,12 +10,15 @@ namespace BPASmartClient.MorkCL.ViewModel
{
public class EditRecipeViewModel : NotifyBase
{
private EFunc lastFuncName = EFunc.搅拌启动;
public EditRecipeViewModel()
{
//AddTestData();

Functions = new();


ActionManage.GetInstance.Register((object o) =>
{
if (o != null && o is ControlData recipe)
@@ -59,6 +62,11 @@ namespace BPASmartClient.MorkCL.ViewModel
MessageNotify.GetInstance.ShowDialog("配方名称不可为空,请重新输入后重试!", DialogType.Error);
return;
}
if (Name.Equals("模板配方"))
{
MessageNotify.GetInstance.ShowDialog("配方名称不可为【模板配方】,请修改!", DialogType.Error);
return;
}
//if (!int.TryParse(ID,out int Id))
//{
// MessageNotify.GetInstance.ShowDialog("配方ID不是数字,请重新输入后重试!");
@@ -171,51 +179,50 @@ namespace BPASmartClient.MorkCL.ViewModel
}
break;

//case EFunc.炒锅回原点位:
// break;
case EFunc.炒锅回原点位:
break;

case EFunc.出餐启动:
break;

#region 废弃代码
//case EFunc.炒锅清洗:
// break;
case EFunc.炒锅清洗:
break;

//case EFunc.炒锅回调料投料位置:
// break;

//case EFunc.去指定炒制位:
// if (int.TryParse(item.funcPars[0].ParValue?.ToString(), out int fryingPanLoc))
// {
// if (fryingPanLoc > 4 || fryingPanLoc <= 0)
// {
// MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的设定炒制位限值1--4,请修改验证后重试!", DialogType.Error);
// return;
// }
// }
// else
// {
// MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的设定炒制不是整数,请修改验证后重试!", DialogType.Error);
// return;
// }
// break;
case EFunc.去指定炒制位:
if (int.TryParse(item.funcPars[0].ParValue?.ToString(), out int fryingPanLoc))
{
if (fryingPanLoc > 4 || fryingPanLoc <= 0)
{
MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的设定炒制位限值1--4,请修改验证后重试!", DialogType.Error);
return;
}
}
else
{
MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的设定炒制不是整数,请修改验证后重试!", DialogType.Error);
return;
}
break;

//case EFunc.炒制:
// if (int.TryParse(item.funcPars[0].ParValue.ToString(), out int stirFryTime))
// {
// if (stirFryTime <= 0)
// {
// MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的炒制时间设置小于0,请修改验证后重试!", DialogType.Error);
// return;
// }
// }
// else
// {
// MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的炒制时间不是纯数字,请修改验证后重试!", DialogType.Error);
// return;
// }
// break;
#endregion
case EFunc.炒制:
if (int.TryParse(item.funcPars[0].ParValue.ToString(), out int stirFryTime))
{
if (stirFryTime <= 0)
{
MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的炒制时间设置小于0,请修改验证后重试!", DialogType.Error);
return;
}
}
else
{
MessageNotify.GetInstance.ShowDialog($"{item.eFunc}功能的炒制时间不是纯数字,请修改验证后重试!", DialogType.Error);
return;
}
break;

default:
break;
@@ -317,7 +324,17 @@ namespace BPASmartClient.MorkCL.ViewModel
{
if (o != null && o is FuncModel model)
{
model.funcPars = InitData.FunParInit[model.eFunc].ToList();
if (model.eFunc!=lastFuncName)
{
model.funcPars = InitData.FunParInit[model.eFunc].ToList();
}
}
});
DropDownOenCommand = new((o) =>
{
if (o!=null && o is EFunc eFunc)
{
lastFuncName = eFunc;
}
});
RemoveCommand = new BPARelayCommand<object>((o) =>
@@ -406,6 +423,11 @@ namespace BPASmartClient.MorkCL.ViewModel
/// <summary>功能选择改变。</summary>
public BPARelayCommand<object> FuncChangeCommand { get; set; }

/// <summary>
/// 打开下拉框时
/// </summary>
public BPARelayCommand<object> DropDownOenCommand { get; set; }

/// <summary>编辑功能。</summary>
public BPARelayCommand<object> EditCommand { get; set; }



+ 44
- 4
BPASmartClient.MorkCL/ViewModel/RecipeManageViewModel.cs View File

@@ -27,6 +27,39 @@ namespace BPASmartClient.MorkCL.ViewModel
EditRecipeView editRecipeView = new EditRecipeView();
editRecipeView.ShowDialog();
});
AddTemplateRecipeCommand = new BPARelayCommand(() =>
{
ControlData template = new ControlData();

#region 给模板配方生成数据。
template.Name = "模板配方";
template.Id = Guid.NewGuid().ToString();
template.Remark = "";
template.DishType = Model.Recipe.EDishType.炒菜;
//1. 开机 热锅
template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.搅拌启动, funcPars = InitData.FunParInit[EFunc.搅拌启动]?.ToList() });
template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.加热启动, funcPars = InitData.FunParInit[EFunc.加热启动]?.ToList() });
template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.炒制, funcPars = InitData.FunParInit[EFunc.炒制]?.ToList() });


template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.添加调料, funcPars = InitData.FunParInit[EFunc.添加调料]?.ToList() });
template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.添加主料, funcPars = InitData.FunParInit[EFunc.添加主料]?.ToList() });

template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.添加辅料, funcPars = InitData.FunParInit[EFunc.添加辅料]?.ToList() });
template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.添加主料, funcPars = InitData.FunParInit[EFunc.添加主料]?.ToList() });
template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.添加辅料, funcPars = InitData.FunParInit[EFunc.添加辅料]?.ToList() });

template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.加热停止, funcPars = InitData.FunParInit[EFunc.加热停止]?.ToList() });

template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.出餐启动, funcPars = InitData.FunParInit[EFunc.搅拌停止]?.ToList() });
template.ControlFuncs.Enqueue(new FuncModel() { eFunc = EFunc.搅拌停止, funcPars = InitData.FunParInit[EFunc.搅拌停止]?.ToList() });
#endregion

EditRecipeView editRecipeView = new EditRecipeView();
ActionManage.GetInstance.Send("OpenRecipeEditView", template);
editRecipeView.ShowDialog();

});
RemoveCommand = new((id) =>
{
if (MessageNotify.GetInstance.ShowDialog("是否删除该配方?", DialogType.Warning))
@@ -69,12 +102,12 @@ namespace BPASmartClient.MorkCL.ViewModel
case EFunc.搅拌停止:
case EFunc.加热启动:
case EFunc.加热停止:
//case EFunc.炒锅回原点位:
case EFunc.炒锅回原点位:
case EFunc.出餐启动:
//case EFunc.炒锅清洗:
case EFunc.炒锅清洗:
//case EFunc.炒锅回调料投料位置:
//case EFunc.去指定炒制位:
//case EFunc.炒制:
case EFunc.去指定炒制位:
case EFunc.炒制:
break;

case EFunc.添加主料:
@@ -108,6 +141,8 @@ namespace BPASmartClient.MorkCL.ViewModel
return;
}
break;
default:
break;
}
}

@@ -161,6 +196,11 @@ namespace BPASmartClient.MorkCL.ViewModel
/// <summary>添加配方。</summary>
public BPARelayCommand AddRecipeCommand { get; set; }

/// <summary>
/// 添加一个模板配方。
/// </summary>
public BPARelayCommand AddTemplateRecipeCommand { get; set; }

/// <summary>移除配方。</summary>
public BPARelayCommand<object> RemoveCommand { get; set; }



Loading…
Cancel
Save