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