Пример #1
0
 public ArtistsViewModel(IScreen hostScreen, IWrappedService wrappedService)
 {
     HostScreen          = hostScreen;
     this.wrappedService = wrappedService;
     NextCommand         = ReactiveCommand.CreateFromTask(Next);
     FetchArtists();
 }
Пример #2
0
        public UserProfileViewModel(IScreen hostScreen, IPlexApi plexApi, IWrappedService wrappedService)
        {
            this.plexApi         = plexApi;
            this.wrappedService  = wrappedService;
            HostScreen           = hostScreen;
            FetchPlexUserCommand = ReactiveCommand.CreateFromTask(FetchPlexUser);
            StartWrappedCommand  = ReactiveCommand.CreateFromTask(StartWrapped);
            FetchPlexUserCommand.IsExecuting.ToProperty(this, x => x.IsFetchingPlexUser, out isFetchingPlexUser);

            this.isAServerSelected = this.WhenAnyValue(x => x.SelectedSever)
                                     .Select(v => v != null)
                                     .ToProperty(this, x => x.IsAServerSelected);

            FetchPlexUserCommand.Execute();
        }
Пример #3
0
 public MediaPageViewModel(IScreen hostScreen, IWrappedService wrappedService)
 {
     HostScreen          = hostScreen;
     this.wrappedService = wrappedService;
     FetchMedias();
 }