Example #1
0
        public WimPickViewModel(UIServices uiServices, ISettingsService settingsService)
        {
            this.uiServices      = uiServices;
            this.settingsService = settingsService;
            var dialog = uiServices.DialogFactory(this);

            PickWimFileCommand = ReactiveCommand.CreateFromObservable(() => PickWimFileObs);
            pickWimFileObs     = PickWimFileCommand.ToProperty(this, x => x.WimMetadata);
            dialog.HandleExceptionsFromCommand(PickWimFileCommand, "WIM file error");
            hasWimHelper = this.WhenAnyValue(model => model.WimMetadata, (WimMetadataViewModel x) => x != null)
                           .ToProperty(this, x => x.HasWim);

            OpenGetWoaCommand = ReactiveCommand.Create((string url) => { Process.Start(url); });
        }