示例#1
0
 /// <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;
 }
示例#2
0
    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;
    }
示例#3
0
    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)
 {
 }
示例#5
0
 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);