public InstallingViewModel(IScreen hostScreen)
        {
            HostScreen = hostScreen;

            var progress = new ScheduledSubject<int>(RxApp.DeferredScheduler);
            ProgressValue = progress;

            progress.ToProperty(this, x => x.LatestProgress, 0);

            this.WhenAny(x => x.PackageMetadata, x => x.Value.ExtractTitle())
                .ToProperty(this, x => x.Title);

            this.WhenAny(x => x.PackageMetadata, v => v.Value)
                .Select(x => x != null ? x.Description : String.Empty)
                .ToProperty(this, x => x.Description);
        }
示例#2
0
        public InstallingViewModel(IScreen hostScreen)
        {
            HostScreen = hostScreen;

            var progress = new ScheduledSubject <int>(RxApp.DeferredScheduler);

            ProgressValue = progress;

            progress.ToProperty(this, x => x.LatestProgress, 0);

            this.WhenAny(x => x.PackageMetadata, x => x.Value.ExtractTitle())
            .ToProperty(this, x => x.Title);

            this.WhenAny(x => x.PackageMetadata, v => v.Value)
            .Select(x => x != null ? x.Description : String.Empty)
            .ToProperty(this, x => x.Description);
        }
        public UninstallingViewModel(IScreen hostScreen)
        {
            HostScreen = hostScreen;

            var progress = new ScheduledSubject<int>(RxApp.DeferredScheduler);
            ProgressValue = progress;

            progress.ToProperty(this, x => x.LatestProgress, 0);

            this.WhenAny(x => x.PackageMetadata, x => x.Value)
                .SelectMany(x => x != null ? Observable.Return(x.Title) : Observable.Empty<string>())
                .ToProperty(this, x => x.Title);

            this.WhenAny(x => x.PackageMetadata, x => x.Value)
                .SelectMany(x => x != null ? Observable.Return(x.Description) : Observable.Empty<string>())
                .ToProperty(this, x => x.Description);
        }
示例#4
0
        public UninstallingViewModel(IScreen hostScreen)
        {
            HostScreen = hostScreen;

            var progress = new ScheduledSubject <int>(RxApp.DeferredScheduler);

            ProgressValue = progress;

            progress.ToProperty(this, x => x.LatestProgress, 0);

            this.WhenAny(x => x.PackageMetadata, x => x.Value)
            .SelectMany(x => x != null ? Observable.Return(x.Title) : Observable.Empty <string>())
            .ToProperty(this, x => x.Title);

            this.WhenAny(x => x.PackageMetadata, x => x.Value)
            .SelectMany(x => x != null ? Observable.Return(x.Description) : Observable.Empty <string>())
            .ToProperty(this, x => x.Description);
        }