终端一体化运控平台
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.
 
 
 

43 line
1.3 KiB

  1. using BPA.Helper;
  2. using BPASmartClient.CustomResource.Pages.Model;
  3. using BPASmartClient.CustomResource.UserControls;
  4. using BPASmartClient.CustomResource.UserControls.MessageShow;
  5. using BPASmartClient.Model;
  6. using System;
  7. using System.Collections.Concurrent;
  8. using System.Collections.Generic;
  9. using System.Collections.ObjectModel;
  10. using System.Diagnostics;
  11. using System.Linq;
  12. using System.Threading;
  13. using System.Threading.Tasks;
  14. namespace BPASmartClient.Academy.ViewModel
  15. {
  16. public class RecipeControlViewModel : NotifyBase
  17. {
  18. public RecipeControlViewModel()
  19. {
  20. StartCommand = new BPARelayCommand<object>(new Action<object>((o) =>
  21. {
  22. if (o != null && o is string recipeName)
  23. {
  24. ActionManage.GetInstance.Send("配方下发", recipeName);
  25. }
  26. }));
  27. CancelRecipeCommand = new BPARelayCommand<object>(new Action<object>((ob) =>
  28. {
  29. if (ob != null && ob is RecipeModel recipe)
  30. {
  31. ActionManage.GetInstance.Send("取消配方", recipe.RecipeName);
  32. }
  33. }));
  34. }
  35. public BPARelayCommand<object> StartCommand { get; set; }
  36. public BPARelayCommand<object> CancelRecipeCommand { get; set; }
  37. }
  38. }