aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-20 11:30:48 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-20 11:30:48 +0300
commitf8f1f96b814391df201b1d8e1ef06c531233ef5c (patch)
treec6b8e4ae7a62bb9efd9109928a0241d1124e60cf /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs
parent65d898feb5cadb4bf421f03e40ef3f3109c881a6 (diff)
downloadTango-f8f1f96b814391df201b1d8e1ef06c531233ef5c.tar.gz
Tango-f8f1f96b814391df201b1d8e1ef06c531233ef5c.zip
Split assembly versions to Core, Machine Studio, PPC!
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.cs74
1 files changed, 0 insertions, 74 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
deleted file mode 100644
index c8d606efc..000000000
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Notifications/DialogViewVM.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Tango.Core.Commands;
-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;
- CloseCommand = new RelayCommand(Cancel, (x) => CanClose);
- OKCommand = new RelayCommand(Accept, (x) => CanClose);
- }
-
- 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>
- /// Gets or sets the ok command.
- /// </summary>
- public RelayCommand OKCommand { 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();
- }
- }
-}