aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs
diff options
context:
space:
mode:
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.cs23
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();