diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-06 18:39:17 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-06 18:39:17 +0300 |
| commit | cff4a8079c4d352cfd47793c701650e62337ed6e (patch) | |
| tree | af145431e541f08ed99b1d3ae377d8a59faedc4f /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs | |
| parent | 776d934a1adc8c58301e56f6639afdeeccb0dda6 (diff) | |
| download | Tango-cff4a8079c4d352cfd47793c701650e62337ed6e.tar.gz Tango-cff4a8079c4d352cfd47793c701650e62337ed6e.zip | |
Working on PPC..
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs index b5e3e18fc..2af15b1ad 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs @@ -51,20 +51,6 @@ namespace Tango.PPC.UI.ViewModels public RelayCommand<DropEventArgs> OnDragAndDropCommand { get; set; } - public JobsViewVM(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) : base(application, authentication, navigation, notification) - { - Jobs = new ObservableCollection<Job>(); - - JobSelectedCommand = new RelayCommand((x) => JobSelected(x as Job)); - OnDragAndDropCommand = new RelayCommand<DropEventArgs>((e) => - { - Job draggedJob = e.Draggable.DataContext as Job; - Job droppedJob = e.Droppable.DataContext as Job; - - OnDragAndDropJobs(draggedJob, droppedJob); - }); - } - private void OnDragAndDropJobs(Job draggedJob, Job droppedJob) { Debug.WriteLine(draggedJob.Name + " Dragged on to " + droppedJob.Name); @@ -88,9 +74,24 @@ namespace Tango.PPC.UI.ViewModels JobsCollectionView.Refresh(); } - private void JobSelected(Job job) + private async void JobSelected(Job job) { Debug.WriteLine(job.Name); + await NotificationProvider.ShowInfo("Job details not yet implemented..."); + } + + public JobsViewVM() + { + Jobs = new ObservableCollection<Job>(); + + JobSelectedCommand = new RelayCommand((x) => JobSelected(x as Job)); + OnDragAndDropCommand = new RelayCommand<DropEventArgs>((e) => + { + Job draggedJob = e.Draggable.DataContext as Job; + Job droppedJob = e.Droppable.DataContext as Job; + + OnDragAndDropJobs(draggedJob, droppedJob); + }); } public override void OnApplicationStarted() |
