diff --git a/BPASmartClient.Business/BPASmartClient.Business.csproj b/BPASmartClient.Business/BPASmartClient.Business.csproj index c64d8727..0d95c75a 100644 --- a/BPASmartClient.Business/BPASmartClient.Business.csproj +++ b/BPASmartClient.Business/BPASmartClient.Business.csproj @@ -8,7 +8,6 @@ - diff --git a/BPASmartClient.Business/InternetInfo.cs b/BPASmartClient.Business/InternetInfo.cs index 8f007d09..09634dfa 100644 --- a/BPASmartClient.Business/InternetInfo.cs +++ b/BPASmartClient.Business/InternetInfo.cs @@ -7,7 +7,7 @@ using System.Configuration; using System.IO; using Microsoft.Extensions.Configuration; using System.Threading; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPA.ApolloClient; using BPA.ApolloClient.Options; diff --git a/BPASmartClient.Business/Plugin/ConfigMgr.cs b/BPASmartClient.Business/Plugin/ConfigMgr.cs index b24aaf91..c19ff67a 100644 --- a/BPASmartClient.Business/Plugin/ConfigMgr.cs +++ b/BPASmartClient.Business/Plugin/ConfigMgr.cs @@ -1,6 +1,6 @@ using BPA.ApolloClient; using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using Microsoft.Extensions.Configuration; diff --git a/BPASmartClient.Business/Plugin/DeviceMgr.cs b/BPASmartClient.Business/Plugin/DeviceMgr.cs index d960924c..d84a8ebf 100644 --- a/BPASmartClient.Business/Plugin/DeviceMgr.cs +++ b/BPASmartClient.Business/Plugin/DeviceMgr.cs @@ -1,7 +1,7 @@ using BPA.Message; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Http; using BPASmartClient.Message; using BPASmartClient.Model; diff --git a/BPASmartClient.Business/Plugin/MQTTMgr.cs b/BPASmartClient.Business/Plugin/MQTTMgr.cs index 1fc625b1..f7c00bcd 100644 --- a/BPASmartClient.Business/Plugin/MQTTMgr.cs +++ b/BPASmartClient.Business/Plugin/MQTTMgr.cs @@ -1,5 +1,5 @@ using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.MQTT; using HBLConsole.Communication; diff --git a/BPASmartClient.Business/Plugin/OrderProxy.cs b/BPASmartClient.Business/Plugin/OrderProxy.cs index 9c436ef9..be39f559 100644 --- a/BPASmartClient.Business/Plugin/OrderProxy.cs +++ b/BPASmartClient.Business/Plugin/OrderProxy.cs @@ -3,8 +3,8 @@ using BPA.Message; using BPA.Message.Enum; using BPA.Models; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Http; using BPASmartClient.Message; using BPASmartClient.Model; @@ -18,7 +18,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.Business { diff --git a/BPASmartClient.Business/Plugin/Plugin.cs b/BPASmartClient.Business/Plugin/Plugin.cs index 4045b95d..418947e1 100644 --- a/BPASmartClient.Business/Plugin/Plugin.cs +++ b/BPASmartClient.Business/Plugin/Plugin.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.Business/Plugin/StatusMgr.cs b/BPASmartClient.Business/Plugin/StatusMgr.cs index d5295377..e2ad2522 100644 --- a/BPASmartClient.Business/Plugin/StatusMgr.cs +++ b/BPASmartClient.Business/Plugin/StatusMgr.cs @@ -1,5 +1,5 @@ using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.Business/TopicDefine.cs b/BPASmartClient.Business/TopicDefine.cs index 38fa60d0..263870a8 100644 --- a/BPASmartClient.Business/TopicDefine.cs +++ b/BPASmartClient.Business/TopicDefine.cs @@ -1,7 +1,7 @@ using BPA.Message; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj index a3987b96..fc288dab 100644 --- a/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj +++ b/BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj @@ -459,10 +459,9 @@ - + - diff --git a/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs b/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs index e504cf29..d6bd905b 100644 --- a/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs +++ b/BPASmartClient.CustomResource/Pages/Model/AlarmHelper.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.ViewModel; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using System; using System.Collections.Concurrent; diff --git a/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs b/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs index b7d1bce3..6befd7fd 100644 --- a/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs +++ b/BPASmartClient.CustomResource/Pages/Model/AlarmTest.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.ViewModel; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using System; using System.Collections.Concurrent; diff --git a/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs b/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs index b240c0c5..62cb05f1 100644 --- a/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs +++ b/BPASmartClient.CustomResource/Pages/Model/MessageNotify.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.CustomResource/Pages/Model/ProductionDataHelper.cs b/BPASmartClient.CustomResource/Pages/Model/ProductionDataHelper.cs index 8d58cc7b..b7e60029 100644 --- a/BPASmartClient.CustomResource/Pages/Model/ProductionDataHelper.cs +++ b/BPASmartClient.CustomResource/Pages/Model/ProductionDataHelper.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using System.Collections.ObjectModel; using System.Windows; using System.IO; -using BPASmartClient.Helper; +using BPA.Helper; namespace BPASmartClient.CustomResource.Pages.Model { diff --git a/BPASmartClient.CustomResource/Pages/Model/ReportHelper.cs b/BPASmartClient.CustomResource/Pages/Model/ReportHelper.cs index 701f2e9c..24e733be 100644 --- a/BPASmartClient.CustomResource/Pages/Model/ReportHelper.cs +++ b/BPASmartClient.CustomResource/Pages/Model/ReportHelper.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Collections.ObjectModel; -using BPASmartClient.Helper; +using BPA.Helper; namespace BPASmartClient.CustomResource.Pages.Model diff --git a/BPASmartClient.CustomResource/Pages/View/AddNewUser.xaml.cs b/BPASmartClient.CustomResource/Pages/View/AddNewUser.xaml.cs index 86ccecec..2f54fa16 100644 --- a/BPASmartClient.CustomResource/Pages/View/AddNewUser.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/AddNewUser.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs index a6cfb8cb..19370ab9 100644 --- a/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/LoginView.xaml.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Diagnostics; diff --git a/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml.cs index 4f172cb3..e7a11ac1 100644 --- a/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/NfcSetView.xaml.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.CustomResource/Pages/View/PasswordChangeView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/PasswordChangeView.xaml.cs index 9e8ca1d0..b9f1a438 100644 --- a/BPASmartClient.CustomResource/Pages/View/PasswordChangeView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/PasswordChangeView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs index 2d8451b3..472b25bb 100644 --- a/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/SubPagLoginView.xaml.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml.cs b/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml.cs index c986e559..820cc790 100644 --- a/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml.cs +++ b/BPASmartClient.CustomResource/Pages/View/UserConfigView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/AddNewUserViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/AddNewUserViewModel.cs index bfa9f346..da67800a 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/AddNewUserViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/AddNewUserViewModel.cs @@ -1,7 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; using BPA.Helper; -using Microsoft.Toolkit.Mvvm.Input; using System; using System.Collections.Generic; using System.Linq; @@ -10,7 +8,7 @@ using System.Threading.Tasks; namespace BPASmartClient.CustomResource.Pages.ViewModel { - public class AddNewUserViewModel:NotifyBase + public class AddNewUserViewModel : NotifyBase { public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } private string _mErrorInfo; @@ -26,9 +24,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public string NewPassword2 { get { return _mNewPassword2; } set { _mNewPassword2 = value; OnPropertyChanged(); } } private string _mNewPassword2; - public RelayCommand ExitCommand { get; set; } + public BPARelayCommand ExitCommand { get; set; } - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } private void Confirm() { @@ -36,9 +34,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel if (NewPassword1 == null) { ErrorInfo = "请输入密码"; return; } if (NewPassword2 != NewPassword1) { ErrorInfo = "两次密码不一致"; return; } var res = Global.userManager.userInfos.FirstOrDefault(p => p.UserName == UserName); - if (res != null) { ErrorInfo = "用户名已存在";return; } + if (res != null) { ErrorInfo = "用户名已存在"; return; } Global.userManager.userInfos.Add(new UserInfo - { + { UserName = UserName, Password = NewPassword1, userTreeViewModels = new List() @@ -49,12 +47,12 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public AddNewUserViewModel() { - ConfirmCommand = new RelayCommand(Confirm); + ConfirmCommand = new BPARelayCommand(Confirm); - ExitCommand = new RelayCommand(() => + ExitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AddNewUserViewCancel"); - + }); } } diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/AlarmViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/AlarmViewModel.cs index 61f1b935..8d2af99e 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/AlarmViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/AlarmViewModel.cs @@ -19,7 +19,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel { public AlarmViewModel() { - ControlCommand = new RelayCommand(() => + ControlCommand = new BPARelayCommand(() => { if (ControlButText == "报警复位") { @@ -41,7 +41,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel }); - SwitchCommand = new RelayCommand(() => + SwitchCommand = new BPARelayCommand(() => { if (ButContent == "历史报警") { @@ -86,9 +86,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel } } - public RelayCommand SwitchCommand { get; set; } + public BPARelayCommand SwitchCommand { get; set; } - public RelayCommand ControlCommand { get; set; } + public BPARelayCommand ControlCommand { get; set; } public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs index c6a728b9..95fa78b3 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/LoginViewModel.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -17,9 +17,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel { Config.GetInstance.Init(); ActionManage.GetInstance.Register(new Action(() => { Login(); }), "EnterLogin", true); - LoginCommand = new RelayCommand(() => { Login(); }); + LoginCommand = new BPARelayCommand(() => { Login(); }); - ExitCommand = new RelayCommand(() => + ExitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ExitAction"); }); @@ -188,9 +188,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel } } - public RelayCommand LoginCommand { get; set; } + public BPARelayCommand LoginCommand { get; set; } - public RelayCommand ExitCommand { get; set; } + public BPARelayCommand ExitCommand { get; set; } diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs index adbd9894..4b6336fe 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/MainViewModel.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Media; using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -20,7 +20,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel { public MainViewModel() { - NavChangedCommand = new RelayCommand(DoNavChanged); + NavChangedCommand = new BPARelayCommand(DoNavChanged); BPASmartClient.Message. MessageLog.GetInstance.InfoNotify = new Action((o) => { Application.Current?.Dispatcher?.Invoke(() => @@ -173,7 +173,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel /// 开机自启 /// public bool AutoStart { get { return SystemHelper.GetInstance.IsAutoStart(); } set { SystemHelper.GetInstance.AutoStart(value); OnPropertyChanged(); } } - public RelayCommand NavChangedCommand { get; set; } + public BPARelayCommand NavChangedCommand { get; set; } public FrameworkElement MainContent { get { return _mMainContent; } set { _mMainContent = value; OnPropertyChanged(); } } private FrameworkElement _mMainContent; diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/NfcSetViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/NfcSetViewModel.cs index 4d92cf7a..fde837e7 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/NfcSetViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/NfcSetViewModel.cs @@ -10,7 +10,7 @@ using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.Nfc; using System.Threading; -using BPASmartClient.Helper; +using BPA.Helper; namespace BPASmartClient.CustomResource.Pages.ViewModel { @@ -25,7 +25,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel if (item != "管理员") permissions.Add(new PermissionSelect() { PermissionName = item }); }); - UserAddCommand = new RelayCommand(() => + UserAddCommand = new BPARelayCommand(() => { if (permissions?.FirstOrDefault(p => p.PermissionSelected == true) == null) { @@ -85,7 +85,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel } }); - UserCancelCommand = new RelayCommand(() => + UserCancelCommand = new BPARelayCommand(() => { if (CardNum != null && CardNum != string.Empty) { @@ -151,13 +151,13 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public string CheckPassword { get { return _checkPassword; } set { _checkPassword = value; OnPropertyChanged(); } } private string _checkPassword = "888888"; - public RelayCommand SavePermission { get; set; } + public BPARelayCommand SavePermission { get; set; } - public RelayCommand DeletePermission { get; set; } + public BPARelayCommand DeletePermission { get; set; } - public RelayCommand UserAddCommand { get; set; } + public BPARelayCommand UserAddCommand { get; set; } - public RelayCommand UserCancelCommand { get; set; } + public BPARelayCommand UserCancelCommand { get; set; } } diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/PasswordChangeViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/PasswordChangeViewModel.cs index 6393f306..4d231c80 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/PasswordChangeViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/PasswordChangeViewModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -40,7 +40,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public PasswordChangeViewModel( ) { - LoginCommand = new RelayCommand(() => + LoginCommand = new BPARelayCommand(() => { if (Global.changeUserInfo == null) CheckPassword(Global.userInfo); else { CheckPassword(Global.changeUserInfo); } @@ -48,16 +48,16 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel }); - ExitCommand = new RelayCommand(() => + ExitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PasswordChangeViewCancel"); Global.changeUserInfo = null; }); } - public RelayCommand LoginCommand { get; set; } + public BPARelayCommand LoginCommand { get; set; } - public RelayCommand ExitCommand { get; set; } + public BPARelayCommand ExitCommand { get; set; } diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/RecipeCompleteViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/RecipeCompleteViewModel.cs index c1e10eed..7f4ac8e8 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/RecipeCompleteViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/RecipeCompleteViewModel.cs @@ -8,7 +8,7 @@ using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; using BPASmartClient.CustomResource.Pages.Model; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; namespace BPASmartClient.CustomResource.Pages.ViewModel { @@ -17,7 +17,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public RecipeCompleteViewModel() { Sqlite.GetInstance.Save(); - SwitchCommand = new RelayCommand(() => + SwitchCommand = new BPARelayCommand(() => { if (ButContent == "历史日志") { @@ -41,7 +41,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel }); - ControlCommand = new RelayCommand(() => + ControlCommand = new BPARelayCommand(() => { if (ControlButText == "报警复位") return; @@ -79,9 +79,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel } } - public RelayCommand SwitchCommand { get; set; } + public BPARelayCommand SwitchCommand { get; set; } - public RelayCommand ControlCommand { get; set; } + public BPARelayCommand ControlCommand { get; set; } public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } private Visibility _mCurrentDataVis = Visibility.Visible; diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/ReportViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/ReportViewModel.cs index c768d2a6..7664c7b5 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/ReportViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/ReportViewModel.cs @@ -17,7 +17,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel ReportHelper reportHelper = new ReportHelper(); public ReportViewModel() { - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { for (int i = 0; i < 30; i++) { @@ -34,12 +34,12 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel //ReportData = reportHelper.Reports; }); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { reportHelper.Save($"aa.pry"); }); - ReadCommand = new RelayCommand(() => + ReadCommand = new BPARelayCommand(() => { ReportData.Clear(); var res = reportHelper.GetData($"{AppDomain.CurrentDomain.BaseDirectory}AccessFile\\ProductionData\\aa.pry"); @@ -56,8 +56,8 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public ObservableCollection ReportData { get; set; } = new ObservableCollection(); - public RelayCommand AddCommand { get; set; } - public RelayCommand SaveCommand { get; set; } - public RelayCommand ReadCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } + public BPARelayCommand ReadCommand { get; set; } } } diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/RunLogViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/RunLogViewModel.cs index 78e73db4..83c07336 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/RunLogViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/RunLogViewModel.cs @@ -8,7 +8,7 @@ using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; using BPASmartClient.CustomResource.Pages.Model; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using System.Diagnostics; namespace BPASmartClient.CustomResource.Pages.ViewModel @@ -18,7 +18,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public RunLogViewModel() { Sqlite.GetInstance.Save(); - SwitchCommand = new RelayCommand(() => + SwitchCommand = new BPARelayCommand(() => { if (ButContent == "历史日志") { @@ -42,7 +42,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel }); - ControlCommand = new RelayCommand(() => + ControlCommand = new BPARelayCommand(() => { if (ControlButText == "报警复位") return; @@ -88,9 +88,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel } } - public RelayCommand SwitchCommand { get; set; } + public BPARelayCommand SwitchCommand { get; set; } - public RelayCommand ControlCommand { get; set; } + public BPARelayCommand ControlCommand { get; set; } public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } private Visibility _mCurrentDataVis = Visibility.Visible; diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/UserConfigViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/UserConfigViewModel.cs index 5c399bd9..3fa25b92 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/UserConfigViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/UserConfigViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.Pages.View; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -63,27 +63,27 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public Visibility VisibilityDevice { get { return _visibilityDevice; } set { _visibilityDevice = value; OnPropertyChanged(); } } private Visibility _visibilityDevice = Visibility.Collapsed; - public RelayCommand AddUserPageCommand { get; set; } + public BPARelayCommand AddUserPageCommand { get; set; } - public RelayCommand DeleteUserPageCommand { get; set; } + public BPARelayCommand DeleteUserPageCommand { get; set; } - public RelayCommand DeleteAllCommand { get; set; } + public BPARelayCommand DeleteAllCommand { get; set; } - public RelayCommand AddAllCommand { get; set; } + public BPARelayCommand AddAllCommand { get; set; } - public RelayCommand ChangeMaterailPageCommand { get; set; } + public BPARelayCommand ChangeMaterailPageCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } - public RelayCommand CancelCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } - public RelayCommand AddLoaclMaterialCommand { get; set; } + public BPARelayCommand AddLoaclMaterialCommand { get; set; } - public RelayCommand DeleteLoaclMaterialCommand { get; set; } + public BPARelayCommand DeleteLoaclMaterialCommand { get; set; } - public RelayCommand AddDeviceMaterialCommand { get; set; } + public BPARelayCommand AddDeviceMaterialCommand { get; set; } - public RelayCommand DeleteDeviceMaterialCommand { get; set; } + public BPARelayCommand DeleteDeviceMaterialCommand { get; set; } private void AddUserPage(object o) @@ -228,19 +228,19 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public UserConfigViewModel() { - AddUserPageCommand = new RelayCommand(AddUserPage); + AddUserPageCommand = new BPARelayCommand(AddUserPage); - DeleteUserPageCommand = new RelayCommand(DeleteUserPage); + DeleteUserPageCommand = new BPARelayCommand(DeleteUserPage); - DeleteAllCommand = new RelayCommand(DeleteAll); + DeleteAllCommand = new BPARelayCommand(DeleteAll); - AddAllCommand = new RelayCommand(AddAll); + AddAllCommand = new BPARelayCommand(AddAll); - ChangeMaterailPageCommand = new RelayCommand(ChangeMaterailPage); + ChangeMaterailPageCommand = new BPARelayCommand(ChangeMaterailPage); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { var res = Global.userManager.userInfos.FirstOrDefault(p => p.UserName == Global.changeUserInfo.UserName && p.Password == Global.changeUserInfo.Password); if(res != null) @@ -257,19 +257,19 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel ActionManage.GetInstance.Send("UserConfigViewConfirm"); }); - CancelCommand = new RelayCommand(() => + CancelCommand = new BPARelayCommand(() => { Global.changeUserInfo = null; ActionManage.GetInstance.Send("UserConfigViewCancel"); }); - AddLoaclMaterialCommand = new RelayCommand(AddLoaclMaterial); + AddLoaclMaterialCommand = new BPARelayCommand(AddLoaclMaterial); - DeleteLoaclMaterialCommand = new RelayCommand(DeleteLoaclMaterial); + DeleteLoaclMaterialCommand = new BPARelayCommand(DeleteLoaclMaterial); - AddDeviceMaterialCommand = new RelayCommand(AddDeviceMaterial); + AddDeviceMaterialCommand = new BPARelayCommand(AddDeviceMaterial); - DeleteDeviceMaterialCommand = new RelayCommand(DeleteDeviceMaterial); + DeleteDeviceMaterialCommand = new BPARelayCommand(DeleteDeviceMaterial); foreach (var item in MenuManage.GetInstance.menuModels) diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/UserLogViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/UserLogViewModel.cs index 3ac61b6d..aafd7b72 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/UserLogViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/UserLogViewModel.cs @@ -8,7 +8,7 @@ using System.Collections.ObjectModel; using BPASmartClient.CustomResource.Pages.Model; using System.Windows; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.Helper; +using BPA.Helper; namespace BPASmartClient.CustomResource.Pages.ViewModel { @@ -18,7 +18,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel { Sqlite.GetInstance.Save(); UserLogs = MessageNotify.GetInstance.userLogs; - SwitchCommand = new RelayCommand(() => + SwitchCommand = new BPARelayCommand(() => { if (ButContent == "历史日志") { @@ -42,7 +42,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel }); - ControlCommand = new RelayCommand(() => + ControlCommand = new BPARelayCommand(() => { if (ControlButText == "报警复位") return; if (ControlButText == "开始查询") @@ -81,9 +81,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel } } - public RelayCommand SwitchCommand { get; set; } + public BPARelayCommand SwitchCommand { get; set; } - public RelayCommand ControlCommand { get; set; } + public BPARelayCommand ControlCommand { get; set; } public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } private Visibility _mCurrentDataVis = Visibility.Visible; diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/UserManageViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/UserManageViewModel.cs index 034bf1a7..943f03a6 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/UserManageViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/UserManageViewModel.cs @@ -23,19 +23,19 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel //public List Authorities { get; set; } = new List() { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }; public List Authorities { get; set; } = new List(); - public RelayCommand SaveCommand { get; set; } - public RelayCommand DeleteCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } + public BPARelayCommand DeleteCommand { get; set; } - public RelayCommand AddUserInfoCommand { get; set; } + public BPARelayCommand AddUserInfoCommand { get; set; } - public RelayCommand SaveDataCommand { get; set; } + public BPARelayCommand SaveDataCommand { get; set; } public UserManageViewModel() { var userManager = JsonConvert.DeserializeObject(File.ReadAllText("up.hbl").AESDecrypt()); usersInfo = userManager.userInfos; AddAuthorities(); - SaveCommand = new RelayCommand((str) => + SaveCommand = new BPARelayCommand((str) => { if (str != string.Empty && str != null) { @@ -62,7 +62,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel MessageBox.Show("保存失败,用户名为空或输入后未回车确认", "提示", MessageBoxButton.OK, MessageBoxImage.Warning); } }); - DeleteCommand = new RelayCommand((str) => + DeleteCommand = new BPARelayCommand((str) => { if (str != string.Empty && str != null) { @@ -89,13 +89,13 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel }); - AddUserInfoCommand = new RelayCommand( ()=> + AddUserInfoCommand = new BPARelayCommand( ()=> { usersInfo.Add(new UserInfo() { Id=IdProcess()}); }); - SaveDataCommand = new RelayCommand(() => + SaveDataCommand = new BPARelayCommand(() => { Global.userManager.userInfos = usersInfo; File.WriteAllText("up.hbl", JsonConvert.SerializeObject(Global.userManager).AESEncrypt()); diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/UserManagerViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/UserManagerViewModel.cs index 8582c0d7..4aa0fc3c 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/UserManagerViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/UserManagerViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.Pages.View; -using Microsoft.Toolkit.Mvvm.Input; +using BPA.Helper; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -15,20 +15,20 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel /// /// datagrid绑定 /// - public ObservableCollection userManager { get; set; } = Global.userManager.userInfos; - + public ObservableCollection userManager { get; set; } = Global.userManager.userInfos; - public RelayCommand ChangePasswardCommand { get; set; } - public RelayCommand AddNewUserCommand { get; set; } + public BPARelayCommand ChangePasswardCommand { get; set; } - public RelayCommand DeleteUserCommand { get; set; } + public BPARelayCommand AddNewUserCommand { get; set; } - public RelayCommand EditUserConfigCommand { get; set; } + public BPARelayCommand DeleteUserCommand { get; set; } + + public BPARelayCommand EditUserConfigCommand { get; set; } private void ChangePassward(object o) { - if (o != null && o is UserInfo infos) + if (o != null && o is UserInfo infos) { Global.changeUserInfo = infos; PasswordChangeView passwordChangeView = new PasswordChangeView(); @@ -55,22 +55,22 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel UserConfigView userConfigView = new UserConfigView(); userConfigView.ShowDialog(); } - + } public UserManagerViewModel() { - ChangePasswardCommand = new RelayCommand(ChangePassward); + ChangePasswardCommand = new BPARelayCommand(ChangePassward); - AddNewUserCommand = new RelayCommand(() => + AddNewUserCommand = new BPARelayCommand(() => { AddNewUser addNewUser = new AddNewUser(); addNewUser.ShowDialog(); }); - DeleteUserCommand = new RelayCommand(DeleteUser); + DeleteUserCommand = new BPARelayCommand(DeleteUser); - EditUserConfigCommand = new RelayCommand(EditUserConfig); + EditUserConfigCommand = new BPARelayCommand(EditUserConfig); } } diff --git a/BPASmartClient.CustomResource/Pages/ViewModel/VariableViewModel.cs b/BPASmartClient.CustomResource/Pages/ViewModel/VariableViewModel.cs index 06b58334..c894ff0f 100644 --- a/BPASmartClient.CustomResource/Pages/ViewModel/VariableViewModel.cs +++ b/BPASmartClient.CustomResource/Pages/ViewModel/VariableViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -25,7 +25,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel public ObservableCollection FryFiveVariables { get; set; } = new ObservableCollection(); public List DeviceName { get; set; } = new List { "滚筒输送线", "炒锅1", "炒锅2", "炒锅3", "炒锅4", "炒锅5" }; - public RelayCommand SaveDataCommand { get; set; } + public BPARelayCommand SaveDataCommand { get; set; } public VariableViewModel() { @@ -48,7 +48,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel } - SaveDataCommand = new RelayCommand(() => + SaveDataCommand = new BPARelayCommand(() => { Json.Data.VariablesInfo["滚筒输送线"] = Variables; Json.Data.VariablesInfo["炒锅1"] = FryOneVariables; diff --git a/BPASmartClient.DRCoffee/CoffeeMachine.cs b/BPASmartClient.DRCoffee/CoffeeMachine.cs index 2bd9da96..b02ae71f 100644 --- a/BPASmartClient.DRCoffee/CoffeeMachine.cs +++ b/BPASmartClient.DRCoffee/CoffeeMachine.cs @@ -1,6 +1,6 @@ using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPASmartClient.Model.咖啡机.Enum; @@ -9,7 +9,7 @@ using BPASmartClient.SerialPort; using System; using System.Collections.Generic; using System.Threading; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.DRCoffee { diff --git a/BPASmartClient.DRCoffee/CommandHandler.cs b/BPASmartClient.DRCoffee/CommandHandler.cs index 7e05e827..d10f64ae 100644 --- a/BPASmartClient.DRCoffee/CommandHandler.cs +++ b/BPASmartClient.DRCoffee/CommandHandler.cs @@ -1,5 +1,5 @@  -using BPASmartClient.EventBus; + using BPASmartClient.Model; using BPASmartClient.Model.咖啡机.Enum; using BPASmartClient.SerialPort; @@ -9,7 +9,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.DRCoffee { diff --git a/BPASmartClient.DRCoffee/MorkCStatus.cs b/BPASmartClient.DRCoffee/MorkCStatus.cs index 3c4555d8..23ba362a 100644 --- a/BPASmartClient.DRCoffee/MorkCStatus.cs +++ b/BPASmartClient.DRCoffee/MorkCStatus.cs @@ -1,6 +1,6 @@ using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Model; using System; using System.Collections.Generic; diff --git a/BPASmartClient.Device/AlarmHelper.cs b/BPASmartClient.Device/AlarmHelper.cs index dcdfb10d..03b382b5 100644 --- a/BPASmartClient.Device/AlarmHelper.cs +++ b/BPASmartClient.Device/AlarmHelper.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using System; diff --git a/BPASmartClient.DosingSystemSingle/Model/ViewModelBase.cs b/BPASmartClient.DosingSystemSingle/Model/ViewModelBase.cs index 797a183a..e93d4861 100644 --- a/BPASmartClient.DosingSystemSingle/Model/ViewModelBase.cs +++ b/BPASmartClient.DosingSystemSingle/Model/ViewModelBase.cs @@ -12,11 +12,11 @@ namespace BPASmartClient.DosingSystemSingle public class ViewModelBase : NotifyBase { public int Index { get; set; } = -1; - public BPARelayCommand AddCommand { get; set; }//添加 - public BPARelayCommand CancelCommand { get; set; }//取消 - public BPARelayCommand SaveCommand { get; set; }//保存 - public BPARelayCommand RemoveCommand { get; set; }//移除 - public BPARelayCommand DetailsCommand { get; set; }//编辑 + public BPABPARelayCommand AddCommand { get; set; }//添加 + public BPABPARelayCommand CancelCommand { get; set; }//取消 + public BPABPARelayCommand SaveCommand { get; set; }//保存 + public BPABPARelayCommand RemoveCommand { get; set; }//移除 + public BPABPARelayCommand DetailsCommand { get; set; }//编辑 /// /// 错误信息 diff --git a/BPASmartClient.DosingSystemSingle/View/NewMaterialView.xaml.cs b/BPASmartClient.DosingSystemSingle/View/NewMaterialView.xaml.cs index c8cf6e26..edc2db68 100644 --- a/BPASmartClient.DosingSystemSingle/View/NewMaterialView.xaml.cs +++ b/BPASmartClient.DosingSystemSingle/View/NewMaterialView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/ChangeDeviceNameViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/ChangeDeviceNameViewModel.cs index 9f615e03..dd56510d 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/ChangeDeviceNameViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/ChangeDeviceNameViewModel.cs @@ -17,8 +17,8 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel if (o != null && o is string str) IpAddress = str; }), "ChangeDeviceNameViewOpen"); - CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); - AddCommand = new BPARelayCommand(() => + CancelCommand = new BPABPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); + AddCommand = new BPABPARelayCommand(() => { if (string.IsNullOrEmpty(DeviceName)) { diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/CommparSetViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/CommparSetViewModel.cs index 4a7a55d1..6360eab2 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/CommparSetViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/CommparSetViewModel.cs @@ -14,7 +14,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel { public CommparSetViewModel() { - SaveCommand = new BPARelayCommand(() => + SaveCommand = new BPABPARelayCommand(() => { if (!string.IsNullOrEmpty(CommBaseParModel.NetworkSegAddress)) { @@ -38,7 +38,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel public BasePar CommBaseParModel { get { return Json.Data.BaseParModel; } set { Json.Data.BaseParModel = value; OnPropertyChanged(); } } //private BasePar _mCommBaseParModel; - public BPARelayCommand SaveCommand { get; set; } + public BPABPARelayCommand SaveCommand { get; set; } } } diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/DeviceListViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/DeviceListViewModel.cs index 56027426..b30a4e3a 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/DeviceListViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/DeviceListViewModel.cs @@ -16,7 +16,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel { public DeviceListViewModel() { - DetailsCommand = new BPARelayCommand((o) => + DetailsCommand = new BPABPARelayCommand((o) => { if (o != null && o is string str) { @@ -28,7 +28,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel devices = DeviceInquire.GetInstance.devices; } - //public BPARelayCommand ChangeNameCommand { get; set; } + //public BPABPARelayCommand ChangeNameCommand { get; set; } //public static ObservableCollection devices { get; set; } = new ObservableCollection(); public ObservableCollection devices { get; set; } diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/DeviceMaterialParViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/DeviceMaterialParViewModel.cs index 5837d6ff..89889f0b 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/DeviceMaterialParViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/DeviceMaterialParViewModel.cs @@ -16,15 +16,15 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel public DeviceMaterialParViewModel() { deviceParModels = Json.Data.deviceParModels; - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); if (res != null) deviceParModels.Remove(res); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); }); - AddCommand = new BPARelayCommand(() => { deviceParModels.Add(new DeviceParModel()); }); - SaveCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { deviceParModels.Add(new DeviceParModel()); }); + SaveCommand = new BPABPARelayCommand(() => { if (deviceParModels == null || deviceParModels.Count <= 0) { @@ -57,10 +57,10 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel public ObservableCollection deviceParModels { get; set; } - //public BPARelayCommand RemoveCommand { get; set; } + //public BPABPARelayCommand RemoveCommand { get; set; } - //public BPARelayCommand AddCommand { get; set; } - //public BPARelayCommand SaveCommand { get; set; } + //public BPABPARelayCommand AddCommand { get; set; } + //public BPABPARelayCommand SaveCommand { get; set; } } } diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs index 1d01dfd5..137a558c 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/HardwareStatusViewModel.cs @@ -23,7 +23,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel // ConveyerBeltModels.Add(new ConveyerBeltModel() { Name = $"输送带{i}", Num = i++ }); //} - //ConveyerBeltControlCommand = new BPARelayCommand(o => + //ConveyerBeltControlCommand = new BPABPARelayCommand(o => //{ // if (o != null && o is int tempCount) // { @@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel Thread.Sleep(100); }), "输送带料仓状态监控"); - RecipeControlCommand = new BPARelayCommand((o) => + RecipeControlCommand = new BPABPARelayCommand((o) => { if (o != null && o is DeviceCurrentStatus currentStatus) { @@ -109,9 +109,9 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel public ObservableCollection ConveyerBeltModels { get; set; } = new ObservableCollection(); - public BPARelayCommand ConveyerBeltControlCommand { get; set; } + public BPABPARelayCommand ConveyerBeltControlCommand { get; set; } - public BPARelayCommand RecipeControlCommand { get; set; } + public BPABPARelayCommand RecipeControlCommand { get; set; } /// /// 输送带状态 diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs index c0a5ebb1..29144113 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/ManualControlViewModel.cs @@ -51,7 +51,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel OtherHandCylinders.Add(new CylinderModel() { Name = "上桶工位气缸" }); OtherHandCylinders.Add(new CylinderModel() { Name = "下桶工位气缸" }); - Open = new BPARelayCommand((o) => + Open = new BPABPARelayCommand((o) => { if (o != null) { @@ -76,7 +76,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel }); - Close = new BPARelayCommand((o) => + Close = new BPABPARelayCommand((o) => { if (o != null) { @@ -100,13 +100,13 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel } }); - SystemStart = new BPARelayCommand(() => + SystemStart = new BPABPARelayCommand(() => { SiemensDevice.GetInstance.MySiemens.Write("M10.0", SystemControlText == "停止" ? false : true); /*var res = SiemensDevice.GetInstance.MySiemens.Read("M10.0"); SystemControlText = res ? "停止" : "启动";*/ }); - ModelSwitch = new BPARelayCommand(() => + ModelSwitch = new BPABPARelayCommand(() => { SiemensDevice.GetInstance.MySiemens.Write("M10.1", ModelSwitchText == "手动" ? true : false); /*var res = SiemensDevice.GetInstance.MySiemens.Read("M10.1"); @@ -166,12 +166,12 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel /// public ObservableCollection OtherHandCylinders { get; set; } = new ObservableCollection(); - public BPARelayCommand Open { get; set; } + public BPABPARelayCommand Open { get; set; } - public BPARelayCommand Close { get; set; } + public BPABPARelayCommand Close { get; set; } - public BPARelayCommand SystemStart { get; set; } - public BPARelayCommand ModelSwitch { get; set; } + public BPABPARelayCommand SystemStart { get; set; } + public BPABPARelayCommand ModelSwitch { get; set; } public string SystemControlText { get { return _mSystemControlText; } set { _mSystemControlText = value; OnPropertyChanged(); } } diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/NewMaterialViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/NewMaterialViewModel.cs index 9e885a16..999efd8d 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/NewMaterialViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/NewMaterialViewModel.cs @@ -22,9 +22,9 @@ public class NewMaterialViewModel : ViewModelBase //public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } //private string _mErrorInfo; - //public BPARelayCommand RemoveCommand { get; set; } + //public BPABPARelayCommand RemoveCommand { get; set; } - //public BPARelayCommand SaveCommand { get; set; } + //public BPABPARelayCommand SaveCommand { get; set; } @@ -42,9 +42,9 @@ public class NewMaterialViewModel : ViewModelBase public NewMaterialViewModel() { - RemoveCommand = new BPARelayCommand(Remove); + RemoveCommand = new BPABPARelayCommand(Remove); - SaveCommand = new BPARelayCommand(() => + SaveCommand = new BPABPARelayCommand(() => { if (MaterialName == String.Empty) { ErrorInfo = "原料名称不能为空"; return; } if (Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == MaterialName) != null) { ErrorInfo = "设备中已存在该原料名称"; return; } diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/NewOutletViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/NewOutletViewModel.cs index 8f888131..b45c974b 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/NewOutletViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/NewOutletViewModel.cs @@ -29,9 +29,9 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel Index = Array.FindIndex(Json.Data.OutletInfoModels.ToArray(), p => p.OutletName == tempOutletInfo.OutletName); } }), "OpenNewOutlet", true); - AddCommand = new BPARelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); - CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); - SaveCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); + CancelCommand = new BPABPARelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); + SaveCommand = new BPABPARelayCommand(() => { ObservableCollection SileNames = new ObservableCollection(); SiloInfos.ToList()?.ForEach(item => { SileNames.Add(item.RawMaterialName); }); @@ -82,7 +82,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel } ActionManage.GetInstance.Send("NewOutletViewClose"); }); - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/NewRecipeViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/NewRecipeViewModel.cs index a0b6503d..33054929 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/NewRecipeViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/NewRecipeViewModel.cs @@ -41,7 +41,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel } }), "Details", true); - AddCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { if (RawMaterials.Count >= DeviceInquire.GetInstance.devices.Count) { @@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel else goto p; }); - RemoveCommand = new BPARelayCommand((obj) => + RemoveCommand = new BPABPARelayCommand((obj) => { if (obj is string rm) { @@ -71,7 +71,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel } }); - SaveCommand = new BPARelayCommand(() => + SaveCommand = new BPABPARelayCommand(() => { if (string.IsNullOrEmpty(RecipeName)) { MessageNotify.GetInstance.ShowDialog("请输入配方名称!", DialogType.Warning); ErrorInfo = "请输入配方名称"; return; } var tempRes = RawMaterials.GroupBy(p => p.RawMaterialName); @@ -196,11 +196,11 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel //public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } //private string _mErrorInfo; - //public BPARelayCommand AddCommand { get; set; } + //public BPABPARelayCommand AddCommand { get; set; } - //public BPARelayCommand RemoveCommand { get; set; } + //public BPABPARelayCommand RemoveCommand { get; set; } - //public BPARelayCommand SaveCommand { get; set; } + //public BPABPARelayCommand SaveCommand { get; set; } public ObservableCollection RawMaterials { get; set; } = new ObservableCollection(); diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/OutletManagementViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/OutletManagementViewModel.cs index f46b8598..94620375 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/OutletManagementViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/OutletManagementViewModel.cs @@ -14,14 +14,14 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel { public OutletManagementViewModel() { - AddCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { NewOutletView newOutletView = new NewOutletView(); newOutletView.ShowDialog(); }); - SaveCommand = new BPARelayCommand(() => { Json.Save(); }); + SaveCommand = new BPABPARelayCommand(() => { Json.Save(); }); OutletInfoModels = Json.Data.OutletInfoModels; - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -34,7 +34,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel } }); - DetailsCommand = new BPARelayCommand((o) => + DetailsCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs index 6d0b2869..e5b43f13 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/RecipeControlViewModel.cs @@ -26,9 +26,9 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel static ObservableCollection RawMaterialReset = new ObservableCollection(); public RecipeControlViewModel() { - StartCommand = new BPARelayCommand(RecipeIssued); - ChangeRecipeStateCommand = new BPARelayCommand(ChangeRecipeState); - CancelRecipeCommand = new BPARelayCommand(CancelRecipe); + StartCommand = new BPABPARelayCommand(RecipeIssued); + ChangeRecipeStateCommand = new BPABPARelayCommand(ChangeRecipeState); + CancelRecipeCommand = new BPABPARelayCommand(CancelRecipe); RecipeRun(); RecipeStatusInquire(); } @@ -247,11 +247,11 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel }), "RecipeControlViewModelStatusInquire"); } - public BPARelayCommand StartCommand { get; set; } + public BPABPARelayCommand StartCommand { get; set; } - public BPARelayCommand ChangeRecipeStateCommand { get; set; } + public BPABPARelayCommand ChangeRecipeStateCommand { get; set; } - public BPARelayCommand CancelRecipeCommand { get; set; } + public BPABPARelayCommand CancelRecipeCommand { get; set; } public static ObservableCollection Recipes { get; set; } = Json.Data.Recipes; diff --git a/BPASmartClient.DosingSystemSingle/ViewModel/RecipeSettingsViewModel.cs b/BPASmartClient.DosingSystemSingle/ViewModel/RecipeSettingsViewModel.cs index 1c6d7519..a8e5b66d 100644 --- a/BPASmartClient.DosingSystemSingle/ViewModel/RecipeSettingsViewModel.cs +++ b/BPASmartClient.DosingSystemSingle/ViewModel/RecipeSettingsViewModel.cs @@ -26,24 +26,24 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel { Recipes = Json.Data.Recipes; - NewMaterital = new BPARelayCommand(() => + NewMaterital = new BPABPARelayCommand(() => { NewMaterialView newMateritalView = new NewMaterialView(); newMateritalView.ShowDialog(); }); - NewRecipe = new BPARelayCommand(() => + NewRecipe = new BPABPARelayCommand(() => { NewRecipeView nrv = new NewRecipeView(); nrv.ShowDialog(); MessageNotify.GetInstance.ShowUserLog("新建配方"); }); - SaveRecipe = new BPARelayCommand(() => + SaveRecipe = new BPABPARelayCommand(() => { Json.Save(); MessageNotify.GetInstance.ShowUserLog("保存配方"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); }); - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -65,7 +65,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel } }); - DetailsCommand = new BPARelayCommand((o) => + DetailsCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -82,17 +82,17 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel } - public BPARelayCommand NewMaterital { get; set; } + public BPABPARelayCommand NewMaterital { get; set; } - public BPARelayCommand NewRecipe { get; set; } + public BPABPARelayCommand NewRecipe { get; set; } - public BPARelayCommand SaveRecipe { get; set; } + public BPABPARelayCommand SaveRecipe { get; set; } - public BPARelayCommand EditCommand { get; set; } + public BPABPARelayCommand EditCommand { get; set; } - public BPARelayCommand DetailsCommand { get; set; } + public BPABPARelayCommand DetailsCommand { get; set; } - public BPARelayCommand RemoveCommand { get; set; } + public BPABPARelayCommand RemoveCommand { get; set; } public ObservableCollection Recipes { get; set; } } diff --git a/BPASmartClient.FoodStationTest/App.xaml.cs b/BPASmartClient.FoodStationTest/App.xaml.cs index 082df6f2..9b8926f4 100644 --- a/BPASmartClient.FoodStationTest/App.xaml.cs +++ b/BPASmartClient.FoodStationTest/App.xaml.cs @@ -2,7 +2,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.Pages.View; using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.ObjectModel; using System.Threading; diff --git a/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs index 87e27e55..5de76862 100644 --- a/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs +++ b/BPASmartClient.FoodStationTest/Model/HK_PLC/HKDeviceStatus.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.ObjectModel; using System.Threading; diff --git a/BPASmartClient.FoodStationTest/Model/ProcessControl.cs b/BPASmartClient.FoodStationTest/Model/ProcessControl.cs index c408a214..947b0f93 100644 --- a/BPASmartClient.FoodStationTest/Model/ProcessControl.cs +++ b/BPASmartClient.FoodStationTest/Model/ProcessControl.cs @@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.FoodStationTest.Model.GVL; using BPASmartClient.FoodStationTest.Model.HK_PLC; using BPASmartClient.FoodStationTest.Model.RawMaterial; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs b/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs index e424e9b2..164a987e 100644 --- a/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs +++ b/BPASmartClient.FoodStationTest/Model/RawMaterial/DeviceInquire.cs @@ -1,7 +1,7 @@ using BPA.Communication; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.FoodStationTest.ViewModel; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using System; using System.Collections.Concurrent; diff --git a/BPASmartClient.FoodStationTest/View/ChangeDeviceNameView.xaml.cs b/BPASmartClient.FoodStationTest/View/ChangeDeviceNameView.xaml.cs index 8552e6d9..f6fa4402 100644 --- a/BPASmartClient.FoodStationTest/View/ChangeDeviceNameView.xaml.cs +++ b/BPASmartClient.FoodStationTest/View/ChangeDeviceNameView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Windows; using System.Windows.Input; diff --git a/BPASmartClient.FoodStationTest/View/NewLocalRecipeView.xaml.cs b/BPASmartClient.FoodStationTest/View/NewLocalRecipeView.xaml.cs index 781093ba..30c2808d 100644 --- a/BPASmartClient.FoodStationTest/View/NewLocalRecipeView.xaml.cs +++ b/BPASmartClient.FoodStationTest/View/NewLocalRecipeView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Windows; using System.Windows.Input; diff --git a/BPASmartClient.FoodStationTest/View/NewRecipeView.xaml.cs b/BPASmartClient.FoodStationTest/View/NewRecipeView.xaml.cs index 59e7af2e..71a2ef9f 100644 --- a/BPASmartClient.FoodStationTest/View/NewRecipeView.xaml.cs +++ b/BPASmartClient.FoodStationTest/View/NewRecipeView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Windows; using System.Windows.Input; diff --git a/BPASmartClient.FoodStationTest/View/RecipeInfosView.xaml.cs b/BPASmartClient.FoodStationTest/View/RecipeInfosView.xaml.cs index f6f50fcc..8842052d 100644 --- a/BPASmartClient.FoodStationTest/View/RecipeInfosView.xaml.cs +++ b/BPASmartClient.FoodStationTest/View/RecipeInfosView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Windows; using System.Windows.Input; diff --git a/BPASmartClient.FoodStationTest/View/SelectRecipesView.xaml.cs b/BPASmartClient.FoodStationTest/View/SelectRecipesView.xaml.cs index cf6b0b68..cb3af207 100644 --- a/BPASmartClient.FoodStationTest/View/SelectRecipesView.xaml.cs +++ b/BPASmartClient.FoodStationTest/View/SelectRecipesView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Windows; using System.Windows.Input; diff --git a/BPASmartClient.FoodStationTest/ViewModel/BomOfMaterialViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/BomOfMaterialViewModel.cs index 61e50ad0..0ef1aa6a 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/BomOfMaterialViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/BomOfMaterialViewModel.cs @@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.Model.Bom; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; @@ -16,14 +16,14 @@ namespace BPASmartClient.FoodStationTest.ViewModel public BomOfMaterialViewModel() { RawMaterialInfo = Json.Data.BomMaterial; - AddMaterial = new RelayCommand(() => + AddMaterial = new BPARelayCommand(() => { RawMaterialInfo.Add(new BomMaterial() { Count = Json.Data.BomMaterial.Count + 1, }); }); - SaveMaterials = new RelayCommand(() => + SaveMaterials = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认是否保存!") == true) { @@ -32,7 +32,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); } }); - GetBomMaterialData = new RelayCommand(() => + GetBomMaterialData = new BPARelayCommand(() => { Json.Data.BomMaterial.Clear(); ProcessControl.GetInstance.RawMaterialNameWithCode();//原料的名称和编码对应 :西门子mes定义的物料编码 @@ -42,7 +42,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); }); - DeleteAllMaterial = new RelayCommand(() => + DeleteAllMaterial = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认是否删除所有原料数据!") == true) { @@ -50,7 +50,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel MessageNotify.GetInstance.ShowUserLog($"西门子物料清单删除完成"); } }); - RemoveCommand = new RelayCommand((Count) => + RemoveCommand = new BPARelayCommand((Count) => { if (Count is int cnt) { @@ -67,11 +67,11 @@ namespace BPASmartClient.FoodStationTest.ViewModel }); } public ObservableCollection RawMaterialInfo { get; set; } = new ObservableCollection(); - public RelayCommand AddMaterial { get; set; } - public RelayCommand SaveMaterials { get; set; } - public RelayCommand RemoveCommand { get; set; } - public RelayCommand GetBomMaterialData { get; set; } - public RelayCommand DeleteAllMaterial { get; set; } + public BPARelayCommand AddMaterial { get; set; } + public BPARelayCommand SaveMaterials { get; set; } + public BPARelayCommand RemoveCommand { get; set; } + public BPARelayCommand GetBomMaterialData { get; set; } + public BPARelayCommand DeleteAllMaterial { get; set; } } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/ChangeDeviceNameViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/ChangeDeviceNameViewModel.cs index 5b8b4022..e6537e38 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/ChangeDeviceNameViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/ChangeDeviceNameViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -18,8 +18,8 @@ namespace BPASmartClient.FoodStationTest.ViewModel IpAddress = str; }), "ChangeDeviceNameViewOpen"); - CancleCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); - ConfirmCommand = new RelayCommand(() => + CancleCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); + ConfirmCommand = new BPARelayCommand(() => { if (string.IsNullOrEmpty(DeviceName)) { @@ -56,9 +56,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel private static string IpAddress = string.Empty; - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } - public RelayCommand CancleCommand { get; set; } + public BPARelayCommand CancleCommand { get; set; } public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/DeviceListViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/DeviceListViewModel.cs index 985a4bcf..1461b0ee 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/DeviceListViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/DeviceListViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.View; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; @@ -11,7 +11,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel { public DeviceListViewModel() { - ChangeNameCommand = new RelayCommand((o) => + ChangeNameCommand = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -21,7 +21,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); - Open = new RelayCommand((o) => + Open = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -29,7 +29,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); - Close = new RelayCommand((o) => + Close = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -45,9 +45,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel devices = new ObservableCollection(devices.OrderBy(item => item.Serial));*/ } - public RelayCommand ChangeNameCommand { get; set; } - public RelayCommand Open { get; set; } - public RelayCommand Close { get; set; } + public BPARelayCommand ChangeNameCommand { get; set; } + public BPARelayCommand Open { get; set; } + public BPARelayCommand Close { get; set; } //public static ObservableCollection devices { get; set; } = new ObservableCollection(); public ObservableCollection devices { get; set; } diff --git a/BPASmartClient.FoodStationTest/ViewModel/DeviceMaterialParViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/DeviceMaterialParViewModel.cs index 9f31b67c..44ab5123 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/DeviceMaterialParViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/DeviceMaterialParViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; @@ -14,7 +14,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel public DeviceMaterialParViewModel() { deviceParModels = Json.Data.deviceParModels; - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); if (res != null) @@ -22,8 +22,8 @@ namespace BPASmartClient.FoodStationTest.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); }); - AddCommand = new RelayCommand(() => { deviceParModels.Add(new DeviceParMode()); }); - SaveCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { deviceParModels.Add(new DeviceParMode()); }); + SaveCommand = new BPARelayCommand(() => { if (deviceParModels == null || deviceParModels.Count <= 0) { @@ -56,10 +56,10 @@ namespace BPASmartClient.FoodStationTest.ViewModel public ObservableCollection deviceParModels { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand AddCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/ManualCommViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/ManualCommViewModel.cs index e072b013..f4835060 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/ManualCommViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/ManualCommViewModel.cs @@ -11,7 +11,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel public ManualCommViewModel() { PlcDataColl.Add(new VarMonitor() { SerialNum = PlcDataColl.Count, Address = "", }); - SetParCommand = new RelayCommand((o) => + SetParCommand = new BPARelayCommand((o) => { if (o != null && o is string address) { @@ -21,9 +21,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel } public static ObservableCollection PlcDataColl { get; set; } = new ObservableCollection(); - public RelayCommand SetParCommand { get; set; } + public BPARelayCommand SetParCommand { get; set; } - public RelayCommand Connect { get; set; } + public BPARelayCommand Connect { get; set; } } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs index e9f4a128..4dc0a480 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/ManualControlViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -216,80 +216,80 @@ namespace BPASmartClient.FoodStationTest.ViewModel }); } } - Open = new RelayCommand((o) => + Open = new BPARelayCommand((o) => { ActionManage.GetInstance.Send("ManualOpen", o); }); - Close = new RelayCommand((o) => + Close = new BPARelayCommand((o) => { ActionManage.GetInstance.Send("ManualClose", o); }); - StartAxisLoadCommand = new RelayCommand(() => + StartAxisLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxisLoadCommand"); }); - StopAxisLoadCommand = new RelayCommand(() => + StopAxisLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxisLoadCommand"); }); - StartAxisMidCommand = new RelayCommand(() => + StartAxisMidCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxisMidCommand"); }); - StopAxisMidCommand = new RelayCommand(() => + StopAxisMidCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxisMidCommand"); }); - StartAxisUnLoadCommand = new RelayCommand(() => + StartAxisUnLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxisUnLoadCommand"); }); - StopAxisUnLoadCommand = new RelayCommand(() => + StopAxisUnLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxisUnLoadCommand"); }); - StartAxis1Command = new RelayCommand(() => + StartAxis1Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxis1Command"); }); - StopAxis1Command = new RelayCommand(() => + StopAxis1Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxis1Command"); }); - StartAxis2Command = new RelayCommand(() => + StartAxis2Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxis2Command"); }); - StopAxis2Command = new RelayCommand(() => + StopAxis2Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxis2Command"); }); - SystemStartCommand = new RelayCommand(() => + SystemStartCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemStart"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统启动!"); }); - SystemStopCommand = new RelayCommand(() => + SystemStopCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemStop"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统停止!"); }); - SystemPauseCommand = new RelayCommand(() => + SystemPauseCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemPause"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停!"); }); - SystemResetCommand = new RelayCommand(() => + SystemResetCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemReset"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停后复位!"); }); - DebugMode = new RelayCommand(() => + DebugMode = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("SystemDebugMode"); }); - AutoMode = new RelayCommand(() => + AutoMode = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("SystemAutoMode"); }); @@ -320,30 +320,30 @@ namespace BPASmartClient.FoodStationTest.ViewModel { StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); } - public RelayCommand Open { get; set; } + public BPARelayCommand Open { get; set; } - public RelayCommand Close { get; set; } + public BPARelayCommand Close { get; set; } //五个电机手动控制 - public RelayCommand StartAxisLoadCommand { get; set; } - public RelayCommand StopAxisLoadCommand { get; set; } - public RelayCommand StartAxisMidCommand { get; set; } - public RelayCommand StopAxisMidCommand { get; set; } - public RelayCommand StartAxisUnLoadCommand { get; set; } - public RelayCommand StopAxisUnLoadCommand { get; set; } - public RelayCommand StartAxis1Command { get; set; } - public RelayCommand StopAxis1Command { get; set; } - public RelayCommand StartAxis2Command { get; set; } - public RelayCommand StopAxis2Command { get; set; } + public BPARelayCommand StartAxisLoadCommand { get; set; } + public BPARelayCommand StopAxisLoadCommand { get; set; } + public BPARelayCommand StartAxisMidCommand { get; set; } + public BPARelayCommand StopAxisMidCommand { get; set; } + public BPARelayCommand StartAxisUnLoadCommand { get; set; } + public BPARelayCommand StopAxisUnLoadCommand { get; set; } + public BPARelayCommand StartAxis1Command { get; set; } + public BPARelayCommand StopAxis1Command { get; set; } + public BPARelayCommand StartAxis2Command { get; set; } + public BPARelayCommand StopAxis2Command { get; set; } - public RelayCommand SystemStartCommand { get; set; } - public RelayCommand SystemStopCommand { get; set; } - public RelayCommand SystemPauseCommand { get; set; } + public BPARelayCommand SystemStartCommand { get; set; } + public BPARelayCommand SystemStopCommand { get; set; } + public BPARelayCommand SystemPauseCommand { get; set; } - public RelayCommand SystemResetCommand { get; set; } + public BPARelayCommand SystemResetCommand { get; set; } - public RelayCommand AutoMode { get; set; } - public RelayCommand DebugMode { get; set; } + public BPARelayCommand AutoMode { get; set; } + public BPARelayCommand DebugMode { get; set; } /// /// 系统模式改变 diff --git a/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs index b208019c..f99ddcc8 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/ManualFlowViewModel.cs @@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.Model.HK_PLC; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -21,7 +21,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel { time = GVL_SmallStation.GetInstance.Time; - Test4Command = new RelayCommand(() => + Test4Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX1.5", PlcVarType = PlcVarType.Bool, Value = true }); //GVL_SmallStation.GetInstance.CylinderReset = true; @@ -29,7 +29,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,气缸收紧错位复位"); }); - CLearRecipeInfo = new RelayCommand(() => + CLearRecipeInfo = new BPARelayCommand(() => { App.Current.Dispatcher.Invoke(() => { @@ -40,7 +40,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); }); - SystemReset = new RelayCommand(() => + SystemReset = new BPARelayCommand(() => { App.Current.Dispatcher.Invoke(() => { @@ -51,7 +51,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); }); - BPAResetCommand = new RelayCommand(() => + BPAResetCommand = new BPARelayCommand(() => { App.Current.Dispatcher.Invoke(() => { @@ -62,7 +62,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); }); - StockbinDosingComple = new RelayCommand(() => + StockbinDosingComple = new BPARelayCommand(() => { int loc = StockbinDosingCompleNum; if (loc >= 1 && loc <= 8) @@ -85,11 +85,11 @@ namespace BPASmartClient.FoodStationTest.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,手动设置料仓{loc}配料,料仓编号不正确"); } }); - StockbinDosingCompleClear = new RelayCommand(() => + StockbinDosingCompleClear = new BPARelayCommand(() => { }); - CancelRecipeCommand = new RelayCommand(() => + CancelRecipeCommand = new BPARelayCommand(() => { string cancelRecipeCode = CancelRecipeCode.Trim(); if (!String.IsNullOrEmpty(cancelRecipeCode) && MessageNotify.GetInstance.ShowDialog($"请确认,是否进行删除订单【{cancelRecipeCode}】操作?")) @@ -111,7 +111,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); - CompletedNumResetCommand = new RelayCommand(() => + CompletedNumResetCommand = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认,是否将配方完成数目清零?", DialogType.Warning)) { @@ -228,7 +228,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } Thread.Sleep(100); }), "流程手动设备状态读取", true); - TimeSet = new RelayCommand(() => + TimeSet = new BPARelayCommand(() => { GVL_SmallStation.GetInstance.Time = time; MessageNotify.GetInstance.ShowUserLog($"设置柔性味魔方复位时间:{time}s"); @@ -237,10 +237,10 @@ namespace BPASmartClient.FoodStationTest.ViewModel HKPlcIsConnect = ProcessControl.GetInstance.HKDevice.IsConnected; } - public RelayCommand Test4Command { get; set; } + public BPARelayCommand Test4Command { get; set; } - public RelayCommand TimeSet { get; set; } - public RelayCommand CompletedNumResetCommand { get; set; } + public BPARelayCommand TimeSet { get; set; } + public BPARelayCommand CompletedNumResetCommand { get; set; } public static bool Heartbeat { get { return _mHeartbeat; } set { _mHeartbeat = value; OnStaticPropertyChanged(); } } private static bool _mHeartbeat; @@ -265,9 +265,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel { StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); } - public RelayCommand CLearRecipeInfo { get; set; } - public RelayCommand SystemReset { get; set; } - public RelayCommand BPAResetCommand { get; set; } + public BPARelayCommand CLearRecipeInfo { get; set; } + public BPARelayCommand SystemReset { get; set; } + public BPARelayCommand BPAResetCommand { get; set; } private bool _SiemensIsConnect { get; set; } public bool SiemensIsConnect { get { return _SiemensIsConnect; } set { _SiemensIsConnect = value; OnPropertyChanged(); } } private bool _HKPlcIsConnect { get; set; } @@ -290,9 +290,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel public static string Recipe5DosingComplete { get { return _Recipe5DosingComplete; } set { _Recipe5DosingComplete = value; OnStaticPropertyChanged(); } } - public RelayCommand StockbinDosingComple { get; set; } - public RelayCommand StockbinDosingCompleClear { get; set; } - public RelayCommand CancelRecipeCommand { get; set; } + public BPARelayCommand StockbinDosingComple { get; set; } + public BPARelayCommand StockbinDosingCompleClear { get; set; } + public BPARelayCommand CancelRecipeCommand { get; set; } private static int _StockbinDosingCompleNum { get; set; } public static int StockbinDosingCompleNum { get { return _StockbinDosingCompleNum; } set { _StockbinDosingCompleNum = value; OnStaticPropertyChanged(); } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/NewLocalRecipeViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/NewLocalRecipeViewModel.cs index 60ca6d53..1cd3e5fd 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/NewLocalRecipeViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/NewLocalRecipeViewModel.cs @@ -2,7 +2,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -49,7 +49,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel }), "LocalRecipeEdit", true); - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { var res = AllRawMaterial.FirstOrDefault(p => p.RawMaterialName == o.ToString()); if (res != null) @@ -57,7 +57,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel //NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); }); - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { int MaxRawMaterial = 15; var res = AllRawMaterial.Where(p => p.RawMaterialType == "小料").ToList(); @@ -78,7 +78,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); - AddFLCommand = new RelayCommand(() => + AddFLCommand = new BPARelayCommand(() => { int MaxRawMaterial = 5; var res = AllRawMaterial.Where(p => p.RawMaterialType == "粉料").ToList(); @@ -98,7 +98,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"粉料最多添加{MaxRawMaterial}种"); } }); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { if (!MessageNotify.GetInstance.ShowDialog("请确认,是否保存该配方配置?")) { @@ -210,11 +210,11 @@ namespace BPASmartClient.FoodStationTest.ViewModel - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand AddCommand { get; set; } - public RelayCommand AddFLCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } + public BPARelayCommand AddFLCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/NewMaterialViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/NewMaterialViewModel.cs index 9c1bdcc8..9d16b541 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/NewMaterialViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/NewMaterialViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -19,9 +19,9 @@ public class NewMaterialViewModel : NotifyBase public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } private string _mErrorInfo; - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } @@ -40,9 +40,9 @@ public class NewMaterialViewModel : NotifyBase public NewMaterialViewModel() { - RemoveCommand = new RelayCommand(Remove); + RemoveCommand = new BPARelayCommand(Remove); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { if (MaterialName == String.Empty) { ErrorInfo = "原料名称不能为空"; return; } diff --git a/BPASmartClient.FoodStationTest/ViewModel/NewRecipeViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/NewRecipeViewModel.cs index db9c9489..f519f7e7 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/NewRecipeViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/NewRecipeViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -29,7 +29,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }), "Details"); - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { p: string guid = Guid.NewGuid().ToString(); @@ -44,7 +44,7 @@ p: goto p; }); - RemoveCommand = new RelayCommand((obj) => + RemoveCommand = new BPARelayCommand((obj) => { if (obj is string rm) { @@ -54,7 +54,7 @@ p: } }); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { ErrorInfo = String.Empty; if (RecipeName == String.Empty) @@ -173,11 +173,11 @@ p: public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } private string _mErrorInfo; - public RelayCommand AddCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } public ObservableCollection RawMaterials { get; set; } = new ObservableCollection(); diff --git a/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs index 73b767e1..0a0878ad 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/RecipeControlViewModel.cs @@ -2,7 +2,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -20,7 +20,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel public RecipeControlViewModel() { - StartCommand = new RelayCommand((o) => + StartCommand = new BPARelayCommand((o) => { if (o != null && o is string deviceName) { @@ -41,7 +41,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); - ChangeRecipeStateCommand = new RelayCommand(ChangeRecipeState); + ChangeRecipeStateCommand = new BPARelayCommand(ChangeRecipeState); @@ -162,9 +162,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel } - public RelayCommand StartCommand { get; set; } + public BPARelayCommand StartCommand { get; set; } - public RelayCommand ChangeRecipeStateCommand { get; set; } + public BPARelayCommand ChangeRecipeStateCommand { get; set; } public static ObservableCollection Recipes { get; set; } = Json.Data.Recipes; diff --git a/BPASmartClient.FoodStationTest/ViewModel/RecipeInfosViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/RecipeInfosViewModel.cs index 1eb92318..3e64bdb4 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/RecipeInfosViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/RecipeInfosViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -46,7 +46,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }), "RecipeInfo"); - ReturnPage = new RelayCommand(() => + ReturnPage = new BPARelayCommand(() => { ActionManage.GetInstance.Send("CloseRecipeInfosView"); }); @@ -61,7 +61,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel public int TrayCode { get { return _mTrayCode; } set { _mTrayCode = value; OnPropertyChanged(); } } private int _mTrayCode; - public RelayCommand ReturnPage { get; set; } + public BPARelayCommand ReturnPage { get; set; } public ObservableCollection RawMaterialsInfo { get; set; } = new ObservableCollection(); } diff --git a/BPASmartClient.FoodStationTest/ViewModel/RecipeReceiveViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/RecipeReceiveViewModel.cs index 05b90e33..7c8a4a47 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/RecipeReceiveViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/RecipeReceiveViewModel.cs @@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.View; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -21,12 +21,12 @@ namespace BPASmartClient.FoodStationTest.ViewModel IsUseLocalRecipe = GVL_SmallStation.GetInstance.IsUseLocalRecipe; Recipes = Json.Data.Recipes; - NewRecipe = new RelayCommand(() => + NewRecipe = new BPARelayCommand(() => { NewLocalRecipeView NewLocalRecipe = new NewLocalRecipeView(); NewLocalRecipe.ShowDialog(); }); - RemoveRecipe = new RelayCommand((o) => + RemoveRecipe = new BPARelayCommand((o) => { if (o != null && o is string cnt) { @@ -41,7 +41,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } } }); - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (o != null && o is string cnt) { @@ -59,7 +59,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } } }); - IssueRecipe = new RelayCommand((o) => + IssueRecipe = new BPARelayCommand((o) => { if (IsUseLocalRecipe == false) { @@ -90,7 +90,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } } }); - NewSimulateRecipe = new RelayCommand(() => + NewSimulateRecipe = new BPARelayCommand(() => { ObservableCollection RawMaterials = new ObservableCollection(); string recipeName = "配方" + (Json.Data.Recipes.Count + 1) + ""; @@ -142,7 +142,7 @@ go: } }); - ClearAllRecipe = new RelayCommand(() => + ClearAllRecipe = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认,是否清除所有本地配方?", DialogType.Warning)) { @@ -154,7 +154,7 @@ go: SelectedRecipes = Json.Data.SelectedRecipes; - SelectRecipesCommand = new RelayCommand(() => + SelectRecipesCommand = new BPARelayCommand(() => { var selectView = new SelectRecipesView(); selectView.ShowDialog(); @@ -186,13 +186,13 @@ go: /// public static ObservableCollection SelectedRecipes { get; set; } - public RelayCommand DetailsCommand { get; set; } - public RelayCommand IssueRecipe { get; set; } - public RelayCommand RemoveRecipe { get; set; } - public RelayCommand NewSimulateRecipe { get; set; } - public RelayCommand ClearAllRecipe { get; set; } - public RelayCommand NewRecipe { get; set; } - public RelayCommand SelectRecipesCommand { get; set; } + public BPARelayCommand DetailsCommand { get; set; } + public BPARelayCommand IssueRecipe { get; set; } + public BPARelayCommand RemoveRecipe { get; set; } + public BPARelayCommand NewSimulateRecipe { get; set; } + public BPARelayCommand ClearAllRecipe { get; set; } + public BPARelayCommand NewRecipe { get; set; } + public BPARelayCommand SelectRecipesCommand { get; set; } public ObservableCollection Recipes { get; set; } } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/RecipeSettingsViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/RecipeSettingsViewModel.cs index 7fd247f8..ac01b0a6 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/RecipeSettingsViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/RecipeSettingsViewModel.cs @@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.View; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; @@ -17,24 +17,24 @@ namespace BPASmartClient.FoodStationTest.ViewModel { Recipes = Json.Data.Recipes; - NewMaterital = new RelayCommand(() => + NewMaterital = new BPARelayCommand(() => { NewMaterialView newMateritalView = new NewMaterialView(); newMateritalView.ShowDialog(); }); - NewRecipe = new RelayCommand(() => + NewRecipe = new BPARelayCommand(() => { NewRecipeView nrv = new NewRecipeView(); nrv.ShowDialog(); MessageNotify.GetInstance.ShowUserLog("新建配方"); }); - SaveRecipe = new RelayCommand(() => + SaveRecipe = new BPARelayCommand(() => { Json.Save(); MessageNotify.GetInstance.ShowUserLog("保存配方"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); }); - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (o is string str) { @@ -45,7 +45,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -60,17 +60,17 @@ namespace BPASmartClient.FoodStationTest.ViewModel } - public RelayCommand NewMaterital { get; set; } + public BPARelayCommand NewMaterital { get; set; } - public RelayCommand NewRecipe { get; set; } + public BPARelayCommand NewRecipe { get; set; } - public RelayCommand SaveRecipe { get; set; } + public BPARelayCommand SaveRecipe { get; set; } - public RelayCommand EditCommand { get; set; } + public BPARelayCommand EditCommand { get; set; } - public RelayCommand DetailsCommand { get; set; } + public BPARelayCommand DetailsCommand { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } public ObservableCollection Recipes { get; set; } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/SelectRecipesViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/SelectRecipesViewModel.cs index 311b0b90..94ef09eb 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/SelectRecipesViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/SelectRecipesViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.FoodStationTest.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; @@ -78,19 +78,19 @@ namespace BPASmartClient.FoodStationTest.ViewModel /// /// 取消筛选,即关闭本窗口。 /// - public RelayCommand CancelCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } /// /// 全选。 /// - public RelayCommand AllSelectCommand { get; set; } + public BPARelayCommand AllSelectCommand { get; set; } /// /// 全部取消选择。 /// - public RelayCommand AllCancelCommand { get; set; } + public BPARelayCommand AllCancelCommand { get; set; } /// /// 确认选择。 /// - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } internal class RecipeDataWithCheck : NotifyBase diff --git a/BPASmartClient.FoodStationTest/ViewModel/SiemensRecipeReceiveViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/SiemensRecipeReceiveViewModel.cs index 2079f036..98de545a 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/SiemensRecipeReceiveViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/SiemensRecipeReceiveViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.View; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; @@ -15,7 +15,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel public SiemensRecipeReceiveViewModel() { Recipes = Json.Data.Recipes; - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (o != null && o is string cnt) { @@ -31,7 +31,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel } } }); - ClearAllRecipe = new RelayCommand(() => + ClearAllRecipe = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog($"请确认,是否删除所有配方订单?")) { @@ -40,8 +40,8 @@ namespace BPASmartClient.FoodStationTest.ViewModel } }); } - public RelayCommand DetailsCommand { get; set; } - public RelayCommand ClearAllRecipe { get; set; } + public BPARelayCommand DetailsCommand { get; set; } + public BPARelayCommand ClearAllRecipe { get; set; } public ObservableCollection Recipes { get; set; } } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/StockBinRawMaterialViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/StockBinRawMaterialViewModel.cs index e9d7aede..87723520 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/StockBinRawMaterialViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/StockBinRawMaterialViewModel.cs @@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.Model.RawMaterial; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -17,7 +17,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel public StockBinRawMaterialViewModel() { RawMaterialInfo = Json.Data.rawMaterialStockBin; - RemoveCommand = new RelayCommand((loc) => + RemoveCommand = new BPARelayCommand((loc) => { if (loc is int pos) { @@ -26,7 +26,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel RawMaterialInfo.Remove(res); } }); - SaveRawMaterialPara = new RelayCommand(() => + SaveRawMaterialPara = new BPARelayCommand(() => { Json.Save(); ProcessControl.GetInstance.StockBinNameWithPos(); @@ -37,14 +37,14 @@ namespace BPASmartClient.FoodStationTest.ViewModel MessageNotify.GetInstance.ShowUserLog($"原料与料仓对应关系保存成功"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); }); - UpdateRawMaterial = new RelayCommand(() => + UpdateRawMaterial = new BPARelayCommand(() => { RawMaterialInfo.Add(new RawMaterialStockBin() { RawMaterialCount = (short)(RawMaterialInfo.Count + 1) }); }); } public ObservableCollection RawMaterialInfo { get; set; } = new ObservableCollection(); - public RelayCommand RemoveCommand { get; set; } - public RelayCommand SaveRawMaterialPara { get; set; } - public RelayCommand UpdateRawMaterial { get; set; } + public BPARelayCommand RemoveCommand { get; set; } + public BPARelayCommand SaveRawMaterialPara { get; set; } + public BPARelayCommand UpdateRawMaterial { get; set; } } } diff --git a/BPASmartClient.FoodStationTest/ViewModel/SystemParViewModel.cs b/BPASmartClient.FoodStationTest/ViewModel/SystemParViewModel.cs index 633a38f2..85cc3430 100644 --- a/BPASmartClient.FoodStationTest/ViewModel/SystemParViewModel.cs +++ b/BPASmartClient.FoodStationTest/ViewModel/SystemParViewModel.cs @@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.FoodStationTest.Model; using BPASmartClient.FoodStationTest.Model.HK_PLC; using BPASmartClient.FoodStationTest.Model.Par; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -22,7 +22,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel AxisMidSpeed = Json.Data.deviceConnectPar.AxisMidSpeed; Axis1Speed = Json.Data.deviceConnectPar.Axis1Speed; Axis2Speed = Json.Data.deviceConnectPar.Axis2Speed; - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { Json.Data.deviceConnectPar.HKPlcConnect = HKPlcConnect; Json.Data.deviceConnectPar.ShieldStockbinAlarm = ShieldStockbinAlarm; @@ -36,7 +36,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel Json.Save(); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"参数保存成功!"); }); - SetParCommand = new RelayCommand(() => + SetParCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB47.DBD0", PlcVarType = PlcVarType.Real, Value = Axis1Speed }); ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB47.DBD4", PlcVarType = PlcVarType.Real, Value = Axis2Speed }); @@ -70,8 +70,8 @@ namespace BPASmartClient.FoodStationTest.ViewModel private float _mAxis1Speed; public float Axis2Speed { get { return _mAxis2Speed; } set { _mAxis2Speed = value; OnPropertyChanged(); } } private float _mAxis2Speed; - public RelayCommand SaveCommand { get; set; } - public RelayCommand SetParCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } + public BPARelayCommand SetParCommand { get; set; } } } diff --git a/BPASmartClient.GSIceCream/CommandHandler.cs b/BPASmartClient.GSIceCream/CommandHandler.cs index 1f58587b..a669db55 100644 --- a/BPASmartClient.GSIceCream/CommandHandler.cs +++ b/BPASmartClient.GSIceCream/CommandHandler.cs @@ -1,5 +1,5 @@  -using BPASmartClient.EventBus; + using BPASmartClient.GSIceCream; using BPASmartClient.Message; using BPASmartClient.Model; @@ -11,7 +11,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.DRCoffee { diff --git a/BPASmartClient.GSIceCream/IceCreamMachine.cs b/BPASmartClient.GSIceCream/IceCreamMachine.cs index 4cde3dd9..a8267cc2 100644 --- a/BPASmartClient.GSIceCream/IceCreamMachine.cs +++ b/BPASmartClient.GSIceCream/IceCreamMachine.cs @@ -1,5 +1,5 @@ -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPASmartClient.Model.冰淇淋.Enum; @@ -9,7 +9,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading; -using static BPASmartClient.EventBus.EventBus; + using static BPASmartClient.GSIceCream.MessageDefine; namespace BPASmartClient.GSIceCream diff --git a/BPASmartClient.GSIceCream/MorkIStatus.cs b/BPASmartClient.GSIceCream/MorkIStatus.cs index 717a1b4d..6ba08fcf 100644 --- a/BPASmartClient.GSIceCream/MorkIStatus.cs +++ b/BPASmartClient.GSIceCream/MorkIStatus.cs @@ -1,5 +1,5 @@ using BPASmartClient.GSIceCream; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model.冰淇淋.Enum; using System; diff --git a/BPASmartClient.IceMaker/IceMakerMachine.cs b/BPASmartClient.IceMaker/IceMakerMachine.cs index 3ec59078..1fb4d607 100644 --- a/BPASmartClient.IceMaker/IceMakerMachine.cs +++ b/BPASmartClient.IceMaker/IceMakerMachine.cs @@ -1,9 +1,9 @@ -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.Peripheral; using BPASmartClient.SerialPort; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.IceMaker { diff --git a/BPASmartClient.IoT/DataVClient.cs b/BPASmartClient.IoT/DataVClient.cs index eff3623a..02a0c5c7 100644 --- a/BPASmartClient.IoT/DataVClient.cs +++ b/BPASmartClient.IoT/DataVClient.cs @@ -3,7 +3,7 @@ using BPA.Message.Enum; using BPA.Message.IOT; using BPASmartClient.Business; using BPASmartClient.Device; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT.Model; using BPASmartClient.Message; using BPASmartDatavDeviceClient.IoT; diff --git a/BPASmartClient.IoT/Model/DataVReport.cs b/BPASmartClient.IoT/Model/DataVReport.cs index 5fdbb077..365603ec 100644 --- a/BPASmartClient.IoT/Model/DataVReport.cs +++ b/BPASmartClient.IoT/Model/DataVReport.cs @@ -1,5 +1,5 @@ using BPA.Message.IOT; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT; using BPASmartClient.IoT.Model; using System; diff --git a/BPASmartClient.IoT/Model/FileUpload.cs b/BPASmartClient.IoT/Model/FileUpload.cs index f07818bd..6d63042b 100644 --- a/BPASmartClient.IoT/Model/FileUpload.cs +++ b/BPASmartClient.IoT/Model/FileUpload.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartDatavDeviceClient.IoT; using DataVAPI.Tool.IOT; diff --git a/BPASmartClient.IoT/Model/IOT/IOTDevServer.cs b/BPASmartClient.IoT/Model/IOT/IOTDevServer.cs index 2b9ee391..db8d5a44 100644 --- a/BPASmartClient.IoT/Model/IOT/IOTDevServer.cs +++ b/BPASmartClient.IoT/Model/IOT/IOTDevServer.cs @@ -1,6 +1,6 @@  -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT; using Newtonsoft.Json; using System; diff --git a/BPASmartClient.JAKA/JakaMachine.cs b/BPASmartClient.JAKA/JakaMachine.cs index e45b477d..ecd81444 100644 --- a/BPASmartClient.JAKA/JakaMachine.cs +++ b/BPASmartClient.JAKA/JakaMachine.cs @@ -1,9 +1,9 @@ -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.JakaRobot; using BPASmartClient.Model; using BPASmartClient.Peripheral; -using static BPASmartClient.EventBus.EventBus; +using static BPA.Helper.EventBus; namespace BPASmartClient.JAKA { diff --git a/BPASmartClient.JXJFoodBigStation/App.xaml.cs b/BPASmartClient.JXJFoodBigStation/App.xaml.cs index d801614e..b7d7169b 100644 --- a/BPASmartClient.JXJFoodBigStation/App.xaml.cs +++ b/BPASmartClient.JXJFoodBigStation/App.xaml.cs @@ -11,7 +11,7 @@ using BPASmartClient.CustomResource.Pages.Enums; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.Pages.View; using BPASmartClient.CustomResource.Pages.ViewModel; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.Model.Siemens; diff --git a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs index 7dccace3..5528f08a 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/HK_PLC/HKDeviceStatus.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Modbus; using System; using System.Collections.Generic; diff --git a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs index 76a30277..72acd2dd 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/ProcessControl.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; using BPASmartClient.JXJFoodBigStation.Model.Siemens; using BPASmartClient.Modbus; diff --git a/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs b/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs index 2bc9ba0b..f91ee920 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/Siemens/SiemensDeviceStatus.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Modbus; using System; using System.Collections.Generic; diff --git a/BPASmartClient.JXJFoodBigStation/Model/TestData.cs b/BPASmartClient.JXJFoodBigStation/Model/TestData.cs index db64053d..8d387af7 100644 --- a/BPASmartClient.JXJFoodBigStation/Model/TestData.cs +++ b/BPASmartClient.JXJFoodBigStation/Model/TestData.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model.Siemens; using System; using System.Collections.Generic; diff --git a/BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml.cs b/BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml.cs index 6279809d..fce8d101 100644 --- a/BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml.cs +++ b/BPASmartClient.JXJFoodBigStation/View/ChangeDeviceNameView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodBigStation/View/HardwareStatusView.xaml.cs b/BPASmartClient.JXJFoodBigStation/View/HardwareStatusView.xaml.cs index 5a54f04f..2d78bf80 100644 --- a/BPASmartClient.JXJFoodBigStation/View/HardwareStatusView.xaml.cs +++ b/BPASmartClient.JXJFoodBigStation/View/HardwareStatusView.xaml.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.UserControls; -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodBigStation/View/RecipeInfosView.xaml.cs b/BPASmartClient.JXJFoodBigStation/View/RecipeInfosView.xaml.cs index dde9b313..cc258cbb 100644 --- a/BPASmartClient.JXJFoodBigStation/View/RecipeInfosView.xaml.cs +++ b/BPASmartClient.JXJFoodBigStation/View/RecipeInfosView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodBigStation/View/SelectRecipesView.xaml.cs b/BPASmartClient.JXJFoodBigStation/View/SelectRecipesView.xaml.cs index 86b3075e..700869e2 100644 --- a/BPASmartClient.JXJFoodBigStation/View/SelectRecipesView.xaml.cs +++ b/BPASmartClient.JXJFoodBigStation/View/SelectRecipesView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/BomOfMaterialViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/BomOfMaterialViewModel.cs index 133db858..b336689d 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/BomOfMaterialViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/BomOfMaterialViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; using BPA.Helper; @@ -34,7 +34,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel RawMaterialInfo = Json.Data.RawMaterials; NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); }*/ - AddMaterial = new RelayCommand(() => + AddMaterial = new BPARelayCommand(() => { RawMaterialInfo.Add(new RawMaterial() { @@ -42,7 +42,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel }); MessageNotify.GetInstance.ShowUserLog("新增一条物料数据。"); }); - SaveMaterials = new RelayCommand(() => + SaveMaterials = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认是否保存!") == true) { @@ -51,7 +51,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); } }); - RemoveCommand = new RelayCommand((Count) => + RemoveCommand = new BPARelayCommand((Count) => { if (Count is int cnt) { @@ -69,9 +69,9 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel }); } public ObservableCollection RawMaterialInfo { get; set; } = new ObservableCollection(); - public RelayCommand AddMaterial { get; set; } - public RelayCommand SaveMaterials { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand AddMaterial { get; set; } + public BPARelayCommand SaveMaterials { get; set; } + public BPARelayCommand RemoveCommand { get; set; } } } diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/ChangeDeviceNameViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/ChangeDeviceNameViewModel.cs index bfb8a250..6bca3216 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/ChangeDeviceNameViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/ChangeDeviceNameViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -14,9 +14,9 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel { private static string IpAddress = string.Empty; - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } - public RelayCommand CancleCommand { get; set; } + public BPARelayCommand CancleCommand { get; set; } public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } @@ -33,8 +33,8 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel if (o != null && o is string str) IpAddress = str; }), "ChangeDeviceNameViewOpen"); - CancleCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); - ConfirmCommand = new RelayCommand(() => + CancleCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); + ConfirmCommand = new BPARelayCommand(() => { if (string.IsNullOrEmpty(DeviceName)) { diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/DeviceManageViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/DeviceManageViewModel.cs index 0d681106..f37dbeca 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/DeviceManageViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/DeviceManageViewModel.cs @@ -1,5 +1,5 @@ using BPA.Models.SqlEntity.BPA_Kitchen; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.View; using BPA.Helper; @@ -18,11 +18,11 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel public ObservableCollection Devices { get; set; } = new ObservableCollection() { new DeviceInfo { DeviceName = "123", IpAddress = "123.213.123.213." } }; - public RelayCommand ChangeNameCommand { get; set; } + public BPARelayCommand ChangeNameCommand { get; set; } public DeviceManageViewModel() { - ChangeNameCommand = new RelayCommand((o) => + ChangeNameCommand = new BPARelayCommand((o) => { if (o != null && o is string str) { diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs index 90922942..b9dd29f9 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/HKPlcCommMonitorViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; using BPA.Helper; @@ -106,7 +106,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel } } - SetValueCommand = new RelayCommand((o) => + SetValueCommand = new BPARelayCommand((o) => { /*if (o != null && o is String address) { @@ -126,6 +126,6 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel }*/ public static ObservableCollection PlcInfo { get; set; } = new ObservableCollection(); - public RelayCommand SetValueCommand { get; set; } + public BPARelayCommand SetValueCommand { get; set; } } } diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/HardwareStatusViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/HardwareStatusViewModel.cs index e684d72a..f5525632 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/HardwareStatusViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/HardwareStatusViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.View; @@ -48,9 +48,9 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel } public ObservableCollection TopDeviceCurrentStatuses { get; set; } = new ObservableCollection(); public ObservableCollection BottomDeviceCurrentStatuses { get; set; } = new ObservableCollection(); - public RelayCommand UpdateRawMaterName { get; set; } - public RelayCommand StartCommand { get; set; } + public BPARelayCommand UpdateRawMaterName { get; set; } + public BPARelayCommand StartCommand { get; set; } - public RelayCommand StopCommand { get; set; } + public BPARelayCommand StopCommand { get; set; } } } diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs index b83f90d8..ccecfc12 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/ManualFlowViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; using BPASmartClient.JXJFoodBigStation.Model.Siemens; @@ -24,7 +24,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel { public ManualFlowViewModel() { - TrayInPlace = new RelayCommand((o) => + TrayInPlace = new BPARelayCommand((o) => { if (o != null) { @@ -34,7 +34,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel MessageNotify.GetInstance.ShowUserLog($"手动点击AGV到达工位{loc}。"); } }); - TrayLeave = new RelayCommand((o) => + TrayLeave = new BPARelayCommand((o) => { if (o!=null) { @@ -44,13 +44,13 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel MessageNotify.GetInstance.ShowUserLog($"手动点击AGV离开工位{loc}。"); } }); - ClearTrayInPlace = new RelayCommand(() => + ClearTrayInPlace = new BPARelayCommand(() => { GVL_BigStation.AGVPutTray = 0; NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"操作成功"); MessageNotify.GetInstance.ShowUserLog($"手动点击清除AGV到位信号按钮。"); }); - ClearAllRecipe = new RelayCommand(() => + ClearAllRecipe = new BPARelayCommand(() => { if (!MessageNotify.GetInstance.ShowDialog($"请确认,是否清除所有西门子配方?",DialogType.Warning)) { @@ -61,7 +61,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"清除所有配方完成"); MessageNotify.GetInstance.ShowUserLog($"手动清除所有西门子配方。"); }); - CancelRecipeCommand = new RelayCommand(() => + CancelRecipeCommand = new BPARelayCommand(() => { if (!MessageNotify.GetInstance.ShowDialog($"请确认,是否取消订单【{CancelRecipeCode}】?", DialogType.Warning)) { @@ -100,10 +100,10 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel StockBin14Name = GVL_BigStation.stockBinName.RawMaterialName14; }), "设备状态读取",true); } - public RelayCommand TrayInPlace { get; set; } - public RelayCommand TrayLeave { get; set; } - public RelayCommand ClearTrayInPlace { get; set; } - public RelayCommand ClearAllRecipe { get; set; } + public BPARelayCommand TrayInPlace { get; set; } + public BPARelayCommand TrayLeave { get; set; } + public BPARelayCommand ClearTrayInPlace { get; set; } + public BPARelayCommand ClearAllRecipe { get; set; } public static bool Heartbeat { get { return _mHeartbeat; } set { _mHeartbeat = value; OnStaticPropertyChanged(); } } private static bool _mHeartbeat; @@ -138,7 +138,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel private static string _StockBin13Name { get; set; } public static string StockBin14Name { get { return _StockBin14Name; } set { _StockBin14Name = value; OnStaticPropertyChanged(); } } private static string _StockBin14Name { get; set; } - public RelayCommand CancelRecipeCommand { get; set; } + public BPARelayCommand CancelRecipeCommand { get; set; } public static event EventHandler StaticPropertyChanged; public static void OnStaticPropertyChanged([CallerMemberName] string PropName = "") diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeInfosViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeInfosViewModel.cs index 6be12e90..9b404aa3 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeInfosViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeInfosViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.JXJFoodBigStation.Model.Siemens; @@ -53,10 +53,10 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel } }), "RawMaterialNames",true); - AddRecipe = new RelayCommand(() => { + AddRecipe = new BPARelayCommand(() => { RawMaterialsInfo.Add(new RawMaterial()); }); - Comfirm = new RelayCommand(() => + Comfirm = new BPARelayCommand(() => { if (!MessageNotify.GetInstance.ShowDialog($"是否保存该配方?")) { @@ -124,7 +124,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel } }); - RemoveRecipe = new RelayCommand((index) => { + RemoveRecipe = new BPARelayCommand((index) => { var res = RawMaterialsInfo.FirstOrDefault(p => p.RawMaterialLocation == index); if (res != null) RawMaterialsInfo.Remove(res); @@ -164,13 +164,13 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel set { _Categorys = value; OnPropertyChanged(); } } - public RelayCommand ReturnPage { get; set; } + public BPARelayCommand ReturnPage { get; set; } - public RelayCommand AddRecipe { get; set; } + public BPARelayCommand AddRecipe { get; set; } - public RelayCommand Comfirm { get; set; } + public BPARelayCommand Comfirm { get; set; } - public RelayCommand RemoveRecipe { get; set; } + public BPARelayCommand RemoveRecipe { get; set; } public ObservableCollection RawMaterialsInfo { get; set; } = new ObservableCollection() ; diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeReceiveViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeReceiveViewModel.cs index 30a560ff..2c39fc17 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeReceiveViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeReceiveViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.View; @@ -29,7 +29,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel IsUseLocalRecipe = GVL_BigStation.IsUseLocalRecipe; Json.Read(); Recipes = Json.Data.Recipes; - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (o != null && o is string num) { @@ -41,13 +41,13 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel MessageNotify.GetInstance.ShowUserLog($"编辑配方,配方名称:【{res.RecipeName}】"); } }); - NewRecipe = new RelayCommand(() => + NewRecipe = new BPARelayCommand(() => { RecipeInfosView nrv = new RecipeInfosView(); nrv.ShowDialog(); }); - //RefreshRecipe = new RelayCommand(() => + //RefreshRecipe = new BPARelayCommand(() => //{ // foreach (var item in ProcessControl.GetInstance.RawMaterialsInfo) // { @@ -68,7 +68,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel //}); //模拟配方 - //NewSimulateRecipe = new RelayCommand(() => + //NewSimulateRecipe = new BPARelayCommand(() => //{ // RawMaterials.Clear(); // string recipeName = "配方" + (Json.Data.Recipes.Count + 1) + ""; @@ -105,7 +105,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel // }); // Json.Save(); //}); - ClearAllRecipe = new RelayCommand(() => + ClearAllRecipe = new BPARelayCommand(() => { if (!MessageNotify.GetInstance.ShowDialog($"请确认,是否删除所有本地配方?",DialogType.Warning)) { @@ -119,7 +119,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel MessageNotify.GetInstance.ShowUserLog($"手动清除所有配方。"); }); - RemoveCommand = new RelayCommand((recipeCode) => + RemoveCommand = new BPARelayCommand((recipeCode) => { if (!MessageNotify.GetInstance.ShowDialog($"请确认,是否删除配方【{recipeCode}】?",DialogType.Warning)) { @@ -135,14 +135,14 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel } }); } - public RelayCommand DetailsCommand { get; set; } - // public RelayCommand NewSimulateRecipe { get; set; } - public RelayCommand ClearAllRecipe { get; set; } - public RelayCommand NewRecipe { get; set; } - public RelayCommand RefreshRecipe { get; set; } + public BPARelayCommand DetailsCommand { get; set; } + // public BPARelayCommand NewSimulateRecipe { get; set; } + public BPARelayCommand ClearAllRecipe { get; set; } + public BPARelayCommand NewRecipe { get; set; } + public BPARelayCommand RefreshRecipe { get; set; } public bool IsUseLocalRecipe { get { return _isUseLocalRecipe; } set { _isUseLocalRecipe = value; OnPropertyChanged(); } } public bool _isUseLocalRecipe { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } public ObservableCollection Recipes { get; set; } = new ObservableCollection(); public ObservableCollection RawMaterialNames { get; set; } = new ObservableCollection(); diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeSendDownViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeSendDownViewModel.cs index 5e9d2bab..c5ebd32e 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeSendDownViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/RecipeSendDownViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.Model.Siemens; using BPASmartClient.JXJFoodBigStation.View; @@ -40,15 +40,15 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel - public RelayCommand StartCommand { get; set; } - public RelayCommand SelectRecipesCommand { get; set; } + public BPARelayCommand StartCommand { get; set; } + public BPARelayCommand SelectRecipesCommand { get; set; } public RecipeSendDownViewModel() { SelectedRecipes= Json.Data.SelectedRecipes; - StartCommand = new RelayCommand((recipeName) => + StartCommand = new BPARelayCommand((recipeName) => { if (recipeName != null) { @@ -83,7 +83,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel } }); - SelectRecipesCommand = new RelayCommand(() => + SelectRecipesCommand = new BPARelayCommand(() => { var selectView = new SelectRecipesView(); selectView.ShowDialog(); diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/SelectRecipesViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/SelectRecipesViewModel.cs index 79895c1f..7c60998e 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/SelectRecipesViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/SelectRecipesViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -83,19 +83,19 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel /// /// 取消筛选,即关闭本窗口。 /// - public RelayCommand CancelCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } /// /// 全选。 /// - public RelayCommand AllSelectCommand { get; set; } + public BPARelayCommand AllSelectCommand { get; set; } /// /// 全部取消选择。 /// - public RelayCommand AllCancelCommand { get; set; } + public BPARelayCommand AllCancelCommand { get; set; } /// /// 确认选择。 /// - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } /// /// 一个配方数据的包装类。 diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/SiemensRecipeSendDownViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/SiemensRecipeSendDownViewModel.cs index 929ddb79..d567f1b5 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/SiemensRecipeSendDownViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/SiemensRecipeSendDownViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.Model.Siemens; using BPA.Helper; diff --git a/BPASmartClient.JXJFoodBigStation/ViewModel/StockBinRawMaterialViewModel.cs b/BPASmartClient.JXJFoodBigStation/ViewModel/StockBinRawMaterialViewModel.cs index ff6440c8..55a6f9c4 100644 --- a/BPASmartClient.JXJFoodBigStation/ViewModel/StockBinRawMaterialViewModel.cs +++ b/BPASmartClient.JXJFoodBigStation/ViewModel/StockBinRawMaterialViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodBigStation.Model; using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; using BPA.Helper; diff --git a/BPASmartClient.JXJFoodSmallStation/App.xaml.cs b/BPASmartClient.JXJFoodSmallStation/App.xaml.cs index 13e96bc6..fd35122b 100644 --- a/BPASmartClient.JXJFoodSmallStation/App.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/App.xaml.cs @@ -11,7 +11,7 @@ using BPASmartClient.CustomResource.Pages.Enums; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.Pages.View; using BPASmartClient.CustomResource.Pages.ViewModel; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model.Siemens; using BPASmartClient.JXJFoodSmallStation.Model.WindSend; using System.Threading; diff --git a/BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj b/BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj index 53a1f31f..4c55f223 100644 --- a/BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj +++ b/BPASmartClient.JXJFoodSmallStation/BPASmartClient.JXJFoodSmallStation.csproj @@ -15,7 +15,6 @@ - diff --git a/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs index c32b6ba0..db9873d0 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/HK_PLC/HKDeviceStatus.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Modbus; using System; using System.Collections.Generic; diff --git a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs index e4ccfa2e..c1ff0c64 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/ProcessControl.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model.GVL; using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC; using BPASmartClient.JXJFoodSmallStation.Model.RawMaterial; diff --git a/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs b/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs index c0a5081b..fafaab1e 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/RawMaterial/DeviceInquire.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.JXJFoodSmallStation.ViewModel; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Modbus; using BPASmartClient.Model; using System; diff --git a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs index 86be7f46..923b55c2 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/Siemens/SiemensDeviceStatus.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Modbus; using System; using System.Collections.Generic; diff --git a/BPASmartClient.JXJFoodSmallStation/Model/TestData.cs b/BPASmartClient.JXJFoodSmallStation/Model/TestData.cs index 4a7c5c99..8e5801e2 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/TestData.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/TestData.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model.Siemens; using System; using System.Collections.Generic; diff --git a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs index c209bf98..d384fbcd 100644 --- a/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs +++ b/BPASmartClient.JXJFoodSmallStation/Model/WindSend/WindSendDeviceStatus.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Modbus; using System; using System.Collections.Generic; diff --git a/BPASmartClient.JXJFoodSmallStation/View/ChangeDeviceNameView.xaml.cs b/BPASmartClient.JXJFoodSmallStation/View/ChangeDeviceNameView.xaml.cs index 160f109e..54c0a788 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/ChangeDeviceNameView.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/View/ChangeDeviceNameView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodSmallStation/View/ManualCommView.xaml.cs b/BPASmartClient.JXJFoodSmallStation/View/ManualCommView.xaml.cs index 9f015671..df25e498 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/ManualCommView.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/View/ManualCommView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml.cs b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml.cs index cfb6b902..500d443e 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/View/NewLocalRecipeView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodSmallStation/View/NewMaterialView.xaml.cs b/BPASmartClient.JXJFoodSmallStation/View/NewMaterialView.xaml.cs index 95013207..427bf2f1 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/NewMaterialView.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/View/NewMaterialView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodSmallStation/View/NewRecipeView.xaml.cs b/BPASmartClient.JXJFoodSmallStation/View/NewRecipeView.xaml.cs index dd907eac..6310a4d4 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/NewRecipeView.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/View/NewRecipeView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml.cs b/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml.cs index 1df76fea..e1840cce 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/View/RecipeInfosView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodSmallStation/View/SelectRecipesView.xaml.cs b/BPASmartClient.JXJFoodSmallStation/View/SelectRecipesView.xaml.cs index d42c3e80..b1e9b477 100644 --- a/BPASmartClient.JXJFoodSmallStation/View/SelectRecipesView.xaml.cs +++ b/BPASmartClient.JXJFoodSmallStation/View/SelectRecipesView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/BomOfMaterialViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/BomOfMaterialViewModel.cs index ae0fcb3f..d6fa2688 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/BomOfMaterialViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/BomOfMaterialViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.JXJFoodSmallStation.Model.Bom; using BPASmartClient.JXJFoodSmallStation.Model.HK_PLC; @@ -24,7 +24,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public BomOfMaterialViewModel() { RawMaterialInfo = Json.Data.BomMaterial; - AddMaterial = new RelayCommand(() => + AddMaterial = new BPARelayCommand(() => { RawMaterialInfo.Add(new BomMaterial() { @@ -32,7 +32,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel }); MessageNotify.GetInstance.ShowUserLog("新增一条物料数据。"); }); - SaveMaterials = new RelayCommand(() => + SaveMaterials = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认是否保存!") == true) { @@ -41,7 +41,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); } }); - GetBomMaterialData = new RelayCommand(() => + GetBomMaterialData = new BPARelayCommand(() => { Json.Data.BomMaterial.Clear(); ProcessControl.GetInstance.RawMaterialNameWithCode();//原料的名称和编码对应 :西门子mes定义的物料编码 @@ -52,7 +52,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel MessageNotify.GetInstance.ShowUserLog("西门子物料数据拉取了本地数据。"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); }); - DeleteAllMaterial = new RelayCommand(() => + DeleteAllMaterial = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认,是否删除所有原料数据!") == true) { @@ -60,7 +60,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel MessageNotify.GetInstance.ShowUserLog($"手动点击西门子物料清单全部清除。"); } }); - RemoveCommand = new RelayCommand((Count) => + RemoveCommand = new BPARelayCommand((Count) => { if (Count is int cnt) { @@ -78,11 +78,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel }); } public ObservableCollection RawMaterialInfo { get; set; } = new ObservableCollection(); - public RelayCommand AddMaterial { get; set; } - public RelayCommand SaveMaterials { get; set; } - public RelayCommand RemoveCommand { get; set; } - public RelayCommand GetBomMaterialData { get; set; } - public RelayCommand DeleteAllMaterial { get; set; } + public BPARelayCommand AddMaterial { get; set; } + public BPARelayCommand SaveMaterials { get; set; } + public BPARelayCommand RemoveCommand { get; set; } + public BPARelayCommand GetBomMaterialData { get; set; } + public BPARelayCommand DeleteAllMaterial { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/ChangeDeviceNameViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/ChangeDeviceNameViewModel.cs index 4966849d..928ce5cd 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/ChangeDeviceNameViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/ChangeDeviceNameViewModel.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -20,8 +20,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel if (o != null && o is string str) IpAddress = str; }), "ChangeDeviceNameViewOpen"); - CancleCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); - ConfirmCommand = new RelayCommand(() => + CancleCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); + ConfirmCommand = new BPARelayCommand(() => { if (string.IsNullOrEmpty(DeviceName)) { @@ -59,9 +59,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel private static string IpAddress = string.Empty; - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } - public RelayCommand CancleCommand { get; set; } + public BPARelayCommand CancleCommand { get; set; } public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceListViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceListViewModel.cs index b74b92a1..8816b176 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceListViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceListViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodSmallStation.View; using BPASmartClient.JXJFoodSmallStation.Model; @@ -18,7 +18,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel { public DeviceListViewModel() { - ChangeNameCommand = new RelayCommand((o) => + ChangeNameCommand = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -28,7 +28,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - Open = new RelayCommand((o) => + Open = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -36,7 +36,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - Close = new RelayCommand((o) => + Close = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -52,9 +52,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel devices = new ObservableCollection(devices.OrderBy(item => item.Serial));*/ } - public RelayCommand ChangeNameCommand { get; set; } - public RelayCommand Open { get; set; } - public RelayCommand Close { get; set; } + public BPARelayCommand ChangeNameCommand { get; set; } + public BPARelayCommand Open { get; set; } + public BPARelayCommand Close { get; set; } //public static ObservableCollection devices { get; set; } = new ObservableCollection(); public ObservableCollection devices { get; set; } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceMaterialParViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceMaterialParViewModel.cs index 44588490..6243e1ae 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceMaterialParViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/DeviceMaterialParViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; @@ -20,7 +20,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public DeviceMaterialParViewModel() { deviceParModels = Json.Data.deviceParModels; - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); if (res != null) deviceParModels.Remove(res); @@ -28,10 +28,10 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"原料:【{o.ToString()}】删除成功!"); }); - AddCommand = new RelayCommand(() => { deviceParModels.Add(new DeviceParMode()); + AddCommand = new BPARelayCommand(() => { deviceParModels.Add(new DeviceParMode()); MessageNotify.GetInstance.ShowUserLog($"新增一条味魔方原料参数设置。"); }); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { if (deviceParModels == null || deviceParModels.Count <= 0) { @@ -65,10 +65,10 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public ObservableCollection deviceParModels { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand AddCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/HardwareStatusViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/HardwareStatusViewModel.cs index 908163f0..63037652 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/HardwareStatusViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/HardwareStatusViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodSmallStation.Model; diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualCommViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualCommViewModel.cs index 7020fb7c..9d49b13b 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualCommViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualCommViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; @@ -21,7 +21,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public ManualCommViewModel() { PlcDataColl.Add(new VarMonitor() { SerialNum = PlcDataColl.Count , Address="",}); - SetParCommand = new RelayCommand((o) => + SetParCommand = new BPARelayCommand((o) => { if (o != null && o is string address) { @@ -31,9 +31,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } public static ObservableCollection PlcDataColl { get; set; } = new ObservableCollection(); - public RelayCommand SetParCommand { get; set; } + public BPARelayCommand SetParCommand { get; set; } - public RelayCommand Connect { get; set; } + public BPARelayCommand Connect { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs index b5a3fa88..a64b1bc9 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualControlViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model; using System.Threading; using System.ComponentModel; @@ -219,81 +219,81 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel }); } } - Open = new RelayCommand((o) => + Open = new BPARelayCommand((o) => { ActionManage.GetInstance.Send("ManualOpen", o); }); - Close = new RelayCommand((o) => + Close = new BPARelayCommand((o) => { ActionManage.GetInstance.Send("ManualClose", o); }); - StartAxisLoadCommand = new RelayCommand(() => + StartAxisLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxisLoadCommand"); }); - StopAxisLoadCommand = new RelayCommand(() => + StopAxisLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxisLoadCommand"); }); - StartAxisMidCommand = new RelayCommand(() => + StartAxisMidCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxisMidCommand"); }); - StopAxisMidCommand = new RelayCommand(() => + StopAxisMidCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxisMidCommand"); }); - StartAxisUnLoadCommand = new RelayCommand(() => + StartAxisUnLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxisUnLoadCommand"); }); - StopAxisUnLoadCommand = new RelayCommand(() => + StopAxisUnLoadCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxisUnLoadCommand"); }); - StartAxis1Command = new RelayCommand(() => + StartAxis1Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxis1Command"); }); - StopAxis1Command = new RelayCommand(() => + StopAxis1Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxis1Command"); }); - StartAxis2Command = new RelayCommand(() => + StartAxis2Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartAxis2Command"); }); - StopAxis2Command = new RelayCommand(() => + StopAxis2Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopAxis2Command"); }); - SystemStartCommand = new RelayCommand(() => + SystemStartCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemStart"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统启动!"); }); - SystemStopCommand = new RelayCommand(() => + SystemStopCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemStop"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统停止!"); }); - SystemPauseCommand = new RelayCommand(() => + SystemPauseCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemPause"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停!"); }); - SystemResetCommand = new RelayCommand(() => + SystemResetCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SystemReset"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停后复位!"); }); - DebugMode = new RelayCommand(() => + DebugMode = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("SystemDebugMode"); }); - AutoMode = new RelayCommand(() => + AutoMode = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("SystemAutoMode"); }); @@ -324,30 +324,30 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel { StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); } - public RelayCommand Open { get; set; } + public BPARelayCommand Open { get; set; } - public RelayCommand Close { get; set; } + public BPARelayCommand Close { get; set; } //五个电机手动控制 - public RelayCommand StartAxisLoadCommand { get; set; } - public RelayCommand StopAxisLoadCommand { get; set; } - public RelayCommand StartAxisMidCommand { get; set; } - public RelayCommand StopAxisMidCommand { get; set; } - public RelayCommand StartAxisUnLoadCommand { get; set; } - public RelayCommand StopAxisUnLoadCommand { get; set; } - public RelayCommand StartAxis1Command { get; set; } - public RelayCommand StopAxis1Command { get; set; } - public RelayCommand StartAxis2Command { get; set; } - public RelayCommand StopAxis2Command { get; set; } + public BPARelayCommand StartAxisLoadCommand { get; set; } + public BPARelayCommand StopAxisLoadCommand { get; set; } + public BPARelayCommand StartAxisMidCommand { get; set; } + public BPARelayCommand StopAxisMidCommand { get; set; } + public BPARelayCommand StartAxisUnLoadCommand { get; set; } + public BPARelayCommand StopAxisUnLoadCommand { get; set; } + public BPARelayCommand StartAxis1Command { get; set; } + public BPARelayCommand StopAxis1Command { get; set; } + public BPARelayCommand StartAxis2Command { get; set; } + public BPARelayCommand StopAxis2Command { get; set; } - public RelayCommand SystemStartCommand { get; set; } - public RelayCommand SystemStopCommand { get; set; } - public RelayCommand SystemPauseCommand { get; set; } + public BPARelayCommand SystemStartCommand { get; set; } + public BPARelayCommand SystemStopCommand { get; set; } + public BPARelayCommand SystemPauseCommand { get; set; } - public RelayCommand SystemResetCommand { get; set; } + public BPARelayCommand SystemResetCommand { get; set; } - public RelayCommand AutoMode { get; set; } - public RelayCommand DebugMode { get; set; } + public BPARelayCommand AutoMode { get; set; } + public BPARelayCommand DebugMode { get; set; } /// /// 系统模式改变 diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs index b96d1f8f..7dba9642 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/ManualFlowViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; @@ -26,7 +26,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public ManualFlowViewModel() { time = GVL_SmallStation.GetInstance.Time; - Test1Command = new RelayCommand(() => + Test1Command = new BPARelayCommand(() => { if (DateTime.Now.Subtract(GVL_SmallStation.GetInstance.LatestIssueRecipe).TotalSeconds<=10) { @@ -47,7 +47,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel }); - Test2Command = new RelayCommand(() => + Test2Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX4.0", PlcVarType = PlcVarType.Bool, Value = true }); //Thread.Sleep(200); @@ -60,7 +60,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel VisibilityBtn3 = Visibility.Visible; NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,粉料仓配料完成"); }); - Test3Command = new RelayCommand(() => + Test3Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX10.0", PlcVarType = PlcVarType.Bool, Value = true }); //Thread.Sleep(200); @@ -74,24 +74,24 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,AGV取托盘完成"); }); - Test4Command = new RelayCommand(() => + Test4Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX1.5", PlcVarType = PlcVarType.Bool, Value = true }); //GVL_SmallStation.GetInstance.CylinderReset = true; MessageNotify.GetInstance.ShowUserLog("手动点击按钮,气缸收紧错位复位"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,气缸收紧错位复位"); }); - //Test5Command = new RelayCommand(() => + //Test5Command = new BPARelayCommand(() => //{ // GVL_SmallStation.GetInstance.WindSendAllowAGVPutGet = true; // MessageNotify.GetInstance.ShowUserLog("手动点击按钮,粉料仓提升到位"); //}); - Test6Command = new RelayCommand(() => + Test6Command = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AGVPutTrayFinish"); MessageNotify.GetInstance.ShowUserLog("手动点击按钮,AGV放货架流程完成"); }); - CLearRecipeInfo = new RelayCommand(() => + CLearRecipeInfo = new BPARelayCommand(() => { App.Current.Dispatcher.Invoke(() => { @@ -102,7 +102,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); }); - SystemReset = new RelayCommand(() => + SystemReset = new BPARelayCommand(() => { App.Current.Dispatcher.Invoke(() => { @@ -113,7 +113,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); }); - BPAResetCommand = new RelayCommand(() => + BPAResetCommand = new BPARelayCommand(() => { App.Current.Dispatcher.Invoke(() => { @@ -124,7 +124,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); }); - StockbinDosingComple = new RelayCommand(() => + StockbinDosingComple = new BPARelayCommand(() => { int loc = StockbinDosingCompleNum; if (loc >= 1 && loc <= 8) @@ -147,7 +147,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,手动设置料仓{loc}配料,料仓编号不正确"); } }); - StockbinDosingCompleClear = new RelayCommand(() => + StockbinDosingCompleClear = new BPARelayCommand(() => { //for (int i = 0; i < GVL_SmallStation.GetInstance.StockInDosingComple.Length; i++) //{ @@ -156,7 +156,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel //MessageNotify.GetInstance.ShowUserLog($"手动点击按钮,清除所有手动配料完成信号"); //NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"清除所有手动配料完成信号"); }); - CancelRecipeCommand = new RelayCommand(() => + CancelRecipeCommand = new BPARelayCommand(() => { string cancelRecipeCode = CancelRecipeCode.Trim(); if (!String.IsNullOrEmpty(cancelRecipeCode) && MessageNotify.GetInstance.ShowDialog($"请确认,是否进行删除订单【{cancelRecipeCode}】操作?")) @@ -178,7 +178,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - CompletedNumResetCommand = new RelayCommand(() => + CompletedNumResetCommand = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认,是否将配方完成数目清零?", DialogType.Warning)) { @@ -295,7 +295,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } Thread.Sleep(100); }), "流程手动设备状态读取", true); - TimeSet = new RelayCommand(() => + TimeSet = new BPARelayCommand(() => { GVL_SmallStation.GetInstance.Time = time; MessageNotify.GetInstance.ShowUserLog($"设置柔性味魔方复位时间:{time}s"); @@ -305,14 +305,14 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel HKPlcIsConnect = ProcessControl.GetInstance.HKDevice.IsConnected; WindSendIsConnect = ProcessControl.GetInstance.WindSendDevice.IsConnected; } - public RelayCommand Test1Command { get; set; } - public RelayCommand Test2Command { get; set; } - public RelayCommand Test3Command { get; set; } - public RelayCommand Test4Command { get; set; } - public RelayCommand Test5Command { get; set; } - public RelayCommand Test6Command { get; set; } - public RelayCommand TimeSet { get; set; } - public RelayCommand CompletedNumResetCommand { get; set; } + public BPARelayCommand Test1Command { get; set; } + public BPARelayCommand Test2Command { get; set; } + public BPARelayCommand Test3Command { get; set; } + public BPARelayCommand Test4Command { get; set; } + public BPARelayCommand Test5Command { get; set; } + public BPARelayCommand Test6Command { get; set; } + public BPARelayCommand TimeSet { get; set; } + public BPARelayCommand CompletedNumResetCommand { get; set; } public static bool Heartbeat { get { return _mHeartbeat; } set { _mHeartbeat = value; OnStaticPropertyChanged(); } } private static bool _mHeartbeat; @@ -337,9 +337,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel { StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); } - public RelayCommand CLearRecipeInfo { get; set; } - public RelayCommand SystemReset { get; set; } - public RelayCommand BPAResetCommand { get; set; } + public BPARelayCommand CLearRecipeInfo { get; set; } + public BPARelayCommand SystemReset { get; set; } + public BPARelayCommand BPAResetCommand { get; set; } private bool _SiemensIsConnect { get; set; } public bool SiemensIsConnect { get { return _SiemensIsConnect; } set { _SiemensIsConnect = value; OnPropertyChanged(); } } private bool _HKPlcIsConnect { get; set; } @@ -362,9 +362,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public static string Recipe5DosingComplete { get { return _Recipe5DosingComplete; } set { _Recipe5DosingComplete = value; OnStaticPropertyChanged(); } } - public RelayCommand StockbinDosingComple { get; set; } - public RelayCommand StockbinDosingCompleClear { get; set; } - public RelayCommand CancelRecipeCommand { get; set; } + public BPARelayCommand StockbinDosingComple { get; set; } + public BPARelayCommand StockbinDosingCompleClear { get; set; } + public BPARelayCommand CancelRecipeCommand { get; set; } private static int _StockbinDosingCompleNum { get; set; } public static int StockbinDosingCompleNum { get { return _StockbinDosingCompleNum; } set { _StockbinDosingCompleNum = value; OnStaticPropertyChanged(); } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs index 592b9906..8a67378d 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewLocalRecipeViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; @@ -74,14 +74,14 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel }), "LocalRecipeEdit", true); - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { var res = AllRawMaterial.FirstOrDefault(p => p.RawMaterialName == o.ToString()); if (res != null) AllRawMaterial.Remove(res); //NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); }); - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { int MaxRawMaterial = 15; var res = AllRawMaterial.Where(p => p.RawMaterialType == "小料").ToList(); @@ -102,7 +102,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - AddFLCommand = new RelayCommand(() => + AddFLCommand = new BPARelayCommand(() => { int MaxRawMaterial = 5; var res = AllRawMaterial.Where(p => p.RawMaterialType == "粉料").ToList(); @@ -122,7 +122,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"粉料最多添加{MaxRawMaterial}种"); } }); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { if (!MessageNotify.GetInstance.ShowDialog("请确认,是否保存该配方配置?")) { @@ -264,11 +264,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand AddCommand { get; set; } - public RelayCommand AddFLCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } + public BPARelayCommand AddFLCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewMaterialViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewMaterialViewModel.cs index 06886da4..eaf0d5a8 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewMaterialViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewMaterialViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -23,9 +23,9 @@ public class NewMaterialViewModel:NotifyBase public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } private string _mErrorInfo; - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } @@ -43,9 +43,9 @@ public class NewMaterialViewModel:NotifyBase public NewMaterialViewModel() { - RemoveCommand = new RelayCommand(Remove); + RemoveCommand = new BPARelayCommand(Remove); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { if(MaterialName == String.Empty) { ErrorInfo = "原料名称不能为空";return; } if(Global.DeviceRawMaterials.FirstOrDefault(p=>p.RawMaterialName == MaterialName) != null) { ErrorInfo = "设备中已存在该原料名称";return;} diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewRecipeViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewRecipeViewModel.cs index 1a01deba..d4fe7204 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/NewRecipeViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/NewRecipeViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.Model; @@ -34,7 +34,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }), "Details"); - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { p: string guid = Guid.NewGuid().ToString(); @@ -49,7 +49,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel else goto p; }); - RemoveCommand = new RelayCommand((obj) => + RemoveCommand = new BPARelayCommand((obj) => { if (obj is string rm) { @@ -62,7 +62,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { ErrorInfo = String.Empty; if (RecipeName == String.Empty) { ErrorInfo = "配方名称未填写"; return; } @@ -180,11 +180,11 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } private string _mErrorInfo; - public RelayCommand AddCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } - public RelayCommand SaveCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } public ObservableCollection RawMaterials { get; set; } = new ObservableCollection(); diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs index e2b4ddb7..4844459a 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeControlViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodSmallStation.Model; using System.Threading; @@ -25,7 +25,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public RecipeControlViewModel() { - StartCommand = new RelayCommand((o) => + StartCommand = new BPARelayCommand((o) => { if (o != null && o is string deviceName) { @@ -46,7 +46,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - ChangeRecipeStateCommand = new RelayCommand(ChangeRecipeState); + ChangeRecipeStateCommand = new BPARelayCommand(ChangeRecipeState); @@ -166,9 +166,9 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } - public RelayCommand StartCommand { get; set; } + public BPARelayCommand StartCommand { get; set; } - public RelayCommand ChangeRecipeStateCommand { get; set; } + public BPARelayCommand ChangeRecipeStateCommand { get; set; } public static ObservableCollection Recipes { get; set; } = Json.Data.Recipes; diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs index 77f466a7..60396b28 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeInfosViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.CustomResource.Pages.Model; @@ -70,7 +70,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }), "RecipeInfo"); - ReturnPage = new RelayCommand(() => + ReturnPage = new BPARelayCommand(() => { ActionManage.GetInstance.Send("CloseRecipeInfosView"); }); @@ -85,7 +85,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public int TrayCode { get { return _mTrayCode; } set { _mTrayCode = value; OnPropertyChanged(); } } private int _mTrayCode; - public RelayCommand ReturnPage { get; set; } + public BPARelayCommand ReturnPage { get; set; } public ObservableCollection RawMaterialsInfo { get; set; } = new ObservableCollection(); } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs index cd77611d..fae6079f 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeReceiveViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.JXJFoodSmallStation.View; @@ -33,12 +33,12 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel IsUseWindSendDosing = GVL_SmallStation.GetInstance.IsUseWindSend; Recipes = Json.Data.Recipes; - NewRecipe = new RelayCommand(() => + NewRecipe = new BPARelayCommand(() => { NewLocalRecipeView NewLocalRecipe = new NewLocalRecipeView(); NewLocalRecipe.ShowDialog(); }); - RemoveRecipe = new RelayCommand((o) => + RemoveRecipe = new BPARelayCommand((o) => { if (o != null && o is string cnt) { @@ -53,7 +53,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } } }); - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (o != null && o is string cnt) { @@ -71,7 +71,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } } }); - IssueRecipe = new RelayCommand((o) => + IssueRecipe = new BPARelayCommand((o) => { if (IsUseLocalRecipe == false) { @@ -102,7 +102,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } } }); - NewSimulateRecipe = new RelayCommand(() => + NewSimulateRecipe = new BPARelayCommand(() => { ObservableCollection RawMaterials = new ObservableCollection(); string recipeName = "配方" + (Json.Data.Recipes.Count + 1) + ""; @@ -159,7 +159,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - ClearAllRecipe = new RelayCommand(() => + ClearAllRecipe = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog("请确认,是否清除所有本地配方?", DialogType.Warning)) { @@ -172,7 +172,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel SelectedRecipes = Json.Data.SelectedRecipes; - SelectRecipesCommand = new RelayCommand(() => + SelectRecipesCommand = new BPARelayCommand(() => { var selectView = new SelectRecipesView(); selectView.ShowDialog(); @@ -205,13 +205,13 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel /// public static ObservableCollection SelectedRecipes { get; set; } - public RelayCommand DetailsCommand { get; set; } - public RelayCommand IssueRecipe { get; set; } - public RelayCommand RemoveRecipe { get; set; } - public RelayCommand NewSimulateRecipe { get; set; } - public RelayCommand ClearAllRecipe { get; set; } - public RelayCommand NewRecipe { get; set; } - public RelayCommand SelectRecipesCommand { get; set; } + public BPARelayCommand DetailsCommand { get; set; } + public BPARelayCommand IssueRecipe { get; set; } + public BPARelayCommand RemoveRecipe { get; set; } + public BPARelayCommand NewSimulateRecipe { get; set; } + public BPARelayCommand ClearAllRecipe { get; set; } + public BPARelayCommand NewRecipe { get; set; } + public BPARelayCommand SelectRecipesCommand { get; set; } public ObservableCollection Recipes { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeSettingsViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeSettingsViewModel.cs index 60501378..d4a303c3 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeSettingsViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RecipeSettingsViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.JXJFoodSmallStation.View; @@ -27,24 +27,24 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel { Recipes = Json.Data.Recipes; - NewMaterital = new RelayCommand(() => + NewMaterital = new BPARelayCommand(() => { NewMaterialView newMateritalView = new NewMaterialView(); newMateritalView.ShowDialog(); }); - NewRecipe = new RelayCommand(() => + NewRecipe = new BPARelayCommand(() => { NewRecipeView nrv = new NewRecipeView(); nrv.ShowDialog(); MessageNotify.GetInstance.ShowUserLog("新建配方"); }); - SaveRecipe = new RelayCommand(() => + SaveRecipe = new BPARelayCommand(() => { Json.Save(); MessageNotify.GetInstance.ShowUserLog("保存配方"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); }); - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (o is string str) { @@ -54,7 +54,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (o != null && o is string str) { @@ -69,17 +69,17 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } - public RelayCommand NewMaterital { get; set; } + public BPARelayCommand NewMaterital { get; set; } - public RelayCommand NewRecipe { get; set; } + public BPARelayCommand NewRecipe { get; set; } - public RelayCommand SaveRecipe { get; set; } + public BPARelayCommand SaveRecipe { get; set; } - public RelayCommand EditCommand { get; set; } + public BPARelayCommand EditCommand { get; set; } - public RelayCommand DetailsCommand { get; set; } + public BPARelayCommand DetailsCommand { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } public ObservableCollection Recipes { get; set; } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs index 03cddb29..fdad0ae3 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/RobotViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; @@ -41,61 +41,61 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel Thread.Sleep(10); },"机器人状态",true); - SystemStart = new RelayCommand(() => { + SystemStart = new BPARelayCommand(() => { ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX0.1"); MessageNotify.GetInstance.ShowUserLog($"手动控制,机器人启动"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"机器人启动,操作完成!"); }); - SystemStop = new RelayCommand(() => { + SystemStop = new BPARelayCommand(() => { ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX0.2"); MessageNotify.GetInstance.ShowUserLog($"手动控制,机器人停止"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"机器人停止,操作完成!"); }); - EStopReset = new RelayCommand(() => { + EStopReset = new BPARelayCommand(() => { ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX0.3"); MessageNotify.GetInstance.ShowUserLog($"手动控制,机器人急停复位"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"机器人急停复位,操作完成!"); }); - //TestRobotRun = new RelayCommand(() => { + //TestRobotRun = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX100.4"); //}); - //AutoMode = new RelayCommand(() => { + //AutoMode = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("RobotSendFalseCommand", "DB4.DBX100.3"); //}); - //TestMode = new RelayCommand(() => { + //TestMode = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX100.3"); //}); - //RobotGetEmptyBarrel = new RelayCommand(() => { + //RobotGetEmptyBarrel = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX100.7"); //}); - //RobotPutEmptyBarrel = new RelayCommand(() => { + //RobotPutEmptyBarrel = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX101.0"); //}); - //RobotGetFullBarrel = new RelayCommand(() => { + //RobotGetFullBarrel = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX101.1"); //}); - //RobotPutFullBarrel = new RelayCommand(() => { + //RobotPutFullBarrel = new BPARelayCommand(() => { // ActionManage.GetInstance.Send("RobotSendTrueCommand", "DB4.DBX101.2"); //}); - //SetProgramNumCommand = new RelayCommand(() =>{ + //SetProgramNumCommand = new BPARelayCommand(() =>{ // ActionManage.GetInstance.Send("RobotSetProgramNum", SetProgramNum); //}); } - public RelayCommand SystemStart { get; set; } - public RelayCommand SystemStop { get; set; } - public RelayCommand EStopReset { get; set; } + public BPARelayCommand SystemStart { get; set; } + public BPARelayCommand SystemStop { get; set; } + public BPARelayCommand EStopReset { get; set; } - public RelayCommand TestRobotRun { get; set; } - public RelayCommand AutoMode { get; set; } - public RelayCommand TestMode { get; set; } + public BPARelayCommand TestRobotRun { get; set; } + public BPARelayCommand AutoMode { get; set; } + public BPARelayCommand TestMode { get; set; } - public RelayCommand RobotGetEmptyBarrel { get; set; } - public RelayCommand RobotPutEmptyBarrel { get; set; } - public RelayCommand RobotGetFullBarrel { get; set; } - public RelayCommand RobotPutFullBarrel { get; set; } - public RelayCommand SetProgramNumCommand { get; set; } + public BPARelayCommand RobotGetEmptyBarrel { get; set; } + public BPARelayCommand RobotPutEmptyBarrel { get; set; } + public BPARelayCommand RobotGetFullBarrel { get; set; } + public BPARelayCommand RobotPutFullBarrel { get; set; } + public BPARelayCommand SetProgramNumCommand { get; set; } public static short IsRunProgramNum { get { return _runProgramNum; } set { _runProgramNum = value; OnStaticPropertyChanged(); } } private static short _runProgramNum; diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/SelectRecipesViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/SelectRecipesViewModel.cs index 99f743a3..59f04a78 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/SelectRecipesViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/SelectRecipesViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.JXJFoodSmallStation.Model.Siemens; using BPA.Helper; @@ -84,19 +84,19 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel /// /// 取消筛选,即关闭本窗口。 /// - public RelayCommand CancelCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } /// /// 全选。 /// - public RelayCommand AllSelectCommand { get; set; } + public BPARelayCommand AllSelectCommand { get; set; } /// /// 全部取消选择。 /// - public RelayCommand AllCancelCommand { get; set; } + public BPARelayCommand AllCancelCommand { get; set; } /// /// 确认选择。 /// - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } internal class RecipeDataWithCheck:NotifyBase diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/SiemensRecipeReceiveViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/SiemensRecipeReceiveViewModel.cs index e5abb37f..4baa8748 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/SiemensRecipeReceiveViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/SiemensRecipeReceiveViewModel.cs @@ -7,7 +7,7 @@ using BPA.Helper; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.JXJFoodSmallStation.View; @@ -28,7 +28,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public SiemensRecipeReceiveViewModel() { Recipes = Json.Data.Recipes; - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (o != null && o is string cnt) { @@ -44,7 +44,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } } }); - ClearAllRecipe = new RelayCommand(() => + ClearAllRecipe = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog($"请确认,是否删除所有配方订单?")) { @@ -53,8 +53,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } }); } - public RelayCommand DetailsCommand { get; set; } - public RelayCommand ClearAllRecipe { get; set; } + public BPARelayCommand DetailsCommand { get; set; } + public BPARelayCommand ClearAllRecipe { get; set; } public ObservableCollection Recipes { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/StockBinRawMaterialViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/StockBinRawMaterialViewModel.cs index 4b82a449..33c3a0e2 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/StockBinRawMaterialViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/StockBinRawMaterialViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.JXJFoodSmallStation.Model.RawMaterial; using BPA.Helper; @@ -23,7 +23,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel public StockBinRawMaterialViewModel() { RawMaterialInfo = Json.Data.rawMaterialStockBin; - RemoveCommand = new RelayCommand((loc) => + RemoveCommand = new BPARelayCommand((loc) => { if (loc is int pos) { @@ -32,7 +32,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel MessageNotify.GetInstance.ShowUserLog($"删除一条料仓物料配置信息,原料料仓位置:【{res.RawMaterialLocation}】,原料编号:【{res.RawMaterialName}】"); } }); - SaveRawMaterialPara = new RelayCommand(() => + SaveRawMaterialPara = new BPARelayCommand(() => { Json.Save(); ProcessControl.GetInstance.StockBinNameWithPos(); @@ -43,15 +43,15 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel MessageNotify.GetInstance.ShowUserLog($"原料与料仓对应关系保存成功"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); }); - UpdateRawMaterial = new RelayCommand(() => + UpdateRawMaterial = new BPARelayCommand(() => { RawMaterialInfo.Add(new RawMaterialStockBin() { RawMaterialCount = (short)(RawMaterialInfo.Count + 1)}); MessageNotify.GetInstance.ShowUserLog($"新增一条料仓物料配置信息。"); }); } public ObservableCollection RawMaterialInfo { get; set; } = new ObservableCollection(); - public RelayCommand RemoveCommand { get; set; } - public RelayCommand SaveRawMaterialPara { get; set; } - public RelayCommand UpdateRawMaterial { get; set; } + public BPARelayCommand RemoveCommand { get; set; } + public BPARelayCommand SaveRawMaterialPara { get; set; } + public BPARelayCommand UpdateRawMaterial { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs index 93f9a1ec..e278e2d4 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/SystemParViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; @@ -33,7 +33,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel AxisMidSpeed = Json.Data.deviceConnectPar.AxisMidSpeed; Axis1Speed = Json.Data.deviceConnectPar.Axis1Speed; Axis2Speed = Json.Data.deviceConnectPar.Axis2Speed; - SaveCommand = new RelayCommand(() => + SaveCommand = new BPARelayCommand(() => { Json.Data.deviceConnectPar.SiemensConnect = SiemensConnect; Json.Data.deviceConnectPar.WindSendConnect = WindSendConnect; @@ -50,7 +50,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统设置参数保存成功!"); MessageNotify.GetInstance.ShowUserLog("保存系统设置参数。"); }); - SetParCommand = new RelayCommand(() => + SetParCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB47.DBD0", PlcVarType = PlcVarType.Real, Value = Axis1Speed }); ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB47.DBD4", PlcVarType = PlcVarType.Real, Value = Axis2Speed }); @@ -89,8 +89,8 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel private float _mAxis1Speed; public float Axis2Speed { get { return _mAxis2Speed; } set { _mAxis2Speed = value; OnPropertyChanged(); } } private float _mAxis2Speed; - public RelayCommand SaveCommand { get; set; } - public RelayCommand SetParCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } + public BPARelayCommand SetParCommand { get; set; } } } diff --git a/BPASmartClient.JXJFoodSmallStation/ViewModel/WindSendParViewModel.cs b/BPASmartClient.JXJFoodSmallStation/ViewModel/WindSendParViewModel.cs index 443ea3de..b4e87868 100644 --- a/BPASmartClient.JXJFoodSmallStation/ViewModel/WindSendParViewModel.cs +++ b/BPASmartClient.JXJFoodSmallStation/ViewModel/WindSendParViewModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; @@ -32,7 +32,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel }); } } - SaveRawMaterialPara = new RelayCommand(() => + SaveRawMaterialPara = new BPARelayCommand(() => { Json.Save(); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"风送料仓原料信息参数保存成功!"); @@ -41,7 +41,7 @@ namespace BPASmartClient.JXJFoodSmallStation.ViewModel } public ObservableCollection WindSendRawMaterial => Json.Data.windSendRawMaterial; - public RelayCommand SaveRawMaterialPara { get; set; } + public BPARelayCommand SaveRawMaterialPara { get; set; } } } diff --git a/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj b/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj index 41709dc2..5ab54de7 100644 --- a/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj +++ b/BPASmartClient.JakaRobot/BPASmartClient.JakaRobot.csproj @@ -7,7 +7,7 @@ - + diff --git a/BPASmartClient.Juicer/JuicerMachine.cs b/BPASmartClient.Juicer/JuicerMachine.cs index 2a834412..610dd621 100644 --- a/BPASmartClient.Juicer/JuicerMachine.cs +++ b/BPASmartClient.Juicer/JuicerMachine.cs @@ -1,9 +1,9 @@ -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.Peripheral; using BPASmartClient.SerialPort; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.Juicer { diff --git a/BPASmartClient.KHKJ/KHKJMachine.cs b/BPASmartClient.KHKJ/KHKJMachine.cs index b940c7ed..1defebb6 100644 --- a/BPASmartClient.KHKJ/KHKJMachine.cs +++ b/BPASmartClient.KHKJ/KHKJMachine.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.SerialPort; using System; diff --git a/BPASmartClient.KLMCoffee/CoffeeMachine.cs b/BPASmartClient.KLMCoffee/CoffeeMachine.cs index b459392b..99cf8a7d 100644 --- a/BPASmartClient.KLMCoffee/CoffeeMachine.cs +++ b/BPASmartClient.KLMCoffee/CoffeeMachine.cs @@ -1,5 +1,5 @@ -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.KLMCoffee.Protocal; using BPASmartClient.Message; using BPASmartClient.Model; @@ -12,7 +12,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.KLMCoffee { diff --git a/BPASmartClient.Lebai/LebaiRobot.cs b/BPASmartClient.Lebai/LebaiRobot.cs index 1eb73718..75e93903 100644 --- a/BPASmartClient.Lebai/LebaiRobot.cs +++ b/BPASmartClient.Lebai/LebaiRobot.cs @@ -8,11 +8,11 @@ using Lebai.SDK; using Lebai.SDK.Dtos; using Robotc; using BPASmartClient.Message; -using BPASmartClient.Helper; +using BPA.Helper; using TaskStatus = Lebai.SDK.Dtos.TaskStatus; using BPASmartClient.Peripheral; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + using BPASmartClient.Model; using BPASmartClient.LebaiRobot; using BPASmartClient.Model.乐白机器人; diff --git a/BPASmartClient.LebaiRobot/LebaiHelper.cs b/BPASmartClient.LebaiRobot/LebaiHelper.cs index 9acf7a53..95e100ca 100644 --- a/BPASmartClient.LebaiRobot/LebaiHelper.cs +++ b/BPASmartClient.LebaiRobot/LebaiHelper.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using Lebai.SDK; diff --git a/BPASmartClient.MCU/MCUMachine.cs b/BPASmartClient.MCU/MCUMachine.cs index 8568ad1a..538d9eca 100644 --- a/BPASmartClient.MCU/MCUMachine.cs +++ b/BPASmartClient.MCU/MCUMachine.cs @@ -1,9 +1,9 @@ -using BPASmartClient.EventBus; + using BPASmartClient.Model.PLC; using BPASmartClient.Model.单片机; using BPASmartClient.Peripheral; using BPASmartClient.SerialPort; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.MCU { diff --git a/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs b/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs index 91c238c1..1a9a4ec2 100644 --- a/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs +++ b/BPASmartClient.MORKSM.BK.PLC/PLCMachine.cs @@ -1,9 +1,9 @@ using BPASmartClient.Peripheral; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; -using BPASmartClient.EventBus; + using BPASmartClient.Modbus; -using static BPASmartClient.EventBus.EventBus; + using BPASmartClient.Model; using BPASmartClient.Model.PLC; diff --git a/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs b/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs index b85c0a94..bad4f9a2 100644 --- a/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs +++ b/BPASmartClient.MilkTeaCube/MilkTeaCubeMachine.cs @@ -1,11 +1,11 @@ using BPASmartClient.Peripheral; using System; using BPASmartClient.Modbus; -using BPASmartClient.Helper; +using BPA.Helper; using System.Threading; using BPASmartClient.Model.̲ζħ; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + namespace BPASmartClient.MilkTeaCube { diff --git a/BPASmartClient.MilkWithTea/App.xaml.cs b/BPASmartClient.MilkWithTea/App.xaml.cs index aba6737f..70f3caea 100644 --- a/BPASmartClient.MilkWithTea/App.xaml.cs +++ b/BPASmartClient.MilkWithTea/App.xaml.cs @@ -1,8 +1,8 @@ global using BPA.Message; global using BPA.Message.Enum; global using BPASmartClient.Device; -global using BPASmartClient.EventBus; -global using BPASmartClient.Helper; +global +global using BPA.Helper; global using BPASmartClient.MilkWithTea.Model; global using BPASmartClient.Model; global using BPASmartClient.MorkMOC; diff --git a/BPASmartClient.MilkWithTea/BPASmartClient.MilkWithTea.csproj b/BPASmartClient.MilkWithTea/BPASmartClient.MilkWithTea.csproj index a835fc5a..afddd6ea 100644 --- a/BPASmartClient.MilkWithTea/BPASmartClient.MilkWithTea.csproj +++ b/BPASmartClient.MilkWithTea/BPASmartClient.MilkWithTea.csproj @@ -23,10 +23,6 @@ - - - - diff --git a/BPASmartClient.MilkWithTea/MainWindow.xaml.cs b/BPASmartClient.MilkWithTea/MainWindow.xaml.cs index 9ee91d82..e6e093f2 100644 --- a/BPASmartClient.MilkWithTea/MainWindow.xaml.cs +++ b/BPASmartClient.MilkWithTea/MainWindow.xaml.cs @@ -2,7 +2,7 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.Device; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT; using BPASmartClient.Message; using BPASmartClient.Peripheral; diff --git a/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs b/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs index 683ce434..d4f5f90f 100644 --- a/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs +++ b/BPASmartClient.MilkWithTea/ViewModel/LocalConfigureViewModel.cs @@ -24,7 +24,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel /// /// 删除配方奶茶 /// - [RelayCommand] + [BPARelayCommand] private void DeleteRecipe(object o) { if (o == null) return; @@ -52,7 +52,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel /// /// 更新物料位置 /// - [RelayCommand] + [BPARelayCommand] private void UpdateMaterialPosion() { Json.Save(); diff --git a/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs b/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs index 11ea80af..2d503e0c 100644 --- a/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs +++ b/BPASmartClient.MilkWithTea/ViewModel/MainControlViewModel.cs @@ -1,6 +1,6 @@  global using CommunityToolkit.Mvvm.Input; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; namespace BPASmartClient.MilkWithTea.ViewModel @@ -50,7 +50,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel /// /// 本地奶茶制作 /// - [RelayCommand] + [BPARelayCommand] private void MakeGood() { if(SelectedRecipe == null) return; diff --git a/BPASmartClient.MilkWithTea/ViewModel/MainWindowVeiwModel.cs b/BPASmartClient.MilkWithTea/ViewModel/MainWindowVeiwModel.cs index 7e0d5bf3..8c470c17 100644 --- a/BPASmartClient.MilkWithTea/ViewModel/MainWindowVeiwModel.cs +++ b/BPASmartClient.MilkWithTea/ViewModel/MainWindowVeiwModel.cs @@ -1,5 +1,5 @@ global using BPA.Helper; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using System; using System.Collections.Generic; diff --git a/BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs b/BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs index ed8b0b73..ec2d7c33 100644 --- a/BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs +++ b/BPASmartClient.MilkWithTea/ViewModel/PatrameterSettiongViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using CommunityToolkit.Mvvm.Input; @@ -56,7 +56,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel /// /// 出料动作 /// - [RelayCommand] + [BPARelayCommand] private void OutMaterial() { ActionManage.GetInstance.Send("通道口出料", new object[] { MaterialID, OutMaterilWeight }); @@ -64,7 +64,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel /// /// 开始矫正 /// - [RelayCommand] + [BPARelayCommand] private void CheckPassway() { @@ -72,7 +72,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel /// /// 开启通道 /// - [RelayCommand] + [BPARelayCommand] private void OpenPassway() { @@ -80,7 +80,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel /// /// 确认重量 /// - [RelayCommand] + [BPARelayCommand] private void CheckMaterailWeight() { @@ -123,12 +123,12 @@ namespace BPASmartClient.MilkWithTea.ViewModel [ObservableProperty] private string _prot; - [RelayCommand] + [BPARelayCommand] private void SaveDevices() { SaveDeviceMessage(); } - [RelayCommand] + [BPARelayCommand] private void ChangeCommunation() { if(IsPort) diff --git a/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs b/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs index 7fa3f636..87f67d3c 100644 --- a/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs +++ b/BPASmartClient.MilkWithTea/ViewModel/RecipeConfigeViewModel.cs @@ -17,12 +17,12 @@ namespace BPASmartClient.MilkWithTea.ViewModel private string _name = String.Empty; - [RelayCommand] + [BPARelayCommand] private void AddMaterial() { Materails.Add(new LocalMaterail()); } - [RelayCommand] + [BPARelayCommand] private void Delete(object o) { if (o == null) return; @@ -31,7 +31,7 @@ namespace BPASmartClient.MilkWithTea.ViewModel Materails.Remove((LocalMaterail)id.DataContext); } } - [RelayCommand] + [BPARelayCommand] private void Save() { if(Name == String.Empty) diff --git a/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj b/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj index 00c35b6d..33e9f8cd 100644 --- a/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj +++ b/BPASmartClient.Modbus/BPASmartClient.Modbus.csproj @@ -5,7 +5,7 @@ - + diff --git a/BPASmartClient.Model/BPASmartClient.Model.csproj b/BPASmartClient.Model/BPASmartClient.Model.csproj index e4c9f72f..1e11df1c 100644 --- a/BPASmartClient.Model/BPASmartClient.Model.csproj +++ b/BPASmartClient.Model/BPASmartClient.Model.csproj @@ -13,7 +13,7 @@ - + diff --git a/BPASmartClient.MorkBF/BPASmartClient.MorkBF.csproj b/BPASmartClient.MorkBF/BPASmartClient.MorkBF.csproj index 163b8885..e9a14f01 100644 --- a/BPASmartClient.MorkBF/BPASmartClient.MorkBF.csproj +++ b/BPASmartClient.MorkBF/BPASmartClient.MorkBF.csproj @@ -6,10 +6,6 @@ true - - - - diff --git a/BPASmartClient.MorkBF/Control_MorkBF.cs b/BPASmartClient.MorkBF/Control_MorkBF.cs index a87d88f7..7f3f5161 100644 --- a/BPASmartClient.MorkBF/Control_MorkBF.cs +++ b/BPASmartClient.MorkBF/Control_MorkBF.cs @@ -2,8 +2,8 @@ using BPA.Message.Enum; using BPASmartClient.Business; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPASmartClient.Model.大炒; @@ -16,7 +16,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + using static BPASmartClient.Model.大炒.FryPotMessages; namespace BPASmartClient.MorkBF diff --git a/BPASmartClient.MorkBF/VIew/FoodManagerView.xaml.cs b/BPASmartClient.MorkBF/VIew/FoodManagerView.xaml.cs index 8f154beb..79b66e91 100644 --- a/BPASmartClient.MorkBF/VIew/FoodManagerView.xaml.cs +++ b/BPASmartClient.MorkBF/VIew/FoodManagerView.xaml.cs @@ -1,5 +1,5 @@  -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs index c012014a..f144976c 100644 --- a/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkBF/ViewModel/DebugViewModel.cs @@ -6,7 +6,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.大炒; using BPASmartClient.MorkBF.Model; using BPASmartClient.MorkBF.VIew; @@ -64,7 +64,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 设定加热挡位 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_SetFireGear(object o) { if(o == null) return; @@ -86,7 +86,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 加热启动 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StartFire(object o) { if (o == null) return; @@ -99,7 +99,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 关闭加热 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StopFire(object o) { if (o == null) return; @@ -112,7 +112,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 设定搅拌挡位 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_SetStirGear(object o) { if (o == null) return; @@ -133,7 +133,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 搅拌启动 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StartStir(object o) { @@ -146,7 +146,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 搅拌停止 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StopStir(object o) { @@ -159,7 +159,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 翻转频率设定 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_SetTurnSpeed(object o) { if (o == null) return; @@ -181,7 +181,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 设定炒锅角度 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_SetPotAngle(object o) { if (o == null) return; @@ -203,7 +203,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 通道出料启动 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StartPassWay(object o) { if (o == null) return; @@ -228,7 +228,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 复位 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_Reset(object o) { //ActionManage.GetInstance.Send("FirePot1_Reset", o); @@ -236,7 +236,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 炒锅回原点 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_PotGotoOrigin(object o) { ActionManage.GetInstance.Send("FirePot_PotGotoOrigin", int.Parse(o.ToString())); @@ -245,7 +245,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 炒锅去投料位置 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_PotGotoInFoodPosition(object o) { @@ -254,7 +254,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 出餐启动 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StartOutFood(object o) { ActionManage.GetInstance.Send("FirePot_StartOutFood", int.Parse(o.ToString())); @@ -262,7 +262,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 清洗 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_Clean(object o) { ActionManage.GetInstance.Send("FirePot_Clean", int.Parse(o.ToString())); @@ -270,7 +270,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 抽水启动 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StartPumpWater(object o) { ActionManage.GetInstance.Send("FirePot_StartPumpWater", new object[] { int.Parse(o.ToString()), true }); @@ -278,7 +278,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 抽水关闭 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_StopPumpWater(object o) { ActionManage.GetInstance.Send("FirePot_StopPumpWater", new object[] { int.Parse(o.ToString()), false }); @@ -286,7 +286,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 推杆伸出 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_PushReach(object o) { ActionManage.GetInstance.Send("FirePot_PushReach", int.Parse(o.ToString()) ); @@ -294,7 +294,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 推杆缩回 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_PushRetract(object o) { ActionManage.GetInstance.Send("FirePot_PushRetract", int.Parse(o.ToString())); @@ -302,7 +302,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 翻转正转 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_PotForward(object o) { ActionManage.GetInstance.Send("FirePot_PotForward", int.Parse(o.ToString())); @@ -310,7 +310,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 翻转反转 /// - [RelayCommand] + [BPARelayCommand] private void FirePot_PotReversal(object o) { ActionManage.GetInstance.Send("FirePot_PotReversal", int.Parse(o.ToString()) ); @@ -342,7 +342,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 机器人启动 /// - [RelayCommand] + [BPARelayCommand] private void RobotStart() { ActionManage.GetInstance.Send("RobotStart"); @@ -350,7 +350,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 机器人停止 /// - [RelayCommand] + [BPARelayCommand] private void RobotStop() { ActionManage.GetInstance.Send("RobotStop"); @@ -358,7 +358,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 复位 /// - [RelayCommand] + [BPARelayCommand] private void RobotReset() { ActionManage.GetInstance.Send("RobotReset"); @@ -366,7 +366,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 机器人上使能 /// - [RelayCommand] + [BPARelayCommand] private void RobotEnable() { ActionManage.GetInstance.Send("RobotEnable"); @@ -375,7 +375,7 @@ namespace BPASmartClient.MorkBF.ViewModel /// /// 机器人动作 /// - [RelayCommand] + [BPARelayCommand] private void RobotAction(object o) { if(int.TryParse(o.ToString(), out int value)) diff --git a/BPASmartClient.MorkBF/ViewModel/FoodManagerViewModel.cs b/BPASmartClient.MorkBF/ViewModel/FoodManagerViewModel.cs index 0ad982c7..7571fd55 100644 --- a/BPASmartClient.MorkBF/ViewModel/FoodManagerViewModel.cs +++ b/BPASmartClient.MorkBF/ViewModel/FoodManagerViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.大炒; using BPASmartClient.MorkBF.Model; using System; @@ -28,13 +28,13 @@ namespace BPASmartClient.MorkBF.ViewModel [ObservableProperty] private string _goodName; - [RelayCommand] + [BPARelayCommand] private void Add() { FryPotProcesses.Add(new FryPotProcess() { FryTime = FryPotProcesses.Count + 1 }); } - [RelayCommand] + [BPARelayCommand] private void Save() { if (string.IsNullOrEmpty(GoodName)) return; @@ -64,7 +64,7 @@ namespace BPASmartClient.MorkBF.ViewModel ActionManage.GetInstance.Send("FoodManagerViewClose"); } - [RelayCommand] + [BPARelayCommand] private void Delete(object o) { if (o == null) return; diff --git a/BPASmartClient.MorkBF/ViewModel/MenuViewModel.cs b/BPASmartClient.MorkBF/ViewModel/MenuViewModel.cs index 116af14d..93b2a42a 100644 --- a/BPASmartClient.MorkBF/ViewModel/MenuViewModel.cs +++ b/BPASmartClient.MorkBF/ViewModel/MenuViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.大炒; using BPASmartClient.MorkBF.Model; using BPASmartClient.MorkBF.VIew; @@ -16,7 +16,7 @@ namespace BPASmartClient.MorkBF.ViewModel { public ObservableCollection fryPotMessages { get; set; } = Json.Data.FryPotMessage; - [RelayCommand] + [BPARelayCommand] private void MenuEdit(object o) { if (o == null) return; @@ -28,7 +28,7 @@ namespace BPASmartClient.MorkBF.ViewModel } } - [RelayCommand] + [BPARelayCommand] private void MenuDelete(object o) { if (o == null) return; @@ -38,7 +38,7 @@ namespace BPASmartClient.MorkBF.ViewModel } Json.Save(); } - [RelayCommand] + [BPARelayCommand] private void FryPot1_StartOrder(object o) { if (o == null) return; @@ -49,7 +49,7 @@ namespace BPASmartClient.MorkBF.ViewModel } - [RelayCommand] + [BPARelayCommand] private void FryPot2_StartOrder(object o) { if (o == null) return; diff --git a/BPASmartClient.MorkF/Control_MorkF.cs b/BPASmartClient.MorkF/Control_MorkF.cs index db339e8e..9c345806 100644 --- a/BPASmartClient.MorkF/Control_MorkF.cs +++ b/BPASmartClient.MorkF/Control_MorkF.cs @@ -2,13 +2,13 @@ using System; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPASmartClient.Model.PLC; using BPA.Models; -using static BPASmartClient.EventBus.EventBus; + using BPASmartClient.Model.小炒机; using BPASmartClient.MorkF.Model; using System.Text; diff --git a/BPASmartClient.MorkF/View/DebugView.xaml.cs b/BPASmartClient.MorkF/View/DebugView.xaml.cs index 934be830..23c6482b 100644 --- a/BPASmartClient.MorkF/View/DebugView.xaml.cs +++ b/BPASmartClient.MorkF/View/DebugView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.MorkF.Model; using BPASmartClient.MorkF.ViewModel; using System; diff --git a/BPASmartClient.MorkF/View/LocalMenu.xaml.cs b/BPASmartClient.MorkF/View/LocalMenu.xaml.cs index d3c98d16..ea46c27c 100644 --- a/BPASmartClient.MorkF/View/LocalMenu.xaml.cs +++ b/BPASmartClient.MorkF/View/LocalMenu.xaml.cs @@ -1,5 +1,5 @@ using BPA.Models; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.MorkF.ViewModel; using System; using System.Collections.Generic; diff --git a/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs index c25cb6d5..2a9fcf4c 100644 --- a/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkF/ViewModel/DebugViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.Business; using BPASmartClient.Device; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.MorkF.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -29,13 +29,13 @@ namespace BPASmartClient.MorkF.ViewModel #region 设备控制 public int FoodMenuID { get { return _foodMenuID; } set { _foodMenuID = value; OnPropertyChanged(); } } private int _foodMenuID; - public RelayCommand PlcInite { get; set; } - public RelayCommand FoodPlcInite { get; set; } - public RelayCommand Plc1Reset { get; set; } - public RelayCommand StartOrder { get; set; } + public BPARelayCommand PlcInite { get; set; } + public BPARelayCommand FoodPlcInite { get; set; } + public BPARelayCommand Plc1Reset { get; set; } + public BPARelayCommand StartOrder { get; set; } - public RelayCommand StopLocalOrder { get; set; } - public RelayCommand ModeChange { get; set; } + public BPARelayCommand StopLocalOrder { get; set; } + public BPARelayCommand ModeChange { get; set; } #endregion @@ -87,22 +87,22 @@ namespace BPASmartClient.MorkF.ViewModel public string ModeButten { get { return _ModeButten; } set { _ModeButten = value; OnPropertyChanged(); } } private string _ModeButten = "联网模式"; - public RelayCommand SetNowPosition { get; set; }//设置机械臂当前坐标 - public RelayCommand FoodLibInit { get; set; }//初始化 - public RelayCommand SurplusCheck { get; set; }//初始化 - public RelayCommand StartElectromagnetism { get; set; }//电磁阀启动 - public RelayCommand StopElectromagnetism { get; set; } - public RelayCommand SetSpeed { get; set; }//速度设定 - public RelayCommand GetDistance_1 { get; set; }//感应测距1 - public RelayCommand GetDistance_2 { get; set; }//感应测距2 - public RelayCommand GetDistance_3 { get; set; }//感应测距3 - public RelayCommand PawTurnFront { get; set; }//夹爪正转 - public RelayCommand PawTurnBack { get; set; }//夹爪反转 - public RelayCommand SetArmPosition { get; set; }//机器臂位置设定 - public RelayCommand ArmRun { get; set; }//机械臂运动 - public RelayCommand PawToPoint1 { get; set; }//感应测距1 - public RelayCommand PawToPoint2 { get; set; }//感应测距2 - public RelayCommand PawToPoint3 { get; set; }//感应测距3 + public BPARelayCommand SetNowPosition { get; set; }//设置机械臂当前坐标 + public BPARelayCommand FoodLibInit { get; set; }//初始化 + public BPARelayCommand SurplusCheck { get; set; }//初始化 + public BPARelayCommand StartElectromagnetism { get; set; }//电磁阀启动 + public BPARelayCommand StopElectromagnetism { get; set; } + public BPARelayCommand SetSpeed { get; set; }//速度设定 + public BPARelayCommand GetDistance_1 { get; set; }//感应测距1 + public BPARelayCommand GetDistance_2 { get; set; }//感应测距2 + public BPARelayCommand GetDistance_3 { get; set; }//感应测距3 + public BPARelayCommand PawTurnFront { get; set; }//夹爪正转 + public BPARelayCommand PawTurnBack { get; set; }//夹爪反转 + public BPARelayCommand SetArmPosition { get; set; }//机器臂位置设定 + public BPARelayCommand ArmRun { get; set; }//机械臂运动 + public BPARelayCommand PawToPoint1 { get; set; }//感应测距1 + public BPARelayCommand PawToPoint2 { get; set; }//感应测距2 + public BPARelayCommand PawToPoint3 { get; set; }//感应测距3 #endregion @@ -129,26 +129,26 @@ namespace BPASmartClient.MorkF.ViewModel private int _passagePosition; public int Weight { get { return _weight; } set { _weight = value; OnPropertyChanged(); } } private int _weight; - public RelayCommand OutMaterials { get; set; } + public BPARelayCommand OutMaterials { get; set; } #endregion #region 炒锅1 - public RelayCommand Pot1SimOrder { get; set; } - public RelayCommand AddOil { get; set; } - public RelayCommand StartFire { get; set; } - public RelayCommand StopFire { get; set; } - public RelayCommand StartStir { get; set; } - public RelayCommand StopStir { get; set; } - public RelayCommand MagnetOn { get; set; } - public RelayCommand MagnetOff { get; set; } - public RelayCommand OutFood { get; set; } - public RelayCommand StirArmGoOrigin { get; set; } - public RelayCommand StirArmGoWork { get; set; } - public RelayCommand HBOTGoWork { get; set; } - public RelayCommand OutMeal { get; set; } - public RelayCommand SetFire { get; set; } - public RelayCommand SetFry { get; set; } - public RelayCommand SetStir { get; set; } + public BPARelayCommand Pot1SimOrder { get; set; } + public BPARelayCommand AddOil { get; set; } + public BPARelayCommand StartFire { get; set; } + public BPARelayCommand StopFire { get; set; } + public BPARelayCommand StartStir { get; set; } + public BPARelayCommand StopStir { get; set; } + public BPARelayCommand MagnetOn { get; set; } + public BPARelayCommand MagnetOff { get; set; } + public BPARelayCommand OutFood { get; set; } + public BPARelayCommand StirArmGoOrigin { get; set; } + public BPARelayCommand StirArmGoWork { get; set; } + public BPARelayCommand HBOTGoWork { get; set; } + public BPARelayCommand OutMeal { get; set; } + public BPARelayCommand SetFire { get; set; } + public BPARelayCommand SetFry { get; set; } + public BPARelayCommand SetStir { get; set; } public List lstFire { get; set; } = new List() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; public List lstFry { get; set; } = new List() { 1, 2 }; public List lstStir { get; set; } = new List() { 1, 2, 3 }; @@ -184,29 +184,29 @@ namespace BPASmartClient.MorkF.ViewModel #region 炒锅2 - public RelayCommand SecAddOil { get; set; } - public RelayCommand SecTempTurnOff { get; set; } - public RelayCommand SecOneBlock { get; set; } - public RelayCommand SecTwoBlock { get; set; } - public RelayCommand SecThreeBlock { get; set; } - public RelayCommand SecOverTurnOff { get; set; } - public RelayCommand SecOverOneBlock { get; set; } - public RelayCommand SecOverTwoBlock { get; set; } - public RelayCommand SecOverThreeBlock { get; set; } - public RelayCommand SecOverGoOn { get; set; } - public RelayCommand SecOverGoDown { get; set; } - public RelayCommand SecAutoModel { get; set; } - public RelayCommand SecManualModel { get; set; } + public BPARelayCommand SecAddOil { get; set; } + public BPARelayCommand SecTempTurnOff { get; set; } + public BPARelayCommand SecOneBlock { get; set; } + public BPARelayCommand SecTwoBlock { get; set; } + public BPARelayCommand SecThreeBlock { get; set; } + public BPARelayCommand SecOverTurnOff { get; set; } + public BPARelayCommand SecOverOneBlock { get; set; } + public BPARelayCommand SecOverTwoBlock { get; set; } + public BPARelayCommand SecOverThreeBlock { get; set; } + public BPARelayCommand SecOverGoOn { get; set; } + public BPARelayCommand SecOverGoDown { get; set; } + public BPARelayCommand SecAutoModel { get; set; } + public BPARelayCommand SecManualModel { get; set; } #endregion public DebugViewModel() { #region 设备控制 - PlcInite = new RelayCommand(() => { ActionManage.GetInstance.Send("InitCommand"); }); - Plc1Reset = new RelayCommand(() => { ActionManage.GetInstance.Send("Plc1Reset"); }); - StartOrder = new RelayCommand(() => { ActionManage.GetInstance.Send("StartOrder", FoodMenuID); }); - StopLocalOrder = new RelayCommand(() => { ActionManage.GetInstance.Send("StopLocalOrder"); }); - ModeChange = new RelayCommand(() => { + PlcInite = new BPARelayCommand(() => { ActionManage.GetInstance.Send("InitCommand"); }); + Plc1Reset = new BPARelayCommand(() => { ActionManage.GetInstance.Send("Plc1Reset"); }); + StartOrder = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartOrder", FoodMenuID); }); + StopLocalOrder = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopLocalOrder"); }); + ModeChange = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ModeChange"); if(ModeButten == "联网模式") { @@ -221,25 +221,25 @@ namespace BPASmartClient.MorkF.ViewModel #region 菜品控制 - FoodLibInit = new RelayCommand(() => { ActionManage.GetInstance.Send("FoodLibInit"); });//菜品库初始化 - SurplusCheck = new RelayCommand(() => { ActionManage.GetInstance.Send("SurplusCheck"); });//菜品库初始化 - StartElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { false }); });//电磁阀启动 - StopElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { true });});//电磁阀关闭 - SetSpeed = new RelayCommand(() => + FoodLibInit = new BPARelayCommand(() => { ActionManage.GetInstance.Send("FoodLibInit"); });//菜品库初始化 + SurplusCheck = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SurplusCheck"); });//菜品库初始化 + StartElectromagnetism = new BPARelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { false }); });//电磁阀启动 + StopElectromagnetism = new BPARelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { true });});//电磁阀关闭 + SetSpeed = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetSpeed", new List { MoveSpeed }); });//设定速度 - PawToPoint1 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint1"); });//爪子去1号位 - PawToPoint2 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint2"); });//爪子去2号位 - PawToPoint3 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint3"); });//爪子去3号位 - GetDistance_1 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_1"); });//感应距离1 - GetDistance_2 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_2"); });//感应距离2 - GetDistance_3 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_3"); });//感应距离3 - PawTurnFront = new RelayCommand(() => { ActionManage.GetInstance.Send("PawTurnFront"); });//夹爪正转 - PawTurnBack = new RelayCommand(() => { ActionManage.GetInstance.Send("PawTurnBack"); });//夹爪反转 - SetArmPosition = new RelayCommand(() => { ActionManage.GetInstance.Send("SetArmPosition", new List { SettingX, SettingY }); });//设定机械臂位置 - SetNowPosition = new RelayCommand(() => { ActionManage.GetInstance.Send("SetNowPosition", new List { SettingX, SettingY }); });//设定机械臂当前位置 - ArmRun = new RelayCommand(() => { + PawToPoint1 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint1"); });//爪子去1号位 + PawToPoint2 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint2"); });//爪子去2号位 + PawToPoint3 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint3"); });//爪子去3号位 + GetDistance_1 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_1"); });//感应距离1 + GetDistance_2 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_2"); });//感应距离2 + GetDistance_3 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_3"); });//感应距离3 + PawTurnFront = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawTurnFront"); });//夹爪正转 + PawTurnBack = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawTurnBack"); });//夹爪反转 + SetArmPosition = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetArmPosition", new List { SettingX, SettingY }); });//设定机械臂位置 + SetNowPosition = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetNowPosition", new List { SettingX, SettingY }); });//设定机械臂当前位置 + ArmRun = new BPARelayCommand(() => { //判断是否都未点击 if(!ArmRunDown&&!ArmRunUp&&!ArmRunLeft&&!ArmRunRight) { @@ -274,42 +274,42 @@ namespace BPASmartClient.MorkF.ViewModel #endregion #region 配料仓控制 - OutMaterials = new RelayCommand(() => { ActionManage.GetInstance.Send("OutMaterials" ,new List { PassagePosition + 1,Weight } ); }); + OutMaterials = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OutMaterials" ,new List { PassagePosition + 1,Weight } ); }); #endregion #region 炒锅1 - Pot1SimOrder = new RelayCommand(() => { ActionManage.GetInstance.Send("模拟小炒锅1订单",new List { OilTime,OilFirGear,OilStrGear,Food1Time,Food1FirGear,Food1StrGear,Food2Time,Food2FirGear,Food2StrGear }); });//模拟订单 - AddOil = new RelayCommand(() => { ActionManage.GetInstance.Send("AddOil", 1); });//加油 - StartFire = new RelayCommand(() => { ActionManage.GetInstance.Send("StartFire"); });//加热启动 - StopFire = new RelayCommand(() => { ActionManage.GetInstance.Send("StopFire"); });//加热停止 - StartStir = new RelayCommand(() => { ActionManage.GetInstance.Send("StartStir"); });//搅拌启动 - StopStir = new RelayCommand(() => { ActionManage.GetInstance.Send("StopStir"); });//搅拌停止 - MagnetOn = new RelayCommand(() => { ActionManage.GetInstance.Send("MagnetOn"); });//磁吸开启 - MagnetOff = new RelayCommand(() => { ActionManage.GetInstance.Send("MagnetOff"); });//磁吸开启 - OutFood = new RelayCommand(() => { ActionManage.GetInstance.Send("OutFood"); });//倒菜启动 - StirArmGoOrigin = new RelayCommand(() => { ActionManage.GetInstance.Send("StirArmGoOrigin"); });//搅拌臂去原点位 - StirArmGoWork = new RelayCommand(() => { ActionManage.GetInstance.Send("StirArmGoWork"); });//搅拌臂去炒制位 - HBOTGoWork = new RelayCommand(() => { ActionManage.GetInstance.Send("HBOTGoWork"); });//放盒子到位 - OutMeal = new RelayCommand(() => { ActionManage.GetInstance.Send("OutMeal"); });//出餐启动 - SetFire = new RelayCommand(() => { ActionManage.GetInstance.Send("SetFire", new List { FireGear }); });//加热挡位设定 - SetStir = new RelayCommand(() => { ActionManage.GetInstance.Send("SetStir", new List { StirGear }); });//搅拌挡位设定 - SetFry = new RelayCommand(() => { ActionManage.GetInstance.Send("SetFry", new List { FryGear }); });//炒锅选择 + Pot1SimOrder = new BPARelayCommand(() => { ActionManage.GetInstance.Send("模拟小炒锅1订单",new List { OilTime,OilFirGear,OilStrGear,Food1Time,Food1FirGear,Food1StrGear,Food2Time,Food2FirGear,Food2StrGear }); });//模拟订单 + AddOil = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AddOil", 1); });//加油 + StartFire = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartFire"); });//加热启动 + StopFire = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopFire"); });//加热停止 + StartStir = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StartStir"); });//搅拌启动 + StopStir = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StopStir"); });//搅拌停止 + MagnetOn = new BPARelayCommand(() => { ActionManage.GetInstance.Send("MagnetOn"); });//磁吸开启 + MagnetOff = new BPARelayCommand(() => { ActionManage.GetInstance.Send("MagnetOff"); });//磁吸开启 + OutFood = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OutFood"); });//倒菜启动 + StirArmGoOrigin = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StirArmGoOrigin"); });//搅拌臂去原点位 + StirArmGoWork = new BPARelayCommand(() => { ActionManage.GetInstance.Send("StirArmGoWork"); });//搅拌臂去炒制位 + HBOTGoWork = new BPARelayCommand(() => { ActionManage.GetInstance.Send("HBOTGoWork"); });//放盒子到位 + OutMeal = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OutMeal"); });//出餐启动 + SetFire = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetFire", new List { FireGear }); });//加热挡位设定 + SetStir = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetStir", new List { StirGear }); });//搅拌挡位设定 + SetFry = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetFry", new List { FryGear }); });//炒锅选择 #endregion #region 炒锅2 - SecAddOil = new RelayCommand(() => { ActionManage.GetInstance.Send("AddOil", 2); }); - SecTempTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("TakeOff", 2); }); - SecOneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OneBlock", 2); }); - SecTwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("TwoBlock", 2); }); - SecThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("ThreeBlock", 2); }); - SecOverTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTurnOff", 2); }); - SecOverOneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverOneBlock", 2); }); - SecOverTwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTwoBlock", 2); }); - SecOverThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverThreeBlock", 2); }); - SecOverGoOn = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoOn", 2); }); - SecOverGoDown = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoDown", 2); }); - SecAutoModel = new RelayCommand(() => { ActionManage.GetInstance.Send("AutoModel", 2); }); - SecManualModel = new RelayCommand(() => { ActionManage.GetInstance.Send("ManualModel", 2); }); + SecAddOil = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AddOil", 2); }); + SecTempTurnOff = new BPARelayCommand(() => { ActionManage.GetInstance.Send("TakeOff", 2); }); + SecOneBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OneBlock", 2); }); + SecTwoBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("TwoBlock", 2); }); + SecThreeBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ThreeBlock", 2); }); + SecOverTurnOff = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverTurnOff", 2); }); + SecOverOneBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverOneBlock", 2); }); + SecOverTwoBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverTwoBlock", 2); }); + SecOverThreeBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverThreeBlock", 2); }); + SecOverGoOn = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverGoOn", 2); }); + SecOverGoDown = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverGoDown", 2); }); + SecAutoModel = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AutoModel", 2); }); + SecManualModel = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ManualModel", 2); }); #endregion Plugin.GetInstance()?.GetPlugin()?.GetDevices().ForEach(device => diff --git a/BPASmartClient.MorkF/ViewModel/LocalMenuViewModel.cs b/BPASmartClient.MorkF/ViewModel/LocalMenuViewModel.cs index c6c2098d..2113abfe 100644 --- a/BPASmartClient.MorkF/ViewModel/LocalMenuViewModel.cs +++ b/BPASmartClient.MorkF/ViewModel/LocalMenuViewModel.cs @@ -1,5 +1,5 @@ using BPA.Models; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.Model.小炒机; using BPASmartClient.MorkF.Model; @@ -48,13 +48,13 @@ namespace BPASmartClient.MorkF.ViewModel /// public MaterialAndFryingTime materialAndFryingTime { get; set; } = Json.Data; - public RelayCommand Delete { get; set; } - public RelayCommand AddFryTime { get; set; } - public RelayCommand NewStartLocalMaterial { get; set; } - public RelayCommand AddMaterial { get; set; } - public RelayCommand DeleteMaterial { get; set; } - public RelayCommand RenameMaterial { get; set; } - public RelayCommand Save { get; set; } + public BPARelayCommand Delete { get; set; } + public BPARelayCommand AddFryTime { get; set; } + public BPARelayCommand NewStartLocalMaterial { get; set; } + public BPARelayCommand AddMaterial { get; set; } + public BPARelayCommand DeleteMaterial { get; set; } + public BPARelayCommand RenameMaterial { get; set; } + public BPARelayCommand Save { get; set; } private void Deleted(object o) { @@ -96,8 +96,8 @@ namespace BPASmartClient.MorkF.ViewModel //} } } - Delete = new RelayCommand(Deleted); - AddFryTime = new RelayCommand(() => + Delete = new BPARelayCommand(Deleted); + AddFryTime = new BPARelayCommand(() => { List seasoningLists = new List(); seasoningLists.Add(new SeasoningList { Loc = 0, Qty = 0 }); @@ -108,11 +108,11 @@ namespace BPASmartClient.MorkF.ViewModel SeasoningLists = seasoningLists, }); }); - NewStartLocalMaterial = new RelayCommand(() => + NewStartLocalMaterial = new BPARelayCommand(() => { ActionManage.GetInstance.Send("NewStartLocalOrder", SelectMaterialName); }); - AddMaterial = new RelayCommand(() => + AddMaterial = new BPARelayCommand(() => { //尝试是否能找到 if(MaterialNames.FirstOrDefault(o=>o == MaterialName) == MaterialName) @@ -125,7 +125,7 @@ namespace BPASmartClient.MorkF.ViewModel SelectMaterialName = MaterialName; } }); - DeleteMaterial = new RelayCommand(() => + DeleteMaterial = new BPARelayCommand(() => { if (materialAndFryingTime.materials.ContainsKey(SelectMaterialName)) { @@ -134,7 +134,7 @@ namespace BPASmartClient.MorkF.ViewModel MaterialNames.Remove(SelectMaterialName); PotActionStep.Clear(); }); - //RenameMaterial = new RelayCommand(() => + //RenameMaterial = new BPARelayCommand(() => //{ // //尝试是否能找到 // if (MaterialNames.FirstOrDefault(o => o == SelectMaterialName) == SelectMaterialName) @@ -149,7 +149,7 @@ namespace BPASmartClient.MorkF.ViewModel // } // } //}); - Save = new RelayCommand(new Action(() => + Save = new BPARelayCommand(new Action(() => { if(PotActionStep.Count > 0) { diff --git a/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs b/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs index 36579447..d866bc71 100644 --- a/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs +++ b/BPASmartClient.MorkF/ViewModel/MaterialCalibrationViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.MorkF.Model; using Google.Protobuf.WellKnownTypes; using BPA.Helper; @@ -297,12 +297,12 @@ namespace BPASmartClient.MorkF.ViewModel public int SensingDistance_3 { get { return _sensingDistance_3; } set { _sensingDistance_3 = value; OnPropertyChanged(); } } private int _sensingDistance_3; - public RelayCommand SetSpeed { get; set; }//速度设定 - public RelayCommand SetArmPosition { get; set; }//机器臂位置设定 + public BPARelayCommand SetSpeed { get; set; }//速度设定 + public BPARelayCommand SetArmPosition { get; set; }//机器臂位置设定 - public RelayCommand GetTestDistance_1 { get; set; }//获取感应器距离1 - public RelayCommand GetTestDistance_2 { get; set; }//获取感应器距离2 - public RelayCommand GetTestDistance_3 { get; set; }//获取感应器距离3 + public BPARelayCommand GetTestDistance_1 { get; set; }//获取感应器距离1 + public BPARelayCommand GetTestDistance_2 { get; set; }//获取感应器距离2 + public BPARelayCommand GetTestDistance_3 { get; set; }//获取感应器距离3 #endregion public bool Up { get { return _Up; } set { _Up = value; OnPropertyChanged(); } } @@ -364,27 +364,27 @@ namespace BPASmartClient.MorkF.ViewModel /// private int BasicPosition { get; set; } = 100; - public RelayCommand SetNowPosition { get; set; }//设置机械臂当前坐标 + public BPARelayCommand SetNowPosition { get; set; }//设置机械臂当前坐标 - public RelayCommand SaveCoordinate { get; set; }//设置机械臂基于当前坐标往左移动 + public BPARelayCommand SaveCoordinate { get; set; }//设置机械臂基于当前坐标往左移动 - public RelayCommand ReadCoordinate { get; set; }//设置机械臂基于当前坐标往右移动 + public BPARelayCommand ReadCoordinate { get; set; }//设置机械臂基于当前坐标往右移动 - public RelayCommand AutoCalculation { get; set; }//设置机械臂基于当前坐标往上移动 + public BPARelayCommand AutoCalculation { get; set; }//设置机械臂基于当前坐标往上移动 - public RelayCommand SetNowDownPosition { get; set; }//设置机械臂基于当前坐标往下移动 + public BPARelayCommand SetNowDownPosition { get; set; }//设置机械臂基于当前坐标往下移动 - public RelayCommand FoodLibInit { get; set; }//初始化 - public RelayCommand StartElectromagnetism { get; set; }//电磁阀启动 - public RelayCommand StopElectromagnetism { get; set; } - public RelayCommand PawTurnFront { get; set; }//夹爪正转 - public RelayCommand PawTurnBack { get; set; }//夹爪反转 - public RelayCommand PawToPoint1 { get; set; }//夹爪位置1 - public RelayCommand PawToPoint2 { get; set; }//夹爪位置2 - public RelayCommand PawToPoint3 { get; set; }//夹爪位置3 - public RelayCommand GetDistance_1 { get; set; }//感应测距1 - public RelayCommand GetDistance_2 { get; set; }//感应测距2 - public RelayCommand GetDistance_3 { get; set; }//感应测距3 + public BPARelayCommand FoodLibInit { get; set; }//初始化 + public BPARelayCommand StartElectromagnetism { get; set; }//电磁阀启动 + public BPARelayCommand StopElectromagnetism { get; set; } + public BPARelayCommand PawTurnFront { get; set; }//夹爪正转 + public BPARelayCommand PawTurnBack { get; set; }//夹爪反转 + public BPARelayCommand PawToPoint1 { get; set; }//夹爪位置1 + public BPARelayCommand PawToPoint2 { get; set; }//夹爪位置2 + public BPARelayCommand PawToPoint3 { get; set; }//夹爪位置3 + public BPARelayCommand GetDistance_1 { get; set; }//感应测距1 + public BPARelayCommand GetDistance_2 { get; set; }//感应测距2 + public BPARelayCommand GetDistance_3 { get; set; }//感应测距3 private static object saveMaterialCoordinateLock = new object(); /// @@ -1004,25 +1004,25 @@ namespace BPASmartClient.MorkF.ViewModel public MaterialCalibrationViewModel() { - StartElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { false }); });//电磁阀启动 - StopElectromagnetism = new RelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { true }); });//电磁阀关闭 + StartElectromagnetism = new BPARelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { false }); });//电磁阀启动 + StopElectromagnetism = new BPARelayCommand(() => { ActionManage.GetInstance.Send("Electromagnetism", new List { true }); });//电磁阀关闭 - FoodLibInit = new RelayCommand(() => { ActionManage.GetInstance.Send("FoodLibInit"); });//菜品库初始化 - PawToPoint1 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint1"); });//爪子去1号位 - PawToPoint2 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint2"); });//爪子去2号位 - PawToPoint3 = new RelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint3"); });//爪子去3号位 - PawTurnFront = new RelayCommand(() => { + FoodLibInit = new BPARelayCommand(() => { ActionManage.GetInstance.Send("FoodLibInit"); });//菜品库初始化 + PawToPoint1 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint1"); });//爪子去1号位 + PawToPoint2 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint2"); });//爪子去2号位 + PawToPoint3 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawToPoint3"); });//爪子去3号位 + PawTurnFront = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawTurnFront"); });//夹爪伸出 - PawTurnBack = new RelayCommand(() => { + PawTurnBack = new BPARelayCommand(() => { ActionManage.GetInstance.Send("PawTurnBack"); });//夹爪收缩 - GetDistance_1 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_1"); });//感应距离1 - GetDistance_2 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_2"); });//感应距离2 - GetDistance_3 = new RelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_3"); });//感应距离3 + GetDistance_1 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_1"); });//感应距离1 + GetDistance_2 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_2"); });//感应距离2 + GetDistance_3 = new BPARelayCommand(() => { ActionManage.GetInstance.Send("GetDistance_3"); });//感应距离3 - SetSpeed = new RelayCommand(() => { ActionManage.GetInstance.Send("SetSpeed", new List { MoveSpeed }); });//速度设定 - SetArmPosition = new RelayCommand(() => { + SetSpeed = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetSpeed", new List { MoveSpeed }); });//速度设定 + SetArmPosition = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SetArmPosition", new List { SettingX, SettingY }); });//设定移动位置 @@ -1062,7 +1062,7 @@ namespace BPASmartClient.MorkF.ViewModel } }), "GetDistanceCallBack"); }), "GetDistanceCallBack"); - SetNowPosition = new RelayCommand(() => + SetNowPosition = new BPARelayCommand(() => { if(!Point && !Left && !Right && !Down && !Up) { @@ -1106,15 +1106,15 @@ namespace BPASmartClient.MorkF.ViewModel } SetPosition(); }); - SaveCoordinate = new RelayCommand(() => + SaveCoordinate = new BPARelayCommand(() => { SaveMaterialCoordinate(); }); - ReadCoordinate = new RelayCommand(() => + ReadCoordinate = new BPARelayCommand(() => { PhysicalMaterialCoordinate(); }); - AutoCalculation = new RelayCommand(() => + AutoCalculation = new BPARelayCommand(() => { AutoCalculationCoordination(); }); diff --git a/BPASmartClient.MorkM/Control_MORKM.cs b/BPASmartClient.MorkM/Control_MORKM.cs index 89a9b841..24d076a5 100644 --- a/BPASmartClient.MorkM/Control_MORKM.cs +++ b/BPASmartClient.MorkM/Control_MORKM.cs @@ -6,11 +6,11 @@ using System.Threading; using System.Threading.Tasks; using System.Diagnostics; using BPASmartClient.Device; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Message.Enum; using BPASmartClient.Model; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + using BPASmartClient.MorkM.Model; using System.Collections.ObjectModel; using BPASmartClient.Model.PLC; diff --git a/BPASmartClient.MorkM/View/SimOrderConfitView.xaml.cs b/BPASmartClient.MorkM/View/SimOrderConfitView.xaml.cs index 59cb30b4..9dc5de5a 100644 --- a/BPASmartClient.MorkM/View/SimOrderConfitView.xaml.cs +++ b/BPASmartClient.MorkM/View/SimOrderConfitView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.MorkM.ViewModel; using System; using System.Collections.Generic; diff --git a/BPASmartClient.MorkM/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkM/ViewModel/DebugViewModel.cs index cab27227..a2891180 100644 --- a/BPASmartClient.MorkM/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkM/ViewModel/DebugViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.MorkM.Model; using BPASmartClient.MorkM.View; @@ -22,13 +22,13 @@ namespace BPASmartClient.MorkM.ViewModel { - AddSimDataCommand = new RelayCommand(() => + AddSimDataCommand = new BPARelayCommand(() => { SimOrderConfitView simOrderConfitView = new SimOrderConfitView(); simOrderConfitView.Show(); }); - SimOrderCommand = new RelayCommand(() => + SimOrderCommand = new BPARelayCommand(() => { List locs = new List(); foreach (var item in simOrderConfig) @@ -49,14 +49,14 @@ namespace BPASmartClient.MorkM.ViewModel Trace.WriteLine("下发模拟订单。。。"); }); - InitCommand = new RelayCommand(() => + InitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("InitDevice"); //初始化按钮 Trace.WriteLine("已点击初始化按钮。。。"); }); - LoopSimOrderCommand = new RelayCommand(() => + LoopSimOrderCommand = new BPARelayCommand(() => { if (LoopOrderButtonContent == "循环跑单") ActionManage.GetInstance.Send("EnableForOrder"); if (LoopOrderButtonContent == "停止跑单") ActionManage.GetInstance.Send("StopForOrder"); @@ -65,7 +65,7 @@ namespace BPASmartClient.MorkM.ViewModel }); - EditCommand = new RelayCommand((o) => + EditCommand = new BPARelayCommand((o) => { if (o != null) { @@ -80,7 +80,7 @@ namespace BPASmartClient.MorkM.ViewModel }); - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (o != null) { @@ -104,17 +104,17 @@ namespace BPASmartClient.MorkM.ViewModel } } - public RelayCommand AddSimDataCommand { get; set; } + public BPARelayCommand AddSimDataCommand { get; set; } - public RelayCommand SimOrderCommand { get; set; } + public BPARelayCommand SimOrderCommand { get; set; } - public RelayCommand InitCommand { get; set; } + public BPARelayCommand InitCommand { get; set; } - public RelayCommand LoopSimOrderCommand { get; set; } + public BPARelayCommand LoopSimOrderCommand { get; set; } - public RelayCommand EditCommand { get; set; } + public BPARelayCommand EditCommand { get; set; } - public RelayCommand RemoveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } public static event EventHandler StaticPropertyChanged; diff --git a/BPASmartClient.MorkM/ViewModel/ParSetViewModel.cs b/BPASmartClient.MorkM/ViewModel/ParSetViewModel.cs index dda4c3b3..7f9f5cca 100644 --- a/BPASmartClient.MorkM/ViewModel/ParSetViewModel.cs +++ b/BPASmartClient.MorkM/ViewModel/ParSetViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.MorkM.Model; using BPA.Helper; using System; diff --git a/BPASmartClient.MorkM/ViewModel/SimOrderConfitViewModel.cs b/BPASmartClient.MorkM/ViewModel/SimOrderConfitViewModel.cs index 2cafe910..a625df3c 100644 --- a/BPASmartClient.MorkM/ViewModel/SimOrderConfitViewModel.cs +++ b/BPASmartClient.MorkM/ViewModel/SimOrderConfitViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.MorkM.Model; using BPA.Helper; @@ -34,7 +34,7 @@ namespace BPASmartClient.MorkM.ViewModel } }), "SendSimData"); - ConfirmCommand = new RelayCommand(() => + ConfirmCommand = new BPARelayCommand(() => { //if (!Json.Data.simOrderConfig.ContainsKey(DeviceType)) //{ @@ -67,13 +67,13 @@ namespace BPASmartClient.MorkM.ViewModel } ActionManage.GetInstance.Send("SimOrderConfitViewModelExit"); }); - CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("SimOrderConfitViewModelExit"); }); + CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SimOrderConfitViewModelExit"); }); } - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } - public RelayCommand CancelCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } public string Name { get { return _mName; } set { _mName = value; OnPropertyChanged();; } } private string _mName; diff --git a/BPASmartClient.MorkMOC/BPASmartClient.MorkMOC.csproj b/BPASmartClient.MorkMOC/BPASmartClient.MorkMOC.csproj index ffb381c2..495a7e8f 100644 --- a/BPASmartClient.MorkMOC/BPASmartClient.MorkMOC.csproj +++ b/BPASmartClient.MorkMOC/BPASmartClient.MorkMOC.csproj @@ -7,10 +7,6 @@ Library - - - - diff --git a/BPASmartClient.MorkMOC/Control_MorkMOC.cs b/BPASmartClient.MorkMOC/Control_MorkMOC.cs index 1b06589b..0039208d 100644 --- a/BPASmartClient.MorkMOC/Control_MorkMOC.cs +++ b/BPASmartClient.MorkMOC/Control_MorkMOC.cs @@ -1,14 +1,14 @@ using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Model; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.MorkMOC { diff --git a/BPASmartClient.MorkMOC/PolymerBatching.cs b/BPASmartClient.MorkMOC/PolymerBatching.cs index 5b8885ce..a0ddbbbe 100644 --- a/BPASmartClient.MorkMOC/PolymerBatching.cs +++ b/BPASmartClient.MorkMOC/PolymerBatching.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Data; diff --git a/BPASmartClient.MorkMV1/Control_MorkMV1.cs b/BPASmartClient.MorkMV1/Control_MorkMV1.cs index eb7ed237..a5fe5ecd 100644 --- a/BPASmartClient.MorkMV1/Control_MorkMV1.cs +++ b/BPASmartClient.MorkMV1/Control_MorkMV1.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; + using BPASmartClient.Model; using BPASmartClient.Peripheral; -using static BPASmartClient.EventBus.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using System.Threading; using BPASmartClient.Message; using BPA.Message; diff --git a/BPASmartClient.MorkMV1/GlobalUsing.cs b/BPASmartClient.MorkMV1/GlobalUsing.cs index f3573942..631505a7 100644 --- a/BPASmartClient.MorkMV1/GlobalUsing.cs +++ b/BPASmartClient.MorkMV1/GlobalUsing.cs @@ -2,11 +2,11 @@ global using System.Collections.Generic; global using BPA.Message.Enum; global using BPASmartClient.Device; -global using BPASmartClient.EventBus; +global global using BPASmartClient.Model; global using BPASmartClient.Peripheral; -global using static BPASmartClient.EventBus.EventBus; -global using BPASmartClient.Helper; +global +global using BPA.Helper; global using System.Threading; global using BPASmartClient.Message; global using BPA.Message; diff --git a/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs index 2a3beab2..66458a25 100644 --- a/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkMV1/ViewModel/DebugViewModel.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.EventBus; + using BPASmartClient.MorkMV1.Model; using System.Windows; using BPASmartClient.Message; @@ -18,16 +18,16 @@ namespace BPASmartClient.MorkMV1.ViewModel { public DebugViewModel() { - InitCommand = new RelayCommand(() => { + InitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("InitDevice"); ActionManage.GetInstance.Send("初始化设定煮面时间"); }); - SimOrderCommand = new RelayCommand(() => + SimOrderCommand = new BPARelayCommand(() => { new MorksSimorderModel() { Bowloc = this.BowlLoc, NoodleLoc = this.NoodleLoc }.Publish(); }); - SimOrderRandomCommand = new RelayCommand(() => + SimOrderRandomCommand = new BPARelayCommand(() => { int NoodPosition = 0; int BowPosion = 0; @@ -35,12 +35,12 @@ namespace BPASmartClient.MorkMV1.ViewModel BowPosion = IsBowPositon == true ? 0 : BowlLoc; ActionManage.GetInstance.Send("EnableForOrder", new object[] { NoodPosition, BowPosion }); }); - SimOrderRandomCloseCommand = new RelayCommand(() => + SimOrderRandomCloseCommand = new BPARelayCommand(() => { ThreadManage.GetInstance().StopTask("ForOrder"); MessageLog.GetInstance.Show("停止模拟随机订单"); }); - EnableLacalSimOrder = new RelayCommand(() => + EnableLacalSimOrder = new BPARelayCommand(() => { Global.EnableLocalSimOrder = LocalSimOrder; VisibilitySimOrder = LocalSimOrder == true ? Visibility.Visible : Visibility.Collapsed; @@ -48,15 +48,15 @@ namespace BPASmartClient.MorkMV1.ViewModel VisibilitySimOrder = LocalSimOrder == true? Visibility.Visible : Visibility.Collapsed; } - public RelayCommand InitCommand { get; set; } + public BPARelayCommand InitCommand { get; set; } - public RelayCommand SimOrderCommand { get; set; } + public BPARelayCommand SimOrderCommand { get; set; } - public RelayCommand SimOrderRandomCommand { get; set; } + public BPARelayCommand SimOrderRandomCommand { get; set; } - public RelayCommand SimOrderRandomCloseCommand { get; set; } + public BPARelayCommand SimOrderRandomCloseCommand { get; set; } - public RelayCommand EnableLacalSimOrder { get; set; } + public BPARelayCommand EnableLacalSimOrder { get; set; } public int NoodleLoc { get { return _mNoodleLoc; } set { _mNoodleLoc = value; OnPropertyChanged(); } } private int _mNoodleLoc = 1; diff --git a/BPASmartClient.MorkMV1/ViewModel/ParSetViewModel.cs b/BPASmartClient.MorkMV1/ViewModel/ParSetViewModel.cs index b2c690b9..0c865ca9 100644 --- a/BPASmartClient.MorkMV1/ViewModel/ParSetViewModel.cs +++ b/BPASmartClient.MorkMV1/ViewModel/ParSetViewModel.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.MorkMV1.Model; using BPA.Helper; @@ -16,7 +16,7 @@ namespace BPASmartClient.MorkMV1.ViewModel { public ParSetViewModel() { - SaveInfoCommand = new RelayCommand(SaveSettingData); + SaveInfoCommand = new BPARelayCommand(SaveSettingData); ActionManage.GetInstance.Register(SaveSettingData, "初始化设定煮面时间"); typeof(DishType).GetEnumNames()?.ToList()?.ForEach(item => { DishTypeName.Add(item); }); @@ -37,7 +37,7 @@ namespace BPASmartClient.MorkMV1.ViewModel } } - public RelayCommand SaveInfoCommand { get; set; } + public BPARelayCommand SaveInfoCommand { get; set; } public ObservableCollection parSets { get; set; } = Json.Data.parSets; public ObservableCollection DishLibraryParSets { get; set; } = Json.Data.DishLibraryParSets; diff --git a/BPASmartClient.MorkMW/BPASmartClient.MorkMW.csproj b/BPASmartClient.MorkMW/BPASmartClient.MorkMW.csproj index 2397e6bc..995d0c7f 100644 --- a/BPASmartClient.MorkMW/BPASmartClient.MorkMW.csproj +++ b/BPASmartClient.MorkMW/BPASmartClient.MorkMW.csproj @@ -9,7 +9,6 @@ - diff --git a/BPASmartClient.MorkMW/Control_MorkMW.cs b/BPASmartClient.MorkMW/Control_MorkMW.cs index 5bf7d98b..35921ad6 100644 --- a/BPASmartClient.MorkMW/Control_MorkMW.cs +++ b/BPASmartClient.MorkMW/Control_MorkMW.cs @@ -2,7 +2,7 @@ using BPA.Helper; using BPA.Message.Enum; using BPA.Models; using BPASmartClient.Device; -using BPASmartClient.EventBus; + using BPASmartClient.Modbus; using BPASmartClient.Model; using BPASmartClient.Model.PLC; @@ -20,7 +20,7 @@ using System.Net.Http.Json; using System.Reflection; using System.Threading; using System.Windows.Documents; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.MorkMW { diff --git a/BPASmartClient.MorkMW/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkMW/ViewModel/DebugViewModel.cs index a0df63a7..ec886bf1 100644 --- a/BPASmartClient.MorkMW/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkMW/ViewModel/DebugViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.EventBus; + using BPASmartClient.Model; using BPASmartClient.Model.订单; using BPASmartClient.MorkMW.Model; @@ -16,7 +16,7 @@ namespace BPASmartClient.MorkMW.ViewModel { public DebugViewModel() { - //SimOrderSetDown = new RelayCommand((s) => + //SimOrderSetDown = new BPARelayCommand((s) => //{ // //new MorkMWSimOrder() { mixWink = new List { new MixWinkModel { Loc = 1,Time=3000 } } }.Publish(); @@ -24,7 +24,7 @@ namespace BPASmartClient.MorkMW.ViewModel //}); SimRecipe = new SimRecipeModel(); - SimOrderSetDown = new RelayCommand((s) => { + SimOrderSetDown = new BPARelayCommand((s) => { if (s is SimRecipeModel res) { @@ -32,17 +32,17 @@ namespace BPASmartClient.MorkMW.ViewModel } }); - AddMaterial = new RelayCommand(() => { + AddMaterial = new BPARelayCommand(() => { SimRecipe.recipe.Insert(0, new MixWinkModel()); }); - ClearMaterial = new RelayCommand(() => { + ClearMaterial = new BPARelayCommand(() => { if(SimRecipe.recipe.Count>0) SimRecipe.recipe.RemoveAt(SimRecipe.recipe.Count - 1); }); - StartLocalSim = new RelayCommand(() => { + StartLocalSim = new BPARelayCommand(() => { GVL_MorkMW.AllowLocalSimOrder = IsSimOrder; }); @@ -51,13 +51,13 @@ namespace BPASmartClient.MorkMW.ViewModel /// /// 模拟订单 /// - public RelayCommand SimOrderSetDown { get; set; } + public BPARelayCommand SimOrderSetDown { get; set; } - public RelayCommand AddMaterial { get; set; } + public BPARelayCommand AddMaterial { get; set; } - public RelayCommand ClearMaterial { get; set; } + public BPARelayCommand ClearMaterial { get; set; } - public RelayCommand StartLocalSim { get; set; } + public BPARelayCommand StartLocalSim { get; set; } public bool IsSimOrder { get; set; } public SimRecipeModel SimRecipe { get; set; } diff --git a/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj b/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj index 316a6727..b22847e6 100644 --- a/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj +++ b/BPASmartClient.MorkS/BPASmartClient.MorkS.csproj @@ -11,7 +11,6 @@ - diff --git a/BPASmartClient.MorkS/Control_Morks.cs b/BPASmartClient.MorkS/Control_Morks.cs index a3a0b202..ec9f9714 100644 --- a/BPASmartClient.MorkS/Control_Morks.cs +++ b/BPASmartClient.MorkS/Control_Morks.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; + using BPASmartClient.Model; using BPASmartClient.Peripheral; -using static BPASmartClient.EventBus.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using System.Threading; using BPASmartClient.Message; using BPA.Message; diff --git a/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs index 09d8d29d..6023904d 100644 --- a/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkS/ViewModel/DebugViewModel.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.EventBus; + using BPASmartClient.MorkS.Model; using System.Windows; using BPASmartClient.Message; @@ -18,16 +18,16 @@ namespace BPASmartClient.MorkS.ViewModel { public DebugViewModel() { - InitCommand = new RelayCommand(() => { + InitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("InitDevice"); ActionManage.GetInstance.Send("初始化设定煮面时间"); }); - SimOrderCommand = new RelayCommand(() => + SimOrderCommand = new BPARelayCommand(() => { new MorksSimorderModel() { Bowloc = this.BowlLoc, NoodleLoc = this.NoodleLoc }.Publish(); }); - SimOrderRandomCommand = new RelayCommand(() => + SimOrderRandomCommand = new BPARelayCommand(() => { int NoodPosition = 0; int BowPosion = 0; @@ -35,12 +35,12 @@ namespace BPASmartClient.MorkS.ViewModel BowPosion = IsBowPositon == true ? 0 : BowlLoc; ActionManage.GetInstance.Send("EnableForOrder", new object[] { NoodPosition, BowPosion }); }); - SimOrderRandomCloseCommand = new RelayCommand(() => + SimOrderRandomCloseCommand = new BPARelayCommand(() => { ThreadManage.GetInstance().StopTask("ForOrder"); MessageLog.GetInstance.Show("停止模拟随机订单"); }); - EnableLacalSimOrder = new RelayCommand(() => + EnableLacalSimOrder = new BPARelayCommand(() => { Global.EnableLocalSimOrder = LocalSimOrder; VisibilitySimOrder = LocalSimOrder == true ? Visibility.Visible : Visibility.Collapsed; @@ -48,15 +48,15 @@ namespace BPASmartClient.MorkS.ViewModel VisibilitySimOrder = LocalSimOrder == true? Visibility.Visible : Visibility.Collapsed; } - public RelayCommand InitCommand { get; set; } + public BPARelayCommand InitCommand { get; set; } - public RelayCommand SimOrderCommand { get; set; } + public BPARelayCommand SimOrderCommand { get; set; } - public RelayCommand SimOrderRandomCommand { get; set; } + public BPARelayCommand SimOrderRandomCommand { get; set; } - public RelayCommand SimOrderRandomCloseCommand { get; set; } + public BPARelayCommand SimOrderRandomCloseCommand { get; set; } - public RelayCommand EnableLacalSimOrder { get; set; } + public BPARelayCommand EnableLacalSimOrder { get; set; } public int NoodleLoc { get { return _mNoodleLoc; } set { _mNoodleLoc = value; OnPropertyChanged(); } } private int _mNoodleLoc = 1; diff --git a/BPASmartClient.MorkS/ViewModel/ParSetViewModel.cs b/BPASmartClient.MorkS/ViewModel/ParSetViewModel.cs index 833220ed..8df7f2f8 100644 --- a/BPASmartClient.MorkS/ViewModel/ParSetViewModel.cs +++ b/BPASmartClient.MorkS/ViewModel/ParSetViewModel.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using BPASmartClient.CustomResource; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.MorkS.Model; using BPA.Helper; @@ -18,16 +18,16 @@ namespace BPASmartClient.MorkS.ViewModel { public ParSetViewModel() { - SaveInfoCommand = new RelayCommand(SaveSettingData); - SoupSootForwardCommand = new RelayCommand(SoupSootForward); - SoupSootBackwardCommand = new RelayCommand(SoupSootBackward); - SoupSootStopCommand = new RelayCommand(SoupSootStop); + SaveInfoCommand = new BPARelayCommand(SaveSettingData); + SoupSootForwardCommand = new BPARelayCommand(SoupSootForward); + SoupSootBackwardCommand = new BPARelayCommand(SoupSootBackward); + SoupSootStopCommand = new BPARelayCommand(SoupSootStop); ActionManage.GetInstance.Register(SaveSettingData, "初始化设定煮面时间"); - CommandStart = new RelayCommand(async () => + CommandStart = new BPARelayCommand(async () => { ActionManage.GetInstance.Send("WriteBools", new WritePar() { Address = "M0.6", Value = true }); await Task.Delay((int)DelayTime * 1000); @@ -48,16 +48,16 @@ namespace BPASmartClient.MorkS.ViewModel } } - //VoicePlayTest = new RelayCommand(() => { + //VoicePlayTest = new BPARelayCommand(() => { // VoiceAPI.Speak(new Random().Next(1,100).ToString()); //}); } - public RelayCommand SaveInfoCommand { get; set; } - public RelayCommand CommandStart { get; set; } - public RelayCommand SoupSootForwardCommand { get; set; } - public RelayCommand SoupSootBackwardCommand { get; set; } - public RelayCommand SoupSootStopCommand { get; set; } + public BPARelayCommand SaveInfoCommand { get; set; } + public BPARelayCommand CommandStart { get; set; } + public BPARelayCommand SoupSootForwardCommand { get; set; } + public BPARelayCommand SoupSootBackwardCommand { get; set; } + public BPARelayCommand SoupSootStopCommand { get; set; } #region 时间设定 /// @@ -76,7 +76,7 @@ namespace BPASmartClient.MorkS.ViewModel /// 未反转抽汤下时间设定 /// public ushort UnBackwardSoupSootTime { get { return Json.Data.UnBackwardSoupSootTime; } set { Json.Data.UnBackwardSoupSootTime = value; OnPropertyChanged(); } } - //public RelayCommand VoicePlayTest { get; set; } + //public BPARelayCommand VoicePlayTest { get; set; } /// diff --git a/BPASmartClient.MorkS3/BPASmartClient.MorkS3.csproj b/BPASmartClient.MorkS3/BPASmartClient.MorkS3.csproj index 84b8b433..c8ee0a05 100644 --- a/BPASmartClient.MorkS3/BPASmartClient.MorkS3.csproj +++ b/BPASmartClient.MorkS3/BPASmartClient.MorkS3.csproj @@ -11,7 +11,6 @@ - diff --git a/BPASmartClient.MorkS3/Control_Morks.cs b/BPASmartClient.MorkS3/Control_Morks.cs index 3ca33215..d899280d 100644 --- a/BPASmartClient.MorkS3/Control_Morks.cs +++ b/BPASmartClient.MorkS3/Control_Morks.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; + using BPASmartClient.Model; using BPASmartClient.Peripheral; -using static BPASmartClient.EventBus.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using System.Threading; using BPASmartClient.Message; using BPA.Message; diff --git a/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs index 94d70f4a..29ee3374 100644 --- a/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkS3/ViewModel/DebugViewModel.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.EventBus; + using BPASmartClient.MorkS3.Model; using System.Windows; using BPASmartClient.Message; @@ -18,16 +18,16 @@ namespace BPASmartClient.MorkS3.ViewModel { public DebugViewModel() { - InitCommand = new RelayCommand(() => { + InitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("InitDevice"); ActionManage.GetInstance.Send("初始化设定煮面时间"); }); - SimOrderCommand = new RelayCommand(() => + SimOrderCommand = new BPARelayCommand(() => { new MorksSimorderModel() { Bowloc = this.BowlLoc, NoodleLoc = this.NoodleLoc }.Publish(); }); - SimOrderRandomCommand = new RelayCommand(() => + SimOrderRandomCommand = new BPARelayCommand(() => { int NoodPosition = 0; int BowPosion = 0; @@ -35,12 +35,12 @@ namespace BPASmartClient.MorkS3.ViewModel BowPosion = IsBowPositon == true ? 0 : BowlLoc; ActionManage.GetInstance.Send("EnableForOrder", new object[] { NoodPosition, BowPosion }); }); - SimOrderRandomCloseCommand = new RelayCommand(() => + SimOrderRandomCloseCommand = new BPARelayCommand(() => { ThreadManage.GetInstance().StopTask("ForOrder"); MessageLog.GetInstance.Show("停止模拟随机订单"); }); - EnableLacalSimOrder = new RelayCommand(() => + EnableLacalSimOrder = new BPARelayCommand(() => { Global.EnableLocalSimOrder = LocalSimOrder; VisibilitySimOrder = LocalSimOrder == true ? Visibility.Visible : Visibility.Collapsed; @@ -48,15 +48,15 @@ namespace BPASmartClient.MorkS3.ViewModel VisibilitySimOrder = LocalSimOrder == true? Visibility.Visible : Visibility.Collapsed; } - public RelayCommand InitCommand { get; set; } + public BPARelayCommand InitCommand { get; set; } - public RelayCommand SimOrderCommand { get; set; } + public BPARelayCommand SimOrderCommand { get; set; } - public RelayCommand SimOrderRandomCommand { get; set; } + public BPARelayCommand SimOrderRandomCommand { get; set; } - public RelayCommand SimOrderRandomCloseCommand { get; set; } + public BPARelayCommand SimOrderRandomCloseCommand { get; set; } - public RelayCommand EnableLacalSimOrder { get; set; } + public BPARelayCommand EnableLacalSimOrder { get; set; } public int NoodleLoc { get { return _mNoodleLoc; } set { _mNoodleLoc = value; OnPropertyChanged(); } } private int _mNoodleLoc = 1; diff --git a/BPASmartClient.MorkS3/ViewModel/ParSetViewModel.cs b/BPASmartClient.MorkS3/ViewModel/ParSetViewModel.cs index 9aa6f571..d46e178e 100644 --- a/BPASmartClient.MorkS3/ViewModel/ParSetViewModel.cs +++ b/BPASmartClient.MorkS3/ViewModel/ParSetViewModel.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.MorkS3.Model; using BPA.Helper; @@ -16,13 +16,13 @@ namespace BPASmartClient.MorkS3.ViewModel { public ParSetViewModel() { - SaveInfoCommand = new RelayCommand(SaveSettingData); + SaveInfoCommand = new BPARelayCommand(SaveSettingData); ActionManage.GetInstance.Register(SaveSettingData, "初始化设定煮面时间"); } - public RelayCommand SaveInfoCommand { get; set; } + public BPARelayCommand SaveInfoCommand { get; set; } public ObservableCollection parSets { get; set; } = Json.Data.parSets; diff --git a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs index 269b081b..8b0c121d 100644 --- a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs +++ b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer - 复制.cs @@ -2,11 +2,11 @@ //using System.Collections.Generic; //using BPA.Message.Enum; //using BPASmartClient.Device; -//using BPASmartClient.EventBus; +// //using BPASmartClient.Model; //using BPASmartClient.Peripheral; -//using static BPASmartClient.EventBus.EventBus; -//using BPASmartClient.Helper; +// +//using BPA.Helper; //using System.Threading; //using BPASmartClient.Message; //using BPA.Message; diff --git a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs index 6841e9c2..64fd7de5 100644 --- a/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs +++ b/BPASmartClient.MorkSUpgradedVer/Control_MorkSUpgradedVer.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; + using BPASmartClient.Model; using BPASmartClient.Peripheral; -using static BPASmartClient.EventBus.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using System.Threading; using BPASmartClient.Message; using BPA.Message; diff --git a/BPASmartClient.MorkSUpgradedVer/GlobalUsing.cs b/BPASmartClient.MorkSUpgradedVer/GlobalUsing.cs index bb45abd5..f14ef59d 100644 --- a/BPASmartClient.MorkSUpgradedVer/GlobalUsing.cs +++ b/BPASmartClient.MorkSUpgradedVer/GlobalUsing.cs @@ -2,11 +2,11 @@ global using System.Collections.Generic; global using BPA.Message.Enum; global using BPASmartClient.Device; -global using BPASmartClient.EventBus; +global global using BPASmartClient.Model; global using BPASmartClient.Peripheral; -global using static BPASmartClient.EventBus.EventBus; -global using BPASmartClient.Helper; +global +global using BPA.Helper; global using System.Threading; global using BPASmartClient.Message; global using BPA.Message; diff --git a/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs index 2b5eef6c..73516285 100644 --- a/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkSUpgradedVer/ViewModel/DebugViewModel.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; -using BPASmartClient.EventBus; + using BPASmartClient.MorkSUpgradedVer.Model; using System.Windows; using BPASmartClient.Message; @@ -18,16 +18,16 @@ namespace BPASmartClient.MorkSUpgradedVer.ViewModel { public DebugViewModel() { - InitCommand = new RelayCommand(() => { + InitCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("InitDevice"); ActionManage.GetInstance.Send("初始化设定煮面时间"); }); - SimOrderCommand = new RelayCommand(() => + SimOrderCommand = new BPARelayCommand(() => { new MorksSimorderModel() { Bowloc = this.BowlLoc, NoodleLoc = this.NoodleLoc }.Publish(); }); - SimOrderRandomCommand = new RelayCommand(() => + SimOrderRandomCommand = new BPARelayCommand(() => { int NoodPosition = 0; int BowPosion = 0; @@ -35,12 +35,12 @@ namespace BPASmartClient.MorkSUpgradedVer.ViewModel BowPosion = IsBowPositon == true ? 0 : BowlLoc; ActionManage.GetInstance.Send("EnableForOrder", new object[] { NoodPosition, BowPosion }); }); - SimOrderRandomCloseCommand = new RelayCommand(() => + SimOrderRandomCloseCommand = new BPARelayCommand(() => { ThreadManage.GetInstance().StopTask("ForOrder"); MessageLog.GetInstance.Show("停止模拟随机订单"); }); - EnableLacalSimOrder = new RelayCommand(() => + EnableLacalSimOrder = new BPARelayCommand(() => { Global.EnableLocalSimOrder = LocalSimOrder; VisibilitySimOrder = LocalSimOrder == true ? Visibility.Visible : Visibility.Collapsed; @@ -48,15 +48,15 @@ namespace BPASmartClient.MorkSUpgradedVer.ViewModel VisibilitySimOrder = LocalSimOrder == true? Visibility.Visible : Visibility.Collapsed; } - public RelayCommand InitCommand { get; set; } + public BPARelayCommand InitCommand { get; set; } - public RelayCommand SimOrderCommand { get; set; } + public BPARelayCommand SimOrderCommand { get; set; } - public RelayCommand SimOrderRandomCommand { get; set; } + public BPARelayCommand SimOrderRandomCommand { get; set; } - public RelayCommand SimOrderRandomCloseCommand { get; set; } + public BPARelayCommand SimOrderRandomCloseCommand { get; set; } - public RelayCommand EnableLacalSimOrder { get; set; } + public BPARelayCommand EnableLacalSimOrder { get; set; } public int NoodleLoc { get { return _mNoodleLoc; } set { _mNoodleLoc = value; OnPropertyChanged(); } } private int _mNoodleLoc = 1; diff --git a/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs b/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs index 48bab6b6..02059990 100644 --- a/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs +++ b/BPASmartClient.MorkSUpgradedVer/ViewModel/ParSetViewModel.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.MorkSUpgradedVer.Model; using BPA.Helper; @@ -16,7 +16,7 @@ namespace BPASmartClient.MorkSUpgradedVer.ViewModel { public ParSetViewModel() { - SaveInfoCommand = new RelayCommand(SaveSettingData); + SaveInfoCommand = new BPARelayCommand(SaveSettingData); ActionManage.GetInstance.Register(SaveSettingData, "初始化设定煮面时间"); @@ -33,7 +33,7 @@ namespace BPASmartClient.MorkSUpgradedVer.ViewModel } - public RelayCommand SaveInfoCommand { get; set; } + public BPARelayCommand SaveInfoCommand { get; set; } public ObservableCollection parSets { get; set; } = Json.Data.parSets; public ObservableCollection DishLibraryParSets { get; set; } = Json.Data.DishLibraryParSets; diff --git a/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs b/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs index 6bb4c237..cf22c209 100644 --- a/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs +++ b/BPASmartClient.MorkT.Lebai.JC/Control_MORKJC2.cs @@ -9,11 +9,11 @@ using System.Threading.Tasks; using BPASmartClient.Device; using BPA.Message.Enum; using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.咖啡机.Enum; using BPASmartClient.Model; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + using BPASmartClient.Message; using BPASmartClient.Model.乐白机器人; using BPASmartClient.Model.单片机; diff --git a/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs b/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs index aa18d11e..e9268639 100644 --- a/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs +++ b/BPASmartClient.MorkT.Lebai.JC/View/DebugView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs index f417ba61..8f2d6118 100644 --- a/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkT.Lebai.JC/ViewModel/DebugViewModel.cs @@ -1,9 +1,9 @@ using BPASmartClient.Business; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; + using BPASmartClient.GSIceCream; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; using BPASmartClient.Model; @@ -37,7 +37,7 @@ namespace BPASmartClient.MorkTLebaiJC.ViewModel; /// /// 机器人控制指令 /// - public RelayCommand Button_RobotControlCommand { get; set; } + public BPARelayCommand Button_RobotControlCommand { get; set; } /// /// 机器人控制 /// @@ -99,15 +99,15 @@ namespace BPASmartClient.MorkTLebaiJC.ViewModel; /// /// 制作咖啡 /// - public RelayCommand Button_MakeCoffeeCommand { get; set; } + public BPARelayCommand Button_MakeCoffeeCommand { get; set; } /// /// 停止制作咖啡 /// - public RelayCommand Button_StopMakeCoffeCommand { get; set; } + public BPARelayCommand Button_StopMakeCoffeCommand { get; set; } /// /// 咖啡模式设置 /// - public RelayCommand Button_CoffeeModeSetCommand { get; set; } + public BPARelayCommand Button_CoffeeModeSetCommand { get; set; } private void Button_MakeCoffee() { @@ -127,9 +127,9 @@ namespace BPASmartClient.MorkTLebaiJC.ViewModel; public string MCUConnected { get { return _mcuConnected; } set { _mcuConnected = value; OnPropertyChanged(); } } private string _mcuConnected { get; set; } - public RelayCommand Button_MCUOuputCommand { get; set; } - public RelayCommand Button_MCUDOuputCommand { get; set; } - public RelayCommand Button_LebaiDOuputCommand { get; set; } + public BPARelayCommand Button_MCUOuputCommand { get; set; } + public BPARelayCommand Button_MCUDOuputCommand { get; set; } + public BPARelayCommand Button_LebaiDOuputCommand { get; set; } public int PWMInputNumber { get { return _pwmInputNumber; } set { _pwmInputNumber = value; OnPropertyChanged(); } } private int _pwmInputNumber = 1; @@ -206,14 +206,14 @@ namespace BPASmartClient.MorkTLebaiJC.ViewModel; public DebugViewModel() { - Button_RobotControlCommand = new RelayCommand(Button_RobotControl); - Button_MakeCoffeeCommand = new RelayCommand(Button_MakeCoffee); - Button_StopMakeCoffeCommand = new RelayCommand(Button_StopMakeCoffe); - Button_CoffeeModeSetCommand = new RelayCommand(Button_CoffeeModeSet); + Button_RobotControlCommand = new BPARelayCommand(Button_RobotControl); + Button_MakeCoffeeCommand = new BPARelayCommand(Button_MakeCoffee); + Button_StopMakeCoffeCommand = new BPARelayCommand(Button_StopMakeCoffe); + Button_CoffeeModeSetCommand = new BPARelayCommand(Button_CoffeeModeSet); - Button_MCUOuputCommand = new RelayCommand(Button_McuOutput); - Button_MCUDOuputCommand = new RelayCommand(Button_McuDOutput); - Button_LebaiDOuputCommand = new RelayCommand(Button_LebaiDOutput); + Button_MCUOuputCommand = new BPARelayCommand(Button_McuOutput); + Button_MCUDOuputCommand = new BPARelayCommand(Button_McuDOutput); + Button_LebaiDOuputCommand = new BPARelayCommand(Button_LebaiDOutput); foreach (DrCoffeeDrinksCode code in Enum.GetValues(typeof(DrCoffeeDrinksCode))) { Coffees.Add(code.ToString()); diff --git a/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs b/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs index 2330e680..f854f4db 100644 --- a/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs +++ b/BPASmartClient.MorkT.Lebai.JC/ViewModel/MonitorViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.Business; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.乐白机器人; using BPA.Helper; using System; diff --git a/BPASmartClient.MorkT/Control_MorkT.cs b/BPASmartClient.MorkT/Control_MorkT.cs index 55fca7a6..b14c0306 100644 --- a/BPASmartClient.MorkT/Control_MorkT.cs +++ b/BPASmartClient.MorkT/Control_MorkT.cs @@ -1,9 +1,9 @@ using BPA.Message.Enum; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; + using BPASmartClient.GSIceCream; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Lebai; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; @@ -22,7 +22,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.MorkT { diff --git a/BPASmartClient.MorkT/View/DebugView.xaml.cs b/BPASmartClient.MorkT/View/DebugView.xaml.cs index 192bc9a1..b00103d1 100644 --- a/BPASmartClient.MorkT/View/DebugView.xaml.cs +++ b/BPASmartClient.MorkT/View/DebugView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT/View/Monitor.xaml.cs b/BPASmartClient.MorkT/View/Monitor.xaml.cs index b5d76d55..b98a572e 100644 --- a/BPASmartClient.MorkT/View/Monitor.xaml.cs +++ b/BPASmartClient.MorkT/View/Monitor.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs index 6a8efff5..838e1b02 100644 --- a/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkT/ViewModel/DebugViewModel.cs @@ -1,9 +1,9 @@ using BPASmartClient.Business; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; + using BPASmartClient.GSIceCream; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; using BPASmartClient.Model; @@ -37,7 +37,7 @@ namespace BPASmartClient.MorkT.ViewModel; /// /// 机器人控制指令 /// - public RelayCommand Button_RobotControlCommand { get; set; } + public BPARelayCommand Button_RobotControlCommand { get; set; } /// /// 机器人控制 /// @@ -99,15 +99,15 @@ namespace BPASmartClient.MorkT.ViewModel; /// /// 制作咖啡 /// - public RelayCommand Button_MakeCoffeeCommand { get; set; } + public BPARelayCommand Button_MakeCoffeeCommand { get; set; } /// /// 停止制作咖啡 /// - public RelayCommand Button_StopMakeCoffeCommand { get; set; } + public BPARelayCommand Button_StopMakeCoffeCommand { get; set; } /// /// 咖啡模式设置 /// - public RelayCommand Button_CoffeeModeSetCommand { get; set; } + public BPARelayCommand Button_CoffeeModeSetCommand { get; set; } private void Button_MakeCoffee() { @@ -127,9 +127,9 @@ namespace BPASmartClient.MorkT.ViewModel; public string MCUConnected { get { return _mcuConnected; } set { _mcuConnected = value; OnPropertyChanged(); } } private string _mcuConnected { get; set; } - public RelayCommand Button_MCUOuputCommand { get; set; } - public RelayCommand Button_MCUDOuputCommand { get; set; } - public RelayCommand Button_LebaiDOuputCommand { get; set; } + public BPARelayCommand Button_MCUOuputCommand { get; set; } + public BPARelayCommand Button_MCUDOuputCommand { get; set; } + public BPARelayCommand Button_LebaiDOuputCommand { get; set; } public int PWMInputNumber { get { return _pwmInputNumber; } set { _pwmInputNumber = value; OnPropertyChanged(); } } private int _pwmInputNumber = 1; @@ -206,14 +206,14 @@ namespace BPASmartClient.MorkT.ViewModel; public DebugViewModel() { - Button_RobotControlCommand = new RelayCommand(Button_RobotControl); - Button_MakeCoffeeCommand = new RelayCommand(Button_MakeCoffee); - Button_StopMakeCoffeCommand = new RelayCommand(Button_StopMakeCoffe); - Button_CoffeeModeSetCommand = new RelayCommand(Button_CoffeeModeSet); + Button_RobotControlCommand = new BPARelayCommand(Button_RobotControl); + Button_MakeCoffeeCommand = new BPARelayCommand(Button_MakeCoffee); + Button_StopMakeCoffeCommand = new BPARelayCommand(Button_StopMakeCoffe); + Button_CoffeeModeSetCommand = new BPARelayCommand(Button_CoffeeModeSet); - Button_MCUOuputCommand = new RelayCommand(Button_McuOutput); - Button_MCUDOuputCommand = new RelayCommand(Button_McuDOutput); - Button_LebaiDOuputCommand = new RelayCommand(Button_LebaiDOutput); + Button_MCUOuputCommand = new BPARelayCommand(Button_McuOutput); + Button_MCUDOuputCommand = new BPARelayCommand(Button_McuDOutput); + Button_LebaiDOuputCommand = new BPARelayCommand(Button_LebaiDOutput); foreach (DrCoffeeDrinksCode code in Enum.GetValues(typeof(DrCoffeeDrinksCode))) { Coffees.Add(code.ToString()); diff --git a/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs b/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs index 813fabe7..b19180d2 100644 --- a/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs +++ b/BPASmartClient.MorkT/ViewModel/MonitorViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.Business; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.乐白机器人; using BPA.Helper; using System; diff --git a/BPASmartClient.MorkTM/Control_MorkTM.cs b/BPASmartClient.MorkTM/Control_MorkTM.cs index 7cd367a9..1b91f308 100644 --- a/BPASmartClient.MorkTM/Control_MorkTM.cs +++ b/BPASmartClient.MorkTM/Control_MorkTM.cs @@ -1,15 +1,15 @@ using BPA.Message; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPASmartClient.Model.PLC; using BPASmartClient.MorkTM; using BPASmartClient.MorkTM.Model; using System.Collections.Concurrent; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.MorkTM { diff --git a/BPASmartClient.MorkTM/PolymerBatching.cs b/BPASmartClient.MorkTM/PolymerBatching.cs index 05285ffb..6f78d8ef 100644 --- a/BPASmartClient.MorkTM/PolymerBatching.cs +++ b/BPASmartClient.MorkTM/PolymerBatching.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Data; diff --git a/BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs index f72d33a1..8ba8e21f 100644 --- a/BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkTM/ViewModel/DebugViewModel.cs @@ -23,11 +23,11 @@ namespace BPASmartClient.MorkTM.ViewModel /// /// 出料 /// - public RelayCommand OutMaterials { get; set; } + public BPARelayCommand OutMaterials { get; set; } /// /// 转盘转动 /// - public RelayCommand TurnOn { get; set; } + public BPARelayCommand TurnOn { get; set; } public float MaertialsWight { get { return _maertialsWight; } set { _maertialsWight = value; OnPropertyChanged(); } } private float _maertialsWight = 10; public DebugViewModel() diff --git a/BPASmartClient.MorkTM/ViewModel/RecipeViewModel.cs b/BPASmartClient.MorkTM/ViewModel/RecipeViewModel.cs index 77fca436..5aae8164 100644 --- a/BPASmartClient.MorkTM/ViewModel/RecipeViewModel.cs +++ b/BPASmartClient.MorkTM/ViewModel/RecipeViewModel.cs @@ -36,19 +36,19 @@ namespace ViewModel /// /// 添加一条配方 /// - public RelayCommand AddRecipeCommand { get; set; } + public BPARelayCommand AddRecipeCommand { get; set; } /// /// 删除一条配方 /// - public RelayCommand RemoveRecipeCommand { get; set; } + public BPARelayCommand RemoveRecipeCommand { get; set; } /// /// 取消配方 /// - public RelayCommand RecipeCancelCommand { get; set; } + public BPARelayCommand RecipeCancelCommand { get; set; } /// /// 保存配方 /// - public RelayCommand SaveRecipeCommand { get; set; } + public BPARelayCommand SaveRecipeCommand { get; set; } #endregion @@ -60,7 +60,7 @@ namespace ViewModel /// /// 删除配方奶茶 /// - public RelayCommand DeleteRecipeCommand { get; set; } + public BPARelayCommand DeleteRecipeCommand { get; set; } #endregion @@ -72,7 +72,7 @@ namespace ViewModel /// /// 更新物料位置 /// - public RelayCommand UpdateMaterialPosionCommand{ get; set; } + public BPARelayCommand UpdateMaterialPosionCommand{ get; set; } #endregion public RecipeViewModel() @@ -92,7 +92,7 @@ namespace ViewModel } - AddRecipeCommand = new RelayCommand(new Action(() => + AddRecipeCommand = new BPARelayCommand(new Action(() => { materialRecipes.Add(new MaterialRecipe() { @@ -101,7 +101,7 @@ namespace ViewModel })); - RemoveRecipeCommand = new RelayCommand((o=> + RemoveRecipeCommand = new BPARelayCommand((o=> { if(o!=null&&o is int index) { @@ -114,12 +114,12 @@ namespace ViewModel })); - RecipeCancelCommand = new RelayCommand(new Action(() => + RecipeCancelCommand = new BPARelayCommand(new Action(() => { materialRecipes.Clear(); })); - SaveRecipeCommand = new RelayCommand(new Action(() => + SaveRecipeCommand = new BPARelayCommand(new Action(() => { if(LocalGoodName == "" || LocalGoodName == null) return; if(materialRecipes.Count == 0) return; @@ -136,7 +136,7 @@ namespace ViewModel })); - DeleteRecipeCommand = new RelayCommand((o => + DeleteRecipeCommand = new BPARelayCommand((o => { if (o != null && o is int index) { @@ -145,7 +145,7 @@ namespace ViewModel } })); - UpdateMaterialPosionCommand = new RelayCommand(new Action(() => + UpdateMaterialPosionCommand = new BPARelayCommand(new Action(() => { UpdateLocalJosnData(posionPath, materailNameAndPosions);//更新物料位置名称 })); diff --git a/BPASmartClient.MorkTSingle/Control_MORKJC.cs b/BPASmartClient.MorkTSingle/Control_MORKJC.cs index 5e4ace57..09c477ac 100644 --- a/BPASmartClient.MorkTSingle/Control_MORKJC.cs +++ b/BPASmartClient.MorkTSingle/Control_MORKJC.cs @@ -9,11 +9,11 @@ using System.Threading.Tasks; using BPASmartClient.Device; using BPA.Message.Enum; using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.咖啡机.Enum; using BPASmartClient.Model; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + using BPASmartClient.Model.PLC; using BPASmartClient.Model.单片机; using BPASmartClient.Business; diff --git a/BPASmartClient.MorkTSingle/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkTSingle/ViewModel/DebugViewModel.cs index 455e0371..f28daddc 100644 --- a/BPASmartClient.MorkTSingle/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkTSingle/ViewModel/DebugViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.Business; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPASmartClient.Model.乐白机器人; @@ -19,7 +19,7 @@ using System.Threading; namespace BPASmartClient.MorkTSingle.ViewModel; public class DebugViewModel : NotifyBase { - public RelayCommand SimOrderMakeCoffee { get; set; } + public BPARelayCommand SimOrderMakeCoffee { get; set; } /// /// 设备ID /// @@ -38,7 +38,7 @@ namespace BPASmartClient.MorkTSingle.ViewModel; Coffees.Add(code.ToString()); } SimOrderCoffeeList = Coffees[0]; - SimOrderMakeCoffee = new RelayCommand(() => + SimOrderMakeCoffee = new BPARelayCommand(() => { new MorkTSimOrder() {KLMDrinkFaultCode = (KLMDrinkFaultType)Enum.Parse(typeof(KLMDrinkFaultType), SimOrderCoffeeList) }.Publish(); }); diff --git a/BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs b/BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs index 128d1f41..d898be71 100644 --- a/BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs +++ b/BPASmartClient.MorkT_BarCounter/Control_MorkT_BarCounter.cs @@ -9,11 +9,11 @@ using System.Threading.Tasks; using BPASmartClient.Device; using BPA.Message.Enum; using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.咖啡机.Enum; using BPASmartClient.Model; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + using BPASmartClient.Message; using BPASmartClient.Model.乐白机器人; using BPASmartClient.Model.单片机; diff --git a/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs b/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs index b8efb655..40a16ba1 100644 --- a/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs +++ b/BPASmartClient.MorkT_BarCounter/View/DebugView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs b/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs index c2b2314c..254bb845 100644 --- a/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs +++ b/BPASmartClient.MorkT_BarCounter/View/TestView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT_BarCounter/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT_BarCounter/ViewModel/DebugViewModel.cs index 9bc55fb7..9cd34736 100644 --- a/BPASmartClient.MorkT_BarCounter/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkT_BarCounter/ViewModel/DebugViewModel.cs @@ -1,8 +1,8 @@ using BPASmartClient.Business; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; using BPASmartClient.Model; @@ -29,20 +29,20 @@ public class DebugViewModel : NotifyBase { CH_Value = Json.Data.parData; } - RobotControlCommand = new RelayCommand(() => + RobotControlCommand = new BPARelayCommand(() => { new WriteJaka() { DeviceId = 126, TagName = "JaKaProgramName", Value = JakaRobotProgram }.Publish(); }); - CoffeeControlCommand = new RelayCommand(() => + CoffeeControlCommand = new BPARelayCommand(() => { new DRCoffee_MakeCoffeeEvent() { DeviceId = 126, DrinkCode = (DrCoffeeDrinksCode)(CoffeeKind) }.Publish(); }); - MikeTeaCupControlCommand = new RelayCommand(() => + MikeTeaCupControlCommand = new BPARelayCommand(() => { new MilkTea_MakeMilkTeaEvent() { DeviceId = 126, TagName = "Start" }.Publish(); }); - GripperControlCommand = new RelayCommand(() => + GripperControlCommand = new BPARelayCommand(() => { string value = GripperProgam + ""; if (value.Length == 1) @@ -63,7 +63,7 @@ public class DebugViewModel : NotifyBase } new WriteGripper() { DeviceId = 126, TagName = "PWMControl", CH_Number = "0", PWMOutput = value }.Publish();//夹爪的幅度控制 }); - MikeTeaCupSetParCommand = new RelayCommand(() => + MikeTeaCupSetParCommand = new BPARelayCommand(() => { for (int i = 0; i < 12; i++) { @@ -76,21 +76,21 @@ public class DebugViewModel : NotifyBase } public int JakaRobotProgram { get { return _JakaRobotProgram; } set { _JakaRobotProgram = value; OnPropertyChanged(); } } private int _JakaRobotProgram { get; set; } - public RelayCommand RobotControlCommand { get; set; } - public RelayCommand MikeTeaCupSetParCommand { get; set; } + public BPARelayCommand RobotControlCommand { get; set; } + public BPARelayCommand MikeTeaCupSetParCommand { get; set; } public int CoffeeKind { get { return _CoffeeKind; } set { _CoffeeKind = value; OnPropertyChanged(); } } private int _CoffeeKind { get; set; } - public RelayCommand CoffeeControlCommand { get; set; } + public BPARelayCommand CoffeeControlCommand { get; set; } public int MilkTeaCub { get { return _MilkTeaCub; } set { _MilkTeaCub = value; OnPropertyChanged(); } } private int _MilkTeaCub { get; set; } - public RelayCommand MikeTeaCupControlCommand { get; set; } + public BPARelayCommand MikeTeaCupControlCommand { get; set; } public int GripperProgam { get { return _GripperProgam; } set { _GripperProgam = value; OnPropertyChanged(); } } private int _GripperProgam { get; set; } public ushort[] CH_Value { get { return _CH_Value; } set { _CH_Value = value; OnPropertyChanged(); } } private ushort[] _CH_Value { get; set; } = new ushort[12] {200,200,200,200,200,200,200,200,200,200,200,200 }; - public RelayCommand GripperControlCommand { get; set; } + public BPARelayCommand GripperControlCommand { get; set; } } diff --git a/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs b/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs index 91e3b5ec..7057cd7d 100644 --- a/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs +++ b/BPASmartClient.MorkT_BarCounter/ViewModel/TestViewModel.cs @@ -1,8 +1,8 @@ using BPASmartClient.Business; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; using BPASmartClient.Model; @@ -36,9 +36,9 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel; /// /// 机器人控制指令 /// - public RelayCommand Button_RobotControlCommand { get; set; } + public BPARelayCommand Button_RobotControlCommand { get; set; } - public RelayCommand Robot_DOutput { get; set; } + public BPARelayCommand Robot_DOutput { get; set; } /// /// 机器人控制 /// @@ -91,8 +91,8 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel; public string MCUDI7 { get { return _mCUDI7; } set { _mCUDI7 = value; OnPropertyChanged(); } } private string _mCUDI7 { get; set; } - public RelayCommand Button_MCUOuputCommand { get; set; } - public RelayCommand Button_MCUDOuputCommand { get; set; } + public BPARelayCommand Button_MCUOuputCommand { get; set; } + public BPARelayCommand Button_MCUDOuputCommand { get; set; } public int MCU_PWM_CH { get { return _choosePWM; } set { _choosePWM = value; OnPropertyChanged(); } } private int _choosePWM = 1; @@ -139,7 +139,7 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel; public string MakeJuice_Index { get { return _makeJuice_Index; } set { _makeJuice_Index = value; OnPropertyChanged(); } } public string _makeJuice_Index { get; set; } - public RelayCommand Button_MakeJuiceCommand { get; set; } + public BPARelayCommand Button_MakeJuiceCommand { get; set; } public void Button_MakeJuice() { @@ -155,10 +155,10 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel; private int _iceMaker_IceTime = 3; #region 订单模拟 - public RelayCommand SimOrderMakeCoffee { get; set; } - public RelayCommand SimOrderMakeJuice { get; set; } - public RelayCommand SimOrderMakeTea { get; set; } - public RelayCommand SimOrderMakeWater { get; set; } + public BPARelayCommand SimOrderMakeCoffee { get; set; } + public BPARelayCommand SimOrderMakeJuice { get; set; } + public BPARelayCommand SimOrderMakeTea { get; set; } + public BPARelayCommand SimOrderMakeWater { get; set; } public int SimOrder_JuiceList { get { return _simOrder_JuiceList; } set { _simOrder_JuiceList = value; OnPropertyChanged(); } } public int _simOrder_JuiceList { get; set; } @@ -166,13 +166,13 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel; public string _simOrder_JuiceMakeID { get; set; } #endregion - public RelayCommand IceMaker_BtnPowerOn { get; set; } - public RelayCommand IceMaker_BtnStandby { get; set;} - public RelayCommand IceMaker_BtnPump { get; set;} + public BPARelayCommand IceMaker_BtnPowerOn { get; set; } + public BPARelayCommand IceMaker_BtnStandby { get; set;} + public BPARelayCommand IceMaker_BtnPump { get; set;} - public RelayCommand IceMaker_BtnStart { get; set; } - public RelayCommand IceMaker_BtnEnd { get; set; } - public RelayCommand IceMaker_BtnSetIceTime { get; set; } + public BPARelayCommand IceMaker_BtnStart { get; set; } + public BPARelayCommand IceMaker_BtnEnd { get; set; } + public BPARelayCommand IceMaker_BtnSetIceTime { get; set; } private void IceMaker_BtnPowerOnCommand() { @@ -240,15 +240,15 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel; /// /// 制作咖啡 /// - public RelayCommand Button_MakeCoffeeCommand { get; set; } + public BPARelayCommand Button_MakeCoffeeCommand { get; set; } /// /// 停止制作咖啡 /// - public RelayCommand Button_StopMakeCoffeCommand { get; set; } + public BPARelayCommand Button_StopMakeCoffeCommand { get; set; } /// /// 咖啡模式设置 /// - public RelayCommand Button_CoffeeModeSetCommand { get; set; } + public BPARelayCommand Button_CoffeeModeSetCommand { get; set; } private void Button_MakeCoffee() { @@ -275,40 +275,40 @@ namespace BPASmartClient.MorkT_BarCounter.ViewModel; public TestViewModel() { - SimOrderMakeCoffee = new RelayCommand(() => + SimOrderMakeCoffee = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 1, DrinkCode = (DrCoffeeDrinksCode)Enum.Parse(typeof(DrCoffeeDrinksCode), SimOrderCoffeeList) }.Publish(); }); - SimOrderMakeJuice = new RelayCommand(() => + SimOrderMakeJuice = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 2, JuiceList = SimOrder_JuiceList, JuiceMakeID = SimOrder_JuiceMakeID }.Publish(); }); - SimOrderMakeTea = new RelayCommand(() => + SimOrderMakeTea = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 3 }.Publish(); }); - SimOrderMakeWater = new RelayCommand(() => + SimOrderMakeWater = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 4 }.Publish(); }); - Button_RobotControlCommand = new RelayCommand(Button_RobotControl); - Robot_DOutput = new RelayCommand(Button_RobotDoutput); + Button_RobotControlCommand = new BPARelayCommand(Button_RobotControl); + Robot_DOutput = new BPARelayCommand(Button_RobotDoutput); - Button_MakeCoffeeCommand = new RelayCommand(Button_MakeCoffee); - Button_StopMakeCoffeCommand = new RelayCommand(Button_StopMakeCoffe); - Button_CoffeeModeSetCommand = new RelayCommand(Button_CoffeeModeSet); + Button_MakeCoffeeCommand = new BPARelayCommand(Button_MakeCoffee); + Button_StopMakeCoffeCommand = new BPARelayCommand(Button_StopMakeCoffe); + Button_CoffeeModeSetCommand = new BPARelayCommand(Button_CoffeeModeSet); - Button_MCUOuputCommand = new RelayCommand(Button_McuPWMOutput); - Button_MCUDOuputCommand = new RelayCommand(Button_McuDOutput); + Button_MCUOuputCommand = new BPARelayCommand(Button_McuPWMOutput); + Button_MCUDOuputCommand = new BPARelayCommand(Button_McuDOutput); - Button_MakeJuiceCommand = new RelayCommand(Button_MakeJuice); + Button_MakeJuiceCommand = new BPARelayCommand(Button_MakeJuice); - IceMaker_BtnPowerOn = new RelayCommand(IceMaker_BtnPowerOnCommand); - IceMaker_BtnStandby = new RelayCommand(IceMaker_BtnStandbyCommand); - IceMaker_BtnPump = new RelayCommand(IceMaker_BtnPumpCommand); - IceMaker_BtnStart = new RelayCommand(IceMaker_BtnStartCommand); - IceMaker_BtnEnd = new RelayCommand(IceMaker_BtnEndCommand); - IceMaker_BtnSetIceTime = new RelayCommand(IceMaker_BtnSetIceTimeCommand); + IceMaker_BtnPowerOn = new BPARelayCommand(IceMaker_BtnPowerOnCommand); + IceMaker_BtnStandby = new BPARelayCommand(IceMaker_BtnStandbyCommand); + IceMaker_BtnPump = new BPARelayCommand(IceMaker_BtnPumpCommand); + IceMaker_BtnStart = new BPARelayCommand(IceMaker_BtnStartCommand); + IceMaker_BtnEnd = new BPARelayCommand(IceMaker_BtnEndCommand); + IceMaker_BtnSetIceTime = new BPARelayCommand(IceMaker_BtnSetIceTimeCommand); foreach (DrCoffeeDrinksCode code in Enum.GetValues(typeof(DrCoffeeDrinksCode))) { diff --git a/BPASmartClient.MorkT_Container/Control_MorkT_Container.cs b/BPASmartClient.MorkT_Container/Control_MorkT_Container.cs index b51c2cfb..a77ca440 100644 --- a/BPASmartClient.MorkT_Container/Control_MorkT_Container.cs +++ b/BPASmartClient.MorkT_Container/Control_MorkT_Container.cs @@ -9,11 +9,11 @@ using System.Threading.Tasks; using BPASmartClient.Device; using BPA.Message.Enum; using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.咖啡机.Enum; using BPASmartClient.Model; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + using BPASmartClient.Message; using BPASmartClient.Model.乐白机器人; using BPASmartClient.Model.单片机; diff --git a/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs b/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs index 1df90832..24a4ab5f 100644 --- a/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs +++ b/BPASmartClient.MorkT_Container/View/DebugView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs index 2b24c1e8..8ff1a054 100644 --- a/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkT_Container/ViewModel/DebugViewModel.cs @@ -1,8 +1,8 @@ using BPASmartClient.Business; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; using BPASmartClient.Model; @@ -36,9 +36,9 @@ namespace BPASmartClient.MorkT_Container.ViewModel; /// /// 机器人控制指令 /// - public RelayCommand Button_RobotControlCommand { get; set; } - public RelayCommand IceMaker_State { get; set; } - public RelayCommand Robot_DOutput { get; set; } + public BPARelayCommand Button_RobotControlCommand { get; set; } + public BPARelayCommand IceMaker_State { get; set; } + public BPARelayCommand Robot_DOutput { get; set; } /// /// 机器人控制 /// @@ -93,8 +93,8 @@ namespace BPASmartClient.MorkT_Container.ViewModel; public bool MCUDI7 { get { return _mCUDI7; } set { _mCUDI7 = value; OnPropertyChanged(); } } private bool _mCUDI7 { get; set; } - public RelayCommand Button_MCUOuputCommand { get; set; } - public RelayCommand Button_MCUDOuputCommand { get; set; } + public BPARelayCommand Button_MCUOuputCommand { get; set; } + public BPARelayCommand Button_MCUDOuputCommand { get; set; } public int MCU_PWM_CH { get { return _choosePWM; } set { _choosePWM = value; OnPropertyChanged(); } } private int _choosePWM = 1; @@ -141,7 +141,7 @@ namespace BPASmartClient.MorkT_Container.ViewModel; public string MakeJuice_Index { get { return _makeJuice_Index; } set { _makeJuice_Index = value; OnPropertyChanged(); } } public string _makeJuice_Index { get; set; } - public RelayCommand Button_MakeJuiceCommand { get; set; } + public BPARelayCommand Button_MakeJuiceCommand { get; set; } public void Button_MakeJuice() { @@ -167,10 +167,10 @@ namespace BPASmartClient.MorkT_Container.ViewModel; private int _iceMaker_IceTime = 3; #region 订单模拟 - public RelayCommand SimOrderMakeCoffee { get; set; } - public RelayCommand SimOrderMakeJuice { get; set; } - public RelayCommand SimOrderMakeTea { get; set; } - public RelayCommand SimOrderMakeWater { get; set; } + public BPARelayCommand SimOrderMakeCoffee { get; set; } + public BPARelayCommand SimOrderMakeJuice { get; set; } + public BPARelayCommand SimOrderMakeTea { get; set; } + public BPARelayCommand SimOrderMakeWater { get; set; } public int SimOrder_JuiceList { get { return _simOrder_JuiceList; } set { _simOrder_JuiceList = value; OnPropertyChanged(); } } public int _simOrder_JuiceList { get; set; } @@ -178,13 +178,13 @@ namespace BPASmartClient.MorkT_Container.ViewModel; public string _simOrder_JuiceMakeID { get; set; } #endregion - public RelayCommand IceMaker_BtnPowerOn { get; set; } - public RelayCommand IceMaker_BtnStandby { get; set;} - public RelayCommand IceMaker_BtnPump { get; set;} + public BPARelayCommand IceMaker_BtnPowerOn { get; set; } + public BPARelayCommand IceMaker_BtnStandby { get; set;} + public BPARelayCommand IceMaker_BtnPump { get; set;} - public RelayCommand IceMaker_BtnStart { get; set; } - public RelayCommand IceMaker_BtnEnd { get; set; } - public RelayCommand IceMaker_BtnSetIceTime { get; set; } + public BPARelayCommand IceMaker_BtnStart { get; set; } + public BPARelayCommand IceMaker_BtnEnd { get; set; } + public BPARelayCommand IceMaker_BtnSetIceTime { get; set; } private void IceMaker_BtnPowerOnCommand() { @@ -252,15 +252,15 @@ namespace BPASmartClient.MorkT_Container.ViewModel; /// /// 制作咖啡 /// - public RelayCommand Button_MakeCoffeeCommand { get; set; } + public BPARelayCommand Button_MakeCoffeeCommand { get; set; } /// /// 停止制作咖啡 /// - public RelayCommand Button_StopMakeCoffeCommand { get; set; } + public BPARelayCommand Button_StopMakeCoffeCommand { get; set; } /// /// 咖啡模式设置 /// - public RelayCommand Button_CoffeeModeSetCommand { get; set; } + public BPARelayCommand Button_CoffeeModeSetCommand { get; set; } private void Button_MakeCoffee() { @@ -287,40 +287,40 @@ namespace BPASmartClient.MorkT_Container.ViewModel; public DebugViewModel() { - SimOrderMakeCoffee = new RelayCommand(() => + SimOrderMakeCoffee = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 1, DrinkCode = (DrCoffeeDrinksCode)Enum.Parse(typeof(DrCoffeeDrinksCode), SimOrderCoffeeList) }.Publish(); }); - SimOrderMakeJuice = new RelayCommand(() => + SimOrderMakeJuice = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 2, JuiceList = SimOrder_JuiceList, JuiceMakeID = SimOrder_JuiceMakeID }.Publish(); }); - SimOrderMakeTea = new RelayCommand(() => + SimOrderMakeTea = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 3 }.Publish(); }); - SimOrderMakeWater = new RelayCommand(() => + SimOrderMakeWater = new BPARelayCommand(() => { new MorkTSimOrder() { OrderNum = 4 }.Publish(); }); - Button_RobotControlCommand = new RelayCommand(Button_RobotControl); - Robot_DOutput = new RelayCommand(Button_RobotDoutput); + Button_RobotControlCommand = new BPARelayCommand(Button_RobotControl); + Robot_DOutput = new BPARelayCommand(Button_RobotDoutput); - Button_MakeCoffeeCommand = new RelayCommand(Button_MakeCoffee); - Button_StopMakeCoffeCommand = new RelayCommand(Button_StopMakeCoffe); - Button_CoffeeModeSetCommand = new RelayCommand(Button_CoffeeModeSet); + Button_MakeCoffeeCommand = new BPARelayCommand(Button_MakeCoffee); + Button_StopMakeCoffeCommand = new BPARelayCommand(Button_StopMakeCoffe); + Button_CoffeeModeSetCommand = new BPARelayCommand(Button_CoffeeModeSet); - Button_MCUOuputCommand = new RelayCommand(Button_McuPWMOutput); - Button_MCUDOuputCommand = new RelayCommand(Button_McuDOutput); + Button_MCUOuputCommand = new BPARelayCommand(Button_McuPWMOutput); + Button_MCUDOuputCommand = new BPARelayCommand(Button_McuDOutput); - Button_MakeJuiceCommand = new RelayCommand(Button_MakeJuice); + Button_MakeJuiceCommand = new BPARelayCommand(Button_MakeJuice); - IceMaker_BtnPowerOn = new RelayCommand(IceMaker_BtnPowerOnCommand); - IceMaker_BtnStandby = new RelayCommand(IceMaker_BtnStandbyCommand); - IceMaker_BtnPump = new RelayCommand(IceMaker_BtnPumpCommand); - IceMaker_BtnStart = new RelayCommand(IceMaker_BtnStartCommand); - IceMaker_BtnEnd = new RelayCommand(IceMaker_BtnEndCommand); - IceMaker_BtnSetIceTime = new RelayCommand(IceMaker_BtnSetIceTimeCommand); + IceMaker_BtnPowerOn = new BPARelayCommand(IceMaker_BtnPowerOnCommand); + IceMaker_BtnStandby = new BPARelayCommand(IceMaker_BtnStandbyCommand); + IceMaker_BtnPump = new BPARelayCommand(IceMaker_BtnPumpCommand); + IceMaker_BtnStart = new BPARelayCommand(IceMaker_BtnStartCommand); + IceMaker_BtnEnd = new BPARelayCommand(IceMaker_BtnEndCommand); + IceMaker_BtnSetIceTime = new BPARelayCommand(IceMaker_BtnSetIceTimeCommand); foreach (DrCoffeeDrinksCode code in Enum.GetValues(typeof(DrCoffeeDrinksCode))) { diff --git a/BPASmartClient.MorkT_HQ/BPASmartClient.MorkTHQ.csproj b/BPASmartClient.MorkT_HQ/BPASmartClient.MorkTHQ.csproj index be5744f2..435ed773 100644 --- a/BPASmartClient.MorkT_HQ/BPASmartClient.MorkTHQ.csproj +++ b/BPASmartClient.MorkT_HQ/BPASmartClient.MorkTHQ.csproj @@ -10,7 +10,6 @@ - diff --git a/BPASmartClient.MorkT_HQ/Control_MorkTHQ.cs b/BPASmartClient.MorkT_HQ/Control_MorkTHQ.cs index 6714be0c..36925570 100644 --- a/BPASmartClient.MorkT_HQ/Control_MorkTHQ.cs +++ b/BPASmartClient.MorkT_HQ/Control_MorkTHQ.cs @@ -2,9 +2,9 @@ using BPA.Message.Enum; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; + using BPASmartClient.GSIceCream; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.KLMCoffee.Protocal; using BPASmartClient.Lebai; using BPASmartClient.LebaiRobot; @@ -22,7 +22,7 @@ using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.MorkTHQ { diff --git a/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs b/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs index 9db7f7df..32c5c704 100644 --- a/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs +++ b/BPASmartClient.MorkT_HQ/View/DebugView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT_HQ/View/Monitor.xaml.cs b/BPASmartClient.MorkT_HQ/View/Monitor.xaml.cs index 2c9e1aee..b0a3bc13 100644 --- a/BPASmartClient.MorkT_HQ/View/Monitor.xaml.cs +++ b/BPASmartClient.MorkT_HQ/View/Monitor.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs b/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs index c749032d..5fea7e9a 100644 --- a/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.MorkT_HQ/ViewModel/DebugViewModel.cs @@ -1,9 +1,9 @@ using BPASmartClient.Business; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; + using BPASmartClient.GSIceCream; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; using BPASmartClient.Model; @@ -39,13 +39,13 @@ namespace BPASmartClient.MorkTHQ.ViewModel /// /// 机器人控制指令 /// - public RelayCommand Button_RobotControlCommand { get; set; } + public BPARelayCommand Button_RobotControlCommand { get; set; } /// /// 机器人控制 /// /// - public RelayCommand Button_SetValueCommand { get; set; } + public BPARelayCommand Button_SetValueCommand { get; set; } private void Button_SetValue() { @@ -62,11 +62,11 @@ namespace BPASmartClient.MorkTHQ.ViewModel /// /// 制作冰淇淋 /// - public RelayCommand Button_MakeIceCreamCommand { get; set; } + public BPARelayCommand Button_MakeIceCreamCommand { get; set; } /// /// 选择冰淇淋模式 /// - public RelayCommand Button_SetIceCreamModelCommand { get; set; } + public BPARelayCommand Button_SetIceCreamModelCommand { get; set; } /// /// 冰淇淋连接状态 @@ -170,15 +170,15 @@ namespace BPASmartClient.MorkTHQ.ViewModel /// /// 制作咖啡 /// - public RelayCommand Button_MakeCoffeeCommand { get; set; } + public BPARelayCommand Button_MakeCoffeeCommand { get; set; } /// /// 停止制作咖啡 /// - public RelayCommand Button_StopMakeCoffeCommand { get; set; } + public BPARelayCommand Button_StopMakeCoffeCommand { get; set; } /// /// 咖啡模式设置 /// - public RelayCommand Button_CoffeeModeSetCommand { get; set; } + public BPARelayCommand Button_CoffeeModeSetCommand { get; set; } private void Button_MakeCoffee() { @@ -203,19 +203,19 @@ namespace BPASmartClient.MorkTHQ.ViewModel /// /// 咖啡杯或冰淇淋杯落杯 /// - public RelayCommand Button_CupControlCommand { get; set; } + public BPARelayCommand Button_CupControlCommand { get; set; } /// /// 单片机冰淇淋机器制冷 /// - public RelayCommand Button_SCChipRefrigerationCommand { get; set; } + public BPARelayCommand Button_SCChipRefrigerationCommand { get; set; } /// /// 单片机冰淇淋机器打料 /// - public RelayCommand Button_SCChipDischargeCommand { get; set; } + public BPARelayCommand Button_SCChipDischargeCommand { get; set; } /// /// 模拟测试 /// - public RelayCommand Button_SCChipTestCommand { get; set; } + public BPARelayCommand Button_SCChipTestCommand { get; set; } private void Button_CupControl(object CupType) { @@ -251,7 +251,7 @@ namespace BPASmartClient.MorkTHQ.ViewModel public string SelectedTemperature { get; set; } = "冷"; - public RelayCommand MakeJuiceCommand { get; set; } + public BPARelayCommand MakeJuiceCommand { get; set; } private void MakeJuice() { @@ -307,27 +307,27 @@ namespace BPASmartClient.MorkTHQ.ViewModel public DebugViewModel() { - Button_RobotControlCommand = new RelayCommand(Button_RobotControl); - Button_SetValueCommand = new RelayCommand(Button_SetValue); + Button_RobotControlCommand = new BPARelayCommand(Button_RobotControl); + Button_SetValueCommand = new BPARelayCommand(Button_SetValue); - Button_MakeIceCreamCommand = new RelayCommand(Button_MakeIceCream); - Button_SetIceCreamModelCommand = new RelayCommand(Button_SetIceCreamModel); + Button_MakeIceCreamCommand = new BPARelayCommand(Button_MakeIceCream); + Button_SetIceCreamModelCommand = new BPARelayCommand(Button_SetIceCreamModel); - Button_MakeCoffeeCommand = new RelayCommand(Button_MakeCoffee); - Button_StopMakeCoffeCommand = new RelayCommand(Button_StopMakeCoffe); - Button_CoffeeModeSetCommand = new RelayCommand(Button_CoffeeModeSet); + Button_MakeCoffeeCommand = new BPARelayCommand(Button_MakeCoffee); + Button_StopMakeCoffeCommand = new BPARelayCommand(Button_StopMakeCoffe); + Button_CoffeeModeSetCommand = new BPARelayCommand(Button_CoffeeModeSet); - Button_CupControlCommand = new RelayCommand(Button_CupControl); - Button_SCChipRefrigerationCommand = new RelayCommand(Button_SCChipRefrigeration); - Button_SCChipDischargeCommand = new RelayCommand(Button_SCChipDischarge); - Button_SCChipTestCommand = new RelayCommand(() => + Button_CupControlCommand = new BPARelayCommand(Button_CupControl); + Button_SCChipRefrigerationCommand = new BPARelayCommand(Button_SCChipRefrigeration); + Button_SCChipDischargeCommand = new BPARelayCommand(Button_SCChipDischarge); + Button_SCChipTestCommand = new BPARelayCommand(() => { Button_SCChipRefrigeration(); Thread.Sleep(50); Button_SCChipDischarge(); }); - MakeJuiceCommand = new RelayCommand(MakeJuice); + MakeJuiceCommand = new BPARelayCommand(MakeJuice); foreach (DrinkType code in Enum.GetValues(typeof(DrinkType))) { diff --git a/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs b/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs index 198c0c24..b86d2a85 100644 --- a/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs +++ b/BPASmartClient.MorkT_HQ/ViewModel/MonitorViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.Business; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.乐白机器人; using BPA.Helper; using System; diff --git a/BPASmartClient.Morkt.JAKA.JC/Control_MORKJC.cs b/BPASmartClient.Morkt.JAKA.JC/Control_MORKJC.cs index d5ec18bd..89a2773e 100644 --- a/BPASmartClient.Morkt.JAKA.JC/Control_MORKJC.cs +++ b/BPASmartClient.Morkt.JAKA.JC/Control_MORKJC.cs @@ -9,11 +9,11 @@ using System.Threading.Tasks; using BPASmartClient.Device; using BPA.Message.Enum; using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.咖啡机.Enum; using BPASmartClient.Model; -using BPASmartClient.EventBus; -using static BPASmartClient.EventBus.EventBus; + + using BPASmartClient.Model.PLC; using BPASmartClient.Model.单片机; using BPASmartClient.Message; diff --git a/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs b/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs index aa18d11e..e9268639 100644 --- a/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs +++ b/BPASmartClient.Morkt.JAKA.JC/View/DebugView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs b/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs index 71508b02..e70de08a 100644 --- a/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs +++ b/BPASmartClient.Morkt.JAKA.JC/ViewModel/DebugViewModel.cs @@ -1,9 +1,9 @@ using BPASmartClient.Business; using BPASmartClient.Device; using BPASmartClient.DRCoffee; -using BPASmartClient.EventBus; + using BPASmartClient.GSIceCream; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.LebaiRobot; using BPASmartClient.Message; using BPASmartClient.Model; @@ -37,7 +37,7 @@ namespace BPASmartClient.MorkTJAKAJC.ViewModel; /// /// 机器人控制指令 /// - public RelayCommand Button_RobotControlCommand { get; set; } + public BPARelayCommand Button_RobotControlCommand { get; set; } /// /// 机器人控制 /// @@ -101,15 +101,15 @@ namespace BPASmartClient.MorkTJAKAJC.ViewModel; /// /// 制作咖啡 /// - public RelayCommand Button_MakeCoffeeCommand { get; set; } + public BPARelayCommand Button_MakeCoffeeCommand { get; set; } /// /// 停止制作咖啡 /// - public RelayCommand Button_StopMakeCoffeCommand { get; set; } + public BPARelayCommand Button_StopMakeCoffeCommand { get; set; } /// /// 咖啡模式设置 /// - public RelayCommand Button_CoffeeModeSetCommand { get; set; } + public BPARelayCommand Button_CoffeeModeSetCommand { get; set; } private void Button_MakeCoffee() { @@ -129,8 +129,8 @@ namespace BPASmartClient.MorkTJAKAJC.ViewModel; public string MCUConnected { get { return _mcuConnected; } set { _mcuConnected = value; OnPropertyChanged(); } } private string _mcuConnected { get; set; } - public RelayCommand Button_MCUOuputCommand { get; set; } - public RelayCommand Button_MCUDOuputCommand { get; set; } + public BPARelayCommand Button_MCUOuputCommand { get; set; } + public BPARelayCommand Button_MCUDOuputCommand { get; set; } public int PWMInputNumber { get { return _pwmInputNumber; } set { _pwmInputNumber = value; OnPropertyChanged(); } } private int _pwmInputNumber = 1; @@ -169,13 +169,13 @@ namespace BPASmartClient.MorkTJAKAJC.ViewModel; public DebugViewModel() { - Button_RobotControlCommand = new RelayCommand(Button_RobotControl); - Button_MakeCoffeeCommand = new RelayCommand(Button_MakeCoffee); - Button_StopMakeCoffeCommand = new RelayCommand(Button_StopMakeCoffe); - Button_CoffeeModeSetCommand = new RelayCommand(Button_CoffeeModeSet); + Button_RobotControlCommand = new BPARelayCommand(Button_RobotControl); + Button_MakeCoffeeCommand = new BPARelayCommand(Button_MakeCoffee); + Button_StopMakeCoffeCommand = new BPARelayCommand(Button_StopMakeCoffe); + Button_CoffeeModeSetCommand = new BPARelayCommand(Button_CoffeeModeSet); - Button_MCUOuputCommand = new RelayCommand(Button_McuOutput); - Button_MCUDOuputCommand = new RelayCommand(Button_McuDOutput); + Button_MCUOuputCommand = new BPARelayCommand(Button_McuOutput); + Button_MCUDOuputCommand = new BPARelayCommand(Button_McuDOutput); foreach (DrCoffeeDrinksCode code in Enum.GetValues(typeof(DrCoffeeDrinksCode))) { diff --git a/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs b/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs index 75896d2d..d8647cc5 100644 --- a/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs +++ b/BPASmartClient.Morkt.JAKA.JC/ViewModel/MonitorViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.Business; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.乐白机器人; using BPA.Helper; using System; diff --git a/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj b/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj index aa29a685..e54eeb6f 100644 --- a/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj +++ b/BPASmartClient.Nfc/BPASmartClient.Nfc.csproj @@ -21,7 +21,7 @@ - + diff --git a/BPASmartClient.RobotGripper/RobotGripperMachine.cs b/BPASmartClient.RobotGripper/RobotGripperMachine.cs index 7a55e09a..b61848dd 100644 --- a/BPASmartClient.RobotGripper/RobotGripperMachine.cs +++ b/BPASmartClient.RobotGripper/RobotGripperMachine.cs @@ -2,8 +2,8 @@ using System; using BPASmartClient.Peripheral; using BPASmartClient.SerialPort; using BPASmartClient.Model.צ; -using static BPASmartClient.EventBus.EventBus; -using BPASmartClient.EventBus; + + namespace BPASmartClient.RobotGripper { diff --git a/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj b/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj index abd3d301..69e6c9f5 100644 --- a/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj +++ b/BPASmartClient.S7Net/BPASmartClient.S7Net.csproj @@ -7,7 +7,7 @@ - + diff --git a/BPASmartClient.SCChip/ChipStatus.cs b/BPASmartClient.SCChip/ChipStatus.cs index 9189085b..f31a25ab 100644 --- a/BPASmartClient.SCChip/ChipStatus.cs +++ b/BPASmartClient.SCChip/ChipStatus.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model.单片机.Enum; using BPASmartClient.SCChip; using System; diff --git a/BPASmartClient.SCChip/CommandHandler.cs b/BPASmartClient.SCChip/CommandHandler.cs index 2719d011..39abfa27 100644 --- a/BPASmartClient.SCChip/CommandHandler.cs +++ b/BPASmartClient.SCChip/CommandHandler.cs @@ -1,5 +1,5 @@  -using BPASmartClient.EventBus; + using BPASmartClient.Message; using BPASmartClient.Model.单片机; using BPASmartClient.Model.单片机.Enum; @@ -12,7 +12,7 @@ using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.SCChip { diff --git a/BPASmartClient.SCChip/ICChipMachine.cs b/BPASmartClient.SCChip/ICChipMachine.cs index 3e1d03ab..b97ea244 100644 --- a/BPASmartClient.SCChip/ICChipMachine.cs +++ b/BPASmartClient.SCChip/ICChipMachine.cs @@ -1,5 +1,5 @@ -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPASmartClient.Model.单片机; @@ -10,7 +10,7 @@ using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Threading; -using static BPASmartClient.EventBus.EventBus; + namespace BPASmartClient.SCChip { diff --git a/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj b/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj index 2abf7c2f..eea7dbef 100644 --- a/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj +++ b/BPASmartClient.SmallBatchingSystem/BPASmartClient.SmallBatchingSystem.csproj @@ -22,8 +22,6 @@ - - diff --git a/BPASmartClient.SmallBatchingSystem/Models/BaseModel.cs b/BPASmartClient.SmallBatchingSystem/Models/BaseModel.cs index 5ac99731..f870101a 100644 --- a/BPASmartClient.SmallBatchingSystem/Models/BaseModel.cs +++ b/BPASmartClient.SmallBatchingSystem/Models/BaseModel.cs @@ -11,11 +11,11 @@ namespace BPASmartClient.SmallBatchingSystem public class BaseModel : NotifyBase { public int Index { get; set; } = -1; - public RelayCommand AddCommand { get; set; } - public RelayCommand CancelCommand { get; set; } - public RelayCommand SaveCommand { get; set; } - public RelayCommand RemoveCommand { get; set; } - public RelayCommand DetailsCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } + public BPARelayCommand RemoveCommand { get; set; } + public BPARelayCommand DetailsCommand { get; set; } public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } private string _mErrorInfo; diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/GrindArenaceousViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/GrindArenaceousViewModel.cs index 90ac9a53..47cac564 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/GrindArenaceousViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/GrindArenaceousViewModel.cs @@ -37,7 +37,7 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels }); } }), "OpenRecipeStatusMotion", true); - CancelCommand = new RelayCommand(() => + CancelCommand = new BPARelayCommand(() => { if (MessageNotify.GetInstance.ShowDialog($"是否取消配方制作,取消后设备将终止配料过程!", DialogType.Warning)) { diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/NewOutletViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/NewOutletViewModel.cs index 960b9888..dccec88f 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/NewOutletViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/NewOutletViewModel.cs @@ -30,9 +30,9 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels Index = Array.FindIndex(Json.Data.OutletInfoModels.ToArray(), p => p.OutletName == tempOutletInfo.OutletName); } }), "OpenNewOutlet", true); - AddCommand = new RelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); - CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); - SaveCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); + CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); + SaveCommand = new BPARelayCommand(() => { ObservableCollection SileNames = new ObservableCollection(); SiloInfos.ToList()?.ForEach(item => { SileNames.Add(item.RawMaterialName); }); @@ -83,7 +83,7 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels } ActionManage.GetInstance.Send("NewOutletViewClose"); }); - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/NewRecipeViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/NewRecipeViewModel.cs index 44beb688..053e8ff1 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/NewRecipeViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/NewRecipeViewModel.cs @@ -28,9 +28,9 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels Index = Array.FindIndex(Json.Data.Recipes.ToArray(), p => p.RecipeName == tempRecipeInfo.RecipeName); } }), "OpenNewRecipe", true); - AddCommand = new RelayCommand(() => { SiloInfos.Add(new RecipeRawMaterialInfo()); }); - CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("NewRecipeViewModelClose"); }); - SaveCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { SiloInfos.Add(new RecipeRawMaterialInfo()); }); + CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("NewRecipeViewModelClose"); }); + SaveCommand = new BPARelayCommand(() => { if (Index >= 0 && Index < Json.Data.OutletInfoModels.Count) { @@ -68,7 +68,7 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels ActionManage.GetInstance.Send("NewRecipeViewModelClose"); }); - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/NewSiloViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/NewSiloViewModel.cs index 52ec097a..4c5e5b0c 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/NewSiloViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/NewSiloViewModel.cs @@ -13,8 +13,8 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels { public NewSiloViewModel() { - CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("SiloClose"); }); - SaveCommand = new RelayCommand(() => + CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SiloClose"); }); + SaveCommand = new BPARelayCommand(() => { if (Index >= 0 && Index < Json.Data.SiloInfoModels.Count) { diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/OutletManagementViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/OutletManagementViewModel.cs index 30642cdd..7d0c09f6 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/OutletManagementViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/OutletManagementViewModel.cs @@ -16,14 +16,14 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels { public OutletManagementViewModel() { - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { NewOutletView newOutletView = new NewOutletView(); newOutletView.ShowDialog(); }); - SaveCommand = new RelayCommand(() => { Json.Save(); }); + SaveCommand = new BPARelayCommand(() => { Json.Save(); }); OutletInfoModels = Json.Data.OutletInfoModels; - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -39,7 +39,7 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels } }); - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeControlViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeControlViewModel.cs index f4e4f118..4e2ff4e0 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeControlViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeControlViewModel.cs @@ -19,7 +19,7 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels public RecipeControlViewModel() { Recipes = Json.Data.Recipes; - StartCommand = new RelayCommand((o) => + StartCommand = new BPARelayCommand((o) => { Task.Factory.StartNew(() => { @@ -56,14 +56,14 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels }); }); - DeviceInitCommand = new RelayCommand(() => { PlcServer.GetInstance.WriteData("M10.4", true); }); + DeviceInitCommand = new BPARelayCommand(() => { PlcServer.GetInstance.WriteData("M10.4", true); }); } - public RelayCommand DeviceInitCommand { get; set; } + public BPARelayCommand DeviceInitCommand { get; set; } public ObservableCollection Recipes { get; set; } - public RelayCommand StartCommand { get; set; } + public BPARelayCommand StartCommand { get; set; } } } diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeViewModel.cs index aa9b7ba4..7c537fd5 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/RecipeViewModel.cs @@ -18,14 +18,14 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels { public RecipeViewModel() { - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { NewRecipeView newOutletView = new NewRecipeView(); newOutletView.ShowDialog(); }); - SaveCommand = new RelayCommand(() => { Json.Save(); Control.GetInstance.NotifyPrompt("配方保存成功"); }); + SaveCommand = new BPARelayCommand(() => { Json.Save(); Control.GetInstance.NotifyPrompt("配方保存成功"); }); RecipeInfoModels = Json.Data.Recipes; - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -42,7 +42,7 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels } }); - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/BPASmartClient.SmallBatchingSystem/ViewModels/SiloManagementViewModel.cs b/BPASmartClient.SmallBatchingSystem/ViewModels/SiloManagementViewModel.cs index 591ca18f..179ea43d 100644 --- a/BPASmartClient.SmallBatchingSystem/ViewModels/SiloManagementViewModel.cs +++ b/BPASmartClient.SmallBatchingSystem/ViewModels/SiloManagementViewModel.cs @@ -16,14 +16,14 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels { public SiloManagementViewModel() { - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { NewSiloView newSiloView = new NewSiloView(); newSiloView.ShowDialog(); }); - SaveCommand = new RelayCommand(() => { Json.Save(); }); + SaveCommand = new BPARelayCommand(() => { Json.Save(); }); SiloInfoModels = Json.Data.SiloInfoModels; - RemoveCommand = new RelayCommand((o) => + RemoveCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -40,7 +40,7 @@ namespace BPASmartClient.SmallBatchingSystem.ViewModels } }); - DetailsCommand = new RelayCommand((o) => + DetailsCommand = new BPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj b/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj index 385bef00..b08c2dcc 100644 --- a/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj +++ b/BPASmartClient.TourismCollege/BPASmartClient.TourismCollege.csproj @@ -18,7 +18,6 @@ - diff --git a/BPASmartClient.Update/BPASmartClient.Update.csproj b/BPASmartClient.Update/BPASmartClient.Update.csproj index ffcff80a..63ab12fd 100644 --- a/BPASmartClient.Update/BPASmartClient.Update.csproj +++ b/BPASmartClient.Update/BPASmartClient.Update.csproj @@ -8,7 +8,7 @@ - + diff --git a/BPASmartClient.ViewModel/AdminstratorsViewModel.cs b/BPASmartClient.ViewModel/AdminstratorsViewModel.cs index d8f615a0..81c41359 100644 --- a/BPASmartClient.ViewModel/AdminstratorsViewModel.cs +++ b/BPASmartClient.ViewModel/AdminstratorsViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -20,11 +20,11 @@ namespace BPASmartClient.ViewModel public string ErrorMessage { get { return _errorMessage; } set { _errorMessage = value; OnPropertyChanged(); } } private string _errorMessage; - public RelayCommand AdminLoginCommand { get; set; } + public BPARelayCommand AdminLoginCommand { get; set; } public AdminstratorsViewModel() { - AdminLoginCommand = new RelayCommand(() => + AdminLoginCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("LoginSuccess"); diff --git a/BPASmartClient.ViewModel/AlarmViewModel.cs b/BPASmartClient.ViewModel/AlarmViewModel.cs index b4a37368..23ae3ae7 100644 --- a/BPASmartClient.ViewModel/AlarmViewModel.cs +++ b/BPASmartClient.ViewModel/AlarmViewModel.cs @@ -9,7 +9,7 @@ using System.Windows; using System.Threading; using BPA.Helper; using BPASmartClient.Device; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Business; using BPASmartClient.Model; @@ -19,7 +19,7 @@ namespace BPASmartClient.ViewModel { public AlarmViewModel() { - ControlCommand = new RelayCommand(() => + ControlCommand = new BPARelayCommand(() => { if (ControlButText == "报警复位") { @@ -41,7 +41,7 @@ namespace BPASmartClient.ViewModel }); - SwitchCommand = new RelayCommand(() => + SwitchCommand = new BPARelayCommand(() => { if (ButContent == "历史报警") { @@ -105,9 +105,9 @@ namespace BPASmartClient.ViewModel } } - public RelayCommand SwitchCommand { get; set; } + public BPARelayCommand SwitchCommand { get; set; } - public RelayCommand ControlCommand { get; set; } + public BPARelayCommand ControlCommand { get; set; } public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } diff --git a/BPASmartClient.ViewModel/BPASmartClient.ViewModel.csproj b/BPASmartClient.ViewModel/BPASmartClient.ViewModel.csproj index 499bd52b..4922bcba 100644 --- a/BPASmartClient.ViewModel/BPASmartClient.ViewModel.csproj +++ b/BPASmartClient.ViewModel/BPASmartClient.ViewModel.csproj @@ -7,7 +7,6 @@ - diff --git a/BPASmartClient.ViewModel/DataVViewModel.cs b/BPASmartClient.ViewModel/DataVViewModel.cs index 058ea78b..c884df27 100644 --- a/BPASmartClient.ViewModel/DataVViewModel.cs +++ b/BPASmartClient.ViewModel/DataVViewModel.cs @@ -1,6 +1,6 @@  using BPASmartClient.Business; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT; using DataVAPI.Tool.IOT; using BPA.Helper; diff --git a/BPASmartClient.ViewModel/DebugViewModel.cs b/BPASmartClient.ViewModel/DebugViewModel.cs index 8363fdbf..660e57df 100644 --- a/BPASmartClient.ViewModel/DebugViewModel.cs +++ b/BPASmartClient.ViewModel/DebugViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -11,43 +11,43 @@ namespace BPASmartClient.ViewModel { public class DebugViewModel : NotifyBase { - public RelayCommand PlcInite { get; set; } - public RelayCommand SimulateOrder { get; set; } - public RelayCommand TakePot { get; set; } - public RelayCommand TakePotReset { get; set; } - public RelayCommand TempTurnOff { get; set; } - public RelayCommand OneBlock { get; set; } - public RelayCommand TwoBlock { get; set; } - public RelayCommand ThreeBlock { get; set; } + public BPARelayCommand PlcInite { get; set; } + public BPARelayCommand SimulateOrder { get; set; } + public BPARelayCommand TakePot { get; set; } + public BPARelayCommand TakePotReset { get; set; } + public BPARelayCommand TempTurnOff { get; set; } + public BPARelayCommand OneBlock { get; set; } + public BPARelayCommand TwoBlock { get; set; } + public BPARelayCommand ThreeBlock { get; set; } - public RelayCommand OverTurnOff { get; set; } - public RelayCommand OverOneBlock { get; set; } - public RelayCommand OverTwoBlock { get; set; } - public RelayCommand OverThreeBlock { get; set; } - public RelayCommand OverGoOn { get; set; } - public RelayCommand OverGoDown { get; set; } - public RelayCommand ShreddCabbage { get; set; } - public RelayCommand FryPork { get; set; } - public RelayCommand XingBaoGu { get; set; } + public BPARelayCommand OverTurnOff { get; set; } + public BPARelayCommand OverOneBlock { get; set; } + public BPARelayCommand OverTwoBlock { get; set; } + public BPARelayCommand OverThreeBlock { get; set; } + public BPARelayCommand OverGoOn { get; set; } + public BPARelayCommand OverGoDown { get; set; } + public BPARelayCommand ShreddCabbage { get; set; } + public BPARelayCommand FryPork { get; set; } + public BPARelayCommand XingBaoGu { get; set; } public DebugViewModel() { - PlcInite = new RelayCommand(() => { ActionManage.GetInstance.Send("InitCommand"); }); - SimulateOrder = new RelayCommand(() => { ActionManage.GetInstance.Send("SimultaorOrder"); }); - TakePot = new RelayCommand(() => { ActionManage.GetInstance.Send("TakePot"); }); - TakePotReset = new RelayCommand(() => { ActionManage.GetInstance.Send("TakePotReset"); }); - TempTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("TakeOff"); }); - OneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OneBlock"); }); - TwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("TwoBlock"); }); - ThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("ThreeBlock"); }); - OverTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTurnOff"); }); - OverOneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverOneBlock"); }); - OverTwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTwoBlock"); }); - OverThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverThreeBlock"); }); - OverGoOn = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoOn"); }); - OverGoDown = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoDown"); }); - ShreddCabbage = new RelayCommand(() => { ActionManage.GetInstance.Send("ShreddCabbage"); }); - FryPork = new RelayCommand(() => { ActionManage.GetInstance.Send("FryPork"); }); - XingBaoGu = new RelayCommand(() => { ActionManage.GetInstance.Send("XingBaoGu"); }); + PlcInite = new BPARelayCommand(() => { ActionManage.GetInstance.Send("InitCommand"); }); + SimulateOrder = new BPARelayCommand(() => { ActionManage.GetInstance.Send("SimultaorOrder"); }); + TakePot = new BPARelayCommand(() => { ActionManage.GetInstance.Send("TakePot"); }); + TakePotReset = new BPARelayCommand(() => { ActionManage.GetInstance.Send("TakePotReset"); }); + TempTurnOff = new BPARelayCommand(() => { ActionManage.GetInstance.Send("TakeOff"); }); + OneBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OneBlock"); }); + TwoBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("TwoBlock"); }); + ThreeBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ThreeBlock"); }); + OverTurnOff = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverTurnOff"); }); + OverOneBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverOneBlock"); }); + OverTwoBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverTwoBlock"); }); + OverThreeBlock = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverThreeBlock"); }); + OverGoOn = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverGoOn"); }); + OverGoDown = new BPARelayCommand(() => { ActionManage.GetInstance.Send("OverGoDown"); }); + ShreddCabbage = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ShreddCabbage"); }); + FryPork = new BPARelayCommand(() => { ActionManage.GetInstance.Send("FryPork"); }); + XingBaoGu = new BPARelayCommand(() => { ActionManage.GetInstance.Send("XingBaoGu"); }); } } } diff --git a/BPASmartClient.ViewModel/DeviceMonitorViewModel.cs b/BPASmartClient.ViewModel/DeviceMonitorViewModel.cs index d940e96c..29283eb5 100644 --- a/BPASmartClient.ViewModel/DeviceMonitorViewModel.cs +++ b/BPASmartClient.ViewModel/DeviceMonitorViewModel.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using BPA.Helper; using System.Collections.ObjectModel; -using BPASmartClient.Helper; +using BPA.Helper; using System.IO; using Newtonsoft.Json; using BPASmartClient.Model; @@ -20,7 +20,7 @@ namespace BPASmartClient.ViewModel { public DeviceMonitorViewModel() { - DeviceWindowSwitch = new RelayCommand((o) => + DeviceWindowSwitch = new BPARelayCommand((o) => { if (o != null && o is string nameSpace) { @@ -81,9 +81,9 @@ namespace BPASmartClient.ViewModel public FrameworkElement MainContent { get { return _mMainContent; } set { _mMainContent = value; OnPropertyChanged(); } } private FrameworkElement _mMainContent; - public RelayCommand DeviceSwitch { get; set; } + public BPARelayCommand DeviceSwitch { get; set; } - public RelayCommand DeviceWindowSwitch { get; set; } + public BPARelayCommand DeviceWindowSwitch { get; set; } public ObservableCollection Devices { get; set; } = new ObservableCollection(); diff --git a/BPASmartClient.ViewModel/FoodMenuViewModel.cs b/BPASmartClient.ViewModel/FoodMenuViewModel.cs index 708976f2..ca00b776 100644 --- a/BPASmartClient.ViewModel/FoodMenuViewModel.cs +++ b/BPASmartClient.ViewModel/FoodMenuViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.Model.小炒机; using BPA.Helper; @@ -19,13 +19,13 @@ namespace BPASmartClient.ViewModel /// public ObservableCollection FoodMenus { get; set; } = new ObservableCollection(); - public RelayCommand StartOrder { get; set; } + public BPARelayCommand StartOrder { get; set; } public FoodMenuViewModel() { Json.Data.materials?.Keys?.ToList().ForEach(key => FoodMenus.Add(new FoodMenuModel { GoodName = key })); - StartOrder = new RelayCommand((o) => + StartOrder = new BPARelayCommand((o) => { ActionManage.GetInstance.Send("开始下单", o); }); diff --git a/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs b/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs index af39a533..32fddd35 100644 --- a/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs +++ b/BPASmartClient.ViewModel/LogOrAlarmIOTViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.Business; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT; using DataVAPI.Tool.IOT; using BPA.Helper; @@ -46,7 +46,7 @@ namespace BPASmartClient.ViewModel } #endregion #region Command - public RelayCommand QueryCommand { get; set; } + public BPARelayCommand QueryCommand { get; set; } #endregion #region 函数 @@ -56,7 +56,7 @@ namespace BPASmartClient.ViewModel LogDataFile = new ObservableCollection(); //查询 - QueryCommand = new RelayCommand(() => + QueryCommand = new BPARelayCommand(() => { Res(); }); diff --git a/BPASmartClient.ViewModel/LogOrAlarmViewModel.cs b/BPASmartClient.ViewModel/LogOrAlarmViewModel.cs index 8f0e4b82..876ab5e5 100644 --- a/BPASmartClient.ViewModel/LogOrAlarmViewModel.cs +++ b/BPASmartClient.ViewModel/LogOrAlarmViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -123,8 +123,8 @@ namespace BPASmartClient.ViewModel #endregion #region Command - public RelayCommand QueryCommand { get; set; } - public RelayCommand OpenCommand { get; set; } + public BPARelayCommand QueryCommand { get; set; } + public BPARelayCommand OpenCommand { get; set; } #endregion #region 函数 @@ -139,7 +139,7 @@ namespace BPASmartClient.ViewModel SelectBookExs = new ObservableCollection(); ItemPropertyChanged(new BookEx(new Book()) { IsChecked = true }, new PropertyChangedEventArgs("IsChecked")); //查询 - QueryCommand = new RelayCommand(() => + QueryCommand = new BPARelayCommand(() => { string sql = string.Empty; if (SelectBookExs.Count <= 0) @@ -194,7 +194,7 @@ namespace BPASmartClient.ViewModel } }); //打开文件目录 - OpenCommand = new RelayCommand(() => + OpenCommand = new BPARelayCommand(() => { System.Diagnostics.Process.Start("Explorer", "/select," + logHelper.GetLogConfigInstance().directRollfileAppender.File); logHelper.GetLogConfigInstance().OpenFile(logHelper.GetLogConfigInstance().directRollfileAppender.File); diff --git a/BPASmartClient.ViewModel/LogViewModel.cs b/BPASmartClient.ViewModel/LogViewModel.cs index 486c4fe2..326f93e3 100644 --- a/BPASmartClient.ViewModel/LogViewModel.cs +++ b/BPASmartClient.ViewModel/LogViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.Business; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT; using BPASmartClient.Message; using BPASmartClient.Model; @@ -202,12 +202,12 @@ namespace BPASmartClient.ViewModel })); }); - ExcelCommand = new RelayCommand(() => + ExcelCommand = new BPARelayCommand(() => { ExcellOrder(); }); - OpenCommand = new RelayCommand(() => + OpenCommand = new BPARelayCommand(() => { string msg = string.Format("已找到日志文件,是否打开! \n 1.如选中不打开,则弹出日志文件夹目录。\n 2.打开,则弹出日志文件夹目录,并打开文件。"); if (System.Windows.MessageBox.Show(msg, "提示", MessageBoxButton.OKCancel) == MessageBoxResult.OK) @@ -357,8 +357,8 @@ namespace BPASmartClient.ViewModel #endregion #region Command - public RelayCommand ExcelCommand { get; set; } - public RelayCommand OpenCommand { get; set; } + public BPARelayCommand ExcelCommand { get; set; } + public BPARelayCommand OpenCommand { get; set; } #endregion } diff --git a/BPASmartClient.ViewModel/MainViewModel.cs b/BPASmartClient.ViewModel/MainViewModel.cs index 5b267450..ddea9e09 100644 --- a/BPASmartClient.ViewModel/MainViewModel.cs +++ b/BPASmartClient.ViewModel/MainViewModel.cs @@ -1,5 +1,5 @@ using BPASmartClient.Business; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using BPA.Helper; diff --git a/BPASmartClient.ViewModel/NewShopWindowModel.cs b/BPASmartClient.ViewModel/NewShopWindowModel.cs index c195f737..b6c189d4 100644 --- a/BPASmartClient.ViewModel/NewShopWindowModel.cs +++ b/BPASmartClient.ViewModel/NewShopWindowModel.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using Microsoft.Toolkit.Mvvm.Messaging; @@ -17,8 +17,8 @@ namespace BPASmartClient.ViewModel public NewShopWindowModel() { - CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("CloseWindow"); }); - DefineCommand = new RelayCommand(() => + CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("CloseWindow"); }); + DefineCommand = new BPARelayCommand(() => { DirectoryInfo directoryInfo = new DirectoryInfo(LocaPath.GetInstance().GetDeviceConfigPath); var files = directoryInfo.GetFiles(); @@ -32,11 +32,11 @@ namespace BPASmartClient.ViewModel }); } - //public RelayCommand CloseWindowCommand { get; set; } + //public BPARelayCommand CloseWindowCommand { get; set; } - public RelayCommand CancelCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } - public RelayCommand DefineCommand { get; set; } + public BPARelayCommand DefineCommand { get; set; } public string ShopName { get { return _mShopName; } set { _mShopName = value; OnPropertyChanged(); } } private string _mShopName; diff --git a/BPASmartClient.ViewModel/OrderListDialogViewModel.cs b/BPASmartClient.ViewModel/OrderListDialogViewModel.cs index 0f691754..d6676ede 100644 --- a/BPASmartClient.ViewModel/OrderListDialogViewModel.cs +++ b/BPASmartClient.ViewModel/OrderListDialogViewModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Threading; using BPA.Message; using BPA.Message.Enum; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -41,7 +41,7 @@ namespace BPASmartClient.ViewModel /// private void CloseButton() { - CloseCommand = new RelayCommand(() => + CloseCommand = new BPARelayCommand(() => { Json.Data.orderLists.Clear(); WeakReferenceMessenger.Default.Send("false", "Close"); @@ -54,7 +54,7 @@ namespace BPASmartClient.ViewModel /// private void CancelButton() { - CancelCommand = new RelayCommand(() => + CancelCommand = new BPARelayCommand(() => { Json.Data.orderLists.Clear(); WeakReferenceMessenger.Default.Send("false", "Close"); @@ -67,7 +67,7 @@ namespace BPASmartClient.ViewModel /// private void ConfirmButton() { - ConfirmCommand = new RelayCommand(() => + ConfirmCommand = new BPARelayCommand(() => { Json.Data.orderLists.Clear(); //var res = orderStatusLists.Where(p => p.IsSelected == true).ToList(); @@ -103,11 +103,11 @@ namespace BPASmartClient.ViewModel }); } - public RelayCommand CloseCommand { get; set; } + public BPARelayCommand CloseCommand { get; set; } - public RelayCommand CancelCommand { get; set; } + public BPARelayCommand CancelCommand { get; set; } - public RelayCommand ConfirmCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } public ObservableCollection orderStatusLists { diff --git a/BPASmartClient.ViewModel/OrderStatusViewModel.cs b/BPASmartClient.ViewModel/OrderStatusViewModel.cs index 269527a0..f7e2c771 100644 --- a/BPASmartClient.ViewModel/OrderStatusViewModel.cs +++ b/BPASmartClient.ViewModel/OrderStatusViewModel.cs @@ -8,8 +8,8 @@ using System.Windows; using BPA.Message; using BPA.Message.Enum; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; diff --git a/BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs b/BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs index 5cd86d46..edace7b6 100644 --- a/BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs +++ b/BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System.Collections.ObjectModel; @@ -41,15 +41,15 @@ namespace BPASmartClient.ViewModel } }), "ShopPar"); - NewDeviceCommand = new RelayCommand(NewDevice); - RemoveDeviceCommand = new RelayCommand(RemoveDevice); - NewCommunicationCommand = new RelayCommand(NewCommunication); - RemoveCommunicationCommand = new RelayCommand(RemoveCommunication); - NewShopCommand = new RelayCommand(() => { NewShop?.Invoke(); }); + NewDeviceCommand = new BPARelayCommand(NewDevice); + RemoveDeviceCommand = new BPARelayCommand(RemoveDevice); + NewCommunicationCommand = new BPARelayCommand(NewCommunication); + RemoveCommunicationCommand = new BPARelayCommand(RemoveCommunication); + NewShopCommand = new BPARelayCommand(() => { NewShop?.Invoke(); }); DataListInit(); - SaveData = new RelayCommand(() => + SaveData = new BPARelayCommand(() => { if (deviceConfig.Count > 0) { @@ -159,26 +159,26 @@ namespace BPASmartClient.ViewModel /// /// 新建设备 /// - public RelayCommand NewDeviceCommand { get; set; } + public BPARelayCommand NewDeviceCommand { get; set; } /// /// 删除设备 /// - public RelayCommand RemoveDeviceCommand { get; set; } + public BPARelayCommand RemoveDeviceCommand { get; set; } /// /// 新建通讯 /// - public RelayCommand NewCommunicationCommand { get; set; } + public BPARelayCommand NewCommunicationCommand { get; set; } /// /// 删除通讯 /// - public RelayCommand RemoveCommunicationCommand { get; set; } + public BPARelayCommand RemoveCommunicationCommand { get; set; } - public RelayCommand SaveData { get; set; } + public BPARelayCommand SaveData { get; set; } - public RelayCommand NewShopCommand { get; set; } + public BPARelayCommand NewShopCommand { get; set; } #endregion #region 列表集合 diff --git a/BPASmartClient.ViewModel/SystemSetViewModel.cs b/BPASmartClient.ViewModel/SystemSetViewModel.cs index bcb10ac5..45d2914d 100644 --- a/BPASmartClient.ViewModel/SystemSetViewModel.cs +++ b/BPASmartClient.ViewModel/SystemSetViewModel.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; diff --git a/BPASmartClient/App.xaml.cs b/BPASmartClient/App.xaml.cs index 48fb5fc7..802c62ad 100644 --- a/BPASmartClient/App.xaml.cs +++ b/BPASmartClient/App.xaml.cs @@ -2,7 +2,7 @@ using BPA.Message.Enum; using BPASmartClient.CustomResource; using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using BPASmartClient.Model; using System; diff --git a/BPASmartClient/BPASmartClient.csproj b/BPASmartClient/BPASmartClient.csproj index b2efb89c..3d48218b 100644 --- a/BPASmartClient/BPASmartClient.csproj +++ b/BPASmartClient/BPASmartClient.csproj @@ -31,7 +31,6 @@ - diff --git a/BPASmartClient/Control/DataVView.xaml.cs b/BPASmartClient/Control/DataVView.xaml.cs index 09047adb..8acc7e98 100644 --- a/BPASmartClient/Control/DataVView.xaml.cs +++ b/BPASmartClient/Control/DataVView.xaml.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.IoT; using BPASmartClient.ViewModel; using DataVAPI.Tool.IOT; diff --git a/BPASmartClient/Control/LogOrAlarmIOTView.xaml.cs b/BPASmartClient/Control/LogOrAlarmIOTView.xaml.cs index 17370a7f..e3564690 100644 --- a/BPASmartClient/Control/LogOrAlarmIOTView.xaml.cs +++ b/BPASmartClient/Control/LogOrAlarmIOTView.xaml.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.ViewModel; using DataVAPI.Tool.IOT; using Microsoft.Win32; diff --git a/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs b/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs index ab21b48b..df14e231 100644 --- a/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs +++ b/BPASmartClient/Control/ShopDeviceConfigView.xaml.cs @@ -15,7 +15,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using BPASmartClient.DialogWindow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Model; using BPASmartClient.ViewModel; using Newtonsoft.Json; diff --git a/BPASmartClient/DialogWindow/NewShopWindow.xaml.cs b/BPASmartClient/DialogWindow/NewShopWindow.xaml.cs index b58e0f44..edd4c382 100644 --- a/BPASmartClient/DialogWindow/NewShopWindow.xaml.cs +++ b/BPASmartClient/DialogWindow/NewShopWindow.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using Microsoft.Toolkit.Mvvm.Messaging; using System; using System.Collections.Generic; diff --git a/BPASmartClient/MainWindow.xaml.cs b/BPASmartClient/MainWindow.xaml.cs index 88a9d024..419513cf 100644 --- a/BPASmartClient/MainWindow.xaml.cs +++ b/BPASmartClient/MainWindow.xaml.cs @@ -4,8 +4,8 @@ using BPASmartClient.Control; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.Device; -using BPASmartClient.EventBus; -using BPASmartClient.Helper; + +using BPA.Helper; using BPASmartClient.IoT; using BPASmartClient.Message; using BPASmartClient.Model; diff --git a/DosingSystem/BPASmartClient.DosingSystem.csproj b/DosingSystem/BPASmartClient.DosingSystem.csproj index 6efcd166..22eb4ff7 100644 --- a/DosingSystem/BPASmartClient.DosingSystem.csproj +++ b/DosingSystem/BPASmartClient.DosingSystem.csproj @@ -21,7 +21,7 @@ - + diff --git a/DosingSystem/Model/ViewModelBase.cs b/DosingSystem/Model/ViewModelBase.cs index dcb58164..ab0a5584 100644 --- a/DosingSystem/Model/ViewModelBase.cs +++ b/DosingSystem/Model/ViewModelBase.cs @@ -12,11 +12,11 @@ namespace BPASmartClient.DosingSystem public class ViewModelBase : NotifyBase { public int Index { get; set; } = -1; - public BPARelayCommand AddCommand { get; set; }//添加 - public BPARelayCommand CancelCommand { get; set; }//取消 - public BPARelayCommand SaveCommand { get; set; }//保存 - public BPARelayCommand RemoveCommand { get; set; }//移除 - public BPARelayCommand DetailsCommand { get; set; }//编辑 + public BPABPARelayCommand AddCommand { get; set; }//添加 + public BPABPARelayCommand CancelCommand { get; set; }//取消 + public BPABPARelayCommand SaveCommand { get; set; }//保存 + public BPABPARelayCommand RemoveCommand { get; set; }//移除 + public BPABPARelayCommand DetailsCommand { get; set; }//编辑 /// /// 错误信息 diff --git a/DosingSystem/View/NewMaterialView.xaml.cs b/DosingSystem/View/NewMaterialView.xaml.cs index 6c8c9498..4e3a9753 100644 --- a/DosingSystem/View/NewMaterialView.xaml.cs +++ b/DosingSystem/View/NewMaterialView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/DosingSystem/ViewModel/ChangeDeviceNameViewModel.cs b/DosingSystem/ViewModel/ChangeDeviceNameViewModel.cs index 614de6ed..58dfcbb9 100644 --- a/DosingSystem/ViewModel/ChangeDeviceNameViewModel.cs +++ b/DosingSystem/ViewModel/ChangeDeviceNameViewModel.cs @@ -17,8 +17,8 @@ namespace BPASmartClient.DosingSystem.ViewModel if (o != null && o is string str) IpAddress = str; }), "ChangeDeviceNameViewOpen"); - CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); - AddCommand = new BPARelayCommand(() => + CancelCommand = new BPABPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); + AddCommand = new BPABPARelayCommand(() => { if (string.IsNullOrEmpty(DeviceName)) { diff --git a/DosingSystem/ViewModel/CommparSetViewModel.cs b/DosingSystem/ViewModel/CommparSetViewModel.cs index ce436ef9..31871a31 100644 --- a/DosingSystem/ViewModel/CommparSetViewModel.cs +++ b/DosingSystem/ViewModel/CommparSetViewModel.cs @@ -14,7 +14,7 @@ namespace BPASmartClient.DosingSystem.ViewModel { public CommparSetViewModel() { - SaveCommand = new BPARelayCommand(() => + SaveCommand = new BPABPARelayCommand(() => { if (!string.IsNullOrEmpty(CommBaseParModel.NetworkSegAddress)) { @@ -37,7 +37,7 @@ namespace BPASmartClient.DosingSystem.ViewModel public BasePar CommBaseParModel { get { return Json.Data.BaseParModel; } set { Json.Data.BaseParModel = value; OnPropertyChanged(); } } //private BasePar _mCommBaseParModel; - public BPARelayCommand SaveCommand { get; set; } + public BPABPARelayCommand SaveCommand { get; set; } } } diff --git a/DosingSystem/ViewModel/DeviceListViewModel.cs b/DosingSystem/ViewModel/DeviceListViewModel.cs index 629cc44d..85d948c0 100644 --- a/DosingSystem/ViewModel/DeviceListViewModel.cs +++ b/DosingSystem/ViewModel/DeviceListViewModel.cs @@ -16,7 +16,7 @@ namespace BPASmartClient.DosingSystem.ViewModel { public DeviceListViewModel() { - DetailsCommand = new BPARelayCommand((o) => + DetailsCommand = new BPABPARelayCommand((o) => { if (o != null && o is string str) { @@ -28,7 +28,7 @@ namespace BPASmartClient.DosingSystem.ViewModel devices = DeviceInquire.GetInstance.devices; } - //public BPARelayCommand ChangeNameCommand { get; set; } + //public BPABPARelayCommand ChangeNameCommand { get; set; } //public static ObservableCollection devices { get; set; } = new ObservableCollection(); public ObservableCollection devices { get; set; } diff --git a/DosingSystem/ViewModel/DeviceMaterialParViewModel.cs b/DosingSystem/ViewModel/DeviceMaterialParViewModel.cs index 7dca646b..7ac58668 100644 --- a/DosingSystem/ViewModel/DeviceMaterialParViewModel.cs +++ b/DosingSystem/ViewModel/DeviceMaterialParViewModel.cs @@ -16,15 +16,15 @@ namespace BPASmartClient.DosingSystem.ViewModel public DeviceMaterialParViewModel() { deviceParModels = Json.Data.deviceParModels; - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); if (res != null) deviceParModels.Remove(res); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); }); - AddCommand = new BPARelayCommand(() => { deviceParModels.Add(new DeviceParModel()); }); - SaveCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { deviceParModels.Add(new DeviceParModel()); }); + SaveCommand = new BPABPARelayCommand(() => { if (deviceParModels == null || deviceParModels.Count <= 0) { @@ -57,10 +57,10 @@ namespace BPASmartClient.DosingSystem.ViewModel public ObservableCollection deviceParModels { get; set; } - //public BPARelayCommand RemoveCommand { get; set; } + //public BPABPARelayCommand RemoveCommand { get; set; } - //public BPARelayCommand AddCommand { get; set; } - //public BPARelayCommand SaveCommand { get; set; } + //public BPABPARelayCommand AddCommand { get; set; } + //public BPABPARelayCommand SaveCommand { get; set; } } } diff --git a/DosingSystem/ViewModel/HardwareStatusViewModel.cs b/DosingSystem/ViewModel/HardwareStatusViewModel.cs index c1193712..6ce02325 100644 --- a/DosingSystem/ViewModel/HardwareStatusViewModel.cs +++ b/DosingSystem/ViewModel/HardwareStatusViewModel.cs @@ -23,7 +23,7 @@ namespace BPASmartClient.DosingSystem.ViewModel // ConveyerBeltModels.Add(new ConveyerBeltModel() { Name = $"输送带{i}", Num = i++ }); //} - //ConveyerBeltControlCommand = new BPARelayCommand(o => + //ConveyerBeltControlCommand = new BPABPARelayCommand(o => //{ // if (o != null && o is int tempCount) // { @@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystem.ViewModel Thread.Sleep(100); }), "输送带料仓状态监控",true); - RecipeControlCommand = new BPARelayCommand((o) => + RecipeControlCommand = new BPABPARelayCommand((o) => { if (o != null && o is DeviceCurrentStatus currentStatus) { @@ -109,9 +109,9 @@ namespace BPASmartClient.DosingSystem.ViewModel public ObservableCollection ConveyerBeltModels { get; set; } = new ObservableCollection(); - public BPARelayCommand ConveyerBeltControlCommand { get; set; } + public BPABPARelayCommand ConveyerBeltControlCommand { get; set; } - public BPARelayCommand RecipeControlCommand { get; set; } + public BPABPARelayCommand RecipeControlCommand { get; set; } /// /// 输送带状态 diff --git a/DosingSystem/ViewModel/ManualControlViewModel.cs b/DosingSystem/ViewModel/ManualControlViewModel.cs index e9bbdbba..c9123ba1 100644 --- a/DosingSystem/ViewModel/ManualControlViewModel.cs +++ b/DosingSystem/ViewModel/ManualControlViewModel.cs @@ -51,7 +51,7 @@ namespace BPASmartClient.DosingSystem.ViewModel OtherHandCylinders.Add(new CylinderModel() { Name = "上桶工位气缸" }); OtherHandCylinders.Add(new CylinderModel() { Name = "下桶工位气缸" }); - Open = new BPARelayCommand((o) => + Open = new BPABPARelayCommand((o) => { if (o != null) { @@ -76,7 +76,7 @@ namespace BPASmartClient.DosingSystem.ViewModel }); - Close = new BPARelayCommand((o) => + Close = new BPABPARelayCommand((o) => { if (o != null) { @@ -100,14 +100,14 @@ namespace BPASmartClient.DosingSystem.ViewModel } }); - SystemStart = new BPARelayCommand(() => + SystemStart = new BPABPARelayCommand(() => { SiemensDevice.GetInstance.MySiemens.Write("M10.0", SystemControlText == "停止" ? false : true); Thread.Sleep(100); var res = SiemensDevice.GetInstance.MySiemens.Read("M10.0"); SystemControlText = res ? "停止" : "启动"; }); - ModelSwitch = new BPARelayCommand(() => + ModelSwitch = new BPABPARelayCommand(() => { SiemensDevice.GetInstance.MySiemens.Write("M10.1", ModelSwitchText == "手动" ? true : false); Thread.Sleep(100); @@ -170,12 +170,12 @@ namespace BPASmartClient.DosingSystem.ViewModel /// public ObservableCollection OtherHandCylinders { get; set; } = new ObservableCollection(); - public BPARelayCommand Open { get; set; } + public BPABPARelayCommand Open { get; set; } - public BPARelayCommand Close { get; set; } + public BPABPARelayCommand Close { get; set; } - public BPARelayCommand SystemStart { get; set; } - public BPARelayCommand ModelSwitch { get; set; } + public BPABPARelayCommand SystemStart { get; set; } + public BPABPARelayCommand ModelSwitch { get; set; } public string SystemControlText { get { return _mSystemControlText; } set { _mSystemControlText = value; OnPropertyChanged(); } } diff --git a/DosingSystem/ViewModel/NewMaterialViewModel.cs b/DosingSystem/ViewModel/NewMaterialViewModel.cs index 0fd5b448..27d68b77 100644 --- a/DosingSystem/ViewModel/NewMaterialViewModel.cs +++ b/DosingSystem/ViewModel/NewMaterialViewModel.cs @@ -22,9 +22,9 @@ public class NewMaterialViewModel : ViewModelBase //public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } //private string _mErrorInfo; - //public BPARelayCommand RemoveCommand { get; set; } + //public BPABPARelayCommand RemoveCommand { get; set; } - //public BPARelayCommand SaveCommand { get; set; } + //public BPABPARelayCommand SaveCommand { get; set; } @@ -42,9 +42,9 @@ public class NewMaterialViewModel : ViewModelBase public NewMaterialViewModel() { - RemoveCommand = new BPARelayCommand(Remove); + RemoveCommand = new BPABPARelayCommand(Remove); - SaveCommand = new BPARelayCommand(() => + SaveCommand = new BPABPARelayCommand(() => { if (MaterialName == String.Empty) { ErrorInfo = "原料名称不能为空"; return; } if (Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == MaterialName) != null) { ErrorInfo = "设备中已存在该原料名称"; return; } diff --git a/DosingSystem/ViewModel/NewOutletViewModel.cs b/DosingSystem/ViewModel/NewOutletViewModel.cs index b0e5fab0..6d85be56 100644 --- a/DosingSystem/ViewModel/NewOutletViewModel.cs +++ b/DosingSystem/ViewModel/NewOutletViewModel.cs @@ -29,9 +29,9 @@ namespace BPASmartClient.DosingSystem.ViewModel Index = Array.FindIndex(Json.Data.OutletInfoModels.ToArray(), p => p.OutletName == tempOutletInfo.OutletName); } }), "OpenNewOutlet", true); - AddCommand = new BPARelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); - CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); - SaveCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); + CancelCommand = new BPABPARelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); + SaveCommand = new BPABPARelayCommand(() => { ObservableCollection SileNames = new ObservableCollection(); SiloInfos.ToList()?.ForEach(item => { SileNames.Add(item.RawMaterialName); }); @@ -82,7 +82,7 @@ namespace BPASmartClient.DosingSystem.ViewModel } ActionManage.GetInstance.Send("NewOutletViewClose"); }); - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/DosingSystem/ViewModel/NewRecipeViewModel.cs b/DosingSystem/ViewModel/NewRecipeViewModel.cs index 54da0130..789bdea4 100644 --- a/DosingSystem/ViewModel/NewRecipeViewModel.cs +++ b/DosingSystem/ViewModel/NewRecipeViewModel.cs @@ -41,7 +41,7 @@ namespace BPASmartClient.DosingSystem.ViewModel } }), "Details", true); - AddCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { if (RawMaterials.Count >= DeviceInquire.GetInstance.devices.Count) { @@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystem.ViewModel else goto p; }); - RemoveCommand = new BPARelayCommand((obj) => + RemoveCommand = new BPABPARelayCommand((obj) => { if (obj is string rm) { @@ -71,7 +71,7 @@ namespace BPASmartClient.DosingSystem.ViewModel } }); - SaveCommand = new BPARelayCommand(() => + SaveCommand = new BPABPARelayCommand(() => { if (string.IsNullOrEmpty(RecipeName)) { MessageNotify.GetInstance.ShowDialog("请输入配方名称!", DialogType.Warning); ErrorInfo = "请输入配方名称"; return; } var tempRes = RawMaterials.GroupBy(p => p.RawMaterialName); @@ -195,11 +195,11 @@ namespace BPASmartClient.DosingSystem.ViewModel //public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } //private string _mErrorInfo; - //public BPARelayCommand AddCommand { get; set; } + //public BPABPARelayCommand AddCommand { get; set; } - //public BPARelayCommand RemoveCommand { get; set; } + //public BPABPARelayCommand RemoveCommand { get; set; } - //public BPARelayCommand SaveCommand { get; set; } + //public BPABPARelayCommand SaveCommand { get; set; } public ObservableCollection RawMaterials { get; set; } = new ObservableCollection(); diff --git a/DosingSystem/ViewModel/OutletManagementViewModel.cs b/DosingSystem/ViewModel/OutletManagementViewModel.cs index 474869aa..c39f50ed 100644 --- a/DosingSystem/ViewModel/OutletManagementViewModel.cs +++ b/DosingSystem/ViewModel/OutletManagementViewModel.cs @@ -14,14 +14,14 @@ namespace BPASmartClient.DosingSystem.ViewModel { public OutletManagementViewModel() { - AddCommand = new BPARelayCommand(() => + AddCommand = new BPABPARelayCommand(() => { NewOutletView newOutletView = new NewOutletView(); newOutletView.ShowDialog(); }); - SaveCommand = new BPARelayCommand(() => { Json.Save(); }); + SaveCommand = new BPABPARelayCommand(() => { Json.Save(); }); OutletInfoModels = Json.Data.OutletInfoModels; - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -34,7 +34,7 @@ namespace BPASmartClient.DosingSystem.ViewModel } }); - DetailsCommand = new BPARelayCommand((o) => + DetailsCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { diff --git a/DosingSystem/ViewModel/RecipeControlViewModel.cs b/DosingSystem/ViewModel/RecipeControlViewModel.cs index 86cefcf6..9afc4946 100644 --- a/DosingSystem/ViewModel/RecipeControlViewModel.cs +++ b/DosingSystem/ViewModel/RecipeControlViewModel.cs @@ -25,9 +25,9 @@ namespace BPASmartClient.DosingSystem.ViewModel static ObservableCollection StockStatus = new ObservableCollection(); public RecipeControlViewModel() { - StartCommand = new BPARelayCommand(RecipeIssued); - ChangeRecipeStateCommand = new BPARelayCommand(ChangeRecipeState); - CancelRecipeCommand = new BPARelayCommand(CancelRecipe); + StartCommand = new BPABPARelayCommand(RecipeIssued); + ChangeRecipeStateCommand = new BPABPARelayCommand(ChangeRecipeState); + CancelRecipeCommand = new BPABPARelayCommand(CancelRecipe); RecipeRun(); RecipeStatusInquire(); } @@ -666,11 +666,11 @@ namespace BPASmartClient.DosingSystem.ViewModel }), "RecipeControlViewModelStatusInquire",true); } - public BPARelayCommand StartCommand { get; set; } + public BPABPARelayCommand StartCommand { get; set; } - public BPARelayCommand ChangeRecipeStateCommand { get; set; } + public BPABPARelayCommand ChangeRecipeStateCommand { get; set; } - public BPARelayCommand CancelRecipeCommand { get; set; } + public BPABPARelayCommand CancelRecipeCommand { get; set; } public static ObservableCollection Recipes { get; set; } = Json.Data.Recipes; diff --git a/DosingSystem/ViewModel/RecipeSettingsViewModel.cs b/DosingSystem/ViewModel/RecipeSettingsViewModel.cs index 7e97422b..cd206106 100644 --- a/DosingSystem/ViewModel/RecipeSettingsViewModel.cs +++ b/DosingSystem/ViewModel/RecipeSettingsViewModel.cs @@ -26,24 +26,24 @@ namespace BPASmartClient.DosingSystem.ViewModel { Recipes = Json.Data.Recipes; - NewMaterital = new BPARelayCommand(() => + NewMaterital = new BPABPARelayCommand(() => { NewMaterialView newMateritalView = new NewMaterialView(); newMateritalView.ShowDialog(); }); - NewRecipe = new BPARelayCommand(() => + NewRecipe = new BPABPARelayCommand(() => { NewRecipeView nrv = new NewRecipeView(); nrv.ShowDialog(); MessageNotify.GetInstance.ShowUserLog("新建配方"); }); - SaveRecipe = new BPARelayCommand(() => + SaveRecipe = new BPABPARelayCommand(() => { Json.Save(); MessageNotify.GetInstance.ShowUserLog("保存配方"); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); }); - RemoveCommand = new BPARelayCommand((o) => + RemoveCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -65,7 +65,7 @@ namespace BPASmartClient.DosingSystem.ViewModel } }); - DetailsCommand = new BPARelayCommand((o) => + DetailsCommand = new BPABPARelayCommand((o) => { if (!string.IsNullOrEmpty(o?.ToString())) { @@ -82,17 +82,17 @@ namespace BPASmartClient.DosingSystem.ViewModel } - public BPARelayCommand NewMaterital { get; set; } + public BPABPARelayCommand NewMaterital { get; set; } - public BPARelayCommand NewRecipe { get; set; } + public BPABPARelayCommand NewRecipe { get; set; } - public BPARelayCommand SaveRecipe { get; set; } + public BPABPARelayCommand SaveRecipe { get; set; } - public BPARelayCommand EditCommand { get; set; } + public BPABPARelayCommand EditCommand { get; set; } - public BPARelayCommand DetailsCommand { get; set; } + public BPABPARelayCommand DetailsCommand { get; set; } - public BPARelayCommand RemoveCommand { get; set; } + public BPABPARelayCommand RemoveCommand { get; set; } public ObservableCollection Recipes { get; set; } } diff --git a/FryPot_DosingSystem/App.xaml.cs b/FryPot_DosingSystem/App.xaml.cs index 2e98296f..aff20037 100644 --- a/FryPot_DosingSystem/App.xaml.cs +++ b/FryPot_DosingSystem/App.xaml.cs @@ -2,7 +2,7 @@ using BPASmartClient.CustomResource.Pages.Enums; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.Pages.View; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.HubHelper; using FryPot_DosingSystem.Control; using FryPot_DosingSystem.Model; diff --git a/FryPot_DosingSystem/Control/DeviceOperate.cs b/FryPot_DosingSystem/Control/DeviceOperate.cs index 08d7086b..1dfece24 100644 --- a/FryPot_DosingSystem/Control/DeviceOperate.cs +++ b/FryPot_DosingSystem/Control/DeviceOperate.cs @@ -1,6 +1,6 @@  using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Modbus; using FryPot_DosingSystem.Model; diff --git a/FryPot_DosingSystem/Control/DosingLogicControl.cs b/FryPot_DosingSystem/Control/DosingLogicControl.cs index f7737588..0d7db3f2 100644 --- a/FryPot_DosingSystem/Control/DosingLogicControl.cs +++ b/FryPot_DosingSystem/Control/DosingLogicControl.cs @@ -2,7 +2,7 @@ using BPASmartClient.AGV.Enums; using BPASmartClient.AGV.Feedback; using BPASmartClient.CustomResource.Pages.Model; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.HubHelper; using FryPot_DosingSystem.Model; using FryPot_DosingSystem.ViewModel; diff --git a/FryPot_DosingSystem/FryPot_DosingSystem.csproj b/FryPot_DosingSystem/FryPot_DosingSystem.csproj index 8fabe29c..8ba96bc2 100644 --- a/FryPot_DosingSystem/FryPot_DosingSystem.csproj +++ b/FryPot_DosingSystem/FryPot_DosingSystem.csproj @@ -20,7 +20,6 @@ - diff --git a/FryPot_DosingSystem/View/AdministratorLoginView.xaml.cs b/FryPot_DosingSystem/View/AdministratorLoginView.xaml.cs index 281a1b33..4e330aed 100644 --- a/FryPot_DosingSystem/View/AdministratorLoginView.xaml.cs +++ b/FryPot_DosingSystem/View/AdministratorLoginView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/FryPot_DosingSystem/View/AgvView.xaml.cs b/FryPot_DosingSystem/View/AgvView.xaml.cs index 4acb90f0..3c0bf4f2 100644 --- a/FryPot_DosingSystem/View/AgvView.xaml.cs +++ b/FryPot_DosingSystem/View/AgvView.xaml.cs @@ -1,5 +1,5 @@  -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.AGV; using FryPot_DosingSystem.ViewModel; using System; diff --git a/FryPot_DosingSystem/View/CopyInfoView.xaml.cs b/FryPot_DosingSystem/View/CopyInfoView.xaml.cs index 73820dd7..7b9b8005 100644 --- a/FryPot_DosingSystem/View/CopyInfoView.xaml.cs +++ b/FryPot_DosingSystem/View/CopyInfoView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/FryPot_DosingSystem/View/DebugView.xaml.cs b/FryPot_DosingSystem/View/DebugView.xaml.cs index fafd5fdb..582145b9 100644 --- a/FryPot_DosingSystem/View/DebugView.xaml.cs +++ b/FryPot_DosingSystem/View/DebugView.xaml.cs @@ -1,5 +1,5 @@ using BPASmartClient.AGV; -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Control; using FryPot_DosingSystem.ViewModel; using System; diff --git a/FryPot_DosingSystem/View/FlowProcessView.xaml.cs b/FryPot_DosingSystem/View/FlowProcessView.xaml.cs index c6ee25cf..4ae7f113 100644 --- a/FryPot_DosingSystem/View/FlowProcessView.xaml.cs +++ b/FryPot_DosingSystem/View/FlowProcessView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using FryPot_DosingSystem.ViewModel; using System; diff --git a/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs b/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs index 8e1ec40d..7c29c5f9 100644 --- a/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs +++ b/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.ViewModel; using System; using System.Collections.Generic; diff --git a/FryPot_DosingSystem/View/NewFryPotMaterial.xaml.cs b/FryPot_DosingSystem/View/NewFryPotMaterial.xaml.cs index 4599dfba..ddbae202 100644 --- a/FryPot_DosingSystem/View/NewFryPotMaterial.xaml.cs +++ b/FryPot_DosingSystem/View/NewFryPotMaterial.xaml.cs @@ -1,5 +1,5 @@  -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/FryPot_DosingSystem/View/NewRecipeView.xaml.cs b/FryPot_DosingSystem/View/NewRecipeView.xaml.cs index 43e793a3..1c3310ee 100644 --- a/FryPot_DosingSystem/View/NewRecipeView.xaml.cs +++ b/FryPot_DosingSystem/View/NewRecipeView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using System; using System.Collections.Generic; diff --git a/FryPot_DosingSystem/View/RecipeManageView.xaml.cs b/FryPot_DosingSystem/View/RecipeManageView.xaml.cs index bac6eff3..158c69c7 100644 --- a/FryPot_DosingSystem/View/RecipeManageView.xaml.cs +++ b/FryPot_DosingSystem/View/RecipeManageView.xaml.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; diff --git a/FryPot_DosingSystem/ViewModel/AdministratorLoginViewModel.cs b/FryPot_DosingSystem/ViewModel/AdministratorLoginViewModel.cs index 4937d237..5b4aa0e4 100644 --- a/FryPot_DosingSystem/ViewModel/AdministratorLoginViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/AdministratorLoginViewModel.cs @@ -1,5 +1,5 @@ using BPA.Message; -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -39,8 +39,8 @@ namespace FryPot_DosingSystem.ViewModel private string _txtpassword; public string Txtpassword { get { return _txtpassword; } set { _txtpassword = value; OnPropertyChanged(); } } - public RelayCommand AdminLoginCommand { get; set; } - public RelayCommand RegistCommand { get; set; } + public BPARelayCommand AdminLoginCommand { get; set; } + public BPARelayCommand RegistCommand { get; set; } public ObservableCollection permission { get; set; } = new ObservableCollection(); @@ -73,7 +73,7 @@ namespace FryPot_DosingSystem.ViewModel Txtpassword = UserInfo.Password; } } - RegistCommand = new RelayCommand(() => + RegistCommand = new BPARelayCommand(() => { if (RegistOrChange != null) { @@ -154,7 +154,7 @@ namespace FryPot_DosingSystem.ViewModel } }); - AdminLoginCommand = new RelayCommand(() => + AdminLoginCommand = new BPARelayCommand(() => { var rest = ActionManage.GetInstance.SendResult("LoginDosingSystem", $"{Admin}-={Password}-={SelectText}"); if (rest != null && rest is string str) diff --git a/FryPot_DosingSystem/ViewModel/CopyInfoViewModel.cs b/FryPot_DosingSystem/ViewModel/CopyInfoViewModel.cs index c92dc281..2e3b23f3 100644 --- a/FryPot_DosingSystem/ViewModel/CopyInfoViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/CopyInfoViewModel.cs @@ -1,5 +1,5 @@  -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; using System; @@ -14,12 +14,12 @@ namespace FryPot_DosingSystem.ViewModel { private string _fryNum; public string FryNum { get { return _fryNum; } set { _fryNum = value;OnPropertyChanged(); } } - public RelayCommand ConfimCommand { get; set; } + public BPARelayCommand ConfimCommand { get; set; } public CopyInfoViewModel() { - ConfimCommand = new RelayCommand(() => { + ConfimCommand = new BPARelayCommand(() => { if (FryNum != null && FryNum != "" && int.TryParse(FryNum.Trim(), out int Num)) { ActionManage.GetInstance.Send("CopyPotNum",Num); diff --git a/FryPot_DosingSystem/ViewModel/DebugViewModel.cs b/FryPot_DosingSystem/ViewModel/DebugViewModel.cs index 9adb442d..198c780d 100644 --- a/FryPot_DosingSystem/ViewModel/DebugViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/DebugViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Control; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -18,287 +18,287 @@ namespace FryPot_DosingSystem.ViewModel public ObservableCollection LineTwoRollerCode { get; set; } = new ObservableCollection() {201,202,203,204,205,206,207,208,501,502,503,504,505,506,507,508 }; public ObservableCollection LineThreeRollerCode { get; set; } = new ObservableCollection() { 301,302,303,304,305,306,307,308}; //滚筒线1绑定命令 - public RelayCommand RollerLineRunning { get; set; } - public RelayCommand EightWorkLoc { get; set; } - public RelayCommand FryPotInputArrive { get; set; } - public RelayCommand FryPotEmptyRollerArrive { get; set; } - public RelayCommand LineOneTaskExit { get; set; } - public RelayCommand LineOneRecipeComSignal { get; set; } - - public RelayCommand AGVLOneArrive { get; set; } - public RelayCommand AGVFryPotDownArrive { get; set; } - public RelayCommand AGVFryPotUpArrive { get; set; } - public RelayCommand AGVFryPotGetEmptyRoller { get; set; } - public RelayCommand AGVLineOneLoadCom { get; set; }//线体1上料完成 + public BPARelayCommand RollerLineRunning { get; set; } + public BPARelayCommand EightWorkLoc { get; set; } + public BPARelayCommand FryPotInputArrive { get; set; } + public BPARelayCommand FryPotEmptyRollerArrive { get; set; } + public BPARelayCommand LineOneTaskExit { get; set; } + public BPARelayCommand LineOneRecipeComSignal { get; set; } + + public BPARelayCommand AGVLOneArrive { get; set; } + public BPARelayCommand AGVFryPotDownArrive { get; set; } + public BPARelayCommand AGVFryPotUpArrive { get; set; } + public BPARelayCommand AGVFryPotGetEmptyRoller { get; set; } + public BPARelayCommand AGVLineOneLoadCom { get; set; }//线体1上料完成 //滚筒线2绑定命令 - public RelayCommand RollerLineTwoRunning { get; set; } - //public RelayCommand EightWorkLoc { get; set; } - public RelayCommand FryPotTwoInputArrive { get; set; } - public RelayCommand FryPotTwoEmptyRollerArrive { get; set; } - public RelayCommand LineTwoTaskExit { get; set; } - public RelayCommand LineTwoRecipeComSignal { get; set; } - - public RelayCommand AGVLTwoArrive { get; set; } - public RelayCommand AGVFryPotTwoDownArrive { get; set; } - public RelayCommand AGVFryPotTwoUpArrive { get; set; } - public RelayCommand AGVFryPotTwoGetEmptyRoller { get; set; } - public RelayCommand AGVLineTwoLoadCom { get; set; }//线体2上料完成 + public BPARelayCommand RollerLineTwoRunning { get; set; } + //public BPARelayCommand EightWorkLoc { get; set; } + public BPARelayCommand FryPotTwoInputArrive { get; set; } + public BPARelayCommand FryPotTwoEmptyRollerArrive { get; set; } + public BPARelayCommand LineTwoTaskExit { get; set; } + public BPARelayCommand LineTwoRecipeComSignal { get; set; } + + public BPARelayCommand AGVLTwoArrive { get; set; } + public BPARelayCommand AGVFryPotTwoDownArrive { get; set; } + public BPARelayCommand AGVFryPotTwoUpArrive { get; set; } + public BPARelayCommand AGVFryPotTwoGetEmptyRoller { get; set; } + public BPARelayCommand AGVLineTwoLoadCom { get; set; }//线体2上料完成 //滚筒线3绑定命令 - public RelayCommand RollerLineThreeRunning { get; set; } - //public RelayCommand EightWorkLoc { get; set; } - public RelayCommand FryPotThreeInputArrive { get; set; } - public RelayCommand FryPotThreeEmptyRollerArrive { get; set; } - public RelayCommand LineThreeTaskExit { get; set; } - public RelayCommand LineThreeRecipeComSignal { get; set; } - - public RelayCommand AGVLThreeArrive { get; set; } - public RelayCommand AGVFryPotThreeDownArrive { get; set; } - public RelayCommand AGVFryPotThreeUpArrive { get; set; } - public RelayCommand AGVFryPotThreeGetEmptyRoller { get; set; } - public RelayCommand AGVLineThreeLoadCom { get; set; }//线体3上料完成 + public BPARelayCommand RollerLineThreeRunning { get; set; } + //public BPARelayCommand EightWorkLoc { get; set; } + public BPARelayCommand FryPotThreeInputArrive { get; set; } + public BPARelayCommand FryPotThreeEmptyRollerArrive { get; set; } + public BPARelayCommand LineThreeTaskExit { get; set; } + public BPARelayCommand LineThreeRecipeComSignal { get; set; } + + public BPARelayCommand AGVLThreeArrive { get; set; } + public BPARelayCommand AGVFryPotThreeDownArrive { get; set; } + public BPARelayCommand AGVFryPotThreeUpArrive { get; set; } + public BPARelayCommand AGVFryPotThreeGetEmptyRoller { get; set; } + public BPARelayCommand AGVLineThreeLoadCom { get; set; }//线体3上料完成 //AGV接口联调 - public RelayCommand AgvDebug { get; set; } + public BPARelayCommand AgvDebug { get; set; } //线体123空桶清洗以及回收 - public RelayCommand AgvArriveLineOneEmptyRollerLoc { get; set; } - - public RelayCommand AgvLineOneLoadEmptyCom { get; set; } - public RelayCommand AgvArriveLineTwoEmptyRollerLoc { get; set; } - public RelayCommand AgvLineTwoLoadEmptyCom { get; set; } - public RelayCommand AgvArriveLineThreeEmptyRollerLoc { get; set; } - public RelayCommand AgvLineThreeLoadEmptyCom { get; set; } - public RelayCommand CleanPlateCallAgv { get; set; } - public RelayCommand AgvArriveCleanPlateLoc { get; set; }//下料 - public RelayCommand AgvArriveCleanPlateLocCom { get; set; }//下料完成 - public RelayCommand AgvArriveLineFourLoc { get; set; }//下料 - public RelayCommand AgvArriveLineFourLocCom { get; set; }//4号线空桶下料完成 - public RelayCommand AgvArriveCleanPlateLocLoad { get; set; }//上料 - public RelayCommand AgvArriveCleanPlateLocLoadCom { get; set; }//上料完成 - public RelayCommand EmptyRollerCleanTaskRestart { get; set; } - - public RelayCommand LineTwoEmptyRollerCleanTaskRestart { get; set; } - - public RelayCommand LineThreeEmptyRollerCleanTaskRestart { get; set; } + public BPARelayCommand AgvArriveLineOneEmptyRollerLoc { get; set; } + + public BPARelayCommand AgvLineOneLoadEmptyCom { get; set; } + public BPARelayCommand AgvArriveLineTwoEmptyRollerLoc { get; set; } + public BPARelayCommand AgvLineTwoLoadEmptyCom { get; set; } + public BPARelayCommand AgvArriveLineThreeEmptyRollerLoc { get; set; } + public BPARelayCommand AgvLineThreeLoadEmptyCom { get; set; } + public BPARelayCommand CleanPlateCallAgv { get; set; } + public BPARelayCommand AgvArriveCleanPlateLoc { get; set; }//下料 + public BPARelayCommand AgvArriveCleanPlateLocCom { get; set; }//下料完成 + public BPARelayCommand AgvArriveLineFourLoc { get; set; }//下料 + public BPARelayCommand AgvArriveLineFourLocCom { get; set; }//4号线空桶下料完成 + public BPARelayCommand AgvArriveCleanPlateLocLoad { get; set; }//上料 + public BPARelayCommand AgvArriveCleanPlateLocLoadCom { get; set; }//上料完成 + public BPARelayCommand EmptyRollerCleanTaskRestart { get; set; } + + public BPARelayCommand LineTwoEmptyRollerCleanTaskRestart { get; set; } + + public BPARelayCommand LineThreeEmptyRollerCleanTaskRestart { get; set; } public DebugViewModel() { - AgvDebug = new RelayCommand(new Action(() => + AgvDebug = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AgvDebug"); })); - AgvArriveCleanPlateLocCom = new RelayCommand(() => + AgvArriveCleanPlateLocCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AgvArriveCleanPlateLocCom"); }); - AgvArriveLineFourLocCom = new RelayCommand(() => + AgvArriveLineFourLocCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AgvArriveLineFourLocCom"); }); - AgvArriveCleanPlateLocLoadCom = new RelayCommand(() => + AgvArriveCleanPlateLocLoadCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoadCom"); }); - LineOneRecipeComSignal = new RelayCommand(() => + LineOneRecipeComSignal = new BPARelayCommand(() => { ActionManage.GetInstance.Send("LineOneRecipeComSignal"); }); - LineTwoRecipeComSignal = new RelayCommand(() => + LineTwoRecipeComSignal = new BPARelayCommand(() => { ActionManage.GetInstance.Send("LineTwoRecipeComSignal"); }); - LineThreeRecipeComSignal = new RelayCommand(() => + LineThreeRecipeComSignal = new BPARelayCommand(() => { ActionManage.GetInstance.Send("LineThreeRecipeComSignal"); }); - EmptyRollerCleanTaskRestart = new RelayCommand(() => + EmptyRollerCleanTaskRestart = new BPARelayCommand(() => { ActionManage.GetInstance.Send("EmptyRollerCleanTaskRestart"); }); - LineTwoEmptyRollerCleanTaskRestart = new RelayCommand(() => + LineTwoEmptyRollerCleanTaskRestart = new BPARelayCommand(() => { ActionManage.GetInstance.Send("LineTwoEmptyRollerCleanTaskRestart"); }); - LineThreeEmptyRollerCleanTaskRestart = new RelayCommand(() => + LineThreeEmptyRollerCleanTaskRestart = new BPARelayCommand(() => { ActionManage.GetInstance.Send("LineThreeEmptyRollerCleanTaskRestart"); }); - AgvLineOneLoadEmptyCom = new RelayCommand(() => { + AgvLineOneLoadEmptyCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AgvLineOneLoadEmptyCom"); }); - AgvLineTwoLoadEmptyCom = new RelayCommand(() => { + AgvLineTwoLoadEmptyCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AgvLineTwoLoadEmptyCom"); }); - AgvLineThreeLoadEmptyCom = new RelayCommand(() => { + AgvLineThreeLoadEmptyCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AgvLineThreeLoadEmptyCom"); }); - AGVLineOneLoadCom = new RelayCommand(() => + AGVLineOneLoadCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AGVLineOneLoadCom"); }); - AGVLineTwoLoadCom = new RelayCommand(() => + AGVLineTwoLoadCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AGVLineTwoLoadCom"); }); - AGVLineThreeLoadCom = new RelayCommand(() => + AGVLineThreeLoadCom = new BPARelayCommand(() => { ActionManage.GetInstance.Send("AGVLineThreeLoadCom"); }); - AgvArriveLineOneEmptyRollerLoc = new RelayCommand(new Action(() => + AgvArriveLineOneEmptyRollerLoc = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AgvArriveLineOneEmptyRollerLoc"); })); - AgvArriveLineTwoEmptyRollerLoc = new RelayCommand(new Action(() => + AgvArriveLineTwoEmptyRollerLoc = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AgvArriveLineTwoEmptyRollerLoc"); })); - AgvArriveLineThreeEmptyRollerLoc = new RelayCommand(new Action(() => + AgvArriveLineThreeEmptyRollerLoc = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AgvArriveLineThreeEmptyRollerLoc"); })); - CleanPlateCallAgv = new RelayCommand(new Action(() => + CleanPlateCallAgv = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("CleanPlateCallAgv"); })); - AgvArriveCleanPlateLoc = new RelayCommand(new Action(() => + AgvArriveCleanPlateLoc = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AgvArriveCleanPlateLoc"); })); - AgvArriveCleanPlateLocLoad = new RelayCommand(new Action(() => + AgvArriveCleanPlateLocLoad = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoad"); })); - AgvArriveLineFourLoc = new RelayCommand(new Action(() => + AgvArriveLineFourLoc = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AgvArriveLineFourLoc"); })); - RollerLineRunning = new RelayCommand(new Action(() => + RollerLineRunning = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("RollerLineRunning"); })); - FryPotInputArrive = new RelayCommand(new Action(() => + FryPotInputArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("FryPotInputArrive"); })); - FryPotEmptyRollerArrive = new RelayCommand(new Action(() => + FryPotEmptyRollerArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("FryPotEmptyRollerArrive"); })); - AGVLOneArrive = new RelayCommand(new Action(() => + AGVLOneArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVLOneArrive"); })); - AGVFryPotDownArrive = new RelayCommand(new Action(() => + AGVFryPotDownArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotDownArrive"); })); - AGVFryPotUpArrive = new RelayCommand(new Action(() => + AGVFryPotUpArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotUpArrive"); })); - AGVFryPotGetEmptyRoller = new RelayCommand(new Action(() => + AGVFryPotGetEmptyRoller = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotGetEmptyRoller"); })); //滚筒线2 - RollerLineTwoRunning = new RelayCommand(new Action(() => + RollerLineTwoRunning = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("RollerLineTwoRunning"); })); - FryPotTwoInputArrive = new RelayCommand(new Action(() => + FryPotTwoInputArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("FryPotTwoInputArrive"); })); - FryPotTwoEmptyRollerArrive = new RelayCommand(new Action(() => + FryPotTwoEmptyRollerArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("FryPotTwoEmptyRollerArrive"); })); - AGVLTwoArrive = new RelayCommand(new Action(() => + AGVLTwoArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVLTwoArrive"); })); - AGVFryPotTwoDownArrive = new RelayCommand(new Action(() => + AGVFryPotTwoDownArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotTwoDownArrive"); })); - AGVFryPotTwoUpArrive = new RelayCommand(new Action(() => + AGVFryPotTwoUpArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotTwoUpArrive"); })); - AGVFryPotTwoGetEmptyRoller = new RelayCommand(new Action(() => + AGVFryPotTwoGetEmptyRoller = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotTwoGetEmptyRoller"); })); //滚筒线3 - RollerLineThreeRunning = new RelayCommand(new Action(() => + RollerLineThreeRunning = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("RollerLineThreeRunning"); })); - FryPotThreeInputArrive = new RelayCommand(new Action(() => + FryPotThreeInputArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("FryPotThreeInputArrive"); })); - FryPotThreeEmptyRollerArrive = new RelayCommand(new Action(() => + FryPotThreeEmptyRollerArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("FryPotThreeEmptyRollerArrive"); })); - AGVLThreeArrive = new RelayCommand(new Action(() => + AGVLThreeArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVLThreeArrive"); })); - AGVFryPotThreeDownArrive = new RelayCommand(new Action(() => + AGVFryPotThreeDownArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotThreeDownArrive"); })); - AGVFryPotThreeUpArrive = new RelayCommand(new Action(() => + AGVFryPotThreeUpArrive = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotThreeUpArrive"); })); - AGVFryPotThreeGetEmptyRoller = new RelayCommand(new Action(() => + AGVFryPotThreeGetEmptyRoller = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("AGVFryPotThreeGetEmptyRoller"); })); - LineOneTaskExit = new RelayCommand(new Action(() => + LineOneTaskExit = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("LineOneTaskExit"); })); - LineTwoTaskExit = new RelayCommand(new Action(() => + LineTwoTaskExit = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("LineTwoTaskExit"); })); - LineThreeTaskExit = new RelayCommand(new Action(() => + LineThreeTaskExit = new BPARelayCommand(new Action(() => { ActionManage.GetInstance.Send("LineThreeTaskExit"); })); diff --git a/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs b/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs index 7beeca04..e010ea3f 100644 --- a/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -17,9 +17,9 @@ namespace FryPot_DosingSystem.ViewModel { public ObservableCollection DeviceName { get; set; } = new ObservableCollection(); public ObservableCollection devices { get; set; } = new ObservableCollection(); - public RelayCommand AddDeviceCommand { get; set; } - public RelayCommand SaveDeviceConfig { get; set; } - public RelayCommand DeleteDevice { get; set; } + public BPARelayCommand AddDeviceCommand { get; set; } + public BPARelayCommand SaveDeviceConfig { get; set; } + public BPARelayCommand DeleteDevice { get; set; } public DeviceListViewModel() { Json.Read(); @@ -30,7 +30,7 @@ namespace FryPot_DosingSystem.ViewModel DeviceName.Add("炒锅3"); DeviceName.Add("炒锅4"); DeviceName.Add("炒锅5"); - AddDeviceCommand = new RelayCommand(() => + AddDeviceCommand = new BPARelayCommand(() => { erp: string guid = Guid.NewGuid().ToString(); @@ -44,7 +44,7 @@ namespace FryPot_DosingSystem.ViewModel goto erp; } }); - DeleteDevice = new RelayCommand((str) => + DeleteDevice = new BPARelayCommand((str) => { DeviceInfo device = devices.FirstOrDefault(p => p.DeviceNum == str); if (device != null) @@ -52,7 +52,7 @@ namespace FryPot_DosingSystem.ViewModel devices.Remove(device); } }); - SaveDeviceConfig = new RelayCommand(() => + SaveDeviceConfig = new BPARelayCommand(() => { Json.Data.Devices = devices; Json.Save(); diff --git a/FryPot_DosingSystem/ViewModel/FlowProcessSetViewModel.cs b/FryPot_DosingSystem/ViewModel/FlowProcessSetViewModel.cs index ebc62a38..ce0e81e0 100644 --- a/FryPot_DosingSystem/ViewModel/FlowProcessSetViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/FlowProcessSetViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -40,13 +40,13 @@ namespace FryPot_DosingSystem.ViewModel public string currentRecipeName { get; set; } public static int currentItemId { get; set; } - public RelayCommand CloseWindowCommand { get; set; } + public BPARelayCommand CloseWindowCommand { get; set; } public ObservableCollection FlowItems { get; set; } = new ObservableCollection(); - public RelayCommand ConfirmCommand { get; set; } - public RelayCommand AddLastFlowItemCommand { get; set; } - public RelayCommand AddFrontFlowItemCommand { get; set; } - public RelayCommand DeleteFlowItemCommand { get; set; } + public BPARelayCommand ConfirmCommand { get; set; } + public BPARelayCommand AddLastFlowItemCommand { get; set; } + public BPARelayCommand AddFrontFlowItemCommand { get; set; } + public BPARelayCommand DeleteFlowItemCommand { get; set; } public FlowProcessSetViewModel() @@ -118,11 +118,11 @@ namespace FryPot_DosingSystem.ViewModel }), "EditFlowProcess"); - CloseWindowCommand = new RelayCommand(() => + CloseWindowCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("CloseFlowProcessView"); }); - ConfirmCommand = new RelayCommand(() => + ConfirmCommand = new BPARelayCommand(() => { var name = Json.Data.Recipes.FirstOrDefault(p => p.RecipeName == currentRecipeName.ToString()); if (name != null) @@ -189,7 +189,7 @@ namespace FryPot_DosingSystem.ViewModel ActionManage.GetInstance.Send("CloseFlowProcessView"); }); - AddFrontFlowItemCommand = new RelayCommand(() => + AddFrontFlowItemCommand = new BPARelayCommand(() => { try { @@ -210,7 +210,7 @@ namespace FryPot_DosingSystem.ViewModel } }); - AddLastFlowItemCommand = new RelayCommand(() => + AddLastFlowItemCommand = new BPARelayCommand(() => { try { @@ -234,7 +234,7 @@ namespace FryPot_DosingSystem.ViewModel // throw; } }); - DeleteFlowItemCommand = new RelayCommand(() => + DeleteFlowItemCommand = new BPARelayCommand(() => { if (flowProcessModels.Count > 0) flowProcessModels.RemoveAt(currentItemId); diff --git a/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs b/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs index e108f64e..e1faa00e 100644 --- a/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using BPA.Helper; using System; diff --git a/FryPot_DosingSystem/ViewModel/LabelPrintViewModel.cs b/FryPot_DosingSystem/ViewModel/LabelPrintViewModel.cs index 305efac6..efa91a84 100644 --- a/FryPot_DosingSystem/ViewModel/LabelPrintViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/LabelPrintViewModel.cs @@ -10,7 +10,7 @@ namespace FryPot_DosingSystem.ViewModel { internal class LabelPrintViewModel:NotifyBase { - public RelayCommand PrintCommand { get; set; } + public BPARelayCommand PrintCommand { get; set; } public LabelPrintViewModel() { diff --git a/FryPot_DosingSystem/ViewModel/MainViewModel.cs b/FryPot_DosingSystem/ViewModel/MainViewModel.cs index 3d8da962..de570274 100644 --- a/FryPot_DosingSystem/ViewModel/MainViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/MainViewModel.cs @@ -1,5 +1,5 @@  -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Control; using FryPot_DosingSystem.Model; using FryPot_DosingSystem.View; @@ -21,11 +21,11 @@ namespace FryPot_DosingSystem.ViewModel { public ObservableCollection menus { get; set; } = new ObservableCollection(); - public RelayCommand Login { get; set; } - public RelayCommand PasswordChange { get; set; } + public BPARelayCommand Login { get; set; } + public BPARelayCommand PasswordChange { get; set; } - public RelayCommand ExitLogin { get; set; } - public RelayCommand TogglePag { get; set; } + public BPARelayCommand ExitLogin { get; set; } + public BPARelayCommand TogglePag { get; set; } public bool UserManagement { get { return _mUserManagement; } set { _mUserManagement = value; OnPropertyChanged(); } } private bool _mUserManagement; /// @@ -90,15 +90,15 @@ namespace FryPot_DosingSystem.ViewModel LogViewModel model = LogViewModel.GetInstance; // DeviceOperate deviceOperate = DeviceOperate.GetInstance;//开启实时PLC数据读取 DosingLogicControl logigControl = DosingLogicControl.GetInstance;//开启逻辑控制任务程序 - TogglePag = new RelayCommand(DoNavChanged); - Login = new RelayCommand(() => + TogglePag = new BPARelayCommand(DoNavChanged); + Login = new BPARelayCommand(() => { ActionManage.GetInstance.CancelRegister("ContentUpdate"); ActionManage.GetInstance.Register(new Func(() => { return "注册"; }), "ContentUpdate"); DoNavChanged("AdministratorLoginView.用户登陆"); UserManagement = false; }); - PasswordChange = new RelayCommand(() => + PasswordChange = new BPARelayCommand(() => { ActionManage.GetInstance.CancelRegister("ContentUpdate"); ActionManage.GetInstance.Register(new Func(() => { return "修改"; }), "ContentUpdate"); @@ -107,7 +107,7 @@ namespace FryPot_DosingSystem.ViewModel DoNavChanged("AdministratorLoginView.密码修改"); UserManagement = false; }); - ExitLogin = new RelayCommand(() => + ExitLogin = new BPARelayCommand(() => { //DoNavChanged("LoginView.退出登录"); CurrentLoginAccount = null; diff --git a/FryPot_DosingSystem/ViewModel/NewFryPotMaterialViewModel.cs b/FryPot_DosingSystem/ViewModel/NewFryPotMaterialViewModel.cs index 52293e0c..acfe80a5 100644 --- a/FryPot_DosingSystem/ViewModel/NewFryPotMaterialViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/NewFryPotMaterialViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -15,7 +15,7 @@ namespace FryPot_DosingSystem.ViewModel { internal class NewFryPotMaterialViewModel : NotifyBase { - public RelayCommand ConfimCommand { get; set; } + public BPARelayCommand ConfimCommand { get; set; } private string _materialName; public string MaterialName { get { return _materialName; } set { _materialName = value; OnPropertyChanged(); } } @@ -25,7 +25,7 @@ namespace FryPot_DosingSystem.ViewModel public NewFryPotMaterialViewModel() { Json.Read(); - ConfimCommand = new RelayCommand(() => + ConfimCommand = new BPARelayCommand(() => { if (Id > 0 && MaterialName != String.Empty) { diff --git a/FryPot_DosingSystem/ViewModel/NewRecipeViewModel.cs b/FryPot_DosingSystem/ViewModel/NewRecipeViewModel.cs index 740f1e11..7d3ff61e 100644 --- a/FryPot_DosingSystem/ViewModel/NewRecipeViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/NewRecipeViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -37,10 +37,10 @@ namespace FryPot_DosingSystem.ViewModel public ObservableCollection materialNames { get; set; } = new ObservableCollection(); - public RelayCommand AddRecipe { get; set; } - public RelayCommand RemoveRecipe { get; set; } - public RelayCommand Comfirm { get; set; } - public RelayCommand SaveAs { get; set; } + public BPARelayCommand AddRecipe { get; set; } + public BPARelayCommand RemoveRecipe { get; set; } + public BPARelayCommand Comfirm { get; set; } + public BPARelayCommand SaveAs { get; set; } public NewRecipeViewModel() { @@ -66,7 +66,7 @@ namespace FryPot_DosingSystem.ViewModel } }), "EditRecipe"); - AddRecipe = new RelayCommand(() => + AddRecipe = new BPARelayCommand(() => { for (int i = 0; i < RecipeRollerNum; i++) { @@ -84,13 +84,13 @@ namespace FryPot_DosingSystem.ViewModel } }); - RemoveRecipe = new RelayCommand(code => + RemoveRecipe = new BPARelayCommand(code => { var res = materials.FirstOrDefault(m => m.MaterialCode == code); if (res != null) materials.Remove(res); }); - Comfirm = new RelayCommand(() => + Comfirm = new BPARelayCommand(() => { var bom = Json.Data.Recipes.FirstOrDefault(p => p.RecipeId == recipeId); @@ -177,7 +177,7 @@ namespace FryPot_DosingSystem.ViewModel } }); - SaveAs = new RelayCommand(() => + SaveAs = new BPARelayCommand(() => { var bom = Json.Data.Recipes.FirstOrDefault(p => p.RecipeName == RecipeName); var rec = Json.Data.Recipes.FirstOrDefault(p => p.RecipeId == recipeId); diff --git a/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs b/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs index fcb87bf4..91fecced 100644 --- a/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs @@ -1,6 +1,6 @@ using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Message; using FryPot_DosingSystem.Model; using BPA.Helper; @@ -22,17 +22,17 @@ namespace FryPot_DosingSystem.ViewModel /// /// 配方下发 /// - public RelayCommand RecipeSetDownCommand { get; set; } + public BPARelayCommand RecipeSetDownCommand { get; set; } /// /// 配方一键下发 /// - public RelayCommand AllRecipeSetDownCommand { get; set; } + public BPARelayCommand AllRecipeSetDownCommand { get; set; } public ObservableCollection Recipes { get; set; } = new ObservableCollection(); public RecipeSetDownViewModel() { //Json.Read(); Recipes =Json.Data.Recipes; - RecipeSetDownCommand = new RelayCommand((Id) => + RecipeSetDownCommand = new BPARelayCommand((Id) => { if (Id != null && Id is string strId) { @@ -53,7 +53,7 @@ namespace FryPot_DosingSystem.ViewModel } }); - AllRecipeSetDownCommand = new RelayCommand(() => + AllRecipeSetDownCommand = new BPARelayCommand(() => { if (Recipes != null) { diff --git a/FryPot_DosingSystem/ViewModel/RecipeSetViewModel.cs b/FryPot_DosingSystem/ViewModel/RecipeSetViewModel.cs index 7f99146d..25354232 100644 --- a/FryPot_DosingSystem/ViewModel/RecipeSetViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/RecipeSetViewModel.cs @@ -1,7 +1,7 @@ using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.MessageShow; -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.Model; using FryPot_DosingSystem.View; using BPA.Helper; @@ -37,25 +37,25 @@ namespace FryPot_DosingSystem.ViewModel public ObservableCollection recipeModels { get; set; } = new ObservableCollection(); - public RelayCommand NewRecipe { get; set; } + public BPARelayCommand NewRecipe { get; set; } - public RelayCommand SaveRecipe { get; set; } + public BPARelayCommand SaveRecipe { get; set; } /// /// 工艺操作 /// - public RelayCommand OperateFlowProcess { get; set; } + public BPARelayCommand OperateFlowProcess { get; set; } /// /// 编辑配方 /// - public RelayCommand EditRecipeCommand { get; set; } + public BPARelayCommand EditRecipeCommand { get; set; } /// /// 复制配方 /// - public RelayCommand CopyRecipeCommand { get; set; } + public BPARelayCommand CopyRecipeCommand { get; set; } /// /// 删除配方 /// - public RelayCommand DeleteRecipeCommand { get; set; } + public BPARelayCommand DeleteRecipeCommand { get; set; } public RecipeSetViewModel() @@ -162,19 +162,19 @@ namespace FryPot_DosingSystem.ViewModel }), "CopyPotNum"); - NewRecipe =new RelayCommand( new Action(() => + NewRecipe =new BPARelayCommand( new Action(() => { NewRecipeView nrv = new NewRecipeView(); nrv.ShowDialog(); //MessageLog.GetInstance.ShowUserLog("新建配方"); })); - SaveRecipe =new RelayCommand( new Action(() => + SaveRecipe =new BPARelayCommand( new Action(() => { Json.Save(); count = recipeModels.Count; NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); })); - EditRecipeCommand = new RelayCommand((Id) => + EditRecipeCommand = new BPARelayCommand((Id) => { if (Id != null) { @@ -184,7 +184,7 @@ namespace FryPot_DosingSystem.ViewModel nrv.ShowDialog(); } }); - DeleteRecipeCommand = new RelayCommand((Id) => + DeleteRecipeCommand = new BPARelayCommand((Id) => { if (Id != null && Id is String strId) { @@ -199,7 +199,7 @@ namespace FryPot_DosingSystem.ViewModel } }); //工艺流程操作 - OperateFlowProcess = new RelayCommand((recipeName) => + OperateFlowProcess = new BPARelayCommand((recipeName) => { if (recipeName != null && recipeName != string.Empty && recipeName != "") { @@ -211,7 +211,7 @@ namespace FryPot_DosingSystem.ViewModel }); //复制配方 - CopyRecipeCommand = new RelayCommand((Id) => { + CopyRecipeCommand = new BPARelayCommand((Id) => { CopyInfoView copyInfoView = new CopyInfoView(); CopyRecipeId = Id.ToString() ; copyInfoView.Show(); diff --git a/FryPot_DosingSystem/ViewModel/SqliteDataViewModel.cs b/FryPot_DosingSystem/ViewModel/SqliteDataViewModel.cs index 2f43241b..b642c53e 100644 --- a/FryPot_DosingSystem/ViewModel/SqliteDataViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/SqliteDataViewModel.cs @@ -1,4 +1,4 @@ -using BPASmartClient.Helper; +using BPA.Helper; using FryPot_DosingSystem.FryPotStatus; using BPA.Helper; using Microsoft.Toolkit.Mvvm.Input; @@ -42,10 +42,10 @@ namespace FryPot_DosingSystem.ViewModel public List list { get; set; } = new List() { "1号炒锅", "2号炒锅", "3号炒锅", "4号炒锅", "5号炒锅" }; public string SelectedDate { get; set; } public string cboSelectedValue { get; set; } - public RelayCommand SelectCommand { get; set; } + public BPARelayCommand SelectCommand { get; set; } public SqliteDataViewModel() { - SelectCommand = new RelayCommand(() => + SelectCommand = new BPARelayCommand(() => { #region 旧版本 //if (SelectedDate != string.Empty && SelectedDate != "" && SelectedDate != null && cboSelectedValue != null && cboSelectedValue != string.Empty && cboSelectedValue != "") diff --git a/FryPot_DosingSystem/ViewModel/UserManageViewModel.cs b/FryPot_DosingSystem/ViewModel/UserManageViewModel.cs index b426a013..fa160125 100644 --- a/FryPot_DosingSystem/ViewModel/UserManageViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/UserManageViewModel.cs @@ -23,15 +23,15 @@ namespace FryPot_DosingSystem.ViewModel //public List Authorities { get; set; } = new List() { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }; public List Authorities { get; set; } = new List(); - public RelayCommand SaveCommand { get; set; } - public RelayCommand DeleteCommand { get; set; } + public BPARelayCommand SaveCommand { get; set; } + public BPARelayCommand DeleteCommand { get; set; } public UserManageViewModel() { var userManager = JsonConvert.DeserializeObject(File.ReadAllText("up.hbl").AESDecrypt()); usersInfo = userManager.userInfos; AddAuthorities(); - SaveCommand = new RelayCommand((str) => + SaveCommand = new BPARelayCommand((str) => { if (str != string.Empty && str != null) { @@ -55,7 +55,7 @@ namespace FryPot_DosingSystem.ViewModel } }); - DeleteCommand = new RelayCommand((str) => + DeleteCommand = new BPARelayCommand((str) => { if (str != string.Empty && str != null) { diff --git a/SmartClient.sln b/SmartClient.sln index e901218e..225c8312 100644 --- a/SmartClient.sln +++ b/SmartClient.sln @@ -27,8 +27,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3.Device", "3.Device", "{9F EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkS", "BPASmartClient.MorkS\BPASmartClient.MorkS.csproj", "{0827FA85-8180-4A85-BE58-9483AC4BB3BA}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkD", "BPASmartClient.MorkD\BPASmartClient.MorkD.csproj", "{8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkT", "BPASmartClient.MorkT\BPASmartClient.MorkT.csproj", "{B399BCFF-82E8-4940-9CE5-B7DCDDFDC696}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2.Business", "2.Business", "{6CEA3385-6F62-452A-8275-033A6037235D}" @@ -98,10 +96,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.AgvApi", "BP EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FryPot_DosingSystem", "FryPot_DosingSystem\FryPot_DosingSystem.csproj", "{2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ZhuoDian", "BPASmartClient.ZhuoDian\BPASmartClient.ZhuoDian.csproj", "{E7168B03-68E5-4285-BB95-5660F877577A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestDemo", "TestDemo\TestDemo.csproj", "{A49E1C5A-9489-451C-9CE6-CEA586234B84}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.HubHelper", "BPASmartClient.HubHelper\BPASmartClient.HubHelper.csproj", "{099E047C-F40E-47A3-A5BA-81FC1500D5E8}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkTSingle", "BPASmartClient.MorkTSingle\BPASmartClient.MorkTSingle.csproj", "{2366AC9B-B662-4550-9486-AF848B4D2961}" @@ -122,8 +116,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.JXJFoodBigSt EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.JXJFoodSmallStation", "BPASmartClient.JXJFoodSmallStation\BPASmartClient.JXJFoodSmallStation.csproj", "{D609C4CF-FA5C-4D39-B12F-07A60FFE5E40}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WPFDemo", "WPFDemo\WPFDemo.csproj", "{A456D582-D910-4CA2-8620-6D8F63344B47}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.SmallBatchingSystem", "BPASmartClient.SmallBatchingSystem\BPASmartClient.SmallBatchingSystem.csproj", "{BA588F22-87FB-4124-AF62-CA8DC492ED7D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkMOC", "BPASmartClient.MorkMOC\BPASmartClient.MorkMOC.csproj", "{D5081D7B-3EBB-42C7-8FB9-A889870D08C2}" @@ -150,8 +142,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ScreenLib", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfTest", "WpfTest\WpfTest.csproj", "{CD43FABA-D1ED-4524-AC51-60ECDE2EAD44}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WpfApp1", "WpfApp1\WpfApp1.csproj", "{81D03688-7361-45B8-A3EB-9B0A9222A338}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkMW", "BPASmartClient.MorkMW\BPASmartClient.MorkMW.csproj", "{C763BF70-2416-4A64-9011-8EF8549473FD}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.DosingSystemSingle", "BPASmartClient.DosingSystemSingle\BPASmartClient.DosingSystemSingle.csproj", "{B79914B9-3A81-426B-88FF-8ABAF5C92AB5}" @@ -174,7 +164,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkMV1", "B EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.FoodStationTest", "BPASmartClient.FoodStationTest\BPASmartClient.FoodStationTest.csproj", "{82D5C479-7C38-41D6-8B42-24D4EC32D94F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.TourismCollege", "BPASmartClient.TourismCollege\BPASmartClient.TourismCollege.csproj", "{BD44A67C-4069-4FBC-BDF2-895F286266A6}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.TourismCollege", "BPASmartClient.TourismCollege\BPASmartClient.TourismCollege.csproj", "{BD44A67C-4069-4FBC-BDF2-895F286266A6}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -370,26 +360,6 @@ Global {0827FA85-8180-4A85-BE58-9483AC4BB3BA}.Release|x64.Build.0 = Release|Any CPU {0827FA85-8180-4A85-BE58-9483AC4BB3BA}.Release|x86.ActiveCfg = Release|Any CPU {0827FA85-8180-4A85-BE58-9483AC4BB3BA}.Release|x86.Build.0 = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|ARM.Build.0 = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|ARM64.Build.0 = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|x64.ActiveCfg = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|x64.Build.0 = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|x86.ActiveCfg = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Debug|x86.Build.0 = Debug|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|Any CPU.Build.0 = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|ARM.ActiveCfg = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|ARM.Build.0 = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|ARM64.ActiveCfg = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|ARM64.Build.0 = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|x64.ActiveCfg = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|x64.Build.0 = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|x86.ActiveCfg = Release|Any CPU - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE}.Release|x86.Build.0 = Release|Any CPU {B399BCFF-82E8-4940-9CE5-B7DCDDFDC696}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B399BCFF-82E8-4940-9CE5-B7DCDDFDC696}.Debug|Any CPU.Build.0 = Debug|Any CPU {B399BCFF-82E8-4940-9CE5-B7DCDDFDC696}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -970,46 +940,6 @@ Global {2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|x64.Build.0 = Release|Any CPU {2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|x86.ActiveCfg = Release|Any CPU {2A1F6798-7BD3-42C9-BC30-F6D9D59E7214}.Release|x86.Build.0 = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM.ActiveCfg = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM.Build.0 = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|ARM64.Build.0 = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x64.ActiveCfg = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x64.Build.0 = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x86.ActiveCfg = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Debug|x86.Build.0 = Debug|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|Any CPU.Build.0 = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM.ActiveCfg = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM.Build.0 = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM64.ActiveCfg = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|ARM64.Build.0 = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|x64.ActiveCfg = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|x64.Build.0 = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|x86.ActiveCfg = Release|Any CPU - {E7168B03-68E5-4285-BB95-5660F877577A}.Release|x86.Build.0 = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM.Build.0 = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|ARM64.Build.0 = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x64.ActiveCfg = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x64.Build.0 = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x86.ActiveCfg = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Debug|x86.Build.0 = Debug|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|Any CPU.Build.0 = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM.ActiveCfg = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM.Build.0 = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM64.ActiveCfg = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|ARM64.Build.0 = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x64.ActiveCfg = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x64.Build.0 = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x86.ActiveCfg = Release|Any CPU - {A49E1C5A-9489-451C-9CE6-CEA586234B84}.Release|x86.Build.0 = Release|Any CPU {099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|Any CPU.Build.0 = Debug|Any CPU {099E047C-F40E-47A3-A5BA-81FC1500D5E8}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -1210,26 +1140,6 @@ Global {D609C4CF-FA5C-4D39-B12F-07A60FFE5E40}.Release|x64.Build.0 = Release|Any CPU {D609C4CF-FA5C-4D39-B12F-07A60FFE5E40}.Release|x86.ActiveCfg = Release|Any CPU {D609C4CF-FA5C-4D39-B12F-07A60FFE5E40}.Release|x86.Build.0 = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|ARM.Build.0 = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|ARM64.Build.0 = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|x64.ActiveCfg = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|x64.Build.0 = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|x86.ActiveCfg = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Debug|x86.Build.0 = Debug|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|Any CPU.Build.0 = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|ARM.ActiveCfg = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|ARM.Build.0 = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|ARM64.ActiveCfg = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|ARM64.Build.0 = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|x64.ActiveCfg = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|x64.Build.0 = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|x86.ActiveCfg = Release|Any CPU - {A456D582-D910-4CA2-8620-6D8F63344B47}.Release|x86.Build.0 = Release|Any CPU {BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|Any CPU.Build.0 = Debug|Any CPU {BA588F22-87FB-4124-AF62-CA8DC492ED7D}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -1430,26 +1340,6 @@ Global {CD43FABA-D1ED-4524-AC51-60ECDE2EAD44}.Release|x64.Build.0 = Release|Any CPU {CD43FABA-D1ED-4524-AC51-60ECDE2EAD44}.Release|x86.ActiveCfg = Release|Any CPU {CD43FABA-D1ED-4524-AC51-60ECDE2EAD44}.Release|x86.Build.0 = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|Any CPU.Build.0 = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|ARM.ActiveCfg = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|ARM.Build.0 = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|ARM64.Build.0 = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|x64.ActiveCfg = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|x64.Build.0 = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|x86.ActiveCfg = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Debug|x86.Build.0 = Debug|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|Any CPU.ActiveCfg = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|Any CPU.Build.0 = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|ARM.ActiveCfg = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|ARM.Build.0 = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|ARM64.ActiveCfg = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|ARM64.Build.0 = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|x64.ActiveCfg = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|x64.Build.0 = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|x86.ActiveCfg = Release|Any CPU - {81D03688-7361-45B8-A3EB-9B0A9222A338}.Release|x86.Build.0 = Release|Any CPU {C763BF70-2416-4A64-9011-8EF8549473FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C763BF70-2416-4A64-9011-8EF8549473FD}.Debug|Any CPU.Build.0 = Debug|Any CPU {C763BF70-2416-4A64-9011-8EF8549473FD}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -1684,7 +1574,6 @@ Global {202763AA-4C4C-4738-B530-93A9A1ECE578} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625} {13C86146-CD3C-4CD3-AB7F-7A155E222832} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625} {0827FA85-8180-4A85-BE58-9483AC4BB3BA} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} - {8878BCFD-AC5E-4D84-8C63-CA99DDE036EE} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} {B399BCFF-82E8-4940-9CE5-B7DCDDFDC696} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} {D3DBCC2D-086E-4E3A-B70A-22A79FB295CF} = {6CEA3385-6F62-452A-8275-033A6037235D} {2BA531E8-7F85-4EBF-AE97-811CD7C83EF2} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} @@ -1714,8 +1603,6 @@ Global {1BFE3DEE-D57A-4497-9CFA-7FF8EEA1B883} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} {8B1C64F3-A52C-480F-8262-50F824136CF3} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {2A1F6798-7BD3-42C9-BC30-F6D9D59E7214} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} - {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} {2366AC9B-B662-4550-9486-AF848B4D2961} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} {BFA4E222-BBCC-4AC7-9EA4-4549AEF3174B} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} @@ -1726,7 +1613,6 @@ Global {D1F2379E-1755-4B50-9D67-15C960C33FFA} = {3D1D0E04-03FD-480A-8CF8-6E01A2E28625} {FA695D7E-6F12-4483-A16D-8494609FAE68} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {D609C4CF-FA5C-4D39-B12F-07A60FFE5E40} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} - {A456D582-D910-4CA2-8620-6D8F63344B47} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {BA588F22-87FB-4124-AF62-CA8DC492ED7D} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {D5081D7B-3EBB-42C7-8FB9-A889870D08C2} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} {CD0FBCF1-9C49-4032-96AD-B9E25F86F2A7} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} @@ -1739,7 +1625,6 @@ Global {135A0978-351F-4727-82CE-2B7A8632AF1B} = {C5968A90-F4CF-4904-88C4-62C77C820A04} {798BBFFE-3BA2-40BA-BFE1-9502398F1F08} = {C6984F48-A0FE-47A4-B63B-E4E5BCFCD6D3} {CD43FABA-D1ED-4524-AC51-60ECDE2EAD44} = {7BE13E55-D8B1-4232-AE63-8BF122633297} - {81D03688-7361-45B8-A3EB-9B0A9222A338} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {C763BF70-2416-4A64-9011-8EF8549473FD} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F} {B79914B9-3A81-426B-88FF-8ABAF5C92AB5} = {8712125E-14CD-4E1B-A1CE-4BDE03805942} {106E84C1-CAC5-4F14-9E31-201D3202C9FD} = {7BE13E55-D8B1-4232-AE63-8BF122633297} diff --git a/TestDemo/Form1.cs b/TestDemo/Form1.cs index 26c242c1..c084c7fd 100644 --- a/TestDemo/Form1.cs +++ b/TestDemo/Form1.cs @@ -1,5 +1,5 @@ using BPASmartClient.AGV.Feedback; -using BPASmartClient.Helper; +using BPA.Helper; using BPASmartClient.Http; using BPASmartClient.HubHelper; using Newtonsoft.Json; diff --git a/WPFDemo/Class1.cs b/WPFDemo/Class1.cs index 5329ce77..f1bf264b 100644 --- a/WPFDemo/Class1.cs +++ b/WPFDemo/Class1.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using BPASmartClient.Helper; +using BPA.Helper; using BPA.Helper; using System.Collections.ObjectModel; using Microsoft.Toolkit.Mvvm.Input; @@ -14,7 +14,7 @@ namespace WPFDemo { public Class1() { - AddCommand = new RelayCommand(() => + AddCommand = new BPARelayCommand(() => { dataTests.Add(new DataTest() { @@ -28,7 +28,7 @@ namespace WPFDemo } public ObservableCollection dataTests { get; set; } = new ObservableCollection(); - public RelayCommand AddCommand { get; set; } + public BPARelayCommand AddCommand { get; set; } } }