终端一体化运控平台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

48 rader
1.7 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Microsoft.Toolkit.Mvvm.ComponentModel;
  7. using System.Collections.ObjectModel;
  8. using BPASmartClient.JXJFoodSmallStation.Model;
  9. using BPASmartClient.Helper;
  10. using Microsoft.Toolkit.Mvvm.Input;
  11. using BPASmartClient.CustomResource.UserControls.MessageShow;
  12. using BPASmartClient.CustomResource.UserControls;
  13. using System.Diagnostics;
  14. using BPASmartClient.JXJFoodSmallStation.Model.WindSend;
  15. using System.Threading;
  16. using BPASmartClient.CustomResource.Pages.Model;
  17. namespace BPASmartClient.JXJFoodSmallStation.ViewModel
  18. {
  19. public class WindSendParViewModel : ObservableObject
  20. {
  21. public WindSendParViewModel()
  22. {
  23. if (WindSendRawMaterial.Count == 0)
  24. {
  25. WindSendRawMaterial.Clear();
  26. for (int i = 0; i < 5; i++)
  27. {
  28. WindSendRawMaterial.Add(new WindSendRawMaterial()
  29. {
  30. Location = i + 1,
  31. });
  32. }
  33. }
  34. SaveRawMaterialPara = new RelayCommand(() =>
  35. {
  36. Json<DevicePar>.Save();
  37. NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, App.MainWindow, "提示", $"风送料仓原料信息参数保存成功!");
  38. MessageNotify.GetInstance.ShowUserLog("风送料仓原料信息参数保存成功。");
  39. });
  40. }
  41. public ObservableCollection<WindSendRawMaterial> WindSendRawMaterial => Json<DevicePar>.Data.windSendRawMaterial;
  42. public RelayCommand SaveRawMaterialPara { get; set; }
  43. }
  44. }