aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-05-02 17:36:54 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-05-02 17:36:54 +0300
commitee697f7a3350d0a97bddee4de3a2ae4f9d285052 (patch)
tree2dc2e3bb811b0d89a3c4c51801c1572966fcee7c /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs
parent73c4b814f1f28170ae72723568189096413c3564 (diff)
downloadTango-ee697f7a3350d0a97bddee4de3a2ae4f9d285052.tar.gz
Tango-ee697f7a3350d0a97bddee4de3a2ae4f9d285052.zip
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs61
1 files changed, 61 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs
new file mode 100644
index 000000000..552880792
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.Commands;
+using Tango.MachineStudio.Common.Notifications;
+using Tango.MachineStudio.UI.TFS;
+using Tango.TFS;
+
+namespace Tango.MachineStudio.UI.ViewModels
+{
+ public class ResolvedIssuesViewVM : DialogViewVM
+ {
+ private Action<WorkItem> _onApprove;
+ private Action<WorkItem> _onDecline;
+
+ public TeamFoundationServiceExtendedClient TFSClient { get; set; }
+
+ public RelayCommand<WorkItem> ApproveCommand { get; set; }
+
+ public RelayCommand<WorkItem> DeclineCommand { get; set; }
+
+ private bool _isAvailable;
+
+ public bool IsAvailable
+ {
+ get { return _isAvailable; }
+ set { _isAvailable = value; RaisePropertyChangedAuto(); }
+ }
+
+ public ResolvedIssuesViewVM() : base()
+ {
+ IsAvailable = true;
+ ApproveCommand = new RelayCommand<WorkItem>(ApproveIssue);
+ DeclineCommand = new RelayCommand<WorkItem>(DeclineIssue);
+ }
+
+ public ResolvedIssuesViewVM(TeamFoundationServiceExtendedClient tfsClient, Action<WorkItem> onApprove, Action<WorkItem> onDecline) : this()
+ {
+ TFSClient = tfsClient;
+ _onApprove = onApprove;
+ _onDecline = onDecline;
+ }
+
+ private void DeclineIssue(WorkItem workItem)
+ {
+ _onDecline(workItem);
+ }
+
+ private void ApproveIssue(WorkItem workItem)
+ {
+ _onApprove(workItem);
+ }
+
+ public void Close()
+ {
+ Accept();
+ }
+ }
+}