@@ -20,7 +20,7 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Helper" Version="1.0.21" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -8,7 +8,7 @@ | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Helper" Version="1.0.21" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -8,8 +8,8 @@ | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Communication" Version="1.0.19" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.21" /> | |||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.9" /> | |||
</ItemGroup> | |||
@@ -18,7 +18,12 @@ namespace BPASmart.Server | |||
{ | |||
BPASmartClient.Message.MessageLog.GetInstance.ShowDebugLog(s); | |||
}); | |||
RedisHelper.GetInstance.ConnectAsync("124.222.238.75", 16000, "123456", 1); | |||
RedisHelper.GetInstance.Connect(new ConfigurationOptions() | |||
{ | |||
ServerAddress = $"124.222.238.75:16000", | |||
Password = "123456", | |||
}); | |||
MqttInit(); | |||
Json<CommunicationPar>.Data.CommunicationDevices.ToList()?.ForEach(item => | |||
{ | |||
@@ -75,7 +80,11 @@ namespace BPASmart.Server | |||
var DeviceModel = item; | |||
}); | |||
modbusTcpMaster.IsReconnect = true; | |||
modbusTcpMaster.ModbusTcpConnect(_modbusTcp.IP, _modbusTcp.PortNum); | |||
modbusTcpMaster.Connect(new ConfigurationOptions() | |||
{ | |||
IpAddress = _modbusTcp.IP, | |||
Port = _modbusTcp.PortNum | |||
}); | |||
break; | |||
case BPASmart.Model.Siemens _siemens: | |||
break; | |||
@@ -200,7 +209,7 @@ namespace BPASmart.Server | |||
}); | |||
} | |||
}); | |||
RedisHelper.GetInstance.SetValue($"{Devicename}", reeisDataModels); | |||
RedisHelper.GetInstance.Write($"{Devicename}", reeisDataModels); | |||
} | |||
} | |||
} | |||
@@ -29,8 +29,8 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Communication" Version="1.0.19" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.21" /> | |||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -229,7 +229,11 @@ namespace BPASmart.VariableManager.ViewModels | |||
}), $"{DeviceType} 设备数据采集"); | |||
}); | |||
modbusTcpMaster.IsReconnect = true; | |||
modbusTcpMaster.ModbusTcpConnect(_modbusTcp.IP, _modbusTcp.PortNum); | |||
modbusTcpMaster.Connect(new ConfigurationOptions() | |||
{ | |||
IpAddress = _modbusTcp.IP, | |||
Port = _modbusTcp.PortNum | |||
}); | |||
break; | |||
case BPASmart.Model.Siemens _siemens: | |||
break; | |||
@@ -409,7 +409,7 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Helper" Version="1.0.21" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
<PackageReference Include="BPA.Message" Version="1.0.46" /> | |||
<PackageReference Include="MahApps.Metro.IconPacks.FontAwesome" Version="4.11.0" /> | |||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | |||
@@ -8,7 +8,7 @@ | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Communication" Version="1.0.19" /> | |||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -21,8 +21,8 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Communication" Version="1.0.19" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.21" /> | |||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | |||
</ItemGroup> | |||
@@ -9,8 +9,8 @@ | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Communication" Version="1.0.19" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.21" /> | |||
<PackageReference Include="BPA.Communication" Version="1.0.36" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -16,7 +16,7 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="BPA.Helper" Version="1.0.22" /> | |||
<PackageReference Include="BPA.Helper" Version="1.0.28" /> | |||
<PackageReference Include="BPA.Message" Version="1.0.46" /> | |||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | |||
</ItemGroup> | |||
@@ -12,11 +12,11 @@ namespace BPASmartClient.DosingSystem | |||
public class ViewModelBase : NotifyBase | |||
{ | |||
public int Index { get; set; } = -1; | |||
public RelayCommand AddCommand { get; set; }//添加 | |||
public RelayCommand CancelCommand { get; set; }//取消 | |||
public RelayCommand SaveCommand { get; set; }//保存 | |||
public RelayCommand<object> RemoveCommand { get; set; }//移除 | |||
public RelayCommand<object> DetailsCommand { get; set; }//编辑 | |||
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; }//编辑 | |||
/// <summary> | |||
/// 错误信息 | |||
@@ -17,8 +17,8 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
if (o != null && o is string str) IpAddress = str; | |||
}), "ChangeDeviceNameViewOpen"); | |||
CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); | |||
AddCommand = new RelayCommand(() => | |||
CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("ChangeDeviceNameViewClose"); }); | |||
AddCommand = new BPARelayCommand(() => | |||
{ | |||
if (string.IsNullOrEmpty(DeviceName)) | |||
{ | |||
@@ -55,9 +55,9 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
private static string IpAddress = string.Empty; | |||
//public RelayCommand ConfirmCommand { get; set; } | |||
//public BPARelayCommand ConfirmCommand { get; set; } | |||
//public RelayCommand CancleCommand { get; set; } | |||
//public BPARelayCommand CancleCommand { get; set; } | |||
//public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | |||
@@ -14,7 +14,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
{ | |||
public CommparSetViewModel() | |||
{ | |||
SaveCommand = new RelayCommand(() => | |||
SaveCommand = new BPARelayCommand(() => | |||
{ | |||
if (!string.IsNullOrEmpty(CommBaseParModel.NetworkSegAddress)) | |||
{ | |||
@@ -38,7 +38,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
public BasePar CommBaseParModel { get { return Json<DevicePar>.Data.BaseParModel; } set { Json<DevicePar>.Data.BaseParModel = value; OnPropertyChanged(); } } | |||
//private BasePar _mCommBaseParModel; | |||
public RelayCommand SaveCommand { get; set; } | |||
public BPARelayCommand SaveCommand { get; set; } | |||
} | |||
} |
@@ -16,7 +16,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
{ | |||
public DeviceListViewModel() | |||
{ | |||
DetailsCommand = new RelayCommand<object>((o) => | |||
DetailsCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
if (o != null && o is string str) | |||
{ | |||
@@ -28,7 +28,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
devices = DeviceInquire.GetInstance.devices; | |||
} | |||
//public RelayCommand<object> ChangeNameCommand { get; set; } | |||
//public BPARelayCommand<object> ChangeNameCommand { get; set; } | |||
//public static ObservableCollection<Devices> devices { get; set; } = new ObservableCollection<Devices>(); | |||
public ObservableCollection<Devices> devices { get; set; } | |||
@@ -5,8 +5,6 @@ using System.Text; | |||
using System.Threading.Tasks; | |||
using BPA.Helper; | |||
using System.Collections.ObjectModel; | |||
using BPA.Helper; | |||
using BPASmartClient.CustomResource.UserControls.MessageShow; | |||
using BPASmartClient.CustomResource.UserControls; | |||
using System.Diagnostics; | |||
@@ -18,15 +16,15 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
public DeviceMaterialParViewModel() | |||
{ | |||
deviceParModels = Json<DevicePar>.Data.deviceParModels; | |||
RemoveCommand = new RelayCommand<object>((o) => | |||
RemoveCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
var res = deviceParModels.FirstOrDefault(p => p.MaterialName == o?.ToString()); | |||
if (res != null) deviceParModels.Remove(res); | |||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"{o.ToString()}:原料删除成功!"); | |||
}); | |||
AddCommand = new RelayCommand(() => { deviceParModels.Add(new DeviceParModel()); }); | |||
SaveCommand = new RelayCommand(() => | |||
AddCommand = new BPARelayCommand(() => { deviceParModels.Add(new DeviceParModel()); }); | |||
SaveCommand = new BPARelayCommand(() => | |||
{ | |||
if (deviceParModels == null || deviceParModels.Count <= 0) | |||
{ | |||
@@ -59,10 +57,10 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
public ObservableCollection<DeviceParModel> 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; } | |||
} | |||
} |
@@ -23,7 +23,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
// ConveyerBeltModels.Add(new ConveyerBeltModel() { Name = $"输送带{i}", Num = i++ }); | |||
//} | |||
//ConveyerBeltControlCommand = new RelayCommand<object>(o => | |||
//ConveyerBeltControlCommand = new BPARelayCommand<object>(o => | |||
//{ | |||
// if (o != null && o is int tempCount) | |||
// { | |||
@@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
Thread.Sleep(100); | |||
}), "输送带料仓状态监控"); | |||
RecipeControlCommand = new RelayCommand<object>((o) => | |||
RecipeControlCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
if (o != null && o is DeviceCurrentStatus currentStatus) | |||
{ | |||
@@ -109,9 +109,9 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
public ObservableCollection<ConveyerBeltModel> ConveyerBeltModels { get; set; } = new ObservableCollection<ConveyerBeltModel>(); | |||
public RelayCommand<object> ConveyerBeltControlCommand { get; set; } | |||
public BPARelayCommand<object> ConveyerBeltControlCommand { get; set; } | |||
public RelayCommand<object> RecipeControlCommand { get; set; } | |||
public BPARelayCommand<object> RecipeControlCommand { get; set; } | |||
/// <summary> | |||
/// 输送带状态 | |||
@@ -49,7 +49,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
OtherHandCylinders.Add(new CylinderModel() { Name = "上桶工位气缸" }); | |||
OtherHandCylinders.Add(new CylinderModel() { Name = "下桶工位气缸" }); | |||
Open = new RelayCommand<object>((o) => | |||
Open = new BPARelayCommand<object>((o) => | |||
{ | |||
if (o != null) | |||
{ | |||
@@ -74,7 +74,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
}); | |||
Close = new RelayCommand<object>((o) => | |||
Close = new BPARelayCommand<object>((o) => | |||
{ | |||
if (o != null) | |||
{ | |||
@@ -139,9 +139,9 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
/// </summary> | |||
public ObservableCollection<CylinderModel> OtherHandCylinders { get; set; } = new ObservableCollection<CylinderModel>(); | |||
public RelayCommand<object> Open { get; set; } | |||
public BPARelayCommand<object> Open { get; set; } | |||
public RelayCommand<object> Close { get; set; } | |||
public BPARelayCommand<object> Close { get; set; } | |||
} | |||
@@ -22,9 +22,9 @@ public class NewMaterialViewModel : ViewModelBase | |||
//public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | |||
//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; } | |||
@@ -42,9 +42,9 @@ public class NewMaterialViewModel : ViewModelBase | |||
public NewMaterialViewModel() | |||
{ | |||
RemoveCommand = new RelayCommand<object>(Remove); | |||
RemoveCommand = new BPARelayCommand<object>(Remove); | |||
SaveCommand = new RelayCommand(() => | |||
SaveCommand = new BPARelayCommand(() => | |||
{ | |||
if (MaterialName == String.Empty) { ErrorInfo = "原料名称不能为空"; return; } | |||
if (Global.DeviceRawMaterials.FirstOrDefault(p => p.RawMaterialName == MaterialName) != null) { ErrorInfo = "设备中已存在该原料名称"; return; } | |||
@@ -29,9 +29,9 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
Index = Array.FindIndex(Json<DevicePar>.Data.OutletInfoModels.ToArray(), p => p.OutletName == tempOutletInfo.OutletName); | |||
} | |||
}), "OpenNewOutlet", true); | |||
AddCommand = new RelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); | |||
CancelCommand = new RelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); | |||
SaveCommand = new RelayCommand(() => | |||
AddCommand = new BPARelayCommand(() => { SiloInfos.Add(new RawMaterialInfo()); }); | |||
CancelCommand = new BPARelayCommand(() => { ActionManage.GetInstance.Send("NewOutletViewClose"); }); | |||
SaveCommand = new BPARelayCommand(() => | |||
{ | |||
ObservableCollection<string> SileNames = new ObservableCollection<string>(); | |||
SiloInfos.ToList()?.ForEach(item => { SileNames.Add(item.RawMaterialName); }); | |||
@@ -82,7 +82,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
} | |||
ActionManage.GetInstance.Send("NewOutletViewClose"); | |||
}); | |||
RemoveCommand = new RelayCommand<object>((o) => | |||
RemoveCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
if (!string.IsNullOrEmpty(o?.ToString())) | |||
{ | |||
@@ -41,7 +41,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
} | |||
}), "Details", true); | |||
AddCommand = new RelayCommand(() => | |||
AddCommand = new BPARelayCommand(() => | |||
{ | |||
if (RawMaterials.Count >= DeviceInquire.GetInstance.devices.Count) | |||
{ | |||
@@ -62,7 +62,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
else goto p; | |||
}); | |||
RemoveCommand = new RelayCommand<object>((obj) => | |||
RemoveCommand = new BPARelayCommand<object>((obj) => | |||
{ | |||
if (obj is string rm) | |||
{ | |||
@@ -71,7 +71,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
} | |||
}); | |||
SaveCommand = new RelayCommand(() => | |||
SaveCommand = new BPARelayCommand(() => | |||
{ | |||
if (string.IsNullOrEmpty(RecipeName)) { MessageNotify.GetInstance.ShowDialog("请输入配方名称!", DialogType.Warning); ErrorInfo = "请输入配方名称"; return; } | |||
@@ -200,11 +200,11 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
//public string ErrorInfo { get { return _mErrorInfo; } set { _mErrorInfo = value; OnPropertyChanged(); } } | |||
//private string _mErrorInfo; | |||
//public RelayCommand AddCommand { get; set; } | |||
//public BPARelayCommand AddCommand { get; set; } | |||
//public RelayCommand<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>(); | |||
@@ -6,7 +6,6 @@ using System.Text; | |||
using System.Threading.Tasks; | |||
using BPA.Helper; | |||
using BPASmartClient.DosingSystem.View; | |||
using BPA.Helper; | |||
namespace BPASmartClient.DosingSystem.ViewModel | |||
@@ -15,14 +14,14 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
{ | |||
public OutletManagementViewModel() | |||
{ | |||
AddCommand = new RelayCommand(() => | |||
AddCommand = new BPARelayCommand(() => | |||
{ | |||
NewOutletView newOutletView = new NewOutletView(); | |||
newOutletView.ShowDialog(); | |||
}); | |||
SaveCommand = new RelayCommand(() => { Json<DevicePar>.Save(); }); | |||
SaveCommand = new BPARelayCommand(() => { Json<DevicePar>.Save(); }); | |||
OutletInfoModels = Json<DevicePar>.Data.OutletInfoModels; | |||
RemoveCommand = new RelayCommand<object>((o) => | |||
RemoveCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
if (!string.IsNullOrEmpty(o?.ToString())) | |||
{ | |||
@@ -35,7 +34,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
} | |||
}); | |||
DetailsCommand = new RelayCommand<object>((o) => | |||
DetailsCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
if (!string.IsNullOrEmpty(o?.ToString())) | |||
{ | |||
@@ -23,8 +23,8 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
static ObservableCollection<StockStatusModel> StockStatus = new ObservableCollection<StockStatusModel>(); | |||
public RecipeControlViewModel() | |||
{ | |||
StartCommand = new RelayCommand<object>(RecipeIssued); | |||
ChangeRecipeStateCommand = new RelayCommand<object>(ChangeRecipeState); | |||
StartCommand = new BPARelayCommand<object>(RecipeIssued); | |||
ChangeRecipeStateCommand = new BPARelayCommand<object>(ChangeRecipeState); | |||
RecipeRun(); | |||
RecipeStatusInquire(); | |||
} | |||
@@ -132,12 +132,13 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
ObservableCollection<RawMaterialModel> RawMater = new ObservableCollection<RawMaterialModel>(); | |||
foreach (var item in recipe.RawMaterials) | |||
{ | |||
RawMater.Add(new RawMaterialModel() { | |||
RawMater.Add(new RawMaterialModel() | |||
{ | |||
RawMaterialName = item.RawMaterialName, | |||
DeviceIp = item.DeviceIp, | |||
DownLimtFeedback = item.DownLimtFeedback, | |||
Loc = item.Loc, | |||
RawMaterialId = item .RawMaterialId, | |||
RawMaterialId = item.RawMaterialId, | |||
RawMaterialSource = item.RawMaterialSource, | |||
RawMaterialType = item.RawMaterialType, | |||
RawMaterialWeight = item.RawMaterialWeight, | |||
@@ -314,9 +315,9 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
}), "RecipeControlViewModelStatusInquire"); | |||
} | |||
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<LocaPar>.Data.Recipes; | |||
@@ -26,24 +26,24 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
{ | |||
Recipes = Json<LocaPar>.Data.Recipes; | |||
NewMaterital = new RelayCommand(() => | |||
NewMaterital = new BPARelayCommand(() => | |||
{ | |||
NewMaterialView newMateritalView = new NewMaterialView(); | |||
newMateritalView.ShowDialog(); | |||
}); | |||
NewRecipe = new RelayCommand(() => | |||
NewRecipe = new BPARelayCommand(() => | |||
{ | |||
NewRecipeView nrv = new NewRecipeView(); | |||
nrv.ShowDialog(); | |||
MessageNotify.GetInstance.ShowUserLog("新建配方"); | |||
}); | |||
SaveRecipe = new RelayCommand(() => | |||
SaveRecipe = new BPARelayCommand(() => | |||
{ | |||
Json<LocaPar>.Save(); | |||
MessageNotify.GetInstance.ShowUserLog("保存配方"); | |||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方保存成功!"); | |||
}); | |||
RemoveCommand = new RelayCommand<object>((o) => | |||
RemoveCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
if (!string.IsNullOrEmpty(o?.ToString())) | |||
{ | |||
@@ -57,7 +57,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"配方删除成功!"); | |||
MessageNotify.GetInstance.ShowUserLog($"删除配方 {res.RecipeName}"); | |||
} | |||
else | |||
else | |||
{ | |||
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, App.MainWindow, "提示", $"删除【{o.ToString()}】配方失败,配方正在使用!"); | |||
} | |||
@@ -65,7 +65,7 @@ namespace BPASmartClient.DosingSystem.ViewModel | |||
} | |||
}); | |||
DetailsCommand = new RelayCommand<object>((o) => | |||
DetailsCommand = new BPARelayCommand<object>((o) => | |||
{ | |||
if (!string.IsNullOrEmpty(o?.ToString())) | |||
{ | |||
@@ -89,17 +89,17 @@ namespace BPASmartClient.DosingSystem.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; } | |||
} | |||