@@ -8,7 +8,6 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.ApolloClient" Version="1.0.12" /> | <PackageReference Include="BPA.ApolloClient" Version="1.0.12" /> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.64" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.86" /> | <PackageReference Include="BPA.Message" Version="1.0.86" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" /> | <PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" /> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | ||||
@@ -7,7 +7,7 @@ using System.Configuration; | |||||
using System.IO; | using System.IO; | ||||
using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||
using System.Threading; | using System.Threading; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPA.ApolloClient; | using BPA.ApolloClient; | ||||
using BPA.ApolloClient.Options; | using BPA.ApolloClient.Options; | ||||
@@ -1,6 +1,6 @@ | |||||
using BPA.ApolloClient; | using BPA.ApolloClient; | ||||
using BPA.Message; | using BPA.Message; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||
@@ -1,7 +1,7 @@ | |||||
using BPA.Message; | using BPA.Message; | ||||
using BPASmartClient.Device; | using BPASmartClient.Device; | ||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Http; | using BPASmartClient.Http; | ||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPA.Message; | using BPA.Message; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.MQTT; | using BPASmartClient.MQTT; | ||||
using HBLConsole.Communication; | using HBLConsole.Communication; | ||||
@@ -3,8 +3,8 @@ using BPA.Message; | |||||
using BPA.Message.Enum; | using BPA.Message.Enum; | ||||
using BPA.Models; | using BPA.Models; | ||||
using BPASmartClient.Device; | using BPASmartClient.Device; | ||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Http; | using BPASmartClient.Http; | ||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
@@ -18,7 +18,7 @@ using System.Collections.ObjectModel; | |||||
using System.Linq; | using System.Linq; | ||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using static BPASmartClient.EventBus.EventBus; | |||||
namespace BPASmartClient.Business | namespace BPASmartClient.Business | ||||
{ | { | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPA.Message; | using BPA.Message; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,7 +1,7 @@ | |||||
using BPA.Message; | using BPA.Message; | ||||
using BPA.Message.Enum; | using BPA.Message.Enum; | ||||
using BPASmartClient.Device; | using BPASmartClient.Device; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -459,10 +459,9 @@ | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="BPA.Helper" Version="1.0.64" /> | |||||
<PackageReference Include="BPA.Helper" Version="1.0.65" /> | |||||
<PackageReference Include="BPA.Message" Version="1.0.86" /> | <PackageReference Include="BPA.Message" Version="1.0.86" /> | ||||
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> | <PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> | ||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.ViewModel; | using BPASmartClient.CustomResource.Pages.ViewModel; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using System; | using System; | ||||
using System.Collections.Concurrent; | using System.Collections.Concurrent; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.ViewModel; | using BPASmartClient.CustomResource.Pages.ViewModel; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using System; | using System; | ||||
using System.Collections.Concurrent; | using System.Collections.Concurrent; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks; | |||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
using System.Windows; | using System.Windows; | ||||
using System.IO; | using System.IO; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
namespace BPASmartClient.CustomResource.Pages.Model | namespace BPASmartClient.CustomResource.Pages.Model | ||||
{ | { | ||||
@@ -4,7 +4,7 @@ using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
namespace BPASmartClient.CustomResource.Pages.Model | namespace BPASmartClient.CustomResource.Pages.Model | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Diagnostics; | using System.Diagnostics; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,7 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -10,7 +8,7 @@ using System.Threading.Tasks; | |||||
namespace BPASmartClient.CustomResource.Pages.ViewModel | namespace BPASmartClient.CustomResource.Pages.ViewModel | ||||
{ | { | ||||
public class AddNewUserViewModel:NotifyBase | |||||
public class AddNewUserViewModel : NotifyBase | |||||
{ | { | ||||
public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | ||||
private string _mErrorInfo; | private string _mErrorInfo; | ||||
@@ -26,9 +24,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public string NewPassword2 { get { return _mNewPassword2; } set { _mNewPassword2 = value; OnPropertyChanged(); } } | public string NewPassword2 { get { return _mNewPassword2; } set { _mNewPassword2 = value; OnPropertyChanged(); } } | ||||
private string _mNewPassword2; | 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() | private void Confirm() | ||||
{ | { | ||||
@@ -36,9 +34,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
if (NewPassword1 == null) { ErrorInfo = "请输入密码"; return; } | if (NewPassword1 == null) { ErrorInfo = "请输入密码"; return; } | ||||
if (NewPassword2 != NewPassword1) { ErrorInfo = "两次密码不一致"; return; } | if (NewPassword2 != NewPassword1) { ErrorInfo = "两次密码不一致"; return; } | ||||
var res = Global.userManager.userInfos.FirstOrDefault(p => p.UserName == UserName); | 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 | Global.userManager.userInfos.Add(new UserInfo | ||||
{ | |||||
{ | |||||
UserName = UserName, | UserName = UserName, | ||||
Password = NewPassword1, | Password = NewPassword1, | ||||
userTreeViewModels = new List<UserTreeViewModel>() | userTreeViewModels = new List<UserTreeViewModel>() | ||||
@@ -49,12 +47,12 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public AddNewUserViewModel() | public AddNewUserViewModel() | ||||
{ | { | ||||
ConfirmCommand = new RelayCommand(Confirm); | |||||
ConfirmCommand = new BPARelayCommand(Confirm); | |||||
ExitCommand = new RelayCommand(() => | |||||
ExitCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("AddNewUserViewCancel"); | ActionManage.GetInstance.Send("AddNewUserViewCancel"); | ||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -19,7 +19,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
{ | { | ||||
public AlarmViewModel() | public AlarmViewModel() | ||||
{ | { | ||||
ControlCommand = new RelayCommand(() => | |||||
ControlCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ControlButText == "报警复位") | if (ControlButText == "报警复位") | ||||
{ | { | ||||
@@ -41,7 +41,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
}); | }); | ||||
SwitchCommand = new RelayCommand(() => | |||||
SwitchCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ButContent == "历史报警") | 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(); } } | public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } | ||||
@@ -5,7 +5,7 @@ using System.Text; | |||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using System.Windows; | using System.Windows; | ||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -17,9 +17,9 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
{ | { | ||||
Config.GetInstance.Init(); | Config.GetInstance.Init(); | ||||
ActionManage.GetInstance.Register(new Action(() => { Login(); }), "EnterLogin", true); | 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"); | 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; } | |||||
@@ -9,7 +9,7 @@ using System.Threading.Tasks; | |||||
using System.Windows; | using System.Windows; | ||||
using System.Windows.Media; | using System.Windows.Media; | ||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -20,7 +20,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
{ | { | ||||
public MainViewModel() | public MainViewModel() | ||||
{ | { | ||||
NavChangedCommand = new RelayCommand<object>(DoNavChanged); | |||||
NavChangedCommand = new BPARelayCommand<object>(DoNavChanged); | |||||
BPASmartClient.Message. MessageLog.GetInstance.InfoNotify = new Action<string>((o) => | BPASmartClient.Message. MessageLog.GetInstance.InfoNotify = new Action<string>((o) => | ||||
{ | { | ||||
Application.Current?.Dispatcher?.Invoke(() => | Application.Current?.Dispatcher?.Invoke(() => | ||||
@@ -173,7 +173,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
/// 开机自启 | /// 开机自启 | ||||
/// </summary> | /// </summary> | ||||
public bool AutoStart { get { return SystemHelper.GetInstance.IsAutoStart(); } set { SystemHelper.GetInstance.AutoStart(value); OnPropertyChanged(); } } | public bool AutoStart { get { return SystemHelper.GetInstance.IsAutoStart(); } set { SystemHelper.GetInstance.AutoStart(value); OnPropertyChanged(); } } | ||||
public RelayCommand<object> NavChangedCommand { get; set; } | |||||
public BPARelayCommand<object> NavChangedCommand { get; set; } | |||||
public FrameworkElement MainContent { get { return _mMainContent; } set { _mMainContent = value; OnPropertyChanged(); } } | public FrameworkElement MainContent { get { return _mMainContent; } set { _mMainContent = value; OnPropertyChanged(); } } | ||||
private FrameworkElement _mMainContent; | private FrameworkElement _mMainContent; | ||||
@@ -10,7 +10,7 @@ using Microsoft.Toolkit.Mvvm.Input; | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Nfc; | using BPASmartClient.Nfc; | ||||
using System.Threading; | using System.Threading; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
namespace BPASmartClient.CustomResource.Pages.ViewModel | namespace BPASmartClient.CustomResource.Pages.ViewModel | ||||
{ | { | ||||
@@ -25,7 +25,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
if (item != "管理员") permissions.Add(new PermissionSelect() { PermissionName = item }); | if (item != "管理员") permissions.Add(new PermissionSelect() { PermissionName = item }); | ||||
}); | }); | ||||
UserAddCommand = new RelayCommand(() => | |||||
UserAddCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (permissions?.FirstOrDefault(p => p.PermissionSelected == true) == null) | 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) | 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(); } } | public string CheckPassword { get { return _checkPassword; } set { _checkPassword = value; OnPropertyChanged(); } } | ||||
private string _checkPassword = "888888"; | 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; } | |||||
} | } | ||||
@@ -4,7 +4,7 @@ using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -40,7 +40,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public PasswordChangeViewModel( ) | public PasswordChangeViewModel( ) | ||||
{ | { | ||||
LoginCommand = new RelayCommand(() => | |||||
LoginCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (Global.changeUserInfo == null) CheckPassword(Global.userInfo); | if (Global.changeUserInfo == null) CheckPassword(Global.userInfo); | ||||
else { CheckPassword(Global.changeUserInfo); } | else { CheckPassword(Global.changeUserInfo); } | ||||
@@ -48,16 +48,16 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
}); | }); | ||||
ExitCommand = new RelayCommand(() => | |||||
ExitCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("PasswordChangeViewCancel"); | ActionManage.GetInstance.Send("PasswordChangeViewCancel"); | ||||
Global.changeUserInfo = null; | Global.changeUserInfo = null; | ||||
}); | }); | ||||
} | } | ||||
public RelayCommand LoginCommand { get; set; } | |||||
public BPARelayCommand LoginCommand { get; set; } | |||||
public RelayCommand ExitCommand { get; set; } | |||||
public BPARelayCommand ExitCommand { get; set; } | |||||
@@ -8,7 +8,7 @@ using Microsoft.Toolkit.Mvvm.Input; | |||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using System.Windows; | using System.Windows; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
namespace BPASmartClient.CustomResource.Pages.ViewModel | namespace BPASmartClient.CustomResource.Pages.ViewModel | ||||
{ | { | ||||
@@ -17,7 +17,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public RecipeCompleteViewModel() | public RecipeCompleteViewModel() | ||||
{ | { | ||||
Sqlite<RecipeCompleteLog>.GetInstance.Save(); | Sqlite<RecipeCompleteLog>.GetInstance.Save(); | ||||
SwitchCommand = new RelayCommand(() => | |||||
SwitchCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ButContent == "历史日志") | if (ButContent == "历史日志") | ||||
{ | { | ||||
@@ -41,7 +41,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
}); | }); | ||||
ControlCommand = new RelayCommand(() => | |||||
ControlCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ControlButText == "报警复位") return; | 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(); } } | public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } | ||||
private Visibility _mCurrentDataVis = Visibility.Visible; | private Visibility _mCurrentDataVis = Visibility.Visible; | ||||
@@ -17,7 +17,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
ReportHelper reportHelper = new ReportHelper(); | ReportHelper reportHelper = new ReportHelper(); | ||||
public ReportViewModel() | public ReportViewModel() | ||||
{ | { | ||||
AddCommand = new RelayCommand(() => | |||||
AddCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
for (int i = 0; i < 30; i++) | for (int i = 0; i < 30; i++) | ||||
{ | { | ||||
@@ -34,12 +34,12 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
//ReportData = reportHelper.Reports; | //ReportData = reportHelper.Reports; | ||||
}); | }); | ||||
SaveCommand = new RelayCommand(() => | |||||
SaveCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
reportHelper.Save($"aa.pry"); | reportHelper.Save($"aa.pry"); | ||||
}); | }); | ||||
ReadCommand = new RelayCommand(() => | |||||
ReadCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ReportData.Clear(); | ReportData.Clear(); | ||||
var res = reportHelper.GetData($"{AppDomain.CurrentDomain.BaseDirectory}AccessFile\\ProductionData\\aa.pry"); | var res = reportHelper.GetData($"{AppDomain.CurrentDomain.BaseDirectory}AccessFile\\ProductionData\\aa.pry"); | ||||
@@ -56,8 +56,8 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public ObservableCollection<ReportBase> ReportData { get; set; } = new ObservableCollection<ReportBase>(); | public ObservableCollection<ReportBase> ReportData { get; set; } = new ObservableCollection<ReportBase>(); | ||||
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; } | |||||
} | } | ||||
} | } |
@@ -8,7 +8,7 @@ using Microsoft.Toolkit.Mvvm.Input; | |||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using System.Windows; | using System.Windows; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System.Diagnostics; | using System.Diagnostics; | ||||
namespace BPASmartClient.CustomResource.Pages.ViewModel | namespace BPASmartClient.CustomResource.Pages.ViewModel | ||||
@@ -18,7 +18,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public RunLogViewModel() | public RunLogViewModel() | ||||
{ | { | ||||
Sqlite<RunLog>.GetInstance.Save(); | Sqlite<RunLog>.GetInstance.Save(); | ||||
SwitchCommand = new RelayCommand(() => | |||||
SwitchCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ButContent == "历史日志") | if (ButContent == "历史日志") | ||||
{ | { | ||||
@@ -42,7 +42,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
}); | }); | ||||
ControlCommand = new RelayCommand(() => | |||||
ControlCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ControlButText == "报警复位") return; | 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(); } } | public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } | ||||
private Visibility _mCurrentDataVis = Visibility.Visible; | private Visibility _mCurrentDataVis = Visibility.Visible; | ||||
@@ -1,6 +1,6 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.CustomResource.Pages.View; | using BPASmartClient.CustomResource.Pages.View; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -63,27 +63,27 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public Visibility VisibilityDevice { get { return _visibilityDevice; } set { _visibilityDevice = value; OnPropertyChanged(); } } | public Visibility VisibilityDevice { get { return _visibilityDevice; } set { _visibilityDevice = value; OnPropertyChanged(); } } | ||||
private Visibility _visibilityDevice = Visibility.Collapsed; | private Visibility _visibilityDevice = Visibility.Collapsed; | ||||
public RelayCommand<object> AddUserPageCommand { get; set; } | |||||
public BPARelayCommand<object> AddUserPageCommand { get; set; } | |||||
public RelayCommand<object> DeleteUserPageCommand { get; set; } | |||||
public BPARelayCommand<object> DeleteUserPageCommand { get; set; } | |||||
public RelayCommand<object> DeleteAllCommand { get; set; } | |||||
public BPARelayCommand<object> DeleteAllCommand { get; set; } | |||||
public RelayCommand<object> AddAllCommand { get; set; } | |||||
public BPARelayCommand<object> AddAllCommand { get; set; } | |||||
public RelayCommand<object> ChangeMaterailPageCommand { get; set; } | |||||
public BPARelayCommand<object> 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<object> AddLoaclMaterialCommand { get; set; } | |||||
public BPARelayCommand<object> AddLoaclMaterialCommand { get; set; } | |||||
public RelayCommand<object> DeleteLoaclMaterialCommand { get; set; } | |||||
public BPARelayCommand<object> DeleteLoaclMaterialCommand { get; set; } | |||||
public RelayCommand<object> AddDeviceMaterialCommand { get; set; } | |||||
public BPARelayCommand<object> AddDeviceMaterialCommand { get; set; } | |||||
public RelayCommand<object> DeleteDeviceMaterialCommand { get; set; } | |||||
public BPARelayCommand<object> DeleteDeviceMaterialCommand { get; set; } | |||||
private void AddUserPage(object o) | private void AddUserPage(object o) | ||||
@@ -228,19 +228,19 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public UserConfigViewModel() | public UserConfigViewModel() | ||||
{ | { | ||||
AddUserPageCommand = new RelayCommand<object>(AddUserPage); | |||||
AddUserPageCommand = new BPARelayCommand<object>(AddUserPage); | |||||
DeleteUserPageCommand = new RelayCommand<object>(DeleteUserPage); | |||||
DeleteUserPageCommand = new BPARelayCommand<object>(DeleteUserPage); | |||||
DeleteAllCommand = new RelayCommand<object>(DeleteAll); | |||||
DeleteAllCommand = new BPARelayCommand<object>(DeleteAll); | |||||
AddAllCommand = new RelayCommand<object>(AddAll); | |||||
AddAllCommand = new BPARelayCommand<object>(AddAll); | |||||
ChangeMaterailPageCommand = new RelayCommand<object>(ChangeMaterailPage); | |||||
ChangeMaterailPageCommand = new BPARelayCommand<object>(ChangeMaterailPage); | |||||
SaveCommand = new RelayCommand(() => | |||||
SaveCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
var res = Global.userManager.userInfos.FirstOrDefault(p => p.UserName == Global.changeUserInfo.UserName && p.Password == Global.changeUserInfo.Password); | var res = Global.userManager.userInfos.FirstOrDefault(p => p.UserName == Global.changeUserInfo.UserName && p.Password == Global.changeUserInfo.Password); | ||||
if(res != null) | if(res != null) | ||||
@@ -257,19 +257,19 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
ActionManage.GetInstance.Send("UserConfigViewConfirm"); | ActionManage.GetInstance.Send("UserConfigViewConfirm"); | ||||
}); | }); | ||||
CancelCommand = new RelayCommand(() => | |||||
CancelCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
Global.changeUserInfo = null; | Global.changeUserInfo = null; | ||||
ActionManage.GetInstance.Send("UserConfigViewCancel"); | ActionManage.GetInstance.Send("UserConfigViewCancel"); | ||||
}); | }); | ||||
AddLoaclMaterialCommand = new RelayCommand<object>(AddLoaclMaterial); | |||||
AddLoaclMaterialCommand = new BPARelayCommand<object>(AddLoaclMaterial); | |||||
DeleteLoaclMaterialCommand = new RelayCommand<object>(DeleteLoaclMaterial); | |||||
DeleteLoaclMaterialCommand = new BPARelayCommand<object>(DeleteLoaclMaterial); | |||||
AddDeviceMaterialCommand = new RelayCommand<object>(AddDeviceMaterial); | |||||
AddDeviceMaterialCommand = new BPARelayCommand<object>(AddDeviceMaterial); | |||||
DeleteDeviceMaterialCommand = new RelayCommand<object>(DeleteDeviceMaterial); | |||||
DeleteDeviceMaterialCommand = new BPARelayCommand<object>(DeleteDeviceMaterial); | |||||
foreach (var item in MenuManage.GetInstance.menuModels) | foreach (var item in MenuManage.GetInstance.menuModels) | ||||
@@ -8,7 +8,7 @@ using System.Collections.ObjectModel; | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using System.Windows; | using System.Windows; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
namespace BPASmartClient.CustomResource.Pages.ViewModel | namespace BPASmartClient.CustomResource.Pages.ViewModel | ||||
{ | { | ||||
@@ -18,7 +18,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
{ | { | ||||
Sqlite<UserLog>.GetInstance.Save(); | Sqlite<UserLog>.GetInstance.Save(); | ||||
UserLogs = MessageNotify.GetInstance.userLogs; | UserLogs = MessageNotify.GetInstance.userLogs; | ||||
SwitchCommand = new RelayCommand(() => | |||||
SwitchCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ButContent == "历史日志") | if (ButContent == "历史日志") | ||||
{ | { | ||||
@@ -42,7 +42,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
}); | }); | ||||
ControlCommand = new RelayCommand(() => | |||||
ControlCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (ControlButText == "报警复位") return; | if (ControlButText == "报警复位") return; | ||||
if (ControlButText == "开始查询") | 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(); } } | public Visibility CurrentDataVis { get { return _mCurrentDataVis; } set { _mCurrentDataVis = value; OnPropertyChanged(); } } | ||||
private Visibility _mCurrentDataVis = Visibility.Visible; | private Visibility _mCurrentDataVis = Visibility.Visible; | ||||
@@ -23,19 +23,19 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
//public List<Permission> Authorities { get; set; } = new List<Permission>() { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }; | //public List<Permission> Authorities { get; set; } = new List<Permission>() { Permission.管理员, Permission.操作员, Permission.观察员, Permission.技术员 }; | ||||
public List<string> Authorities { get; set; } = new List<string>(); | public List<string> Authorities { get; set; } = new List<string>(); | ||||
public RelayCommand<string> SaveCommand { get; set; } | |||||
public RelayCommand<string> DeleteCommand { get; set; } | |||||
public BPARelayCommand<string> SaveCommand { get; set; } | |||||
public BPARelayCommand<string> 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() | public UserManageViewModel() | ||||
{ | { | ||||
var userManager = JsonConvert.DeserializeObject<UserManager>(File.ReadAllText("up.hbl").AESDecrypt()); | var userManager = JsonConvert.DeserializeObject<UserManager>(File.ReadAllText("up.hbl").AESDecrypt()); | ||||
usersInfo = userManager.userInfos; | usersInfo = userManager.userInfos; | ||||
AddAuthorities(); | AddAuthorities(); | ||||
SaveCommand = new RelayCommand<string>((str) => | |||||
SaveCommand = new BPARelayCommand<string>((str) => | |||||
{ | { | ||||
if (str != string.Empty && str != null) | if (str != string.Empty && str != null) | ||||
{ | { | ||||
@@ -62,7 +62,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
MessageBox.Show("保存失败,用户名为空或输入后未回车确认", "提示", MessageBoxButton.OK, MessageBoxImage.Warning); | MessageBox.Show("保存失败,用户名为空或输入后未回车确认", "提示", MessageBoxButton.OK, MessageBoxImage.Warning); | ||||
} | } | ||||
}); | }); | ||||
DeleteCommand = new RelayCommand<string>((str) => | |||||
DeleteCommand = new BPARelayCommand<string>((str) => | |||||
{ | { | ||||
if (str != string.Empty && str != null) | 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()}); | usersInfo.Add(new UserInfo() { Id=IdProcess()}); | ||||
}); | }); | ||||
SaveDataCommand = new RelayCommand(() => | |||||
SaveDataCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
Global.userManager.userInfos = usersInfo; | Global.userManager.userInfos = usersInfo; | ||||
File.WriteAllText("up.hbl", JsonConvert.SerializeObject(Global.userManager).AESEncrypt()); | File.WriteAllText("up.hbl", JsonConvert.SerializeObject(Global.userManager).AESEncrypt()); | ||||
@@ -1,6 +1,6 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.CustomResource.Pages.View; | using BPASmartClient.CustomResource.Pages.View; | ||||
using Microsoft.Toolkit.Mvvm.Input; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
@@ -15,20 +15,20 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
/// <summary> | /// <summary> | ||||
/// datagrid绑定 | /// datagrid绑定 | ||||
/// </summary> | /// </summary> | ||||
public ObservableCollection<UserInfo> userManager { get; set; } = Global.userManager.userInfos; | |||||
public ObservableCollection<UserInfo> userManager { get; set; } = Global.userManager.userInfos; | |||||
public RelayCommand<object> ChangePasswardCommand { get; set; } | |||||
public RelayCommand AddNewUserCommand { get; set; } | |||||
public BPARelayCommand<object> ChangePasswardCommand { get; set; } | |||||
public RelayCommand<object> DeleteUserCommand { get; set; } | |||||
public BPARelayCommand AddNewUserCommand { get; set; } | |||||
public RelayCommand<object> EditUserConfigCommand { get; set; } | |||||
public BPARelayCommand<object> DeleteUserCommand { get; set; } | |||||
public BPARelayCommand<object> EditUserConfigCommand { get; set; } | |||||
private void ChangePassward(object o) | private void ChangePassward(object o) | ||||
{ | { | ||||
if (o != null && o is UserInfo infos) | |||||
if (o != null && o is UserInfo infos) | |||||
{ | { | ||||
Global.changeUserInfo = infos; | Global.changeUserInfo = infos; | ||||
PasswordChangeView passwordChangeView = new PasswordChangeView(); | PasswordChangeView passwordChangeView = new PasswordChangeView(); | ||||
@@ -55,22 +55,22 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
UserConfigView userConfigView = new UserConfigView(); | UserConfigView userConfigView = new UserConfigView(); | ||||
userConfigView.ShowDialog(); | userConfigView.ShowDialog(); | ||||
} | } | ||||
} | } | ||||
public UserManagerViewModel() | public UserManagerViewModel() | ||||
{ | { | ||||
ChangePasswardCommand = new RelayCommand<object>(ChangePassward); | |||||
ChangePasswardCommand = new BPARelayCommand<object>(ChangePassward); | |||||
AddNewUserCommand = new RelayCommand(() => | |||||
AddNewUserCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
AddNewUser addNewUser = new AddNewUser(); | AddNewUser addNewUser = new AddNewUser(); | ||||
addNewUser.ShowDialog(); | addNewUser.ShowDialog(); | ||||
}); | }); | ||||
DeleteUserCommand = new RelayCommand<object>(DeleteUser); | |||||
DeleteUserCommand = new BPARelayCommand<object>(DeleteUser); | |||||
EditUserConfigCommand = new RelayCommand<object>(EditUserConfig); | |||||
EditUserConfigCommand = new BPARelayCommand<object>(EditUserConfig); | |||||
} | } | ||||
} | } | ||||
@@ -1,7 +1,7 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -25,7 +25,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
public ObservableCollection<PlcVariableInfoModel> FryFiveVariables { get; set; } = new ObservableCollection<PlcVariableInfoModel>(); | public ObservableCollection<PlcVariableInfoModel> FryFiveVariables { get; set; } = new ObservableCollection<PlcVariableInfoModel>(); | ||||
public List<string> DeviceName { get; set; } = new List<string> { "滚筒输送线", "炒锅1", "炒锅2", "炒锅3", "炒锅4", "炒锅5" }; | public List<string> DeviceName { get; set; } = new List<string> { "滚筒输送线", "炒锅1", "炒锅2", "炒锅3", "炒锅4", "炒锅5" }; | ||||
public RelayCommand SaveDataCommand { get; set; } | |||||
public BPARelayCommand SaveDataCommand { get; set; } | |||||
public VariableViewModel() | public VariableViewModel() | ||||
{ | { | ||||
@@ -48,7 +48,7 @@ namespace BPASmartClient.CustomResource.Pages.ViewModel | |||||
} | } | ||||
SaveDataCommand = new RelayCommand(() => | |||||
SaveDataCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
Json<PlcVariableInfoManage>.Data.VariablesInfo["滚筒输送线"] = Variables; | Json<PlcVariableInfoManage>.Data.VariablesInfo["滚筒输送线"] = Variables; | ||||
Json<PlcVariableInfoManage>.Data.VariablesInfo["炒锅1"] = FryOneVariables; | Json<PlcVariableInfoManage>.Data.VariablesInfo["炒锅1"] = FryOneVariables; | ||||
@@ -1,6 +1,6 @@ | |||||
using BPASmartClient.DRCoffee; | using BPASmartClient.DRCoffee; | ||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPASmartClient.Model.咖啡机.Enum; | using BPASmartClient.Model.咖啡机.Enum; | ||||
@@ -9,7 +9,7 @@ using BPASmartClient.SerialPort; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Threading; | using System.Threading; | ||||
using static BPASmartClient.EventBus.EventBus; | |||||
namespace BPASmartClient.DRCoffee | namespace BPASmartClient.DRCoffee | ||||
{ | { | ||||
@@ -1,5 +1,5 @@ | |||||
| | ||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPASmartClient.Model.咖啡机.Enum; | using BPASmartClient.Model.咖啡机.Enum; | ||||
using BPASmartClient.SerialPort; | using BPASmartClient.SerialPort; | ||||
@@ -9,7 +9,7 @@ using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading; | using System.Threading; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using static BPASmartClient.EventBus.EventBus; | |||||
namespace BPASmartClient.DRCoffee | namespace BPASmartClient.DRCoffee | ||||
{ | { | ||||
@@ -1,6 +1,6 @@ | |||||
using BPASmartClient.DRCoffee; | using BPASmartClient.DRCoffee; | ||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using System; | using System; | ||||
@@ -12,11 +12,11 @@ namespace BPASmartClient.DosingSystemSingle | |||||
public class ViewModelBase : NotifyBase | public class ViewModelBase : NotifyBase | ||||
{ | { | ||||
public int Index { get; set; } = -1; | public int Index { get; set; } = -1; | ||||
public BPARelayCommand AddCommand { get; set; }//添加 | |||||
public BPARelayCommand CancelCommand { get; set; }//取消 | |||||
public BPARelayCommand SaveCommand { get; set; }//保存 | |||||
public BPARelayCommand<object> RemoveCommand { get; set; }//移除 | |||||
public BPARelayCommand<object> DetailsCommand { get; set; }//编辑 | |||||
public BPABPARelayCommand AddCommand { get; set; }//添加 | |||||
public BPABPARelayCommand CancelCommand { get; set; }//取消 | |||||
public BPABPARelayCommand SaveCommand { get; set; }//保存 | |||||
public BPABPARelayCommand<object> RemoveCommand { get; set; }//移除 | |||||
public BPABPARelayCommand<object> DetailsCommand { get; set; }//编辑 | |||||
/// <summary> | /// <summary> | ||||
/// 错误信息 | /// 错误信息 | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -17,8 +17,8 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
if (o != null && o is string str) IpAddress = str; | if (o != null && o is string str) IpAddress = str; | ||||
}), "ChangeDeviceNameViewOpen"); | }), "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)) | if (string.IsNullOrEmpty(DeviceName)) | ||||
{ | { | ||||
@@ -14,7 +14,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
{ | { | ||||
public CommparSetViewModel() | public CommparSetViewModel() | ||||
{ | { | ||||
SaveCommand = new BPARelayCommand(() => | |||||
SaveCommand = new BPABPARelayCommand(() => | |||||
{ | { | ||||
if (!string.IsNullOrEmpty(CommBaseParModel.NetworkSegAddress)) | if (!string.IsNullOrEmpty(CommBaseParModel.NetworkSegAddress)) | ||||
{ | { | ||||
@@ -38,7 +38,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
public BasePar CommBaseParModel { get { return Json<DevicePar>.Data.BaseParModel; } set { Json<DevicePar>.Data.BaseParModel = value; OnPropertyChanged(); } } | public BasePar CommBaseParModel { get { return Json<DevicePar>.Data.BaseParModel; } set { Json<DevicePar>.Data.BaseParModel = value; OnPropertyChanged(); } } | ||||
//private BasePar _mCommBaseParModel; | //private BasePar _mCommBaseParModel; | ||||
public BPARelayCommand SaveCommand { get; set; } | |||||
public BPABPARelayCommand SaveCommand { get; set; } | |||||
} | } | ||||
} | } |
@@ -16,7 +16,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
{ | { | ||||
public DeviceListViewModel() | public DeviceListViewModel() | ||||
{ | { | ||||
DetailsCommand = new BPARelayCommand<object>((o) => | |||||
DetailsCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string str) | if (o != null && o is string str) | ||||
{ | { | ||||
@@ -28,7 +28,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
devices = DeviceInquire.GetInstance.devices; | devices = DeviceInquire.GetInstance.devices; | ||||
} | } | ||||
//public BPARelayCommand<object> ChangeNameCommand { get; set; } | |||||
//public BPABPARelayCommand<object> ChangeNameCommand { get; set; } | |||||
//public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>(); | //public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>(); | ||||
public ObservableCollection<Devices> devices { get; set; } | public ObservableCollection<Devices> devices { get; set; } | ||||
@@ -16,15 +16,15 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
public DeviceMaterialParViewModel() | public DeviceMaterialParViewModel() | ||||
{ | { | ||||
deviceParModels = Json<DevicePar>.Data.deviceParModels; | deviceParModels = Json<DevicePar>.Data.deviceParModels; | ||||
RemoveCommand = new BPARelayCommand<object>((o) => | |||||
RemoveCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); | var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); | ||||
if (res != null) deviceParModels.Remove(res); | if (res != null) deviceParModels.Remove(res); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); | 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) | if (deviceParModels == null || deviceParModels.Count <= 0) | ||||
{ | { | ||||
@@ -57,10 +57,10 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
public ObservableCollection<DeviceParModel> deviceParModels { get; set; } | public ObservableCollection<DeviceParModel> deviceParModels { get; set; } | ||||
//public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
//public BPABPARelayCommand<object> RemoveCommand { get; set; } | |||||
//public BPARelayCommand AddCommand { get; set; } | |||||
//public BPARelayCommand SaveCommand { get; set; } | |||||
//public BPABPARelayCommand AddCommand { get; set; } | |||||
//public BPABPARelayCommand SaveCommand { get; set; } | |||||
} | } | ||||
} | } |
@@ -23,7 +23,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
// ConveyerBeltModels.Add(new ConveyerBeltModel() { Name = $"输送带{i}", Num = i++ }); | // ConveyerBeltModels.Add(new ConveyerBeltModel() { Name = $"输送带{i}", Num = i++ }); | ||||
//} | //} | ||||
//ConveyerBeltControlCommand = new BPARelayCommand<object>(o => | |||||
//ConveyerBeltControlCommand = new BPABPARelayCommand<object>(o => | |||||
//{ | //{ | ||||
// if (o != null && o is int tempCount) | // if (o != null && o is int tempCount) | ||||
// { | // { | ||||
@@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
Thread.Sleep(100); | Thread.Sleep(100); | ||||
}), "输送带料仓状态监控"); | }), "输送带料仓状态监控"); | ||||
RecipeControlCommand = new BPARelayCommand<object>((o) => | |||||
RecipeControlCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is DeviceCurrentStatus currentStatus) | if (o != null && o is DeviceCurrentStatus currentStatus) | ||||
{ | { | ||||
@@ -109,9 +109,9 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
public ObservableCollection<ConveyerBeltModel> ConveyerBeltModels { get; set; } = new ObservableCollection<ConveyerBeltModel>(); | public ObservableCollection<ConveyerBeltModel> ConveyerBeltModels { get; set; } = new ObservableCollection<ConveyerBeltModel>(); | ||||
public BPARelayCommand<object> ConveyerBeltControlCommand { get; set; } | |||||
public BPABPARelayCommand<object> ConveyerBeltControlCommand { get; set; } | |||||
public BPARelayCommand<object> RecipeControlCommand { get; set; } | |||||
public BPABPARelayCommand<object> RecipeControlCommand { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 输送带状态 | /// 输送带状态 | ||||
@@ -51,7 +51,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
OtherHandCylinders.Add(new CylinderModel() { Name = "上桶工位气缸" }); | OtherHandCylinders.Add(new CylinderModel() { Name = "上桶工位气缸" }); | ||||
OtherHandCylinders.Add(new CylinderModel() { Name = "下桶工位气缸" }); | OtherHandCylinders.Add(new CylinderModel() { Name = "下桶工位气缸" }); | ||||
Open = new BPARelayCommand<object>((o) => | |||||
Open = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null) | if (o != null) | ||||
{ | { | ||||
@@ -76,7 +76,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
}); | }); | ||||
Close = new BPARelayCommand<object>((o) => | |||||
Close = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null) | 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); | SiemensDevice.GetInstance.MySiemens.Write("M10.0", SystemControlText == "停止" ? false : true); | ||||
/*var res = SiemensDevice.GetInstance.MySiemens.Read<bool>("M10.0"); | /*var res = SiemensDevice.GetInstance.MySiemens.Read<bool>("M10.0"); | ||||
SystemControlText = res ? "停止" : "启动";*/ | SystemControlText = res ? "停止" : "启动";*/ | ||||
}); | }); | ||||
ModelSwitch = new BPARelayCommand(() => | |||||
ModelSwitch = new BPABPARelayCommand(() => | |||||
{ | { | ||||
SiemensDevice.GetInstance.MySiemens.Write("M10.1", ModelSwitchText == "手动" ? true : false); | SiemensDevice.GetInstance.MySiemens.Write("M10.1", ModelSwitchText == "手动" ? true : false); | ||||
/*var res = SiemensDevice.GetInstance.MySiemens.Read<bool>("M10.1"); | /*var res = SiemensDevice.GetInstance.MySiemens.Read<bool>("M10.1"); | ||||
@@ -166,12 +166,12 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
/// </summary> | /// </summary> | ||||
public ObservableCollection<CylinderModel> OtherHandCylinders { get; set; } = new ObservableCollection<CylinderModel>(); | public ObservableCollection<CylinderModel> OtherHandCylinders { get; set; } = new ObservableCollection<CylinderModel>(); | ||||
public BPARelayCommand<object> Open { get; set; } | |||||
public BPABPARelayCommand<object> Open { get; set; } | |||||
public BPARelayCommand<object> Close { get; set; } | |||||
public BPABPARelayCommand<object> 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(); } } | public string SystemControlText { get { return _mSystemControlText; } set { _mSystemControlText = value; OnPropertyChanged(); } } | ||||
@@ -22,9 +22,9 @@ public class NewMaterialViewModel : ViewModelBase | |||||
//public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | //public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | ||||
//private string _mErrorInfo; | //private string _mErrorInfo; | ||||
//public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
//public BPABPARelayCommand<object> RemoveCommand { get; set; } | |||||
//public BPARelayCommand SaveCommand { get; set; } | |||||
//public BPABPARelayCommand SaveCommand { get; set; } | |||||
@@ -42,9 +42,9 @@ public class NewMaterialViewModel : ViewModelBase | |||||
public NewMaterialViewModel() | public NewMaterialViewModel() | ||||
{ | { | ||||
RemoveCommand = new BPARelayCommand<object>(Remove); | |||||
RemoveCommand = new BPABPARelayCommand<object>(Remove); | |||||
SaveCommand = new BPARelayCommand(() => | |||||
SaveCommand = new BPABPARelayCommand(() => | |||||
{ | { | ||||
if (MaterialName == String.Empty) { ErrorInfo = "原料名称不能为空"; return; } | if (MaterialName == String.Empty) { ErrorInfo = "原料名称不能为空"; return; } | ||||
if (Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == MaterialName) != null) { ErrorInfo = "设备中已存在该原料名称"; return; } | if (Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == MaterialName) != null) { ErrorInfo = "设备中已存在该原料名称"; return; } | ||||
@@ -29,9 +29,9 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
Index = Array.FindIndex(Json<DevicePar>.Data.OutletInfoModels.ToArray(), p => p.OutletName == tempOutletInfo.OutletName); | Index = Array.FindIndex(Json<DevicePar>.Data.OutletInfoModels.ToArray(), p => p.OutletName == tempOutletInfo.OutletName); | ||||
} | } | ||||
}), "OpenNewOutlet", true); | }), "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<string> SileNames = new ObservableCollection<string>(); | ObservableCollection<string> SileNames = new ObservableCollection<string>(); | ||||
SiloInfos.ToList()?.ForEach(item => { SileNames.Add(item.RawMaterialName); }); | SiloInfos.ToList()?.ForEach(item => { SileNames.Add(item.RawMaterialName); }); | ||||
@@ -82,7 +82,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
} | } | ||||
ActionManage.GetInstance.Send("NewOutletViewClose"); | ActionManage.GetInstance.Send("NewOutletViewClose"); | ||||
}); | }); | ||||
RemoveCommand = new BPARelayCommand<object>((o) => | |||||
RemoveCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (!string.IsNullOrEmpty(o?.ToString())) | if (!string.IsNullOrEmpty(o?.ToString())) | ||||
{ | { | ||||
@@ -41,7 +41,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
} | } | ||||
}), "Details", true); | }), "Details", true); | ||||
AddCommand = new BPARelayCommand(() => | |||||
AddCommand = new BPABPARelayCommand(() => | |||||
{ | { | ||||
if (RawMaterials.Count >= DeviceInquire.GetInstance.devices.Count) | if (RawMaterials.Count >= DeviceInquire.GetInstance.devices.Count) | ||||
{ | { | ||||
@@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
else goto p; | else goto p; | ||||
}); | }); | ||||
RemoveCommand = new BPARelayCommand<object>((obj) => | |||||
RemoveCommand = new BPABPARelayCommand<object>((obj) => | |||||
{ | { | ||||
if (obj is string rm) | 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; } | if (string.IsNullOrEmpty(RecipeName)) { MessageNotify.GetInstance.ShowDialog("请输入配方名称!", DialogType.Warning); ErrorInfo = "请输入配方名称"; return; } | ||||
var tempRes = RawMaterials.GroupBy(p => p.RawMaterialName); | 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(); } } | //public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | ||||
//private string _mErrorInfo; | //private string _mErrorInfo; | ||||
//public BPARelayCommand AddCommand { get; set; } | |||||
//public BPABPARelayCommand AddCommand { get; set; } | |||||
//public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
//public BPABPARelayCommand<object> RemoveCommand { get; set; } | |||||
//public BPARelayCommand SaveCommand { get; set; } | |||||
//public BPABPARelayCommand SaveCommand { get; set; } | |||||
public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel>(); | public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel>(); | ||||
@@ -14,14 +14,14 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
{ | { | ||||
public OutletManagementViewModel() | public OutletManagementViewModel() | ||||
{ | { | ||||
AddCommand = new BPARelayCommand(() => | |||||
AddCommand = new BPABPARelayCommand(() => | |||||
{ | { | ||||
NewOutletView newOutletView = new NewOutletView(); | NewOutletView newOutletView = new NewOutletView(); | ||||
newOutletView.ShowDialog(); | newOutletView.ShowDialog(); | ||||
}); | }); | ||||
SaveCommand = new BPARelayCommand(() => { Json<DevicePar>.Save(); }); | |||||
SaveCommand = new BPABPARelayCommand(() => { Json<DevicePar>.Save(); }); | |||||
OutletInfoModels = Json<DevicePar>.Data.OutletInfoModels; | OutletInfoModels = Json<DevicePar>.Data.OutletInfoModels; | ||||
RemoveCommand = new BPARelayCommand<object>((o) => | |||||
RemoveCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (!string.IsNullOrEmpty(o?.ToString())) | if (!string.IsNullOrEmpty(o?.ToString())) | ||||
{ | { | ||||
@@ -34,7 +34,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
} | } | ||||
}); | }); | ||||
DetailsCommand = new BPARelayCommand<object>((o) => | |||||
DetailsCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (!string.IsNullOrEmpty(o?.ToString())) | if (!string.IsNullOrEmpty(o?.ToString())) | ||||
{ | { | ||||
@@ -26,9 +26,9 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
static ObservableCollection<string> RawMaterialReset = new ObservableCollection<string>(); | static ObservableCollection<string> RawMaterialReset = new ObservableCollection<string>(); | ||||
public RecipeControlViewModel() | public RecipeControlViewModel() | ||||
{ | { | ||||
StartCommand = new BPARelayCommand<object>(RecipeIssued); | |||||
ChangeRecipeStateCommand = new BPARelayCommand<object>(ChangeRecipeState); | |||||
CancelRecipeCommand = new BPARelayCommand<object>(CancelRecipe); | |||||
StartCommand = new BPABPARelayCommand<object>(RecipeIssued); | |||||
ChangeRecipeStateCommand = new BPABPARelayCommand<object>(ChangeRecipeState); | |||||
CancelRecipeCommand = new BPABPARelayCommand<object>(CancelRecipe); | |||||
RecipeRun(); | RecipeRun(); | ||||
RecipeStatusInquire(); | RecipeStatusInquire(); | ||||
} | } | ||||
@@ -247,11 +247,11 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
}), "RecipeControlViewModelStatusInquire"); | }), "RecipeControlViewModelStatusInquire"); | ||||
} | } | ||||
public BPARelayCommand<object> StartCommand { get; set; } | |||||
public BPABPARelayCommand<object> StartCommand { get; set; } | |||||
public BPARelayCommand<object> ChangeRecipeStateCommand { get; set; } | |||||
public BPABPARelayCommand<object> ChangeRecipeStateCommand { get; set; } | |||||
public BPARelayCommand<object> CancelRecipeCommand { get; set; } | |||||
public BPABPARelayCommand<object> CancelRecipeCommand { get; set; } | |||||
public static ObservableCollection<RecipeModel> Recipes { get; set; } = Json<LocaPar>.Data.Recipes; | public static ObservableCollection<RecipeModel> Recipes { get; set; } = Json<LocaPar>.Data.Recipes; | ||||
@@ -26,24 +26,24 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
{ | { | ||||
Recipes = Json<LocaPar>.Data.Recipes; | Recipes = Json<LocaPar>.Data.Recipes; | ||||
NewMaterital = new BPARelayCommand(() => | |||||
NewMaterital = new BPABPARelayCommand(() => | |||||
{ | { | ||||
NewMaterialView newMateritalView = new NewMaterialView(); | NewMaterialView newMateritalView = new NewMaterialView(); | ||||
newMateritalView.ShowDialog(); | newMateritalView.ShowDialog(); | ||||
}); | }); | ||||
NewRecipe = new BPARelayCommand(() => | |||||
NewRecipe = new BPABPARelayCommand(() => | |||||
{ | { | ||||
NewRecipeView nrv = new NewRecipeView(); | NewRecipeView nrv = new NewRecipeView(); | ||||
nrv.ShowDialog(); | nrv.ShowDialog(); | ||||
MessageNotify.GetInstance.ShowUserLog("新建配方"); | MessageNotify.GetInstance.ShowUserLog("新建配方"); | ||||
}); | }); | ||||
SaveRecipe = new BPARelayCommand(() => | |||||
SaveRecipe = new BPABPARelayCommand(() => | |||||
{ | { | ||||
Json<LocaPar>.Save(); | Json<LocaPar>.Save(); | ||||
MessageNotify.GetInstance.ShowUserLog("保存配方"); | MessageNotify.GetInstance.ShowUserLog("保存配方"); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); | ||||
}); | }); | ||||
RemoveCommand = new BPARelayCommand<object>((o) => | |||||
RemoveCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (!string.IsNullOrEmpty(o?.ToString())) | if (!string.IsNullOrEmpty(o?.ToString())) | ||||
{ | { | ||||
@@ -65,7 +65,7 @@ namespace BPASmartClient.DosingSystemSingle.ViewModel | |||||
} | } | ||||
}); | }); | ||||
DetailsCommand = new BPARelayCommand<object>((o) => | |||||
DetailsCommand = new BPABPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (!string.IsNullOrEmpty(o?.ToString())) | 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<object> EditCommand { get; set; } | |||||
public BPABPARelayCommand<object> EditCommand { get; set; } | |||||
public BPARelayCommand<object> DetailsCommand { get; set; } | |||||
public BPABPARelayCommand<object> DetailsCommand { get; set; } | |||||
public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
public BPABPARelayCommand<object> RemoveCommand { get; set; } | |||||
public ObservableCollection<RecipeModel> Recipes { get; set; } | public ObservableCollection<RecipeModel> Recipes { get; set; } | ||||
} | } | ||||
@@ -2,7 +2,7 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.CustomResource.Pages.View; | using BPASmartClient.CustomResource.Pages.View; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
using System.Threading; | using System.Threading; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
using System.Threading; | using System.Threading; | ||||
@@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.Pages.Model; | |||||
using BPASmartClient.FoodStationTest.Model.GVL; | using BPASmartClient.FoodStationTest.Model.GVL; | ||||
using BPASmartClient.FoodStationTest.Model.HK_PLC; | using BPASmartClient.FoodStationTest.Model.HK_PLC; | ||||
using BPASmartClient.FoodStationTest.Model.RawMaterial; | using BPASmartClient.FoodStationTest.Model.RawMaterial; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Concurrent; | using System.Collections.Concurrent; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -1,7 +1,7 @@ | |||||
using BPA.Communication; | using BPA.Communication; | ||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.FoodStationTest.ViewModel; | using BPASmartClient.FoodStationTest.ViewModel; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using System; | using System; | ||||
using System.Collections.Concurrent; | using System.Collections.Concurrent; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Windows; | using System.Windows; | ||||
using System.Windows.Input; | using System.Windows.Input; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Windows; | using System.Windows; | ||||
using System.Windows.Input; | using System.Windows.Input; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Windows; | using System.Windows; | ||||
using System.Windows.Input; | using System.Windows.Input; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Windows; | using System.Windows; | ||||
using System.Windows.Input; | using System.Windows.Input; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Windows; | using System.Windows; | ||||
using System.Windows.Input; | using System.Windows.Input; | ||||
@@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; | |||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.Model.Bom; | using BPASmartClient.FoodStationTest.Model.Bom; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
@@ -16,14 +16,14 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public BomOfMaterialViewModel() | public BomOfMaterialViewModel() | ||||
{ | { | ||||
RawMaterialInfo = Json<DevicePar>.Data.BomMaterial; | RawMaterialInfo = Json<DevicePar>.Data.BomMaterial; | ||||
AddMaterial = new RelayCommand(() => | |||||
AddMaterial = new BPARelayCommand(() => | |||||
{ | { | ||||
RawMaterialInfo.Add(new BomMaterial() | RawMaterialInfo.Add(new BomMaterial() | ||||
{ | { | ||||
Count = Json<DevicePar>.Data.BomMaterial.Count + 1, | Count = Json<DevicePar>.Data.BomMaterial.Count + 1, | ||||
}); | }); | ||||
}); | }); | ||||
SaveMaterials = new RelayCommand(() => | |||||
SaveMaterials = new BPARelayCommand(() => | |||||
{ | { | ||||
if (MessageNotify.GetInstance.ShowDialog("请确认是否保存!") == true) | if (MessageNotify.GetInstance.ShowDialog("请确认是否保存!") == true) | ||||
{ | { | ||||
@@ -32,7 +32,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); | ||||
} | } | ||||
}); | }); | ||||
GetBomMaterialData = new RelayCommand(() => | |||||
GetBomMaterialData = new BPARelayCommand(() => | |||||
{ | { | ||||
Json<DevicePar>.Data.BomMaterial.Clear(); | Json<DevicePar>.Data.BomMaterial.Clear(); | ||||
ProcessControl.GetInstance.RawMaterialNameWithCode();//原料的名称和编码对应 :西门子mes定义的物料编码 | ProcessControl.GetInstance.RawMaterialNameWithCode();//原料的名称和编码对应 :西门子mes定义的物料编码 | ||||
@@ -42,7 +42,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); | ||||
}); | }); | ||||
DeleteAllMaterial = new RelayCommand(() => | |||||
DeleteAllMaterial = new BPARelayCommand(() => | |||||
{ | { | ||||
if (MessageNotify.GetInstance.ShowDialog("请确认是否删除所有原料数据!") == true) | if (MessageNotify.GetInstance.ShowDialog("请确认是否删除所有原料数据!") == true) | ||||
{ | { | ||||
@@ -50,7 +50,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
MessageNotify.GetInstance.ShowUserLog($"西门子物料清单删除完成"); | MessageNotify.GetInstance.ShowUserLog($"西门子物料清单删除完成"); | ||||
} | } | ||||
}); | }); | ||||
RemoveCommand = new RelayCommand<int>((Count) => | |||||
RemoveCommand = new BPARelayCommand<int>((Count) => | |||||
{ | { | ||||
if (Count is int cnt) | if (Count is int cnt) | ||||
{ | { | ||||
@@ -67,11 +67,11 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
}); | }); | ||||
} | } | ||||
public ObservableCollection<BomMaterial> RawMaterialInfo { get; set; } = new ObservableCollection<BomMaterial>(); | public ObservableCollection<BomMaterial> RawMaterialInfo { get; set; } = new ObservableCollection<BomMaterial>(); | ||||
public RelayCommand AddMaterial { get; set; } | |||||
public RelayCommand SaveMaterials { get; set; } | |||||
public RelayCommand<int> 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<int> RemoveCommand { get; set; } | |||||
public BPARelayCommand GetBomMaterialData { get; set; } | |||||
public BPARelayCommand DeleteAllMaterial { get; set; } | |||||
} | } | ||||
} | } |
@@ -1,6 +1,6 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -18,8 +18,8 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
IpAddress = str; | IpAddress = str; | ||||
}), "ChangeDeviceNameViewOpen"); | }), "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)) | if (string.IsNullOrEmpty(DeviceName)) | ||||
{ | { | ||||
@@ -56,9 +56,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
private static string IpAddress = string.Empty; | 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(); } } | public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | ||||
@@ -1,6 +1,6 @@ | |||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.View; | using BPASmartClient.FoodStationTest.View; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
@@ -11,7 +11,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
{ | { | ||||
public DeviceListViewModel() | public DeviceListViewModel() | ||||
{ | { | ||||
ChangeNameCommand = new RelayCommand<object>((o) => | |||||
ChangeNameCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string str) | if (o != null && o is string str) | ||||
{ | { | ||||
@@ -21,7 +21,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
Open = new RelayCommand<object>((o) => | |||||
Open = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string str) | if (o != null && o is string str) | ||||
{ | { | ||||
@@ -29,7 +29,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
Close = new RelayCommand<object>((o) => | |||||
Close = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string str) | if (o != null && o is string str) | ||||
{ | { | ||||
@@ -45,9 +45,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
devices = new ObservableCollection<Devices>(devices.OrderBy(item => item.Serial));*/ | devices = new ObservableCollection<Devices>(devices.OrderBy(item => item.Serial));*/ | ||||
} | } | ||||
public RelayCommand<object> ChangeNameCommand { get; set; } | |||||
public RelayCommand<object> Open { get; set; } | |||||
public RelayCommand<object> Close { get; set; } | |||||
public BPARelayCommand<object> ChangeNameCommand { get; set; } | |||||
public BPARelayCommand<object> Open { get; set; } | |||||
public BPARelayCommand<object> Close { get; set; } | |||||
//public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>(); | //public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>(); | ||||
public ObservableCollection<Devices> devices { get; set; } | public ObservableCollection<Devices> devices { get; set; } | ||||
@@ -1,7 +1,7 @@ | |||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
@@ -14,7 +14,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public DeviceMaterialParViewModel() | public DeviceMaterialParViewModel() | ||||
{ | { | ||||
deviceParModels = Json<DevicePar>.Data.deviceParModels; | deviceParModels = Json<DevicePar>.Data.deviceParModels; | ||||
RemoveCommand = new RelayCommand<object>((o) => | |||||
RemoveCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); | var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); | ||||
if (res != null) | if (res != null) | ||||
@@ -22,8 +22,8 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); | 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) | if (deviceParModels == null || deviceParModels.Count <= 0) | ||||
{ | { | ||||
@@ -56,10 +56,10 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public ObservableCollection<DeviceParMode> deviceParModels { get; set; } | public ObservableCollection<DeviceParMode> deviceParModels { get; set; } | ||||
public RelayCommand<object> RemoveCommand { get; set; } | |||||
public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
public RelayCommand AddCommand { get; set; } | |||||
public RelayCommand SaveCommand { get; set; } | |||||
public BPARelayCommand AddCommand { get; set; } | |||||
public BPARelayCommand SaveCommand { get; set; } | |||||
} | } | ||||
} | } |
@@ -11,7 +11,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public ManualCommViewModel() | public ManualCommViewModel() | ||||
{ | { | ||||
PlcDataColl.Add(new VarMonitor() { SerialNum = PlcDataColl.Count, Address = "", }); | PlcDataColl.Add(new VarMonitor() { SerialNum = PlcDataColl.Count, Address = "", }); | ||||
SetParCommand = new RelayCommand<object>((o) => | |||||
SetParCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string address) | if (o != null && o is string address) | ||||
{ | { | ||||
@@ -21,9 +21,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
public static ObservableCollection<VarMonitor> PlcDataColl { get; set; } = new ObservableCollection<VarMonitor>(); | public static ObservableCollection<VarMonitor> PlcDataColl { get; set; } = new ObservableCollection<VarMonitor>(); | ||||
public RelayCommand<object> SetParCommand { get; set; } | |||||
public BPARelayCommand<object> SetParCommand { get; set; } | |||||
public RelayCommand Connect { get; set; } | |||||
public BPARelayCommand Connect { get; set; } | |||||
} | } | ||||
} | } |
@@ -1,7 +1,7 @@ | |||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -216,80 +216,80 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
Open = new RelayCommand<object>((o) => | |||||
Open = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("ManualOpen", o); | ActionManage.GetInstance.Send("ManualOpen", o); | ||||
}); | }); | ||||
Close = new RelayCommand<object>((o) => | |||||
Close = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("ManualClose", o); | ActionManage.GetInstance.Send("ManualClose", o); | ||||
}); | }); | ||||
StartAxisLoadCommand = new RelayCommand(() => | |||||
StartAxisLoadCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StartAxisLoadCommand"); | ActionManage.GetInstance.Send("StartAxisLoadCommand"); | ||||
}); | }); | ||||
StopAxisLoadCommand = new RelayCommand(() => | |||||
StopAxisLoadCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StopAxisLoadCommand"); | ActionManage.GetInstance.Send("StopAxisLoadCommand"); | ||||
}); | }); | ||||
StartAxisMidCommand = new RelayCommand(() => | |||||
StartAxisMidCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StartAxisMidCommand"); | ActionManage.GetInstance.Send("StartAxisMidCommand"); | ||||
}); | }); | ||||
StopAxisMidCommand = new RelayCommand(() => | |||||
StopAxisMidCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StopAxisMidCommand"); | ActionManage.GetInstance.Send("StopAxisMidCommand"); | ||||
}); | }); | ||||
StartAxisUnLoadCommand = new RelayCommand(() => | |||||
StartAxisUnLoadCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StartAxisUnLoadCommand"); | ActionManage.GetInstance.Send("StartAxisUnLoadCommand"); | ||||
}); | }); | ||||
StopAxisUnLoadCommand = new RelayCommand(() => | |||||
StopAxisUnLoadCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StopAxisUnLoadCommand"); | ActionManage.GetInstance.Send("StopAxisUnLoadCommand"); | ||||
}); | }); | ||||
StartAxis1Command = new RelayCommand(() => | |||||
StartAxis1Command = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StartAxis1Command"); | ActionManage.GetInstance.Send("StartAxis1Command"); | ||||
}); | }); | ||||
StopAxis1Command = new RelayCommand(() => | |||||
StopAxis1Command = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StopAxis1Command"); | ActionManage.GetInstance.Send("StopAxis1Command"); | ||||
}); | }); | ||||
StartAxis2Command = new RelayCommand(() => | |||||
StartAxis2Command = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StartAxis2Command"); | ActionManage.GetInstance.Send("StartAxis2Command"); | ||||
}); | }); | ||||
StopAxis2Command = new RelayCommand(() => | |||||
StopAxis2Command = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("StopAxis2Command"); | ActionManage.GetInstance.Send("StopAxis2Command"); | ||||
}); | }); | ||||
SystemStartCommand = new RelayCommand(() => | |||||
SystemStartCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("SystemStart"); | ActionManage.GetInstance.Send("SystemStart"); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统启动!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统启动!"); | ||||
}); | }); | ||||
SystemStopCommand = new RelayCommand(() => | |||||
SystemStopCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("SystemStop"); | ActionManage.GetInstance.Send("SystemStop"); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统停止!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统停止!"); | ||||
}); | }); | ||||
SystemPauseCommand = new RelayCommand(() => | |||||
SystemPauseCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("SystemPause"); | ActionManage.GetInstance.Send("SystemPause"); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停!"); | ||||
}); | }); | ||||
SystemResetCommand = new RelayCommand(() => | |||||
SystemResetCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("SystemReset"); | ActionManage.GetInstance.Send("SystemReset"); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停后复位!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"系统暂停后复位!"); | ||||
}); | }); | ||||
DebugMode = new RelayCommand(() => | |||||
DebugMode = new BPARelayCommand(() => | |||||
{ | { | ||||
// ActionManage.GetInstance.Send("SystemDebugMode"); | // ActionManage.GetInstance.Send("SystemDebugMode"); | ||||
}); | }); | ||||
AutoMode = new RelayCommand(() => | |||||
AutoMode = new BPARelayCommand(() => | |||||
{ | { | ||||
// ActionManage.GetInstance.Send("SystemAutoMode"); | // ActionManage.GetInstance.Send("SystemAutoMode"); | ||||
}); | }); | ||||
@@ -320,30 +320,30 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
{ | { | ||||
StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); | StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); | ||||
} | } | ||||
public RelayCommand<object> Open { get; set; } | |||||
public BPARelayCommand<object> Open { get; set; } | |||||
public RelayCommand<object> Close { get; set; } | |||||
public BPARelayCommand<object> 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; } | |||||
/// <summary> | /// <summary> | ||||
/// 系统模式改变 | /// 系统模式改变 | ||||
@@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; | |||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.Model.HK_PLC; | using BPASmartClient.FoodStationTest.Model.HK_PLC; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -21,7 +21,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
{ | { | ||||
time = GVL_SmallStation.GetInstance.Time; | 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 }); | ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB4.DBX1.5", PlcVarType = PlcVarType.Bool, Value = true }); | ||||
//GVL_SmallStation.GetInstance.CylinderReset = true; | //GVL_SmallStation.GetInstance.CylinderReset = true; | ||||
@@ -29,7 +29,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,气缸收紧错位复位"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,气缸收紧错位复位"); | ||||
}); | }); | ||||
CLearRecipeInfo = new RelayCommand(() => | |||||
CLearRecipeInfo = new BPARelayCommand(() => | |||||
{ | { | ||||
App.Current.Dispatcher.Invoke(() => | App.Current.Dispatcher.Invoke(() => | ||||
{ | { | ||||
@@ -40,7 +40,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
SystemReset = new RelayCommand(() => | |||||
SystemReset = new BPARelayCommand(() => | |||||
{ | { | ||||
App.Current.Dispatcher.Invoke(() => | App.Current.Dispatcher.Invoke(() => | ||||
{ | { | ||||
@@ -51,7 +51,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
BPAResetCommand = new RelayCommand(() => | |||||
BPAResetCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
App.Current.Dispatcher.Invoke(() => | App.Current.Dispatcher.Invoke(() => | ||||
{ | { | ||||
@@ -62,7 +62,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
StockbinDosingComple = new RelayCommand(() => | |||||
StockbinDosingComple = new BPARelayCommand(() => | |||||
{ | { | ||||
int loc = StockbinDosingCompleNum; | int loc = StockbinDosingCompleNum; | ||||
if (loc >= 1 && loc <= 8) | if (loc >= 1 && loc <= 8) | ||||
@@ -85,11 +85,11 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,手动设置料仓{loc}配料,料仓编号不正确"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"手动点击按钮,手动设置料仓{loc}配料,料仓编号不正确"); | ||||
} | } | ||||
}); | }); | ||||
StockbinDosingCompleClear = new RelayCommand(() => | |||||
StockbinDosingCompleClear = new BPARelayCommand(() => | |||||
{ | { | ||||
}); | }); | ||||
CancelRecipeCommand = new RelayCommand(() => | |||||
CancelRecipeCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
string cancelRecipeCode = CancelRecipeCode.Trim(); | string cancelRecipeCode = CancelRecipeCode.Trim(); | ||||
if (!String.IsNullOrEmpty(cancelRecipeCode) && MessageNotify.GetInstance.ShowDialog($"请确认,是否进行删除订单【{cancelRecipeCode}】操作?")) | 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)) | if (MessageNotify.GetInstance.ShowDialog("请确认,是否将配方完成数目清零?", DialogType.Warning)) | ||||
{ | { | ||||
@@ -228,7 +228,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
Thread.Sleep(100); | Thread.Sleep(100); | ||||
}), "流程手动设备状态读取", true); | }), "流程手动设备状态读取", true); | ||||
TimeSet = new RelayCommand(() => | |||||
TimeSet = new BPARelayCommand(() => | |||||
{ | { | ||||
GVL_SmallStation.GetInstance.Time = time; | GVL_SmallStation.GetInstance.Time = time; | ||||
MessageNotify.GetInstance.ShowUserLog($"设置柔性味魔方复位时间:{time}s"); | MessageNotify.GetInstance.ShowUserLog($"设置柔性味魔方复位时间:{time}s"); | ||||
@@ -237,10 +237,10 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
HKPlcIsConnect = ProcessControl.GetInstance.HKDevice.IsConnected; | 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(); } } | public static bool Heartbeat { get { return _mHeartbeat; } set { _mHeartbeat = value; OnStaticPropertyChanged(); } } | ||||
private static bool _mHeartbeat; | private static bool _mHeartbeat; | ||||
@@ -265,9 +265,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
{ | { | ||||
StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); | 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; } | private bool _SiemensIsConnect { get; set; } | ||||
public bool SiemensIsConnect { get { return _SiemensIsConnect; } set { _SiemensIsConnect = value; OnPropertyChanged(); } } | public bool SiemensIsConnect { get { return _SiemensIsConnect; } set { _SiemensIsConnect = value; OnPropertyChanged(); } } | ||||
private bool _HKPlcIsConnect { get; set; } | 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 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; } | private static int _StockbinDosingCompleNum { get; set; } | ||||
public static int StockbinDosingCompleNum { get { return _StockbinDosingCompleNum; } set { _StockbinDosingCompleNum = value; OnStaticPropertyChanged(); } } | public static int StockbinDosingCompleNum { get { return _StockbinDosingCompleNum; } set { _StockbinDosingCompleNum = value; OnStaticPropertyChanged(); } } | ||||
@@ -2,7 +2,7 @@ | |||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -49,7 +49,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
}), "LocalRecipeEdit", true); | }), "LocalRecipeEdit", true); | ||||
RemoveCommand = new RelayCommand<object>((o) => | |||||
RemoveCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
var res = AllRawMaterial.FirstOrDefault(p => p.RawMaterialName == o.ToString()); | var res = AllRawMaterial.FirstOrDefault(p => p.RawMaterialName == o.ToString()); | ||||
if (res != null) | if (res != null) | ||||
@@ -57,7 +57,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
//NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); | //NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); | ||||
}); | }); | ||||
AddCommand = new RelayCommand(() => | |||||
AddCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
int MaxRawMaterial = 15; | int MaxRawMaterial = 15; | ||||
var res = AllRawMaterial.Where(p => p.RawMaterialType == "小料").ToList(); | 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; | int MaxRawMaterial = 5; | ||||
var res = AllRawMaterial.Where(p => p.RawMaterialType == "粉料").ToList(); | var res = AllRawMaterial.Where(p => p.RawMaterialType == "粉料").ToList(); | ||||
@@ -98,7 +98,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"粉料最多添加{MaxRawMaterial}种"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"粉料最多添加{MaxRawMaterial}种"); | ||||
} | } | ||||
}); | }); | ||||
SaveCommand = new RelayCommand(() => | |||||
SaveCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (!MessageNotify.GetInstance.ShowDialog("请确认,是否保存该配方配置?")) | if (!MessageNotify.GetInstance.ShowDialog("请确认,是否保存该配方配置?")) | ||||
{ | { | ||||
@@ -210,11 +210,11 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public RelayCommand<object> RemoveCommand { get; set; } | |||||
public BPARelayCommand<object> 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; } | |||||
} | } | ||||
} | } |
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -19,9 +19,9 @@ public class NewMaterialViewModel : NotifyBase | |||||
public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | ||||
private string _mErrorInfo; | private string _mErrorInfo; | ||||
public RelayCommand<object> RemoveCommand { get; set; } | |||||
public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
public RelayCommand SaveCommand { get; set; } | |||||
public BPARelayCommand SaveCommand { get; set; } | |||||
@@ -40,9 +40,9 @@ public class NewMaterialViewModel : NotifyBase | |||||
public NewMaterialViewModel() | public NewMaterialViewModel() | ||||
{ | { | ||||
RemoveCommand = new RelayCommand<object>(Remove); | |||||
RemoveCommand = new BPARelayCommand<object>(Remove); | |||||
SaveCommand = new RelayCommand(() => | |||||
SaveCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
if (MaterialName == String.Empty) | if (MaterialName == String.Empty) | ||||
{ ErrorInfo = "原料名称不能为空"; return; } | { ErrorInfo = "原料名称不能为空"; return; } | ||||
@@ -1,6 +1,6 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -29,7 +29,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}), "Details"); | }), "Details"); | ||||
AddCommand = new RelayCommand(() => | |||||
AddCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
p: | p: | ||||
string guid = Guid.NewGuid().ToString(); | string guid = Guid.NewGuid().ToString(); | ||||
@@ -44,7 +44,7 @@ p: | |||||
goto p; | goto p; | ||||
}); | }); | ||||
RemoveCommand = new RelayCommand<object>((obj) => | |||||
RemoveCommand = new BPARelayCommand<object>((obj) => | |||||
{ | { | ||||
if (obj is string rm) | if (obj is string rm) | ||||
{ | { | ||||
@@ -54,7 +54,7 @@ p: | |||||
} | } | ||||
}); | }); | ||||
SaveCommand = new RelayCommand(() => | |||||
SaveCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
ErrorInfo = String.Empty; | ErrorInfo = String.Empty; | ||||
if (RecipeName == String.Empty) | if (RecipeName == String.Empty) | ||||
@@ -173,11 +173,11 @@ p: | |||||
public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | ||||
private string _mErrorInfo; | private string _mErrorInfo; | ||||
public RelayCommand AddCommand { get; set; } | |||||
public BPARelayCommand AddCommand { get; set; } | |||||
public RelayCommand<object> RemoveCommand { get; set; } | |||||
public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
public RelayCommand SaveCommand { get; set; } | |||||
public BPARelayCommand SaveCommand { get; set; } | |||||
public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel>(); | public ObservableCollection<RawMaterialModel> RawMaterials { get; set; } = new ObservableCollection<RawMaterialModel>(); | ||||
@@ -2,7 +2,7 @@ | |||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -20,7 +20,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public RecipeControlViewModel() | public RecipeControlViewModel() | ||||
{ | { | ||||
StartCommand = new RelayCommand<object>((o) => | |||||
StartCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string deviceName) | if (o != null && o is string deviceName) | ||||
{ | { | ||||
@@ -41,7 +41,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
ChangeRecipeStateCommand = new RelayCommand<object>(ChangeRecipeState); | |||||
ChangeRecipeStateCommand = new BPARelayCommand<object>(ChangeRecipeState); | |||||
@@ -162,9 +162,9 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
public RelayCommand<object> StartCommand { get; set; } | |||||
public BPARelayCommand<object> StartCommand { get; set; } | |||||
public RelayCommand<object> ChangeRecipeStateCommand { get; set; } | |||||
public BPARelayCommand<object> ChangeRecipeStateCommand { get; set; } | |||||
public static ObservableCollection<RecipeModel> Recipes { get; set; } = Json<LocalPar>.Data.Recipes; | public static ObservableCollection<RecipeModel> Recipes { get; set; } = Json<LocalPar>.Data.Recipes; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -46,7 +46,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}), "RecipeInfo"); | }), "RecipeInfo"); | ||||
ReturnPage = new RelayCommand(() => | |||||
ReturnPage = new BPARelayCommand(() => | |||||
{ | { | ||||
ActionManage.GetInstance.Send("CloseRecipeInfosView"); | ActionManage.GetInstance.Send("CloseRecipeInfosView"); | ||||
}); | }); | ||||
@@ -61,7 +61,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public int TrayCode { get { return _mTrayCode; } set { _mTrayCode = value; OnPropertyChanged(); } } | public int TrayCode { get { return _mTrayCode; } set { _mTrayCode = value; OnPropertyChanged(); } } | ||||
private int _mTrayCode; | private int _mTrayCode; | ||||
public RelayCommand ReturnPage { get; set; } | |||||
public BPARelayCommand ReturnPage { get; set; } | |||||
public ObservableCollection<RemoteRecipeRawMaterial> RawMaterialsInfo { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>(); | public ObservableCollection<RemoteRecipeRawMaterial> RawMaterialsInfo { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>(); | ||||
} | } | ||||
@@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; | |||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.View; | using BPASmartClient.FoodStationTest.View; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -21,12 +21,12 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
IsUseLocalRecipe = GVL_SmallStation.GetInstance.IsUseLocalRecipe; | IsUseLocalRecipe = GVL_SmallStation.GetInstance.IsUseLocalRecipe; | ||||
Recipes = Json<LocalRecipeDataColl>.Data.Recipes; | Recipes = Json<LocalRecipeDataColl>.Data.Recipes; | ||||
NewRecipe = new RelayCommand(() => | |||||
NewRecipe = new BPARelayCommand(() => | |||||
{ | { | ||||
NewLocalRecipeView NewLocalRecipe = new NewLocalRecipeView(); | NewLocalRecipeView NewLocalRecipe = new NewLocalRecipeView(); | ||||
NewLocalRecipe.ShowDialog(); | NewLocalRecipe.ShowDialog(); | ||||
}); | }); | ||||
RemoveRecipe = new RelayCommand<object>((o) => | |||||
RemoveRecipe = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string cnt) | if (o != null && o is string cnt) | ||||
{ | { | ||||
@@ -41,7 +41,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
DetailsCommand = new RelayCommand<object>((o) => | |||||
DetailsCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string cnt) | if (o != null && o is string cnt) | ||||
{ | { | ||||
@@ -59,7 +59,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
IssueRecipe = new RelayCommand<object>((o) => | |||||
IssueRecipe = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (IsUseLocalRecipe == false) | if (IsUseLocalRecipe == false) | ||||
{ | { | ||||
@@ -90,7 +90,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
} | } | ||||
}); | }); | ||||
NewSimulateRecipe = new RelayCommand(() => | |||||
NewSimulateRecipe = new BPARelayCommand(() => | |||||
{ | { | ||||
ObservableCollection<RemoteRecipeRawMaterial> RawMaterials = new ObservableCollection<RemoteRecipeRawMaterial>(); | ObservableCollection<RemoteRecipeRawMaterial> RawMaterials = new ObservableCollection<RemoteRecipeRawMaterial>(); | ||||
string recipeName = "配方" + (Json<LocalRecipeDataColl>.Data.Recipes.Count + 1) + ""; | string recipeName = "配方" + (Json<LocalRecipeDataColl>.Data.Recipes.Count + 1) + ""; | ||||
@@ -142,7 +142,7 @@ go: | |||||
} | } | ||||
}); | }); | ||||
ClearAllRecipe = new RelayCommand(() => | |||||
ClearAllRecipe = new BPARelayCommand(() => | |||||
{ | { | ||||
if (MessageNotify.GetInstance.ShowDialog("请确认,是否清除所有本地配方?", DialogType.Warning)) | if (MessageNotify.GetInstance.ShowDialog("请确认,是否清除所有本地配方?", DialogType.Warning)) | ||||
{ | { | ||||
@@ -154,7 +154,7 @@ go: | |||||
SelectedRecipes = Json<LocalRecipeDataColl>.Data.SelectedRecipes; | SelectedRecipes = Json<LocalRecipeDataColl>.Data.SelectedRecipes; | ||||
SelectRecipesCommand = new RelayCommand(() => | |||||
SelectRecipesCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
var selectView = new SelectRecipesView(); | var selectView = new SelectRecipesView(); | ||||
selectView.ShowDialog(); | selectView.ShowDialog(); | ||||
@@ -186,13 +186,13 @@ go: | |||||
/// </summary> | /// </summary> | ||||
public static ObservableCollection<RemoteRecipeData> SelectedRecipes { get; set; } | public static ObservableCollection<RemoteRecipeData> SelectedRecipes { get; set; } | ||||
public RelayCommand<object> DetailsCommand { get; set; } | |||||
public RelayCommand<object> IssueRecipe { get; set; } | |||||
public RelayCommand<object> 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<object> DetailsCommand { get; set; } | |||||
public BPARelayCommand<object> IssueRecipe { get; set; } | |||||
public BPARelayCommand<object> 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<RemoteRecipeData> Recipes { get; set; } | public ObservableCollection<RemoteRecipeData> Recipes { get; set; } | ||||
} | } | ||||
} | } |
@@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; | |||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.View; | using BPASmartClient.FoodStationTest.View; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
@@ -17,24 +17,24 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
{ | { | ||||
Recipes = Json<LocalPar>.Data.Recipes; | Recipes = Json<LocalPar>.Data.Recipes; | ||||
NewMaterital = new RelayCommand(() => | |||||
NewMaterital = new BPARelayCommand(() => | |||||
{ | { | ||||
NewMaterialView newMateritalView = new NewMaterialView(); | NewMaterialView newMateritalView = new NewMaterialView(); | ||||
newMateritalView.ShowDialog(); | newMateritalView.ShowDialog(); | ||||
}); | }); | ||||
NewRecipe = new RelayCommand(() => | |||||
NewRecipe = new BPARelayCommand(() => | |||||
{ | { | ||||
NewRecipeView nrv = new NewRecipeView(); | NewRecipeView nrv = new NewRecipeView(); | ||||
nrv.ShowDialog(); | nrv.ShowDialog(); | ||||
MessageNotify.GetInstance.ShowUserLog("新建配方"); | MessageNotify.GetInstance.ShowUserLog("新建配方"); | ||||
}); | }); | ||||
SaveRecipe = new RelayCommand(() => | |||||
SaveRecipe = new BPARelayCommand(() => | |||||
{ | { | ||||
Json<LocalPar>.Save(); | Json<LocalPar>.Save(); | ||||
MessageNotify.GetInstance.ShowUserLog("保存配方"); | MessageNotify.GetInstance.ShowUserLog("保存配方"); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); | ||||
}); | }); | ||||
RemoveCommand = new RelayCommand<object>((o) => | |||||
RemoveCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o is string str) | if (o is string str) | ||||
{ | { | ||||
@@ -45,7 +45,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
DetailsCommand = new RelayCommand<object>((o) => | |||||
DetailsCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string str) | 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<object> EditCommand { get; set; } | |||||
public BPARelayCommand<object> EditCommand { get; set; } | |||||
public RelayCommand<object> DetailsCommand { get; set; } | |||||
public BPARelayCommand<object> DetailsCommand { get; set; } | |||||
public RelayCommand<object> RemoveCommand { get; set; } | |||||
public BPARelayCommand<object> RemoveCommand { get; set; } | |||||
public ObservableCollection<RecipeModel> Recipes { get; set; } | public ObservableCollection<RecipeModel> Recipes { get; set; } | ||||
} | } | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
@@ -78,19 +78,19 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
/// <summary> | /// <summary> | ||||
/// 取消筛选,即关闭本窗口。 | /// 取消筛选,即关闭本窗口。 | ||||
/// </summary> | /// </summary> | ||||
public RelayCommand CancelCommand { get; set; } | |||||
public BPARelayCommand CancelCommand { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 全选。 | /// 全选。 | ||||
/// </summary> | /// </summary> | ||||
public RelayCommand AllSelectCommand { get; set; } | |||||
public BPARelayCommand AllSelectCommand { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 全部取消选择。 | /// 全部取消选择。 | ||||
/// </summary> | /// </summary> | ||||
public RelayCommand AllCancelCommand { get; set; } | |||||
public BPARelayCommand AllCancelCommand { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 确认选择。 | /// 确认选择。 | ||||
/// </summary> | /// </summary> | ||||
public RelayCommand ConfirmCommand { get; set; } | |||||
public BPARelayCommand ConfirmCommand { get; set; } | |||||
internal class RecipeDataWithCheck : NotifyBase | internal class RecipeDataWithCheck : NotifyBase | ||||
@@ -1,7 +1,7 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.View; | using BPASmartClient.FoodStationTest.View; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System.Collections.ObjectModel; | using System.Collections.ObjectModel; | ||||
@@ -15,7 +15,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public SiemensRecipeReceiveViewModel() | public SiemensRecipeReceiveViewModel() | ||||
{ | { | ||||
Recipes = Json<RemoteRecipeDataColl>.Data.Recipes; | Recipes = Json<RemoteRecipeDataColl>.Data.Recipes; | ||||
DetailsCommand = new RelayCommand<object>((o) => | |||||
DetailsCommand = new BPARelayCommand<object>((o) => | |||||
{ | { | ||||
if (o != null && o is string cnt) | 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($"请确认,是否删除所有配方订单?")) | if (MessageNotify.GetInstance.ShowDialog($"请确认,是否删除所有配方订单?")) | ||||
{ | { | ||||
@@ -40,8 +40,8 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
} | } | ||||
}); | }); | ||||
} | } | ||||
public RelayCommand<object> DetailsCommand { get; set; } | |||||
public RelayCommand ClearAllRecipe { get; set; } | |||||
public BPARelayCommand<object> DetailsCommand { get; set; } | |||||
public BPARelayCommand ClearAllRecipe { get; set; } | |||||
public ObservableCollection<RemoteRecipeData> Recipes { get; set; } | public ObservableCollection<RemoteRecipeData> Recipes { get; set; } | ||||
} | } | ||||
} | } |
@@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls; | |||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.Model.RawMaterial; | using BPASmartClient.FoodStationTest.Model.RawMaterial; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -17,7 +17,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
public StockBinRawMaterialViewModel() | public StockBinRawMaterialViewModel() | ||||
{ | { | ||||
RawMaterialInfo = Json<DevicePar>.Data.rawMaterialStockBin; | RawMaterialInfo = Json<DevicePar>.Data.rawMaterialStockBin; | ||||
RemoveCommand = new RelayCommand<Object>((loc) => | |||||
RemoveCommand = new BPARelayCommand<Object>((loc) => | |||||
{ | { | ||||
if (loc is int pos) | if (loc is int pos) | ||||
{ | { | ||||
@@ -26,7 +26,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
RawMaterialInfo.Remove(res); | RawMaterialInfo.Remove(res); | ||||
} | } | ||||
}); | }); | ||||
SaveRawMaterialPara = new RelayCommand(() => | |||||
SaveRawMaterialPara = new BPARelayCommand(() => | |||||
{ | { | ||||
Json<DevicePar>.Save(); | Json<DevicePar>.Save(); | ||||
ProcessControl.GetInstance.StockBinNameWithPos(); | ProcessControl.GetInstance.StockBinNameWithPos(); | ||||
@@ -37,14 +37,14 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
MessageNotify.GetInstance.ShowUserLog($"原料与料仓对应关系保存成功"); | MessageNotify.GetInstance.ShowUserLog($"原料与料仓对应关系保存成功"); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); | ||||
}); | }); | ||||
UpdateRawMaterial = new RelayCommand(() => | |||||
UpdateRawMaterial = new BPARelayCommand(() => | |||||
{ | { | ||||
RawMaterialInfo.Add(new RawMaterialStockBin() { RawMaterialCount = (short)(RawMaterialInfo.Count + 1) }); | RawMaterialInfo.Add(new RawMaterialStockBin() { RawMaterialCount = (short)(RawMaterialInfo.Count + 1) }); | ||||
}); | }); | ||||
} | } | ||||
public ObservableCollection<RawMaterialStockBin> RawMaterialInfo { get; set; } = new ObservableCollection<RawMaterialStockBin>(); | public ObservableCollection<RawMaterialStockBin> RawMaterialInfo { get; set; } = new ObservableCollection<RawMaterialStockBin>(); | ||||
public RelayCommand<Object> RemoveCommand { get; set; } | |||||
public RelayCommand SaveRawMaterialPara { get; set; } | |||||
public RelayCommand UpdateRawMaterial { get; set; } | |||||
public BPARelayCommand<Object> RemoveCommand { get; set; } | |||||
public BPARelayCommand SaveRawMaterialPara { get; set; } | |||||
public BPARelayCommand UpdateRawMaterial { get; set; } | |||||
} | } | ||||
} | } |
@@ -3,7 +3,7 @@ using BPASmartClient.CustomResource.UserControls.MessageShow; | |||||
using BPASmartClient.FoodStationTest.Model; | using BPASmartClient.FoodStationTest.Model; | ||||
using BPASmartClient.FoodStationTest.Model.HK_PLC; | using BPASmartClient.FoodStationTest.Model.HK_PLC; | ||||
using BPASmartClient.FoodStationTest.Model.Par; | using BPASmartClient.FoodStationTest.Model.Par; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
@@ -22,7 +22,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
AxisMidSpeed = Json<DevicePar>.Data.deviceConnectPar.AxisMidSpeed; | AxisMidSpeed = Json<DevicePar>.Data.deviceConnectPar.AxisMidSpeed; | ||||
Axis1Speed = Json<DevicePar>.Data.deviceConnectPar.Axis1Speed; | Axis1Speed = Json<DevicePar>.Data.deviceConnectPar.Axis1Speed; | ||||
Axis2Speed = Json<DevicePar>.Data.deviceConnectPar.Axis2Speed; | Axis2Speed = Json<DevicePar>.Data.deviceConnectPar.Axis2Speed; | ||||
SaveCommand = new RelayCommand(() => | |||||
SaveCommand = new BPARelayCommand(() => | |||||
{ | { | ||||
Json<DevicePar>.Data.deviceConnectPar.HKPlcConnect = HKPlcConnect; | Json<DevicePar>.Data.deviceConnectPar.HKPlcConnect = HKPlcConnect; | ||||
Json<DevicePar>.Data.deviceConnectPar.ShieldStockbinAlarm = ShieldStockbinAlarm; | Json<DevicePar>.Data.deviceConnectPar.ShieldStockbinAlarm = ShieldStockbinAlarm; | ||||
@@ -36,7 +36,7 @@ namespace BPASmartClient.FoodStationTest.ViewModel | |||||
Json<DevicePar>.Save(); | Json<DevicePar>.Save(); | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"参数保存成功!"); | 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.DBD0", PlcVarType = PlcVarType.Real, Value = Axis1Speed }); | ||||
ActionManage.GetInstance.Send("PLCWrite", new HKDeviceWrite() { Address = "DB47.DBD4", PlcVarType = PlcVarType.Real, Value = Axis2Speed }); | 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; | private float _mAxis1Speed; | ||||
public float Axis2Speed { get { return _mAxis2Speed; } set { _mAxis2Speed = value; OnPropertyChanged(); } } | public float Axis2Speed { get { return _mAxis2Speed; } set { _mAxis2Speed = value; OnPropertyChanged(); } } | ||||
private float _mAxis2Speed; | private float _mAxis2Speed; | ||||
public RelayCommand SaveCommand { get; set; } | |||||
public RelayCommand SetParCommand { get; set; } | |||||
public BPARelayCommand SaveCommand { get; set; } | |||||
public BPARelayCommand SetParCommand { get; set; } | |||||
} | } | ||||
} | } |
@@ -1,5 +1,5 @@ | |||||
| | ||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.GSIceCream; | using BPASmartClient.GSIceCream; | ||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
@@ -11,7 +11,7 @@ using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
using System.Threading; | using System.Threading; | ||||
using System.Threading.Tasks; | using System.Threading.Tasks; | ||||
using static BPASmartClient.EventBus.EventBus; | |||||
namespace BPASmartClient.DRCoffee | namespace BPASmartClient.DRCoffee | ||||
{ | { | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Helper; | |||||
| |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPASmartClient.Model.冰淇淋.Enum; | using BPASmartClient.Model.冰淇淋.Enum; | ||||
@@ -9,7 +9,7 @@ using System; | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
using System.Threading; | using System.Threading; | ||||
using static BPASmartClient.EventBus.EventBus; | |||||
using static BPASmartClient.GSIceCream.MessageDefine; | using static BPASmartClient.GSIceCream.MessageDefine; | ||||
namespace BPASmartClient.GSIceCream | namespace BPASmartClient.GSIceCream | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.GSIceCream; | using BPASmartClient.GSIceCream; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartClient.Model.冰淇淋.Enum; | using BPASmartClient.Model.冰淇淋.Enum; | ||||
using System; | using System; | ||||
@@ -1,9 +1,9 @@ | |||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Helper; | |||||
| |||||
using BPA.Helper; | |||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPASmartClient.Peripheral; | using BPASmartClient.Peripheral; | ||||
using BPASmartClient.SerialPort; | using BPASmartClient.SerialPort; | ||||
using static BPASmartClient.EventBus.EventBus; | |||||
namespace BPASmartClient.IceMaker | namespace BPASmartClient.IceMaker | ||||
{ | { | ||||
@@ -3,7 +3,7 @@ using BPA.Message.Enum; | |||||
using BPA.Message.IOT; | using BPA.Message.IOT; | ||||
using BPASmartClient.Business; | using BPASmartClient.Business; | ||||
using BPASmartClient.Device; | using BPASmartClient.Device; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.IoT.Model; | using BPASmartClient.IoT.Model; | ||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartDatavDeviceClient.IoT; | using BPASmartDatavDeviceClient.IoT; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPA.Message.IOT; | using BPA.Message.IOT; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.IoT; | using BPASmartClient.IoT; | ||||
using BPASmartClient.IoT.Model; | using BPASmartClient.IoT.Model; | ||||
using System; | using System; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Message; | using BPASmartClient.Message; | ||||
using BPASmartDatavDeviceClient.IoT; | using BPASmartDatavDeviceClient.IoT; | ||||
using DataVAPI.Tool.IOT; | using DataVAPI.Tool.IOT; | ||||
@@ -1,6 +1,6 @@ | |||||
| | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.IoT; | using BPASmartClient.IoT; | ||||
using Newtonsoft.Json; | using Newtonsoft.Json; | ||||
using System; | using System; | ||||
@@ -1,9 +1,9 @@ | |||||
using BPASmartClient.EventBus; | |||||
using BPASmartClient.Helper; | |||||
| |||||
using BPA.Helper; | |||||
using BPASmartClient.JakaRobot; | using BPASmartClient.JakaRobot; | ||||
using BPASmartClient.Model; | using BPASmartClient.Model; | ||||
using BPASmartClient.Peripheral; | using BPASmartClient.Peripheral; | ||||
using static BPASmartClient.EventBus.EventBus; | |||||
using static BPA.Helper.EventBus; | |||||
namespace BPASmartClient.JAKA | namespace BPASmartClient.JAKA | ||||
{ | { | ||||
@@ -11,7 +11,7 @@ using BPASmartClient.CustomResource.Pages.Enums; | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.CustomResource.Pages.View; | using BPASmartClient.CustomResource.Pages.View; | ||||
using BPASmartClient.CustomResource.Pages.ViewModel; | using BPASmartClient.CustomResource.Pages.ViewModel; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.JXJFoodBigStation.Model; | using BPASmartClient.JXJFoodBigStation.Model; | ||||
using BPASmartClient.JXJFoodBigStation.Model.Siemens; | using BPASmartClient.JXJFoodBigStation.Model.Siemens; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Modbus; | using BPASmartClient.Modbus; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; | using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; | ||||
using BPASmartClient.JXJFoodBigStation.Model.Siemens; | using BPASmartClient.JXJFoodBigStation.Model.Siemens; | ||||
using BPASmartClient.Modbus; | using BPASmartClient.Modbus; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.Modbus; | using BPASmartClient.Modbus; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.JXJFoodBigStation.Model.Siemens; | using BPASmartClient.JXJFoodBigStation.Model.Siemens; | ||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,4 +1,4 @@ | |||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | using System.Linq; | ||||
@@ -1,7 +1,7 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.CustomResource.UserControls; | using BPASmartClient.CustomResource.UserControls; | ||||
using BPASmartClient.CustomResource.UserControls.MessageShow; | using BPASmartClient.CustomResource.UserControls.MessageShow; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPASmartClient.JXJFoodBigStation.Model; | using BPASmartClient.JXJFoodBigStation.Model; | ||||
using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; | using BPASmartClient.JXJFoodBigStation.Model.HK_PLC; | ||||
using BPA.Helper; | using BPA.Helper; | ||||
@@ -34,7 +34,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
RawMaterialInfo = Json<BomMaterial>.Data.RawMaterials; | RawMaterialInfo = Json<BomMaterial>.Data.RawMaterials; | ||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"读取程序的Bom清单"); | ||||
}*/ | }*/ | ||||
AddMaterial = new RelayCommand(() => | |||||
AddMaterial = new BPARelayCommand(() => | |||||
{ | { | ||||
RawMaterialInfo.Add(new RawMaterial() | RawMaterialInfo.Add(new RawMaterial() | ||||
{ | { | ||||
@@ -42,7 +42,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
}); | }); | ||||
MessageNotify.GetInstance.ShowUserLog("新增一条物料数据。"); | MessageNotify.GetInstance.ShowUserLog("新增一条物料数据。"); | ||||
}); | }); | ||||
SaveMaterials = new RelayCommand(() => | |||||
SaveMaterials = new BPARelayCommand(() => | |||||
{ | { | ||||
if (MessageNotify.GetInstance.ShowDialog("请确认是否保存!") == true) | if (MessageNotify.GetInstance.ShowDialog("请确认是否保存!") == true) | ||||
{ | { | ||||
@@ -51,7 +51,7 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); | NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "成功", $"原料与料仓对应关系保存成功"); | ||||
} | } | ||||
}); | }); | ||||
RemoveCommand = new RelayCommand<int>((Count) => | |||||
RemoveCommand = new BPARelayCommand<int>((Count) => | |||||
{ | { | ||||
if (Count is int cnt) | if (Count is int cnt) | ||||
{ | { | ||||
@@ -69,9 +69,9 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
}); | }); | ||||
} | } | ||||
public ObservableCollection<RawMaterial> RawMaterialInfo { get; set; } = new ObservableCollection<RawMaterial>(); | public ObservableCollection<RawMaterial> RawMaterialInfo { get; set; } = new ObservableCollection<RawMaterial>(); | ||||
public RelayCommand AddMaterial { get; set; } | |||||
public RelayCommand SaveMaterials { get; set; } | |||||
public RelayCommand<int> RemoveCommand { get; set; } | |||||
public BPARelayCommand AddMaterial { get; set; } | |||||
public BPARelayCommand SaveMaterials { get; set; } | |||||
public BPARelayCommand<int> RemoveCommand { get; set; } | |||||
} | } | ||||
} | } |
@@ -1,5 +1,5 @@ | |||||
using BPASmartClient.CustomResource.Pages.Model; | using BPASmartClient.CustomResource.Pages.Model; | ||||
using BPASmartClient.Helper; | |||||
using BPA.Helper; | |||||
using BPA.Helper; | using BPA.Helper; | ||||
using Microsoft.Toolkit.Mvvm.Input; | using Microsoft.Toolkit.Mvvm.Input; | ||||
using System; | using System; | ||||
@@ -14,9 +14,9 @@ namespace BPASmartClient.JXJFoodBigStation.ViewModel | |||||
{ | { | ||||
private static string IpAddress = string.Empty; | 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(); } } | 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; | if (o != null && o is string str) IpAddress = str; | ||||
}), "ChangeDeviceNameViewOpen"); | }), "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)) | if (string.IsNullOrEmpty(DeviceName)) | ||||
{ | { | ||||