diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index 21014f94..2cc9110e 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -30,6 +30,7 @@ + @@ -234,6 +235,7 @@ + diff --git a/BPASmartClient.CustomResource/Image/AGV/炒锅2.png b/BPASmartClient.CustomResource/Image/AGV/炒锅2.png new file mode 100644 index 00000000..1d6c211c Binary files /dev/null and b/BPASmartClient.CustomResource/Image/AGV/炒锅2.png differ diff --git a/BPASmartClient.CustomResource/Themes/MyStyle.xaml b/BPASmartClient.CustomResource/Themes/MyStyle.xaml index acdc7f56..bf3c986b 100644 --- a/BPASmartClient.CustomResource/Themes/MyStyle.xaml +++ b/BPASmartClient.CustomResource/Themes/MyStyle.xaml @@ -456,6 +456,19 @@ + + + + @@ -1159,11 +1268,16 @@ 1 - - - + + + 滚筒炒锅 + 1 + + + + @@ -1276,22 +1390,26 @@ - + + 炒锅(1)号 - - + + + 炒锅(2)号 - - + + + 炒锅(3)号 - - + + + 炒锅(4)号 - - + + + 炒锅(5)号 - - + @@ -1318,7 +1436,6 @@ - @@ -1345,7 +1462,6 @@ - @@ -1372,7 +1488,6 @@ - @@ -1399,7 +1514,6 @@ - diff --git a/FryPot_DosingSystem/View/AgvView.xaml.cs b/FryPot_DosingSystem/View/AgvView.xaml.cs index d438a8b7..7887fc7b 100644 --- a/FryPot_DosingSystem/View/AgvView.xaml.cs +++ b/FryPot_DosingSystem/View/AgvView.xaml.cs @@ -163,6 +163,30 @@ namespace FryPot_DosingSystem.View } AgvViewModel.GetInstance().Set小车是否承载物品(id, IsBool.No); break; + case "启动炒锅": + try + { + id = int.Parse(guntongchaoguo_text.Text.ToString()); + } + catch (Exception ex) + { + MessageBox.Show("只能输入 1-4 的数字!"); + return; + } + AgvViewModel.GetInstance().Set启动或停止炒锅(id, IsRun.Start); + break; + case "停止炒锅": + try + { + id = int.Parse(guntongchaoguo_text.Text.ToString()); + } + catch (Exception ex) + { + MessageBox.Show("只能输入 1-4 的数字!"); + return; + } + AgvViewModel.GetInstance().Set启动或停止炒锅(id, IsRun.Stop); + break; } } diff --git a/FryPot_DosingSystem/ViewModel/AgvViewModel.cs b/FryPot_DosingSystem/ViewModel/AgvViewModel.cs index 05f55717..a73dffac 100644 --- a/FryPot_DosingSystem/ViewModel/AgvViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/AgvViewModel.cs @@ -300,6 +300,40 @@ namespace FryPot_DosingSystem.ViewModel } } + /// + /// 启动或停止炒锅 + /// + /// 默认:1 2 3 4 5,代表五个炒锅 + /// + public void Set启动或停止炒锅(int id, IsRun mode) + { + try + { + switch (id) + { + case 1: + wokModel_1.isRun= mode; + break; + case 2: + wokModel_2.isRun = mode; + break; + case 3: + wokModel_3.isRun = mode; + break; + case 4: + wokModel_4.isRun = mode; + break; + case 5: + wokModel_5.isRun = mode; + break; + } + + } + catch (Exception ex) + { + + } + } #endregion #region 其他函数 @@ -834,7 +868,7 @@ namespace FryPot_DosingSystem.ViewModel try { count = int.Parse(_DishesNum); - if (count > 0 && count <= 8) + if (count >= 0 && count <= 8) { _DishesNum = count.ToString(); } @@ -932,6 +966,37 @@ namespace FryPot_DosingSystem.ViewModel OnPropertyChanged("other"); } } + /// + /// 是否运行 + /// + private IsRun _isRun = IsRun.Stop; + public IsRun isRun + { + get + { + return _isRun; + } + set + { + _isRun = value; + Text = _isRun.ToString(); + OnPropertyChanged("isBool"); + } + } + private string _Text = IsRun.Stop.ToString(); + public string Text + { + get + { + return _Text; + } + set + { + _Text = value; + OnPropertyChanged("Text"); + } + } + /// /// 工作流程 /// diff --git a/SmartClient.sln b/SmartClient.sln index 358a538c..0a5dc7ce 100644 --- a/SmartClient.sln +++ b/SmartClient.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Blend for Visual Studio Version 17 +# Visual Studio Version 17 VisualStudioVersion = 17.0.32002.185 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.DRCoffee", "BPASmartClient.DRCoffee\BPASmartClient.DRCoffee.csproj", "{31E9DC70-5889-4BA5-A5BA-FFDE66AFF314}" @@ -1165,7 +1165,6 @@ Global {E7168B03-68E5-4285-BB95-5660F877577A} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {A49E1C5A-9489-451C-9CE6-CEA586234B84} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {099E047C-F40E-47A3-A5BA-81FC1500D5E8} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625} - {76B6B333-0109-4EE8-A9B2-3E53A7421D92} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}