终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

53 wiersze
2.1 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.Concurrent;
  8. using System.Collections.ObjectModel;
  9. using System.Windows;
  10. using BPASmartClient.Helper;
  11. using Microsoft.Toolkit.Mvvm.Input;
  12. using BPASmartClient.DosingHKProject.Model;
  13. using BPASmartClient.DosingHKProject.View;
  14. using BPASmartClient.CustomResource.UserControls;
  15. using BPASmartClient.CustomResource.UserControls.Model;
  16. using BPASmartClient.CustomResource.UserControls.Enum;
  17. using System.Windows.Media;
  18. using BPASmartClient.CustomResource.UserControls.MessageShow;
  19. using BPASmartClient.CustomResource.Pages.Model;
  20. using BPASmartClient.DosingHKProject.Model.Siemens;
  21. using BPASmartClient.DosingHKProject.Model.GVL;
  22. namespace BPASmartClient.DosingHKProject.ViewModel
  23. {
  24. public class SiemensRecipeReceiveViewModel : ObservableObject
  25. {
  26. //ObservableCollection<RemoteRecipeRawMaterial> RawMaterials { get; set; } = new ObservableCollection<RemoteRecipeRawMaterial>();
  27. public SiemensRecipeReceiveViewModel()
  28. {
  29. Recipes = Json<RemoteRecipeDataColl>.Data.Recipes;
  30. DetailsCommand = new RelayCommand<object>((o) =>
  31. {
  32. if (o != null && o is string cnt)
  33. {
  34. ActionManage.GetInstance.Send("CloseRecipeInfosView");
  35. RecipeInfosView nrv = new RecipeInfosView();
  36. var res = Json<RemoteRecipeDataColl>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == cnt);
  37. if (res != null)
  38. {
  39. ActionManage.GetInstance.Send("RecipeInfo", res);
  40. nrv.Show();
  41. MessageNotify.GetInstance.ShowUserLog($"查看配方——{res.RecipeName}");
  42. }
  43. }
  44. });
  45. }
  46. public RelayCommand<object> DetailsCommand { get; set; }
  47. public RelayCommand ClearAllRecipe { get; set; }
  48. public ObservableCollection<RemoteRecipeData> Recipes { get; set; }
  49. }
  50. }