diff --git a/Borepin/Borepin/App.xaml b/Borepin/Borepin/App.xaml
index 774ad16..9dc13c6 100644
--- a/Borepin/Borepin/App.xaml
+++ b/Borepin/Borepin/App.xaml
@@ -7,10 +7,6 @@
mc:Ignorable="d"
x:Class="Borepin.App">
- #FF00D4AA
- #FF3C474D
- #FF333333
- #FF555555
- #FFCCCCCC
+
\ No newline at end of file
diff --git a/Borepin/Borepin/App.xaml.cs b/Borepin/Borepin/App.xaml.cs
index e7b225f..9ae10de 100644
--- a/Borepin/Borepin/App.xaml.cs
+++ b/Borepin/Borepin/App.xaml.cs
@@ -28,10 +28,10 @@ namespace Borepin
protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.RegisterForNavigation();
- containerRegistry.RegisterForNavigation(nameof(TabbedPage));
- containerRegistry.RegisterForNavigation();
- containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
}
}
}
diff --git a/Borepin/Borepin/Borepin.csproj b/Borepin/Borepin/Borepin.csproj
index 86251a8..3467af8 100644
--- a/Borepin/Borepin/Borepin.csproj
+++ b/Borepin/Borepin/Borepin.csproj
@@ -46,6 +46,9 @@
+
+ MSBuild:UpdateDesignTimeXaml
+
MSBuild:UpdateDesignTimeXaml
diff --git a/Borepin/Borepin/Model/Machine.cs b/Borepin/Borepin/Model/Machine.cs
new file mode 100644
index 0000000..9860bc3
--- /dev/null
+++ b/Borepin/Borepin/Model/Machine.cs
@@ -0,0 +1,35 @@
+using Prism.Mvvm;
+
+namespace Borepin.Model
+{
+ public class Machine : BindableBase
+ {
+ private string _ID;
+ public string ID
+ {
+ get => _ID;
+ set => SetProperty(ref _ID, value);
+ }
+
+ private string _State;
+ public string State
+ {
+ get => _State;
+ set => SetProperty(ref _State, value);
+ }
+
+ private string _Description;
+ public string Description
+ {
+ get => _Description;
+ set => SetProperty(ref _Description, value);
+ }
+
+ private string _User;
+ public string User
+ {
+ get => _User;
+ set => SetProperty(ref _User, value);
+ }
+ }
+}
diff --git a/Borepin/Borepin/Page/MachinePage.xaml b/Borepin/Borepin/Page/MachinePage.xaml
new file mode 100644
index 0000000..fd6a1c2
--- /dev/null
+++ b/Borepin/Borepin/Page/MachinePage.xaml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/MachinePage.xaml.cs b/Borepin/Borepin/Page/MachinePage.xaml.cs
new file mode 100644
index 0000000..fe09902
--- /dev/null
+++ b/Borepin/Borepin/Page/MachinePage.xaml.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+using Xamarin.Forms;
+using Xamarin.Forms.Xaml;
+
+namespace Borepin.Page
+{
+ [XamlCompilation(XamlCompilationOptions.Compile)]
+ public partial class MachinePage : ContentPage
+ {
+ public MachinePage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/MachinesPage.xaml b/Borepin/Borepin/Page/MachinesPage.xaml
index 984db10..0a07ddc 100644
--- a/Borepin/Borepin/Page/MachinesPage.xaml
+++ b/Borepin/Borepin/Page/MachinesPage.xaml
@@ -5,9 +5,18 @@
Title="Machines">
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Borepin/Borepin/PageModel/MachinePageModel.cs b/Borepin/Borepin/PageModel/MachinePageModel.cs
new file mode 100644
index 0000000..c3608da
--- /dev/null
+++ b/Borepin/Borepin/PageModel/MachinePageModel.cs
@@ -0,0 +1,35 @@
+using Borepin.Model;
+using Prism.Mvvm;
+using Prism.Navigation;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Input;
+using Xamarin.Forms;
+
+namespace Borepin.PageModel
+{
+ public class MachinePageModel : BindableBase
+ {
+ private INavigationService _NavigationService;
+
+ public MachinePageModel(string machineID, INavigationService navigationService)
+ {
+ _NavigationService = navigationService;
+
+ Machine = new Machine()
+ {
+ ID = machineID,
+ Description = "This is a Discription",
+ User = "Test User"
+ };
+ }
+
+ private Machine _Machine;
+ public Machine Machine
+ {
+ get => Machine;
+ set => SetProperty(ref _Machine, value);
+ }
+ }
+}
diff --git a/Borepin/Borepin/PageModel/MachinesPageModel.cs b/Borepin/Borepin/PageModel/MachinesPageModel.cs
new file mode 100644
index 0000000..beb780a
--- /dev/null
+++ b/Borepin/Borepin/PageModel/MachinesPageModel.cs
@@ -0,0 +1,57 @@
+using Borepin.Model;
+using Prism.Mvvm;
+using Prism.Navigation;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Text;
+using System.Windows.Input;
+using Xamarin.Forms;
+
+namespace Borepin.PageModel
+{
+ public class Employee
+ {
+ public string DisplayName { get; set; }
+ }
+
+ public class MachinesPageModel : BindableBase
+ {
+ private INavigationService _navigationService;
+
+ public MachinesPageModel(INavigationService navigationService)
+ {
+ _navigationService = navigationService;
+ GoToMachineCommand = new Command(GoToMachineCommandExecuted);
+
+ MachineList = new ObservableCollection();
+ MachineList.Add(new Machine() { ID = "Machine 1", State = "InUse" });
+ MachineList.Add(new Machine() { ID = "Machine 1", State = "InUse" });
+ MachineList.Add(new Machine() { ID = "Machine 1", State = "InUse" });
+ MachineList.Add(new Machine() { ID = "Machine 1", State = "InUse" });
+ }
+
+ private ICommand _GoToMachineCommand;
+ public ICommand GoToMachineCommand
+ {
+ get => _GoToMachineCommand;
+ set => SetProperty(ref _GoToMachineCommand, value);
+ }
+
+ private async void GoToMachineCommandExecuted(string machineID)
+ {
+ var result = await _navigationService.NavigateAsync($"NavigationPage/MachinePage/MachinePage?machineID={ machineID }");
+ if (!result.Success)
+ {
+ System.Diagnostics.Debugger.Break();
+ }
+ }
+
+ private ObservableCollection _MachineList;
+ public ObservableCollection MachineList
+ {
+ get => _MachineList;
+ set => SetProperty(ref _MachineList, value);
+ }
+ }
+}
diff --git a/Borepin/Borepin/PageModel/MainPagePageModel.cs b/Borepin/Borepin/PageModel/MainPagePageModel.cs
new file mode 100644
index 0000000..77063b4
--- /dev/null
+++ b/Borepin/Borepin/PageModel/MainPagePageModel.cs
@@ -0,0 +1,35 @@
+using Prism.Mvvm;
+using Prism.Navigation;
+using System.Windows.Input;
+using Xamarin.Forms;
+
+namespace Borepin.PageModel
+{
+ public class MainPagePageModel : BindableBase
+ {
+ private INavigationService _NavigationService;
+
+ public MainPagePageModel(INavigationService navigationService)
+ {
+ _NavigationService = navigationService;
+ NavigateCommand = new Command(NavigateCommandExecuted);
+ }
+
+ private ICommand _NavigationCommand;
+
+ public ICommand NavigateCommand
+ {
+ get => _NavigationCommand;
+ set => SetProperty(ref _NavigationCommand, value);
+ }
+
+ private async void NavigateCommandExecuted(string view)
+ {
+ var result = await _NavigationService.NavigateAsync($"NavigationPage/{view}");
+ if(!result.Success)
+ {
+ System.Diagnostics.Debugger.Break();
+ }
+ }
+ }
+}
diff --git a/Borepin/Borepin/PageModel/MainPageViewModel.cs b/Borepin/Borepin/PageModel/MainPageViewModel.cs
deleted file mode 100644
index b409502..0000000
--- a/Borepin/Borepin/PageModel/MainPageViewModel.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using Prism.Commands;
-using Prism.Mvvm;
-using Prism.Navigation;
-
-namespace Borepin.PageModel
-{
- public class MainPageViewModel : BindableBase
- {
- private INavigationService _navigationService { get; }
-
- public MainPageViewModel(INavigationService navigationService)
- {
- _navigationService = navigationService;
- NavigateCommand = new DelegateCommand(NavigateCommandExecuted);
- }
-
- public DelegateCommand NavigateCommand { get; }
-
- private async void NavigateCommandExecuted(string view)
- {
- var result = await _navigationService.NavigateAsync($"NavigationPage/{view}");
- if(!result.Success)
- {
- System.Diagnostics.Debugger.Break();
- }
- }
- }
-}
diff --git a/Borepin/Borepin/PageModel/MyTabbedPage.cs b/Borepin/Borepin/PageModel/MyTabbedPage.cs
deleted file mode 100644
index fab6b9c..0000000
--- a/Borepin/Borepin/PageModel/MyTabbedPage.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Xamarin.Forms;
-
-namespace Borepin.PageModel
-{
- public class MyTabbedPage : TabbedPage
- {
- public MyTabbedPage()
- {
- Title = "Tabbed Page";
- }
- }
-}