FModel/FModel/ViewModels/LoadingModesViewModel.cs
GMatrixGames e21a3be55b
Update/net7 (#290)
* file-scoped namespace & net7.0

* Workflow
2022-06-11 20:07:59 -04:00

22 lines
686 B
C#

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using FModel.Framework;
using FModel.ViewModels.Commands;
namespace FModel.ViewModels;
public class LoadingModesViewModel : ViewModel
{
private LoadCommand _loadCommand;
public LoadCommand LoadCommand => _loadCommand ??= new LoadCommand(this);
public ReadOnlyObservableCollection<ELoadingMode> Modes { get; }
public LoadingModesViewModel()
{
Modes = new ReadOnlyObservableCollection<ELoadingMode>(new ObservableCollection<ELoadingMode>(EnumerateLoadingModes()));
}
private IEnumerable<ELoadingMode> EnumerateLoadingModes() => Enum.GetValues<ELoadingMode>();
}