public ModalWindowViewModel() { ShowTextCommand.Subscribe(_ => { NumberOutput.Value = NumberInput.Value; NumberInput.Value = null; FocusTextBoxCommand.Execute(); }); ClearTextCommand = NumberOutput .Select(number => !(number is null)) .ToReactiveCommand(); ClearTextCommand.Subscribe(_ => { NumberOutput.Value = null; NumberInput.Value = null; FocusTextBoxCommand.Execute(); }); }
protected internal override void VisitClearTextCommand(ClearTextCommand clearTextCommand) { this.WriteIndent(); this.writer.WriteLine("cleartext"); }