using BPASmartClient.Model; using BPASmartClient.Model.订单; using BPASmartClient.MorkMW.Model; using BPA.Helper; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BPASmartClient.MorkMW.ViewModel { public class DebugViewModel:NotifyBase { public DebugViewModel() { //SimOrderSetDown = new BPARelayCommand((s) => //{ // //new MorkMWSimOrder() { mixWink = new List { new MixWinkModel { Loc = 1,Time=3000 } } }.Publish(); //}); SimRecipe = new SimRecipeModel(); SimOrderSetDown = new BPARelayCommand((s) => { if (s is SimRecipeModel res) { new MorkMWSimOrder() {mixWink=res.recipe.ToList() }.Publish(); } }); AddMaterial = new BPARelayCommand(() => { SimRecipe.recipe.Insert(0, new MixWinkModel()); }); ClearMaterial = new BPARelayCommand(() => { if(SimRecipe.recipe.Count>0) SimRecipe.recipe.RemoveAt(SimRecipe.recipe.Count - 1); }); StartLocalSim = new BPARelayCommand(() => { GVL_MorkMW.AllowLocalSimOrder = IsSimOrder; }); } /// /// 模拟订单 /// public BPARelayCommand SimOrderSetDown { get; set; } public BPARelayCommand AddMaterial { get; set; } public BPARelayCommand ClearMaterial { get; set; } public BPARelayCommand StartLocalSim { get; set; } public bool IsSimOrder { get; set; } public SimRecipeModel SimRecipe { get; set; } public List location { get; set; } = new List() { 1, 2, 3, 4, 5, 6 }; } }