Version 3.0.290

This commit is contained in:
Oliver Hauff 2022-04-10 17:38:34 +02:00
parent af3c20ea1c
commit ad3cdbcadf
231 changed files with 14555 additions and 7798 deletions

View file

@ -7,7 +7,7 @@ using System.Threading.Tasks;
using TINK.Model;
using TINK.Model.Connector;
using TINK.Repository.Exception;
using TINK.Model.Services.Geolocation;
using TINK.Services.Geolocation;
using TINK.Settings;
using TINK.View;
using TINK.ViewModel.Map;
@ -65,18 +65,12 @@ namespace TINK.ViewModel
/// <summary> Constructs a settings page view model object.</summary>
/// <param name="tinkApp"> Reference to tink app model.</param>
/// <param name="p_oUser"></param>
/// <param name="p_oDevice"></param>
/// <param name="p_oFilterGroup">Filter to apply on stations and bikes.</param>
/// <param name="p_oUris">Available copri server host uris including uri to use for next start.</param>
/// <param name="p_oPolling"> Holds whether to poll or not and the periode leght is polling is on. </param>
/// <param name="p_oDefaultPollingPeriode">Default polling periode lenght.</param>
/// <param name="p_oMinimumLogEventLevel">Controls logging level.</param>
/// <param name="p_oViewService">Interface to view</param>
/// <param name="geoloctionServicesContainer"></param>
/// <param name="viewService">Interface to view</param>
public SettingsPageViewModel(
ITinkApp tinkApp,
IServicesContainer<IGeolocation> geoloctionServicesContainer,
IViewService p_oViewService)
IViewService viewService)
{
TinkApp = tinkApp
?? throw new ArgumentException("Can not instantiate settings page view model- object. No tink app object available.");
@ -84,7 +78,7 @@ namespace TINK.ViewModel
GeoloctionServicesContainer = geoloctionServicesContainer
?? throw new ArgumentException($"Can not instantiate {nameof(SettingsPageViewModel)}- object. Geolocation services container object must not be null.");
m_oViewService = p_oViewService
m_oViewService = viewService
?? throw new ArgumentException("Can not instantiate settings page view model- object. No user view service available.");
m_oMinimumLogEventLevel = TinkApp.MinimumLogEventLevel;
@ -155,8 +149,10 @@ namespace TINK.ViewModel
GeolocationServices = new ServicesViewModel(
GeoloctionServicesContainer.Select(x => x.GetType().FullName),
new Dictionary<string, string> {
{ typeof(LastKnownGeolocationService).FullName, "Smartdevice-LastKnowGeolocation" },
{ typeof(GeolocationService).FullName, "Smartdevice-MediumAccuracy" },
{ typeof(LastKnownGeolocationService).FullName, "LastKnowGeolocation" },
{ typeof(GeolocationAccuracyMediumService).FullName, "Medium Accuracy" },
{ typeof(GeolocationAccuracyHighService).FullName, "High Accuracy" },
{ typeof(GeolocationAccuracyBestService).FullName, "Best Accuracy" },
{ typeof(SimulatedGeolocationService).FullName, "Simulation-AlwaysSamePosition" } },
GeoloctionServicesContainer.Active.GetType().FullName);
}
@ -323,6 +319,9 @@ namespace TINK.ViewModel
}
}
/// <summary> Empty if no user is logged in session cookie otherwise. </summary>
public string SessionCookie => TinkApp.ActiveUser.IsLoggedIn ? TinkApp.ActiveUser.SessionCookie : "";
/// <summary>Polling periode.</summary>
public PollingViewModel Polling { get; }