From a20fd4bd769aeccd1fd1f20273f895c92a5b5bb8 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 14 Jan 2018 15:24:49 +0200 Subject: Added code comments for: MachineStudio.Common. --- .../Notifications/DialogViewVM.cs | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs') 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 { + /// + /// Represents a dialog view model base class. + /// + /// public abstract class DialogViewVM : ViewModel { public event Action Accepted; public event Action Canceled; + /// + /// Initializes a new instance of the class. + /// public DialogViewVM() { CanClose = true; @@ -20,25 +27,39 @@ namespace Tango.MachineStudio.Common.Notifications } private bool _canClose; - + /// + /// Gets or sets a value indicating whether this dialog can be closed. + /// public bool CanClose { get { return _canClose; } set { _canClose = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } } + /// + /// Gets or sets the close command. + /// public RelayCommand CloseCommand { get; set; } + /// + /// Called when the dialog has been shown. + /// public virtual void OnShow() { } + /// + /// Invokes the event. + /// protected virtual void Accept() { Accepted?.Invoke(); } + /// + /// Invokes the event. + /// protected virtual void Cancel() { Canceled?.Invoke(); -- cgit v1.3.1