|
- 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.JXJFoodBigStation.Model;
- using BPASmartClient.JXJFoodBigStation.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.JXJFoodBigStation.Model.Siemens;
-
- namespace BPASmartClient.JXJFoodBigStation.ViewModel
- {
- public class RecipeReceiveViewModel : ObservableObject
- {
- public RecipeReceiveViewModel()
- {
- //Json<LocaPar>.Read();
- Recipes = Json<RemoteRecipeDataColl>.Data.Recipes;
- DetailsCommand = new RelayCommand<object>((o) =>
- {
- if (o != null && o is long num)
- {
- ActionManage.GetInstance.CancelRegister("RecipeInfo");
- RecipeInfosView nrv = new RecipeInfosView();
- var res = Json<RemoteRecipeDataColl>.Data.Recipes.FirstOrDefault(p => p.RecipeCode == num);
- ActionManage.GetInstance.Send("RecipeInfo", res);
- nrv.ShowDialog();
- MessageLog.GetInstance.ShowUserLog($"查看配方——{res.RecipeName}");
- }
- });
- }
-
- public RelayCommand<object> DetailsCommand { get; set; }
-
- public ObservableCollection<RemoteRecipeData> Recipes { get; set; }
- }
- }
|