diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs b/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs index 1854b410a..3154be545 100644 --- a/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs +++ b/Software/Visual_Studio/Tango.SharedUI/DialogViewVM.cs @@ -24,7 +24,7 @@ namespace Tango.SharedUI { CanClose = true; CloseCommand = new RelayCommand(Cancel, (x) => CanClose); - OKCommand = new RelayCommand(Accept, (x) => CanClose); + OKCommand = new RelayCommand(Accept, (x) => CanClose && CanOK()); } private bool _canClose; @@ -38,6 +38,14 @@ namespace Tango.SharedUI } /// <summary> + /// Determines whether this instance can invoke the OK command. + /// </summary> + protected virtual bool CanOK() + { + return true; + } + + /// <summary> /// Gets a value indicating whether the dialog has been confirmed. /// </summary> public bool DialogResult { get; private set; } |
