终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

49 regels
1.8 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.JXJFoodSmallStation.Model;
  13. using BPASmartClient.JXJFoodSmallStation.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.JXJFoodSmallStation.Model.Siemens;
  21. namespace BPASmartClient.JXJFoodSmallStation.ViewModel
  22. {
  23. public class RecipeReceiveViewModel : ObservableObject
  24. {
  25. public RecipeReceiveViewModel()
  26. {
  27. //Json<LocaPar>.Read();
  28. Recipes = Json<RemoteRecipeDataColl>.Data.Recipes;
  29. DetailsCommand = new RelayCommand<object>((o) =>
  30. {
  31. if (o != null && o is long num)
  32. {
  33. ActionManage.GetInstance.CancelRegister("RecipeInfo");
  34. RecipeInfosView nrv = new RecipeInfosView();
  35. var res = Json<RemoteRecipeDataColl>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == num);
  36. ActionManage.GetInstance.Send("RecipeInfo", res);
  37. nrv.ShowDialog();
  38. MessageLog.GetInstance.ShowUserLog($"查看配方——{res.RecipeName}");
  39. }
  40. });
  41. }
  42. public RelayCommand<object> DetailsCommand { get; set; }
  43. public ObservableCollection<RemoteRecipeData> Recipes { get; set; }
  44. }
  45. }