using System.Collections.ObjectModel; using CommunityToolkit.Mvvm.ComponentModel; using Seyounth.Hyosung.Data.Models; using Seyounth.Hyosung.Data.Models.Plc; using Seyounth.Hyosung.Data.Services; using Seyounth.Hyosung.Runtime; using Seyounth.Hyosung.Runtime.Models; namespace Seyounth.Hyosung.ViewModels; public partial class HomeViewModel : ObservableObject { [ObservableProperty] private StackStationModel _stack1; [ObservableProperty] private StackStationModel _stack2; [ObservableProperty] private ObservableCollection _varieties; [ObservableProperty] private List _yarnCarTypes; [ObservableProperty] private Variety _selectedVariety; [ObservableProperty] private PackLineOption _packLineOption; private readonly IHyosungRuntime _runtime; public HomeViewModel(IVarietyService varietyService, IHyosungRuntime runtime) { PackLineOption = runtime.PackLineOption; _runtime = runtime; _stack1 = _runtime.Stack1; _stack2 = _runtime.Stack2; _yarnCarTypes = new List(); _yarnCarTypes.Add("A"); _yarnCarTypes.Add("B"); _yarnCarTypes.Add("C"); _yarnCarTypes.Add("D"); _varieties = new ObservableCollection(varietyService.GetAll()); } }