sharee.bike-App/LastenradBayern/TINK/View/Bike/ILockItBike.xaml

210 lines
11 KiB
Text
Raw Normal View History

2022-10-03 17:55:10 +02:00
<?xml version="1.0" encoding="UTF-8"?>
2021-11-07 19:42:59 +01:00
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:conv="clr-namespace:TINK.View"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
2022-08-30 15:42:25 +02:00
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
2021-11-07 19:42:59 +01:00
mc:Ignorable="d"
x:Class="TINK.View.Bike.ILockItBike">
<ContentView>
<ContentView.Resources>
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="Label_Converter"/>
</ContentView.Resources>
<StackLayout
Padding="10">
2022-06-17 14:17:58 +02:00
<!-- Name of the bike -->
2021-11-07 19:42:59 +01:00
<Label
FontAttributes="Bold"
FontSize="Large"
HorizontalTextAlignment="Center"
Text="{Binding Name}"/>
2022-06-17 14:17:58 +02:00
<!-- Id of the bike -->
2021-11-07 19:42:59 +01:00
<Label
FontAttributes="Bold"
HorizontalTextAlignment="Center"
IsVisible="{Binding DisplayId, Converter={StaticResource Label_Converter}}"
Text="{Binding DisplayId}"/>
2022-08-30 15:42:25 +02:00
<!-- Battery level -->
2022-10-03 17:55:10 +02:00
<sharedGui:BarLevelView
2022-08-30 15:42:25 +02:00
Current="{Binding CurrentChargeBars}"
Maximum="{Binding MaxChargeBars}"
2022-10-03 17:55:10 +02:00
IsVisible="{Binding IsBatteryChargeVisible}"/>
<!-- Rental state -->
2021-11-07 19:42:59 +01:00
<Label
Text="{Binding StateText}"
TextColor="{Binding StateColor}"/>
<Label
Text="{Binding ErrorText}"
IsVisible="{Binding ErrorText, Converter={StaticResource Label_Converter}}"
TextColor="Red"/>
2022-08-30 15:42:25 +02:00
<!-- Button for Reserve / End Reservation / Open / Close & End -->
2021-11-07 19:42:59 +01:00
<Button
Text="{Binding ButtonText}"
IsVisible="{Binding IsButtonVisible}"
IsEnabled="{Binding IsIdle}"
Command="{Binding OnButtonClicked}"/>
2022-08-30 15:42:25 +02:00
<!-- Button for Find Lock / Open & Rent / Close -->
2022-12-27 21:08:09 +01:00
<Button
2021-11-07 19:42:59 +01:00
Text="{Binding LockitButtonText}"
IsVisible="{Binding IsLockitButtonVisible}"
IsEnabled="{Binding IsIdle}"
Command="{Binding OnLockitButtonClicked}"/>
2022-12-27 21:08:09 +01:00
<!-- Copri Lock Label -->
2022-08-30 15:42:25 +02:00
<Label
Text="{x:Static resources:AppResources.StatusTextCopriLock}"
FontSize="Small"
IsVisible="{Binding IsBikeWithCopriLock}"/>
2023-05-11 17:39:28 +02:00
<!-- Rental description (tariff name, options and rental info -->
2021-11-07 19:42:59 +01:00
<Grid
2022-06-17 14:17:58 +02:00
RowSpacing="0"
2021-11-07 19:42:59 +01:00
IsVisible="{Binding TariffDescription.Header, Converter={StaticResource Label_Converter}}">
<Grid.RowDefinitions>
2023-05-11 17:39:28 +02:00
<!-- start tariff entries -->
2021-11-07 19:42:59 +01:00
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
2022-01-04 18:54:03 +01:00
<RowDefinition Height="Auto" />
2022-06-17 14:17:58 +02:00
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<!-- start rental info -->
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
2021-11-07 19:42:59 +01:00
</Grid.RowDefinitions>
2022-06-17 14:17:58 +02:00
2021-11-07 19:42:59 +01:00
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
2023-05-11 17:39:28 +02:00
<!-- start tariff entries (should be a CollectionView) -->
2022-04-10 17:38:34 +02:00
<Label
2022-06-17 14:17:58 +02:00
Text= "{x:Static resources:AppResources.MessageBikesManagementTariffDescriptionTariffHeader}"
IsVisible="{Binding TariffDescription.Header, Converter={StaticResource Label_Converter}}"
Grid.Row="0"
2022-04-10 17:38:34 +02:00
FontAttributes="Bold"/>
2021-11-07 19:42:59 +01:00
<Label
2022-06-17 14:17:58 +02:00
Text="{Binding TariffDescription.Header}"
IsVisible="{Binding TariffDescription.Header, Converter={StaticResource Label_Converter}}"
Grid.Row="0"
2022-04-10 17:38:34 +02:00
Grid.Column="1"
2021-11-07 19:42:59 +01:00
FontAttributes="Bold"/>
<Label
2022-06-17 14:17:58 +02:00
Text= "{Binding TariffDescription.TarifEntry1.Description}"
IsVisible="{Binding TariffDescription.TarifEntry1.Description, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="1"/>
<Label
2022-06-17 14:17:58 +02:00
Text="{Binding TariffDescription.TarifEntry1.Value}"
IsVisible="{Binding TariffDescription.TarifEntry1.Value, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="1"
Grid.Column="1"/>
<Label
2022-06-17 14:17:58 +02:00
Text= "{Binding TariffDescription.TarifEntry2.Description}"
IsVisible="{Binding TariffDescription.TarifEntry2.Description, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="2"/>
<Label
2022-06-17 14:17:58 +02:00
Text="{Binding TariffDescription.TarifEntry2.Value}"
IsVisible="{Binding TariffDescription.TarifEntry2.Value, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="2"
Grid.Column="1"/>
<Label
2022-06-17 14:17:58 +02:00
Text= "{Binding TariffDescription.TarifEntry3.Description}"
IsVisible="{Binding TariffDescription.TarifEntry3.Description, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="3"/>
<Label
2022-06-17 14:17:58 +02:00
Text="{Binding TariffDescription.TarifEntry3.Value}"
IsVisible="{Binding TariffDescription.TarifEntry3.Value, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="3"
Grid.Column="1"/>
<Label
2022-06-17 14:17:58 +02:00
Text= "{Binding TariffDescription.TarifEntry4.Description}"
IsVisible="{Binding TariffDescription.TarifEntry4.Description, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="4"/>
<Label
2022-06-17 14:17:58 +02:00
Text="{Binding TariffDescription.TarifEntry4.Value}"
IsVisible="{Binding TariffDescription.TarifEntry4.Value, Converter={StaticResource Label_Converter}}"
2021-11-07 19:42:59 +01:00
Grid.Row="4"
Grid.Column="1"/>
2022-06-17 14:17:58 +02:00
<Label
Text= "{Binding TariffDescription.TarifEntry5.Description}"
IsVisible="{Binding TariffDescription.TarifEntry5.Description, Converter={StaticResource Label_Converter}}"
Grid.Row="5"/>
<Label
Text="{Binding TariffDescription.TarifEntry5.Value}"
IsVisible="{Binding TariffDescription.TarifEntry5.Value, Converter={StaticResource Label_Converter}}"
Grid.Row="5"
Grid.Column="1"/>
<Label
Text= "{Binding TariffDescription.TarifEntry6.Description}"
IsVisible="{Binding TariffDescription.TarifEntry6.Description, Converter={StaticResource Label_Converter}}"
Grid.Row="6"/>
<Label
Text="{Binding TariffDescription.TarifEntry6.Value}"
IsVisible="{Binding TariffDescription.TarifEntry6.Value, Converter={StaticResource Label_Converter}}"
Grid.Row="6"
Grid.Column="1"/>
<Label
Text= "{Binding TariffDescription.TarifEntry7.Description}"
IsVisible="{Binding TariffDescription.TarifEntry7.Description, Converter={StaticResource Label_Converter}}"
Grid.Row="7"/>
<Label
Text="{Binding TariffDescription.TarifEntry7.Value}"
IsVisible="{Binding TariffDescription.TarifEntry7.Value, Converter={StaticResource Label_Converter}}"
Grid.Row="7"
Grid.Column="1"/>
<Label
Text= "{Binding TariffDescription.TarifEntry8.Description}"
IsVisible="{Binding TariffDescription.TarifEntry8.Description, Converter={StaticResource Label_Converter}}"
Grid.Row="8"/>
<Label
Text="{Binding TariffDescription.TarifEntry8.Value}"
IsVisible="{Binding TariffDescription.TarifEntry8.Value, Converter={StaticResource Label_Converter}}"
Grid.Row="8"
Grid.Column="1"/>
<Label
Text= "{Binding TariffDescription.TarifEntry9.Description}"
IsVisible="{Binding TariffDescription.TarifEntry9.Description, Converter={StaticResource Label_Converter}}"
Grid.Row="9"/>
<Label
Text="{Binding TariffDescription.TarifEntry9.Value}"
IsVisible="{Binding TariffDescription.TarifEntry9.Value, Converter={StaticResource Label_Converter}}"
Grid.Row="9"
Grid.Column="1"/>
2023-05-11 17:39:28 +02:00
<!-- start tariff entries (should be a CollectionView) -->
2022-06-17 14:17:58 +02:00
<Label
Text= "{Binding TariffDescription.InfoEntry1}"
IsVisible="{Binding TariffDescription.InfoEntry1, Converter={StaticResource Label_Converter}}"
Grid.Row="10"
Grid.ColumnSpan="2"/>
<Label
Text= "{Binding TariffDescription.InfoEntry2}"
IsVisible="{Binding TariffDescription.InfoEntry2, Converter={StaticResource Label_Converter}}"
Grid.Row="11"
Grid.ColumnSpan="2"/>
<Label
Text= "{Binding TariffDescription.InfoEntry3}"
IsVisible="{Binding TariffDescription.InfoEntry3, Converter={StaticResource Label_Converter}}"
Grid.Row="12"
Grid.ColumnSpan="2"/>
<Label
Text= "{Binding TariffDescription.InfoEntry4}"
IsVisible="{Binding TariffDescription.InfoEntry4, Converter={StaticResource Label_Converter}}"
Grid.Row="13"
Grid.ColumnSpan="2"/>
<Label
2023-02-22 14:03:35 +01:00
Text= "{Binding TariffDescription.TrackingInfoText}"
IsVisible="{Binding TariffDescription.TrackingInfoText, Converter={StaticResource Label_Converter}}"
2022-06-17 14:17:58 +02:00
Grid.Row="14"
Grid.ColumnSpan="2"/>
2021-11-07 19:42:59 +01:00
</Grid>
</StackLayout>
</ContentView>
2022-10-03 17:55:10 +02:00
</ViewCell>