|
1234567891011121314151617181920212223242526272829303132333435363738 |
- global using Microsoft.Toolkit.Mvvm.ComponentModel;
- using BPASmartClient.Helper;
- using BPASmartClient.Model;
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.MilkWithTea.ViewModel
- {
- public class MainWindowVeiwModel : ObservableObject
- {
- public bool AutoStart { get { return SystemHelper.GetInstance.IsAutoStart(); } set { SystemHelper.GetInstance.AutoStart(value); OnPropertyChanged(); } }
-
- public MainWindowVeiwModel()
- {
- Json<JsonLocalRecipes>.Read();
- Json<JsonDeviceConfig>.Read();
- if (Json<JsonLocalRecipes>.Data.localMaterails.Count<14)
- {
- Json<JsonLocalRecipes>.Data.localMaterails.Clear();
- for (int i = 1; i < 15; i++)
- {
- Json<JsonLocalRecipes>.Data.localMaterails.Add(new LocalMaterail
- {
- MaterialID = Guid.NewGuid().ToString(),
- MaterialPosition = i
- });;
- }
- }
- }
-
-
-
- }
- }
|