/// <summary> /// Default constructor for an action /// </summary> /// <param name="header">The item header</param> /// <param name="iconKind">The item icon kind</param> /// <param name="command">The item command</param> /// <param name="minUserLevel">The minimum user level for the action</param> public ActionItemViewModel(string?header, GenericIconKind iconKind, ICommand?command, UserLevel minUserLevel = UserLevel.Normal) { Header = header; IconKind = iconKind; Command = command; MinUserLevel = minUserLevel; }
protected GameOptionsDialog_BasePageViewModel(LocalizedString pageName, GenericIconKind pageIcon) { // Set properties PageName = pageName; PageIcon = pageIcon; AsyncLock = new AsyncLock(); // Create commands SaveCommand = new AsyncRelayCommand(SavePageAsync); UseRecommendedCommand = new RelayCommand(UseRecommended); PageSelectionIndexChangedCommand = new AsyncRelayCommand(PageSelectionIndexChangedAsync); // Subscribe to events App.RefreshRequired += App_RefreshRequiredAsync; }
public Page_Games_CategoryViewModel(IEnumerable <Games> games, LocalizedString displayName, GenericIconKind icon) { // Set properties Games = games.ToArray(); DisplayName = displayName; Icon = icon; IsMaster = false; // Create properties InstalledGames = new ObservableCollection <Page_Games_GameViewModel>(); NotInstalledGames = new ObservableCollection <Page_Games_GameViewModel>(); // Enable collection synchronization BindingOperations.EnableCollectionSynchronization(InstalledGames, Application.Current); BindingOperations.EnableCollectionSynchronization(NotInstalledGames, Application.Current); }
public OverflowButtonItemViewModel(string header, GenericIconKind iconKind, ICommand command, UserLevel minUserLevel = UserLevel.Normal) : base(header, iconKind, command, minUserLevel) { }
public record GameFileLink(string Header, FileSystemPath Path, GenericIconKind Icon = GenericIconKind.None, string Arguments = null);
public record GamePurchaseLink(string Header, string Path, GenericIconKind Icon = GenericIconKind.GameDisplay_Purchase);