diff --git a/Borepin/Borepin.Android/MainActivity.cs b/Borepin/Borepin.Android/MainActivity.cs
index 60d2c0f..36ff798 100644
--- a/Borepin/Borepin.Android/MainActivity.cs
+++ b/Borepin/Borepin.Android/MainActivity.cs
@@ -2,6 +2,7 @@
using Android.App;
using Android.Content.PM;
using Android.OS;
+using AndroidX.AppCompat.App;
namespace Borepin.Droid
{
@@ -10,6 +11,8 @@ namespace Borepin.Droid
{
protected override void OnCreate(Bundle savedInstanceState)
{
+ AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo;
+
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
diff --git a/Borepin/Borepin.UWP/App.xaml b/Borepin/Borepin.UWP/App.xaml
index f6da795..4048647 100644
--- a/Borepin/Borepin.UWP/App.xaml
+++ b/Borepin/Borepin.UWP/App.xaml
@@ -2,6 +2,5 @@
x:Class="Borepin.UWP.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="using:Borepin.UWP">
-
+ xmlns:local="using:Borepin.UWP" RequestedTheme="Light">
diff --git a/Borepin/Borepin.iOS/Borepin.iOS.csproj b/Borepin/Borepin.iOS/Borepin.iOS.csproj
index dc82457..9b2c35b 100644
--- a/Borepin/Borepin.iOS/Borepin.iOS.csproj
+++ b/Borepin/Borepin.iOS/Borepin.iOS.csproj
@@ -1,4 +1,4 @@
-
+
true
@@ -193,4 +193,8 @@
-
\ No newline at end of file
+
+
+
+
+
diff --git a/Borepin/Borepin.iOS/Info.plist b/Borepin/Borepin.iOS/Info.plist
index b464cc1..7ba1bb6 100644
--- a/Borepin/Borepin.iOS/Info.plist
+++ b/Borepin/Borepin.iOS/Info.plist
@@ -40,5 +40,7 @@
NFCReaderUsageDescription
FabAccess needs to be able to read your card for authentication with the server.
+ UIUserInterfaceStyle
+ Light
diff --git a/Borepin/Borepin/App.xaml.cs b/Borepin/Borepin/App.xaml.cs
index 6514feb..09f5c74 100644
--- a/Borepin/Borepin/App.xaml.cs
+++ b/Borepin/Borepin/App.xaml.cs
@@ -45,6 +45,7 @@ namespace Borepin
containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation();
+ containerRegistry.RegisterForNavigation();
containerRegistry.RegisterForNavigation("SetUpProcess_WelcomePage");
containerRegistry.RegisterForNavigation("SetUpProcess_ScanPage");
diff --git a/Borepin/Borepin/Borepin.csproj b/Borepin/Borepin/Borepin.csproj
index f729d47..71862f2 100644
--- a/Borepin/Borepin/Borepin.csproj
+++ b/Borepin/Borepin/Borepin.csproj
@@ -68,6 +68,9 @@
MSBuild:UpdateDesignTimeXaml
+
+ MSBuild:UpdateDesignTimeXaml
+
MSBuild:UpdateDesignTimeXaml
@@ -98,6 +101,9 @@
MSBuild:UpdateDesignTimeXaml
+
+ MSBuild:UpdateDesignTimeXaml
+
ResXFileCodeGenerator
Resources.Designer.cs
@@ -109,6 +115,12 @@
MSBuild:UpdateDesignTimeXaml
+
+ MSBuild:UpdateDesignTimeXaml
+
+
+ MSBuild:UpdateDesignTimeXaml
+
MSBuild:UpdateDesignTimeXaml
diff --git a/Borepin/Borepin/Model/MachineVisualize.cs b/Borepin/Borepin/Model/MachineVisualize.cs
index ef37065..05a1743 100644
--- a/Borepin/Borepin/Model/MachineVisualize.cs
+++ b/Borepin/Borepin/Model/MachineVisualize.cs
@@ -29,12 +29,12 @@ namespace Borepin.Model
State = _Machine.State;
Manager = new UserVisualize(_Machine.Manager);
- CanUse = _Machine.Use != null;
- CanInUse = _Machine.Inuse != null;
- CanTransfer = _Machine.Transfer != null;
- CanCheck = _Machine.Check != null;
- CanManage = _Machine.Manage != null;
- CanAdmin = _Machine.Admin != null;
+ CanUse = !((UseInterface_Proxy)_Machine.Use).IsNull;
+ CanInUse = !((InUseInterface_Proxy) _Machine.Inuse).IsNull;
+ CanTransfer = !((TransferInterface_Proxy) _Machine.Transfer).IsNull;
+ CanCheck = !((CheckInterface_Proxy) _Machine.Check).IsNull;
+ CanManage = !((ManageInterface_Proxy) _Machine.Manage).IsNull;
+ CanAdmin = !((AdminInterface_Proxy) _Machine.Admin).IsNull;
}
#endregion
diff --git a/Borepin/Borepin/Page/ListPage.xaml b/Borepin/Borepin/Page/ListPage.xaml
new file mode 100644
index 0000000..b649e6b
--- /dev/null
+++ b/Borepin/Borepin/Page/ListPage.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/ListPage.xaml.cs b/Borepin/Borepin/Page/ListPage.xaml.cs
new file mode 100644
index 0000000..4f57114
--- /dev/null
+++ b/Borepin/Borepin/Page/ListPage.xaml.cs
@@ -0,0 +1,15 @@
+
+using Xamarin.Forms;
+using Xamarin.Forms.Xaml;
+
+namespace Borepin.Page
+{
+ [XamlCompilation(XamlCompilationOptions.Compile)]
+ public partial class ListPage : ContentPage
+ {
+ public ListPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/SetUpProcess/ScanPage.xaml b/Borepin/Borepin/Page/SetUpProcess/ScanPage.xaml
index a87a52e..4a60546 100644
--- a/Borepin/Borepin/Page/SetUpProcess/ScanPage.xaml
+++ b/Borepin/Borepin/Page/SetUpProcess/ScanPage.xaml
@@ -3,26 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Page.SetUpProcess.ScanPage"
xmlns:i18n="clr-namespace:Borepin.Helpers"
- xmlns:views="clr-namespace:Borepin.View"
- xmlns:converters="clr-namespace:Borepin.Converter">
-
-
-
-
-
-
-
-
+ xmlns:views="clr-namespace:Borepin.View">
-
-
-
-
-
+
+
-
+
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/TestPage.xaml b/Borepin/Borepin/Page/TestPage.xaml
new file mode 100644
index 0000000..8018b7d
--- /dev/null
+++ b/Borepin/Borepin/Page/TestPage.xaml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/TestPage.xaml.cs b/Borepin/Borepin/Page/TestPage.xaml.cs
new file mode 100644
index 0000000..b78f7d1
--- /dev/null
+++ b/Borepin/Borepin/Page/TestPage.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 TestPage : ContentPage
+ {
+ public TestPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Borepin/Borepin/PageModel/AddServerProcess/HostSelectPageModel.cs b/Borepin/Borepin/PageModel/AddServerProcess/HostSelectPageModel.cs
index aa96d05..c664418 100644
--- a/Borepin/Borepin/PageModel/AddServerProcess/HostSelectPageModel.cs
+++ b/Borepin/Borepin/PageModel/AddServerProcess/HostSelectPageModel.cs
@@ -31,12 +31,11 @@ namespace Borepin.PageModel.AddServerProcess
#endregion
#region LoadData
- public override async Task LoadData()
+ public override Task LoadData()
{
- IsBusy = true;
-
IsBusy = false;
- await Task.CompletedTask;
+
+ return Task.CompletedTask;
}
#endregion
@@ -125,8 +124,7 @@ namespace Borepin.PageModel.AddServerProcess
public override void OnNavigatedTo(INavigationParameters parameters)
{
- IsBusy = true;
- Task.Run(LoadData);
+
}
#endregion
}
diff --git a/Borepin/Borepin/PageModel/AddServerProcess/LoginChoosePageModel.cs b/Borepin/Borepin/PageModel/AddServerProcess/LoginChoosePageModel.cs
index 100f0d8..367750c 100644
--- a/Borepin/Borepin/PageModel/AddServerProcess/LoginChoosePageModel.cs
+++ b/Borepin/Borepin/PageModel/AddServerProcess/LoginChoosePageModel.cs
@@ -16,12 +16,11 @@ namespace Borepin.PageModel.AddServerProcess
#endregion
#region LoadData
- public override async Task LoadData()
+ public override Task LoadData()
{
- IsBusy = true;
-
IsBusy = false;
- await Task.CompletedTask;
+
+ return Task.CompletedTask;
}
#endregion
@@ -51,8 +50,7 @@ namespace Borepin.PageModel.AddServerProcess
public override void OnNavigatedTo(INavigationParameters parameters)
{
- IsBusy = true;
- Task.Run(LoadData);
+ IsBusy = false;
}
#endregion
}
diff --git a/Borepin/Borepin/PageModel/AddServerProcess/LoginPasswordPageModel.cs b/Borepin/Borepin/PageModel/AddServerProcess/LoginPasswordPageModel.cs
index 76d1502..77f8b9d 100644
--- a/Borepin/Borepin/PageModel/AddServerProcess/LoginPasswordPageModel.cs
+++ b/Borepin/Borepin/PageModel/AddServerProcess/LoginPasswordPageModel.cs
@@ -4,6 +4,7 @@ using Borepin.Service.BFFH;
using Borepin.Service.Connections;
using Prism.Commands;
using Prism.Navigation;
+using Prism.Services;
using System;
using System.Threading.Tasks;
using System.Windows.Input;
@@ -15,13 +16,16 @@ namespace Borepin.PageModel.AddServerProcess
#region Private Properties
private readonly IBFFHService _BFFHService;
private readonly IConnectionService _ConnectionService;
+ private readonly IPageDialogService _PageDialogService;
#endregion
#region Constructors
- public LoginPasswordPageModel(INavigationService navigationService, IBFFHService bffhService, IConnectionService connectionService) : base(navigationService)
+ public LoginPasswordPageModel(INavigationService navigationService, IBFFHService bffhService, IConnectionService connectionService, IPageDialogService pageDialogService) : base(navigationService)
{
_BFFHService = bffhService;
_ConnectionService = connectionService;
+ _PageDialogService = pageDialogService;
+
AuthenticateCommand = new DelegateCommand(async () => await AuthenticateCommandExecuted());
@@ -30,12 +34,11 @@ namespace Borepin.PageModel.AddServerProcess
#endregion
#region LoadData
- public override async Task LoadData()
+ public override Task LoadData()
{
- IsBusy = true;
-
IsBusy = false;
- await Task.CompletedTask;
+
+ return Task.CompletedTask;
}
#endregion
@@ -65,11 +68,19 @@ namespace Borepin.PageModel.AddServerProcess
private async Task AuthenticateCommandExecuted()
{
+ IsBusy = true;
+
Connection connection_update = _BFFHService.ActiveConnection;
connection_update.Username = Username;
- await _BFFHService.Authenticate(connection_update, Password).ConfigureAwait(false);
+ if(!await _BFFHService.Authenticate(connection_update, Password))
+ {
+ await _PageDialogService.DisplayAlertAsync("Connection failed", "Unable to authenticate to server.", "Ok");
+
+ IsBusy = false;
+ return;
+ }
try
{
@@ -77,7 +88,7 @@ namespace Borepin.PageModel.AddServerProcess
}
catch (ArgumentException)
{
-
+ // Could be better catched
}
await _ConnectionService.LogConnect(_BFFHService.ActiveConnection);
@@ -99,8 +110,7 @@ namespace Borepin.PageModel.AddServerProcess
public override void OnNavigatedTo(INavigationParameters parameters)
{
- IsBusy = true;
- Task.Run(LoadData);
+
}
#endregion
}
diff --git a/Borepin/Borepin/PageModel/ListPageModel.cs b/Borepin/Borepin/PageModel/ListPageModel.cs
new file mode 100644
index 0000000..f34f149
--- /dev/null
+++ b/Borepin/Borepin/PageModel/ListPageModel.cs
@@ -0,0 +1,57 @@
+using Borepin.Model;
+using Borepin.ViewModel;
+using Prism.Mvvm;
+using System.Collections.Generic;
+using System.Windows.Input;
+using Xamarin.Forms;
+
+namespace Borepin.PageModel
+{
+ public class ListPageModel : BindableBase
+ {
+ public ListPageModel()
+ {
+ ListItemViewModel_List = new List()
+ {
+ new ListItemViewModel(
+ new ListItem()
+ {
+ Value1 = "ListItem 1"
+ }),
+
+ new ListItemViewModel(
+ new ListItem()
+ {
+ Value1 = "ListItem 2"
+ }),
+
+ new ListItemViewModel(
+ new ListItem()
+ {
+ Value1 = "ListItem 3"
+ }),
+ };
+
+ SelectListItemCommand = new Command