diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-07-20 12:22:23 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-07-20 12:22:23 +0300 |
| commit | 2741e998e9a039e4f25e621b00483d72891840eb (patch) | |
| tree | af29762e5585c856f9657e9c6997f94b0b646d84 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs | |
| parent | 2e37232fd2055ff0556c43c6f3f68e5ac427f2f6 (diff) | |
| parent | f4fc9795b21c8631451ca16e93e479bcd3872bb5 (diff) | |
| download | Tango-2741e998e9a039e4f25e621b00483d72891840eb.tar.gz Tango-2741e998e9a039e4f25e621b00483d72891840eb.zip | |
MERGE Vica changes.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs new file mode 100644 index 000000000..0187f3bee --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs @@ -0,0 +1,45 @@ +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.ThreadExtensions.ViewModels +{ + public class AddItemDialogVM : DialogViewVM + { + private string _name; + + public string Name + { + get { return _name; } + set { _name = value; + RaisePropertyChangedAuto(); + SaveCommand.RaiseCanExecuteChanged(); + } + } + + + /// <summary> + /// Gets or sets the login command. + /// </summary> + public RelayCommand SaveCommand { get; set; } + + /// <summary> + /// Gets or sets the cancel command. + /// </summary> + public RelayCommand CancelCommand { get; set; } + + /// <summary> + /// Initializes a new instance of the <see cref="MachineLoginViewVM"/> class. + /// </summary> + public AddItemDialogVM() + { + SaveCommand = new RelayCommand(Accept, () => false == String.IsNullOrEmpty(Name)); + CancelCommand = new RelayCommand(Cancel); + } + + } +} |
