diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-14 15:24:49 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-14 15:24:49 +0200 |
| commit | a20fd4bd769aeccd1fd1f20273f895c92a5b5bb8 (patch) | |
| tree | 15f2dc0d4629dfd17b2e44ca3732d549fed27751 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs | |
| parent | 04db84896f75bb761e8b3d482b4cb0f82c08d96e (diff) | |
| download | Tango-a20fd4bd769aeccd1fd1f20273f895c92a5b5bb8.tar.gz Tango-a20fd4bd769aeccd1fd1f20273f895c92a5b5bb8.zip | |
Added code comments for:
MachineStudio.Common.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs index e5e4cac78..5fcd63071 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs @@ -8,11 +8,18 @@ using Tango.SharedUI; namespace Tango.MachineStudio.Common.Notifications { + /// <summary> + /// Represents a dialog view model base class. + /// </summary> + /// <seealso cref="Tango.SharedUI.ViewModel" /> public abstract class DialogViewVM : ViewModel { public event Action Accepted; public event Action Canceled; + /// <summary> + /// Initializes a new instance of the <see cref="DialogViewVM"/> class. + /// </summary> public DialogViewVM() { CanClose = true; @@ -20,25 +27,39 @@ namespace Tango.MachineStudio.Common.Notifications } private bool _canClose; - + /// <summary> + /// Gets or sets a value indicating whether this dialog can be closed. + /// </summary> public bool CanClose { get { return _canClose; } set { _canClose = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } + /// <summary> + /// Gets or sets the close command. + /// </summary> public RelayCommand CloseCommand { get; set; } + /// <summary> + /// Called when the dialog has been shown. + /// </summary> public virtual void OnShow() { } + /// <summary> + /// Invokes the <see cref="Accepted"/> event. + /// </summary> protected virtual void Accept() { Accepted?.Invoke(); } + /// <summary> + /// Invokes the <see cref="Canceled"/> event. + /// </summary> protected virtual void Cancel() { Canceled?.Invoke(); |
