From 97bcb7a87f77314e6b2b20ef1a1d2e76f3a74a6f Mon Sep 17 00:00:00 2001 From: yahaha Date: Sat, 3 Dec 2022 17:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=82=92=E9=94=85=E8=8F=9C=E5=93=81?= =?UTF-8?q?=E5=BA=93=E6=A3=80=E6=B5=8B=E5=8A=9F=E8=83=BD=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.MorkF/Control_MorkF.cs | 24 +- .../View/MaterialCalibration.xaml | 685 +++++++++++++ .../View/MaterialCalibration.xaml.cs | 28 + .../ViewModel/MaterialCalibrationViewModel.cs | 931 ++++++++++++++++++ BPASmartClient/AssemblyInfo.cs | 4 +- 5 files changed, 1669 insertions(+), 3 deletions(-) create mode 100644 BPASmartClient.MorkF/View/MaterialCalibration.xaml create mode 100644 BPASmartClient.MorkF/View/MaterialCalibration.xaml.cs create mode 100644 BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs index 49ec2bcd..abff1ff1 100644 --- a/BPASmartClient.MorkF/Control_MorkF.cs +++ b/BPASmartClient.MorkF/Control_MorkF.cs @@ -14,6 +14,7 @@ using System.Text; using System.Collections.Concurrent; using System.Windows.Documents; using BPASmartClient.Business; +using Microsoft.CodeAnalysis; namespace BPASmartClient.MorkF { @@ -466,11 +467,32 @@ namespace BPASmartClient.MorkF { if (list_int.Count == 2) { - SetNowPosition(list_int[0], list_int[1]); + SetArmPosition(list_int[0], list_int[1]); } } }), "SetNowPosition"); }), "SetNowPosition"); + ActionManage.GetInstance.Register(new Action((list) => + { + ThreadManage.GetInstance().Start(new Action(() => + { + if (list is List list_object) + { + if (list_object.Count != 3) + { + return; + } + + if (list_object[0] is string No && list_object[1] is int x && list_object[2] is int y) + { + if (SetArmPosition(x, y)) + { + ActionManage.GetInstance.Send("CalibrationCallBack", new List { No });//设定机械臂当前位置 + } + } + } + }), "CalibrationCoordination"); + }), "CalibrationCoordination"); #endregion //ActionManage.GetInstance.Register(PLCInite, "InitCommand"); #region 配料控制 diff --git a/BPASmartClient.MorkF/View/MaterialCalibration.xaml b/BPASmartClient.MorkF/View/MaterialCalibration.xaml new file mode 100644 index 00000000..ce2e698a --- /dev/null +++ b/BPASmartClient.MorkF/View/MaterialCalibration.xaml @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +