mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-21 20:46:28 +02:00
Code updated to 3.0.238
This commit is contained in:
parent
3302d80678
commit
9c6a1fa92b
257 changed files with 7763 additions and 2861 deletions
|
@ -6,7 +6,7 @@ using System.ComponentModel;
|
|||
using System.Threading.Tasks;
|
||||
using TINK.Model;
|
||||
using TINK.Model.Connector;
|
||||
using TINK.Model.Repository.Exception;
|
||||
using TINK.Repository.Exception;
|
||||
using TINK.Model.Services.Geolocation;
|
||||
using TINK.Settings;
|
||||
using TINK.View;
|
||||
|
@ -16,6 +16,7 @@ using System.Linq;
|
|||
using TINK.Model.User.Account;
|
||||
using TINK.Services.BluetoothLock;
|
||||
using Xamarin.Forms;
|
||||
using TINK.Services;
|
||||
|
||||
namespace TINK.ViewModel
|
||||
{
|
||||
|
@ -51,12 +52,17 @@ namespace TINK.ViewModel
|
|||
/// </summary>
|
||||
private LogEventLevel m_oMinimumLogEventLevel;
|
||||
|
||||
/// <summary> Gets a value indicating whether reporting level is verbose or not.</summary>
|
||||
public bool IsReportLevelVerbose { get; set; }
|
||||
|
||||
/// <summary> List of copri server uris.</summary>
|
||||
public ServicesViewModel Themes { get; }
|
||||
|
||||
/// <summary> Reference on the tink app instance. </summary>
|
||||
private ITinkApp TinkApp { get; }
|
||||
|
||||
IServicesContainer<IGeolocation> GeoloctionServicesContainer { get; }
|
||||
|
||||
/// <summary> Constructs a settings page view model object.</summary>
|
||||
/// <param name="tinkApp"> Reference to tink app model.</param>
|
||||
/// <param name="p_oUser"></param>
|
||||
|
@ -69,16 +75,22 @@ namespace TINK.ViewModel
|
|||
/// <param name="p_oViewService">Interface to view</param>
|
||||
public SettingsPageViewModel(
|
||||
ITinkApp tinkApp,
|
||||
IServicesContainer<IGeolocation> geoloctionServicesContainer,
|
||||
IViewService p_oViewService)
|
||||
{
|
||||
TinkApp = tinkApp
|
||||
?? throw new ArgumentException("Can not instantiate settings page view model- object. No tink app object available.");
|
||||
|
||||
GeoloctionServicesContainer = geoloctionServicesContainer
|
||||
?? throw new ArgumentException($"Can not instantiate {nameof(SettingsPageViewModel)}- object. Geolocation services container object must not be null.");
|
||||
|
||||
m_oViewService = p_oViewService
|
||||
?? throw new ArgumentException("Can not instantiate settings page view model- object. No user view service available.");
|
||||
|
||||
m_oMinimumLogEventLevel = TinkApp.MinimumLogEventLevel;
|
||||
|
||||
IsReportLevelVerbose = TinkApp.IsReportLevelVerbose;
|
||||
|
||||
CenterMapToCurrentLocation = TinkApp.CenterMapToCurrentLocation;
|
||||
|
||||
ExternalFolder = TinkApp.ExternalFolder;
|
||||
|
@ -140,12 +152,12 @@ namespace TINK.ViewModel
|
|||
TinkApp.LocksServices.Active.GetType().FullName));
|
||||
|
||||
GeolocationServices = new ServicesViewModel(
|
||||
TinkApp.GeolocationServices.Select(x => x.GetType().FullName),
|
||||
GeoloctionServicesContainer.Select(x => x.GetType().FullName),
|
||||
new Dictionary<string, string> {
|
||||
{ typeof(LastKnownGeolocationService).FullName, "Smartdevice-LastKnowGeolocation" },
|
||||
{ typeof(GeolocationService).FullName, "Smartdevice-MediumAccuracy" },
|
||||
{ typeof(SimulatedGeolocationService).FullName, "Simulation-AlwaysSamePosition" } },
|
||||
TinkApp.GeolocationServices.Active.GetType().FullName);
|
||||
GeoloctionServicesContainer.Active.GetType().FullName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -212,7 +224,7 @@ namespace TINK.ViewModel
|
|||
/// </summary>
|
||||
public string DeviceIdentifier
|
||||
{
|
||||
get { return TinkApp.Device.GetIdentifier(); }
|
||||
get { return TinkApp.SmartDevice.Identifier; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -259,9 +271,11 @@ namespace TINK.ViewModel
|
|||
TinkApp.MinimumLogEventLevel = m_oMinimumLogEventLevel; // Update value to be serialized.
|
||||
TinkApp.UpdateLoggingLevel(m_oMinimumLogEventLevel); // Update logging server.
|
||||
|
||||
TinkApp.IsReportLevelVerbose = IsReportLevelVerbose;
|
||||
|
||||
TinkApp.LocksServices.SetActive(LocksServices.Services.Active);
|
||||
|
||||
TinkApp.GeolocationServices.SetActive(GeolocationServices.Active);
|
||||
GeoloctionServicesContainer.SetActive(GeolocationServices.Active);
|
||||
|
||||
TinkApp.LocksServices.SetTimeOut(TimeSpan.FromSeconds(LocksServices.ConnectTimeoutSec));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue