aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-06 18:39:17 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-06 18:39:17 +0300
commitcff4a8079c4d352cfd47793c701650e62337ed6e (patch)
treeaf145431e541f08ed99b1d3ae377d8a59faedc4f /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
parent776d934a1adc8c58301e56f6639afdeeccb0dda6 (diff)
downloadTango-cff4a8079c4d352cfd47793c701650e62337ed6e.tar.gz
Tango-cff4a8079c4d352cfd47793c701650e62337ed6e.zip
Working on PPC..
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs31
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs5
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs12
3 files changed, 23 insertions, 25 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()
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";
+
}
}
}