diff --git a/Borepin/Borepin.Android/Borepin.Android.csproj b/Borepin/Borepin.Android/Borepin.Android.csproj
index faed791..a6f3713 100644
--- a/Borepin/Borepin.Android/Borepin.Android.csproj
+++ b/Borepin/Borepin.Android/Borepin.Android.csproj
@@ -1,4 +1,4 @@
-
+
Debug
@@ -78,6 +78,7 @@
+
@@ -188,4 +189,4 @@
-
+
\ No newline at end of file
diff --git a/Borepin/Borepin.Android/PlatformInitializer.cs b/Borepin/Borepin.Android/PlatformInitializer.cs
index 3ef5cd9..7d8bdc6 100644
--- a/Borepin/Borepin.Android/PlatformInitializer.cs
+++ b/Borepin/Borepin.Android/PlatformInitializer.cs
@@ -1,5 +1,6 @@
using Borepin.Droid.Services;
using Borepin.Service.Storage;
+using Borepin.Service.Versioning;
using Prism;
using Prism.Ioc;
@@ -11,6 +12,7 @@ namespace Borepin.Droid
{
containerRegistry.Register();
containerRegistry.Register();
+ containerRegistry.Register();
}
}
}
\ No newline at end of file
diff --git a/Borepin/Borepin.Android/Services/VersioningService.cs b/Borepin/Borepin.Android/Services/VersioningService.cs
new file mode 100644
index 0000000..17f2262
--- /dev/null
+++ b/Borepin/Borepin.Android/Services/VersioningService.cs
@@ -0,0 +1,30 @@
+using Borepin.Service.Versioning;
+using Xamarin.Essentials;
+
+namespace Borepin.Droid.Services
+{
+ public class VersioningService : IVersioningService
+ {
+ #region Constructors
+ public VersioningService()
+ {
+ VersionTracking.Track();
+ }
+ #endregion
+ public string CurrentBuild
+ {
+ get
+ {
+ return VersionTracking.CurrentBuild;
+ }
+ }
+
+ public string CurrentVersion
+ {
+ get
+ {
+ return VersionTracking.CurrentVersion;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Borepin/Borepin.UWP/Borepin.UWP.csproj b/Borepin/Borepin.UWP/Borepin.UWP.csproj
index ee66686..e344410 100644
--- a/Borepin/Borepin.UWP/Borepin.UWP.csproj
+++ b/Borepin/Borepin.UWP/Borepin.UWP.csproj
@@ -100,6 +100,7 @@
+
diff --git a/Borepin/Borepin.UWP/PlatformInitializer.cs b/Borepin/Borepin.UWP/PlatformInitializer.cs
index f82af1b..08027a6 100644
--- a/Borepin/Borepin.UWP/PlatformInitializer.cs
+++ b/Borepin/Borepin.UWP/PlatformInitializer.cs
@@ -2,6 +2,7 @@
using Prism;
using Prism.Ioc;
using Borepin.Service.Storage;
+using Borepin.Service.Versioning;
namespace Borepin.UWP
{
@@ -11,6 +12,7 @@ namespace Borepin.UWP
{
containerRegistry.Register();
containerRegistry.Register();
+ containerRegistry.Register();
}
}
}
diff --git a/Borepin/Borepin.UWP/Services/VersioningService.cs b/Borepin/Borepin.UWP/Services/VersioningService.cs
new file mode 100644
index 0000000..1205e72
--- /dev/null
+++ b/Borepin/Borepin.UWP/Services/VersioningService.cs
@@ -0,0 +1,30 @@
+using Borepin.Service.Versioning;
+using Xamarin.Essentials;
+
+namespace Borepin.UWP.Services
+{
+ public class VersioningService : IVersioningService
+ {
+ #region Constructors
+ public VersioningService()
+ {
+ VersionTracking.Track();
+ }
+ #endregion
+ public string CurrentBuild
+ {
+ get
+ {
+ return VersionTracking.CurrentBuild;
+ }
+ }
+
+ public string CurrentVersion
+ {
+ get
+ {
+ return VersionTracking.CurrentVersion;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Borepin/Borepin.iOS/Borepin.iOS.csproj b/Borepin/Borepin.iOS/Borepin.iOS.csproj
index 3d1f129..c42d85e 100644
--- a/Borepin/Borepin.iOS/Borepin.iOS.csproj
+++ b/Borepin/Borepin.iOS/Borepin.iOS.csproj
@@ -82,6 +82,7 @@
+
diff --git a/Borepin/Borepin.iOS/PlatformInitializer.cs b/Borepin/Borepin.iOS/PlatformInitializer.cs
index 21dfdbc..ff22291 100644
--- a/Borepin/Borepin.iOS/PlatformInitializer.cs
+++ b/Borepin/Borepin.iOS/PlatformInitializer.cs
@@ -1,5 +1,6 @@
using Borepin.iOS.Services;
using Borepin.Service.Storage;
+using Borepin.Service.Versioning;
using Prism;
using Prism.Ioc;
@@ -11,6 +12,7 @@ namespace Borepin.iOS
{
containerRegistry.Register();
containerRegistry.Register();
+ containerRegistry.Register();
}
}
}
\ No newline at end of file
diff --git a/Borepin/Borepin.iOS/Services/VersioningService.cs b/Borepin/Borepin.iOS/Services/VersioningService.cs
new file mode 100644
index 0000000..38411e1
--- /dev/null
+++ b/Borepin/Borepin.iOS/Services/VersioningService.cs
@@ -0,0 +1,30 @@
+using Borepin.Service.Versioning;
+using Xamarin.Essentials;
+
+namespace Borepin.iOS.Services
+{
+ public class VersioningService : IVersioningService
+ {
+ #region Constructors
+ public VersioningService()
+ {
+ VersionTracking.Track();
+ }
+ #endregion
+ public string CurrentBuild
+ {
+ get
+ {
+ return VersionTracking.CurrentBuild;
+ }
+ }
+
+ public string CurrentVersion
+ {
+ get
+ {
+ return VersionTracking.CurrentVersion;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Borepin/Borepin/Page/MainPage.xaml b/Borepin/Borepin/Page/MainPage.xaml
index b39d289..fe7da81 100644
--- a/Borepin/Borepin/Page/MainPage.xaml
+++ b/Borepin/Borepin/Page/MainPage.xaml
@@ -4,10 +4,16 @@
x:Class="Borepin.Page.MainPage"
Title="MainPage">
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/Borepin/Borepin/PageModel/MainPageModel.cs b/Borepin/Borepin/PageModel/MainPageModel.cs
index f05e43e..36afcd8 100644
--- a/Borepin/Borepin/PageModel/MainPageModel.cs
+++ b/Borepin/Borepin/PageModel/MainPageModel.cs
@@ -2,6 +2,7 @@
using System.Threading.Tasks;
using System.Windows.Input;
using Borepin.Base;
+using Borepin.Service.Versioning;
using Prism.Navigation;
using Xamarin.Forms;
@@ -9,9 +10,15 @@ namespace Borepin.PageModel
{
public class MainPageModel : PageModelBase
{
+ #region Private Members
+ private readonly IVersioningService _VersioningService;
+ #endregion
+
#region Constructors
- public MainPageModel(INavigationService navigationService) : base(navigationService)
+ public MainPageModel(INavigationService navigationService, IVersioningService versioningService) : base(navigationService)
{
+ _VersioningService = versioningService;
+
NavigateCommand = new Command(NavigateCommandExecute);
}
#endregion
@@ -19,10 +26,29 @@ namespace Borepin.PageModel
#region LoadData
public override Task LoadData()
{
+ CurrentVersion = _VersioningService.CurrentVersion;
+ CurrentBuild = _VersioningService.CurrentBuild;
+
return Task.CompletedTask;
}
#endregion
+ #region Fields
+ private string _CurrentVersion;
+ public string CurrentVersion
+ {
+ get => _CurrentVersion;
+ set => SetProperty(ref _CurrentVersion, value);
+ }
+
+ private string _CurrentBuild;
+ public string CurrentBuild
+ {
+ get => _CurrentBuild;
+ set => SetProperty(ref _CurrentBuild, value);
+ }
+ #endregion
+
#region Commands
private ICommand _NavigationCommand;
public ICommand NavigateCommand
@@ -42,9 +68,9 @@ namespace Borepin.PageModel
}
- public override void OnNavigatedTo(INavigationParameters parameters)
+ public override async void OnNavigatedTo(INavigationParameters parameters)
{
-
+ await LoadData().ConfigureAwait(false);
}
#endregion
}
diff --git a/Borepin/Borepin/Service/Versioning/IVersioningService.cs b/Borepin/Borepin/Service/Versioning/IVersioningService.cs
new file mode 100644
index 0000000..fdc36f3
--- /dev/null
+++ b/Borepin/Borepin/Service/Versioning/IVersioningService.cs
@@ -0,0 +1,8 @@
+namespace Borepin.Service.Versioning
+{
+ public interface IVersioningService
+ {
+ string CurrentBuild { get; }
+ string CurrentVersion { get; }
+ }
+}