Version 3.0.346

This commit is contained in:
Oliver Hauff 2022-10-17 18:45:38 +02:00
parent 1ba809dd59
commit 47c03f43fb
43 changed files with 609 additions and 117 deletions

View file

@ -0,0 +1,18 @@
using System.Collections.Generic;
using System.Linq;
namespace TINK.ViewModel.Settings
{
/// <summary> Manages data to be shown by a picker. </summary>
public class PickerViewModel : ServicesViewModel
{
/// <summary>Constructs view model ensuring consistency. </summary>
/// <param name="serviceToText"> Dictionary holding values and display text to mange and display by picker.</param>
/// <param name="active">Value of entry for which the display text has to be shown.</param>
public PickerViewModel(
IDictionary<string, string> serviceToText,
string active) : base(serviceToText.Select(x => x.Key), serviceToText, active)
{
}
}
}

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
@ -8,6 +8,7 @@ using Serilog.Events;
using TINK.Model;
using TINK.Model.Connector;
using TINK.Model.User.Account;
using TINK.MultilingualResources;
using TINK.Repository.Exception;
using TINK.Services;
using TINK.Services.BluetoothLock;
@ -44,6 +45,9 @@ namespace TINK.ViewModel
/// <summary> Manages selection of locks services.</summary>
public LocksServicesViewModel LocksServices { get; }
/// <summary>Settings determining the startup behavior of the app.</summary>
public ServicesViewModel StartupSettings { get; }
/// <summary> Manages selection of geolocation services.</summary>
public ServicesViewModel GeolocationServices { get; }
@ -155,6 +159,13 @@ namespace TINK.ViewModel
{ typeof(GeolocationAccuracyBestService).FullName, "Best Accuracy" },
{ typeof(SimulatedGeolocationService).FullName, "Simulation-AlwaysSamePosition" } },
GeoloctionServicesContainer.Active.GetType().FullName);
StartupSettings = new PickerViewModel(
new Dictionary<string, string> {
{ ViewTypes.MapPage.ToString(), AppResources.MarkingMapPage },
{ ViewTypes.FindBikePage.ToString(), AppResources.MarkingFindBike },
},
tinkApp.StartupSettings.StartupPage.ToString());
}
/// <summary>
@ -259,6 +270,8 @@ namespace TINK.ViewModel
TinkApp.GroupFilterMapPage,
TinkApp.ActiveUser.DoFilter(TinkApp.FilterGroupSetting.DoFilter()));
TinkApp.StartupSettings.StartupPage = Enum.TryParse(StartupSettings.Active, out ViewTypes startupPage) ? startupPage : Model.Settings.StartupSettings.DefaultStartupPage;
TinkApp.CenterMapToCurrentLocation = CenterMapToCurrentLocation;
if (IsLogToExternalFolderVisible)