32 lines
989 B
C#
32 lines
989 B
C#
using System.Collections.ObjectModel;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using Seyounth.Hyosung.Data.Models;
|
|
using Seyounth.Hyosung.Data.Services;
|
|
using Seyounth.Hyosung.Models;
|
|
|
|
namespace Seyounth.Hyosung.ViewModels;
|
|
|
|
public partial class HomeViewModel : ObservableObject
|
|
{
|
|
[ObservableProperty] private StackModel _stack1;
|
|
|
|
[ObservableProperty] private StackModel _stack2;
|
|
|
|
[ObservableProperty] private ObservableCollection<Variety> _varieties;
|
|
|
|
[ObservableProperty] private List<string> _yarnCarTypes;
|
|
|
|
[ObservableProperty] private Variety _selectedVariety;
|
|
|
|
public HomeViewModel(IVarietyService varietyService)
|
|
{
|
|
_stack1 = new StackModel();
|
|
_stack2 = new StackModel();
|
|
_yarnCarTypes = new List<string>();
|
|
_yarnCarTypes.Add("A");
|
|
_yarnCarTypes.Add("B");
|
|
_yarnCarTypes.Add("C");
|
|
_yarnCarTypes.Add("D");
|
|
_varieties = new ObservableCollection<Variety>(varietyService.GetAll());
|
|
}
|
|
} |