public MissingBase16ViewModel() { // Don't move this line, service must be instantiated here b16Service = new Base16Sevice(Result); var inServ = new InputService(); IObservable <bool> isFindEnabled = this.WhenAnyValue( x => x.Input, x => x.MissingChar, x => x.Result.CurrentState, (b58, c, state) => !string.IsNullOrEmpty(b58) && inServ.IsMissingCharValid(c) && state != State.Working); FindCommand = ReactiveCommand.Create(Find, isFindEnabled); ExtraInputTypeList = ListHelper.GetEnumDescItems(InputType.PrivateKey).ToArray(); SelectedExtraInputType = ExtraInputTypeList.First(); HasExample = true; IObservable <bool> isExampleVisible = this.WhenAnyValue( x => x.Result.CurrentState, (state) => state != State.Working); ExampleCommand = ReactiveCommand.Create(Example, isExampleVisible); SetExamples(GetExampleData()); }
public MissingBase16ViewModel() { // Don't move this line, service must be instantiated here b16Service = new Base16Sevice(Result); IObservable <bool> isFindEnabled = this.WhenAnyValue( x => x.Input, x => x.MissingChar, x => x.Result.CurrentState, (b58, c, state) => !string.IsNullOrEmpty(b58) && b16Service.IsMissingCharValid(c) && state != Models.State.Working); FindCommand = ReactiveCommand.Create(Find, isFindEnabled); }