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

70 lines
1.9 KiB

  1. using BPASmartClient.Model;
  2. using BPASmartClient.Model.订单;
  3. using BPASmartClient.MorkMW.Model;
  4. using BPA.Helper;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace BPASmartClient.MorkMW.ViewModel
  11. {
  12. public class DebugViewModel:NotifyBase
  13. {
  14. public DebugViewModel()
  15. {
  16. //SimOrderSetDown = new BPARelayCommand((s) =>
  17. //{
  18. // //new MorkMWSimOrder() { mixWink = new List<MixWinkModel> { new MixWinkModel { Loc = 1,Time=3000 } } }.Publish();
  19. //});
  20. SimRecipe = new SimRecipeModel();
  21. SimOrderSetDown = new BPARelayCommand<object>((s) => {
  22. if (s is SimRecipeModel res)
  23. {
  24. new MorkMWSimOrder() {mixWink=res.recipe.ToList() }.Publish();
  25. }
  26. });
  27. AddMaterial = new BPARelayCommand(() => {
  28. SimRecipe.recipe.Insert(0, new MixWinkModel());
  29. });
  30. ClearMaterial = new BPARelayCommand(() => {
  31. if(SimRecipe.recipe.Count>0)
  32. SimRecipe.recipe.RemoveAt(SimRecipe.recipe.Count - 1);
  33. });
  34. StartLocalSim = new BPARelayCommand(() => {
  35. GVL_MorkMW.AllowLocalSimOrder = IsSimOrder;
  36. });
  37. }
  38. /// <summary>
  39. /// 模拟订单
  40. /// </summary>
  41. public BPARelayCommand<object> SimOrderSetDown { get; set; }
  42. public BPARelayCommand AddMaterial { get; set; }
  43. public BPARelayCommand ClearMaterial { get; set; }
  44. public BPARelayCommand StartLocalSim { get; set; }
  45. public bool IsSimOrder { get; set; }
  46. public SimRecipeModel SimRecipe { get; set; }
  47. public List<int> location { get; set; } = new List<int>() { 1, 2, 3, 4, 5, 6 };
  48. }
  49. }