mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-20 20:16:30 +02:00
Version 3.0.346
This commit is contained in:
parent
1ba809dd59
commit
47c03f43fb
43 changed files with 609 additions and 117 deletions
18
TINKLib/ViewModel/Settings/PickerViewModel.cs
Normal file
18
TINKLib/ViewModel/Settings/PickerViewModel.cs
Normal 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue