From cff4a8079c4d352cfd47793c701650e62337ed6e Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 6 Jun 2018 18:39:17 +0300 Subject: Working on PPC.. --- .../PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs | 31 +++++++++++----------- .../PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | 5 ---- .../PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs | 12 +++++---- 3 files changed, 23 insertions(+), 25 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels') 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 OnDragAndDropCommand { get; set; } - public JobsViewVM(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) : base(application, authentication, navigation, notification) - { - Jobs = new ObservableCollection(); - - JobSelectedCommand = new RelayCommand((x) => JobSelected(x as Job)); - OnDragAndDropCommand = new RelayCommand((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(); + + JobSelectedCommand = new RelayCommand((x) => JobSelected(x as Job)); + OnDragAndDropCommand = new RelayCommand((e) => + { + Job draggedJob = e.Draggable.DataContext as Job; + Job droppedJob = e.Droppable.DataContext as Job; + + OnDragAndDropJobs(draggedJob, droppedJob); + }); } public override void OnApplicationStarted() diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs index 37940b2f8..a33dc25d7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -17,11 +17,6 @@ namespace Tango.PPC.UI.ViewModels { public class LoadingViewVM : PPCViewModel { - public LoadingViewVM(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) : base(application, authentication, navigation, notification) - { - - } - public async override void OnApplicationStarted() { await Task.Delay(500); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs index c75e031f1..d1fc4c015 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs @@ -3,18 +3,20 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.PPC.Common; using Tango.PPC.Common.Application; +using Tango.PPC.Common.Authentication; +using Tango.PPC.Common.Navigation; +using Tango.PPC.Common.Notifications; using Tango.SharedUI; namespace Tango.PPC.UI.ViewModels { - public class MainViewVM : ViewModel + public class MainViewVM : PPCViewModel { - public String Test { get; set; } - - public MainViewVM(IPPCApplicationManager application) + public override void OnApplicationStarted() { - Test = "This is a binding test"; + } } } -- cgit v1.3.1