终端一体化运控平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

70 行
1.9 KiB

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