sharee.bike-App/LastenradBayern/TINK/View/Settings/SettingsPage.xaml

233 lines
15 KiB
Text
Raw Normal View History

2021-11-07 19:42:59 +01:00
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.Settings.SettingsPage"
2022-05-15 19:56:03 +02:00
xmlns:conv="clr-namespace:TINK.View.Settings;assembly=TINKLib"
xmlns:account="clr-namespace:TINK.Model.User.Account;assembly=TINKLib"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib">
2021-11-07 19:42:59 +01:00
<ContentPage.Resources>
2022-05-15 19:56:03 +02:00
<conv:BackendPermissionsToVisibleConverter x:Key="Frame_Converter"/>
<conv:PermissionToVisibleConverter x:Key="SwitchTheme_Converter" VisibleFlag="{x:Static account:Permissions.SwitchTheme}"/>
<conv:PermissionToVisibleConverter x:Key="PickCopriServer_Converter" VisibleFlag="{x:Static account:Permissions.PickCopriServer}"/>
<conv:PermissionToVisibleConverter x:Key="ManagePolling_Converter" VisibleFlag="{x:Static account:Permissions.ManagePolling}"/>
<conv:PermissionToVisibleConverter x:Key="ManageCopriCacheExpiration_Converter" VisibleFlag="{x:Static account:Permissions.ManageCopriCacheExpiration}"/>
<conv:PermissionToVisibleConverter x:Key="PickLockServiceImplementation_Converter" VisibleFlag="{x:Static account:Permissions.PickLockServiceImplementation}"/>
<conv:PermissionToVisibleConverter x:Key="PickLocationServiceImplementation_Converter" VisibleFlag="{x:Static account:Permissions.PickLocationServiceImplementation}"/>
<conv:PermissionToVisibleConverter x:Key="PickLoggingLevel_Converter" VisibleFlag="{x:Static account:Permissions.PickLoggingLevel}"/>
<conv:PermissionToVisibleConverter x:Key="ReportLevel_Converter" VisibleFlag="{x:Static account:Permissions.ReportLevel}"/>
<conv:PermissionToVisibleConverter x:Key="ShowDiagnostics_Converter" VisibleFlag="{x:Static account:Permissions.ShowDiagnostics}"/>
<conv:PermissionToVisibleConverter x:Key="SwitchSiteCaching_Converter" VisibleFlag="{x:Static account:Permissions.SwitchNoSiteCaching}"/>
2021-11-07 19:42:59 +01:00
</ContentPage.Resources>
<ContentPage.Content>
<ScrollView>
<Frame>
<StackLayout>
<!--
<Button Text="Feedback" Clicked="OnFeedbackClickedAsync"/>
-->
<Frame>
<StackLayout>
2022-05-15 19:56:03 +02:00
<Label Text="{x:Static resources:AppResources.MarkingCenterMapToCurrentPos}"/>
2021-11-07 19:42:59 +01:00
<Switch IsToggled="{Binding CenterMapToCurrentLocation}"/>
</StackLayout>
</Frame>
<!-- Filter on view TINK/ Konrad -->
<Frame IsVisible="{Binding IsGroupFilterVisible}">
<StackLayout>
2022-05-15 19:56:03 +02:00
<Label Text="{x:Static resources:AppResources.MarkingShowHideBikesOfType}"/>
2021-11-07 19:42:59 +01:00
<ListView
HasUnevenRows="True"
HeightRequest="120"
x:Name="Filters">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell IsEnabled="{Binding IsEnabled}">
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Text}"/>
<Switch IsToggled="{Binding IsActivated}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</Frame>
<Frame
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchTheme_Converter}}">
2021-11-07 19:42:59 +01:00
<StackLayout>
<!-- Themes -->
<Label
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchTheme_Converter}}"
2021-11-07 19:42:59 +01:00
Text="Theme"/>
<Picker
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchTheme_Converter}}"
2021-11-07 19:42:59 +01:00
ItemsSource="{Binding Themes.ServicesTextList}"
SelectedItem="{Binding Themes.ActiveText}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource Frame_Converter}}">
<!-- COPRI server selection -->
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickCopriServer_Converter}}"
Text="{Binding CopriServerUriList.CorpiServerUriDescription}"/>
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickCopriServer_Converter}}"
ItemsSource="{Binding CopriServerUriList.ServerTextList}"
SelectedItem="{Binding CopriServerUriList.NextActiveServerText}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
Text="{Binding Polling.PollingText}"/>
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
IsToggled="{Binding Polling.IsActivated}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
Text="{Binding Polling.PeriodeTotalSecondsText}"/>
<Stepper
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
Minimum="5"
Increment="5"
Maximum="600"
IsEnabled="{Binding Polling.IsActivated}"
Value="{Binding Polling.PeriodeTotalSeconds}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ManageCopriCacheExpiration_Converter}}"
Text="Time after which COPRI-cache expires [s]"/>
<Slider
IsVisible="{Binding DebugLevel, Converter={StaticResource ManageCopriCacheExpiration_Converter}}"
x:Name="expiresAfter"
Minimum="0"
Maximum="15"
Value="{Binding ExpiresAfterTotalSeconds}"/>
<Entry
IsVisible="{Binding DebugLevel, Converter={StaticResource ManageCopriCacheExpiration_Converter}}"
IsReadOnly="True"
Text="{Binding ExpiresAfterTotalSecondsText}"/>
</StackLayout>
</Frame>
<Frame
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}">
2021-11-07 19:42:59 +01:00
<!-- Lock control -->
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
2022-05-15 19:56:03 +02:00
Text="{x:Static resources:AppResources.MarkingLockControl}" />
2021-11-07 19:42:59 +01:00
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
ItemsSource="{Binding LocksServices.Services.ServicesTextList}"
SelectedItem="{Binding LocksServices.Services.ActiveText}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
Text="Bluetooth Connect Timeout [sec]"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
Text="{Binding LocksServices.ConnectTimeoutSecText}"/>
<Stepper
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
Minimum="0.1"
Increment="0.25"
Maximum="60"
Value="{Binding LocksServices.ConnectTimeoutSec}"/>
</StackLayout>
</Frame>
<Frame
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLocationServiceImplementation_Converter}}">
2021-11-07 19:42:59 +01:00
<!-- Geolocation -->
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLocationServiceImplementation_Converter}}"
2022-05-15 19:56:03 +02:00
Text="{x:Static resources:AppResources.MarkingGeolocationControl}" />
2021-11-07 19:42:59 +01:00
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLocationServiceImplementation_Converter}}"
ItemsSource="{Binding GeolocationServices.ServicesTextList}"
SelectedItem="{Binding GeolocationServices.ActiveText}"/>
</StackLayout>
</Frame>
<Frame
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchSiteCaching_Converter}}">
2021-11-07 19:42:59 +01:00
<!-- Web site caching -->
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchSiteCaching_Converter}}"
2022-05-15 19:56:03 +02:00
Text="{x:Static resources:AppResources.MarkingWebsiteCaching}"/>
2021-11-07 19:42:59 +01:00
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchSiteCaching_Converter}}"
IsToggled="{Binding IsSiteCachingOnDisplayValue}"/>
</StackLayout>
</Frame>
<Frame
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}">
2021-11-07 19:42:59 +01:00
<!-- Logging -->
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
2022-05-15 19:56:03 +02:00
Text="{x:Static resources:AppResources.MarkingLoggingLevel}" />
2021-11-07 19:42:59 +01:00
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
ItemsSource="{Binding LoggingLevels}"
SelectedItem="{Binding SelectedLoggingLevel}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
Text="Logdatei in externen Pfad schreiben"/>
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
IsToggled="{Binding LogToExternalFolderDisplayValue}"
IsEnabled="{Binding IsLogToExternalFolderVisible}"/>
</StackLayout>
</Frame>
<Frame
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource ReportLevel_Converter}}">
2021-11-07 19:42:59 +01:00
<!-- Logging -->
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ReportLevel_Converter}}"
2022-05-15 19:56:03 +02:00
Text="{x:Static resources:AppResources.MarkingVerboseErrorMessage}" />
2021-11-07 19:42:59 +01:00
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource ReportLevel_Converter}}"
IsToggled="{Binding IsReportLevelVerbose}"/>
</StackLayout>
</Frame>
<Frame
2022-05-15 19:56:03 +02:00
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}">
2021-11-07 19:42:59 +01:00
<!-- Display of parameters -->
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Device Identifier" />
<Entry
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding DeviceIdentifier}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Copri Sitzungkeks"/>
<Entry
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding SessionCookie}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Interner Pfad (Einstell./ ggf. Logging)"/>
<Editor
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding InternalPath}"/>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Externer Pfad (Mock/ ggf. Logging)"/>
<Editor
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding ExternalPath}"/>
</StackLayout>
</Frame>
</StackLayout>
</Frame>
</ScrollView>
</ContentPage.Content>
</ContentPage>