public WarningsDialogViewModel(WarningDialogResult buttons, params string[] warnings) { this.Buttons = buttons; this.YesCommand = new ActionCommand(() => _sub.OnNext(WarningDialogResult.Yes)); this.NoCommand = new ActionCommand(() => _sub.OnNext(WarningDialogResult.No)); this.OkCommand = new ActionCommand(() => _sub.OnNext(WarningDialogResult.Ok)); this.CancelCommand = new ActionCommand(() => _sub.OnNext(WarningDialogResult.Cancel)); this.Warnings = new ObservableCollection <string>(warnings); this.Title = "Do you want to proceed?"; }
public WarningsDialogViewModel(WarningDialogResult buttons, IEnumerable <string> warnings) : this(buttons, warnings != null ? warnings.ToArray() : new string[0]) { }