using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Toolkit.Mvvm.ComponentModel; using System.Collections.ObjectModel; using BPASmartClient.JXJFoodSmallStation.Model; using BPASmartClient.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.UserControls; using System.Diagnostics; using BPASmartClient.JXJFoodSmallStation.Model.WindSend; using System.Threading; using BPASmartClient.CustomResource.Pages.Model; namespace BPASmartClient.JXJFoodSmallStation.ViewModel { public class WindSendParViewModel : ObservableObject { public WindSendParViewModel() { if (WindSendRawMaterial.Count == 0) { WindSendRawMaterial.Clear(); for (int i = 0; i < 5; i++) { WindSendRawMaterial.Add(new WindSendRawMaterial() { Location = i + 1, }); } } SaveRawMaterialPara = new RelayCommand(() => { Json.Save(); NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"风送料仓原料信息参数保存成功!"); MessageNotify.GetInstance.ShowUserLog("风送料仓原料信息参数保存成功。"); }); } public ObservableCollection WindSendRawMaterial => Json.Data.windSendRawMaterial; public RelayCommand SaveRawMaterialPara { get; set; } } }