コード例 #1
0
        public CollectionSettingsMenu(IDialogManager dialogManager, IMediator mediator,
                                      UploadCollection uploadCollection)
        {
            _dialogManager = dialogManager;
            _mediator      = mediator;

            StateChangeMenu = new CollectionStateChangeMenu(uploadCollection);
            RegisterSubMenu(StateChangeMenu);
            Header = "Collection settings";
        }
コード例 #2
0
 public CustomCollectionContextMenu(ModLibraryViewModel library)
 {
     Library           = library;
     _uploadCollection = library.UploadCollection;
     this.WhenAnyValue(x => x.CurrentItem.Model.IsInstalled, x => x.CurrentItem.Model.Items.Count,
                       (installed, count) => installed && count > 0)
     .Subscribe(isInstalled =>
                Items.Where(
                    x =>
                    x.Action == UninstallModsFromDisk || x.AsyncAction == Diagnose ||
                    x.AsyncAction == LaunchCollection)
                .ForEach(x => x.IsEnabled = isInstalled));
 }
コード例 #3
0
 public UploadCollectionPopupMenu(UploadCollection uploadCollection)
 {
     _uploadCollection = uploadCollection;
     Header            = "Upload Collection";
 }
コード例 #4
0
 public CollectionStateChangeMenu(UploadCollection uploadCollection)
 {
     _uploadCollection = uploadCollection;
     Header            = "Change state";
 }