diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-04-26 14:09:47 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-04-26 14:09:47 +0300 |
| commit | 5a01fe2392fd67e413548d46cdfa51e5ae994b85 (patch) | |
| tree | 44a6117c6f333e121ecf5154ae19e688d104c478 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/ResolvedIssuesViewVM.cs | |
| parent | b079f2e9ec3f7f514b1a04228d5f7accdb2f9560 (diff) | |
| parent | 2a29f99d015e5c229c8c62356c4aeb482f580a0f (diff) | |
| download | Tango-5a01fe2392fd67e413548d46cdfa51e5ae994b85.tar.gz Tango-5a01fe2392fd67e413548d46cdfa51e5ae994b85.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
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.cs | 61 |
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(); + } + } +} |
