using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Toolkit.Mvvm.ComponentModel; using System.Collections.Concurrent; using System.Collections.ObjectModel; using System.Windows; using BPASmartClient.Helper; using Microsoft.Toolkit.Mvvm.Input; using BPASmartClient.DosingHKProject.Model; using BPASmartClient.DosingHKProject.View; using BPASmartClient.CustomResource.UserControls; using BPASmartClient.CustomResource.UserControls.Model; using BPASmartClient.CustomResource.UserControls.Enum; using System.Windows.Media; using BPASmartClient.CustomResource.UserControls.MessageShow; using BPASmartClient.CustomResource.Pages.Model; using BPASmartClient.DosingHKProject.Model.Siemens; using BPASmartClient.DosingHKProject.Model.GVL; namespace BPASmartClient.DosingHKProject.ViewModel { public class SiemensRecipeReceiveViewModel : ObservableObject { //ObservableCollection RawMaterials { get; set; } = new ObservableCollection(); public SiemensRecipeReceiveViewModel() { Recipes = Json.Data.Recipes; DetailsCommand = new RelayCommand((o) => { if (o != null && o is string cnt) { ActionManage.GetInstance.Send("CloseRecipeInfosView"); RecipeInfosView nrv = new RecipeInfosView(); var res = Json.Data.Recipes.FirstOrDefault(p => p.RecipeCode == cnt); if (res != null) { ActionManage.GetInstance.Send("RecipeInfo", res); nrv.Show(); MessageNotify.GetInstance.ShowUserLog($"查看配方——{res.RecipeName}"); } } }); } public RelayCommand DetailsCommand { get; set; } public RelayCommand ClearAllRecipe { get; set; } public ObservableCollection Recipes { get; set; } } }