mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-15 06:36:38 +01:00
228 lines
12 KiB
XML
228 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<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"
|
|
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
|
mc:Ignorable="d"
|
|
x:Class="TINK.View.Bike.ILockItBike">
|
|
<ContentView>
|
|
<ContentView.Resources>
|
|
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="Label_Converter"/>
|
|
</ContentView.Resources>
|
|
<StackLayout
|
|
Padding="10">
|
|
<Grid Padding="0,0,5,10">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<!-- Icon of the bike -->
|
|
<Image
|
|
Source="{Binding DisplayedBikeImageSourceString}"
|
|
HeightRequest="80"
|
|
Aspect="AspectFit"
|
|
HorizontalOptions="Start"
|
|
VerticalOptions="End"
|
|
Grid.Column="0"/>
|
|
<!-- Battery level -->
|
|
<sharedGui:BarLevelView
|
|
Current="{Binding CurrentChargeBars}"
|
|
Maximum="{Binding MaxChargeBars}"
|
|
Grid.Column="1"
|
|
VerticalOptions="End"
|
|
IsVisible="{Binding IsBatteryChargeVisible}"/>
|
|
<!-- Name of the bike -->
|
|
<StackLayout Grid.Column="2">
|
|
<Label
|
|
FontAttributes="Bold"
|
|
FontSize="Large"
|
|
HorizontalTextAlignment="Right"
|
|
Text="{Binding Name}"/>
|
|
<!-- Id of the bike -->
|
|
<Label
|
|
FontAttributes="Bold"
|
|
HorizontalTextAlignment="Right"
|
|
IsVisible="{Binding DisplayId, Converter={StaticResource Label_Converter}}"
|
|
Text="{Binding DisplayId}"/>
|
|
</StackLayout>
|
|
</Grid>
|
|
<!-- Rental state -->
|
|
<Label
|
|
Text="{Binding StateText}"
|
|
TextColor="{Binding StateColor}"/>
|
|
<Label
|
|
Text="{Binding ErrorText}"
|
|
IsVisible="{Binding ErrorText, Converter={StaticResource Label_Converter}}"
|
|
TextColor="Red"/>
|
|
<!-- Low Battery level -->
|
|
<Label
|
|
x:Name="LowLevelLabel"
|
|
Text="{x:Static resources:AppResources.StatusTextLowBatteryLevel}"
|
|
FontSize="Small"
|
|
IsVisible="{Binding IsCurrentChargeLow}" />
|
|
<Button
|
|
Text="{Binding ButtonText}"
|
|
IsVisible="{Binding IsButtonVisible}"
|
|
IsEnabled="{Binding IsIdle}"
|
|
Command="{Binding OnButtonClicked}"/>
|
|
<Button
|
|
Style="{StaticResource SecondaryButton}"
|
|
Text="{Binding LockitButtonText}"
|
|
IsVisible="{Binding IsLockitButtonVisible}"
|
|
IsEnabled="{Binding IsIdle}"
|
|
Command="{Binding OnLockitButtonClicked}"/>
|
|
<!-- Rental description (tarif name, options and rental info -->
|
|
<Grid
|
|
RowSpacing="0"
|
|
IsVisible="{Binding TariffDescription.Header, Converter={StaticResource Label_Converter}}">
|
|
<Grid.RowDefinitions>
|
|
<!-- start tarif- entries -->
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<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" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<!-- start tarif- entries (should be a CollectionView) -->
|
|
<Label
|
|
Text= "{x:Static resources:AppResources.MessageBikesManagementTariffDescriptionTariffHeader}"
|
|
IsVisible="{Binding TariffDescription.Header, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="0"
|
|
FontAttributes="Bold"/>
|
|
<Label
|
|
Text="{Binding TariffDescription.Header}"
|
|
IsVisible="{Binding TariffDescription.Header, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="0"
|
|
Grid.Column="1"
|
|
FontAttributes="Bold"/>
|
|
<Label
|
|
Text= "{Binding TariffDescription.TarifEntry1.Description}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry1.Description, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="1"/>
|
|
<Label
|
|
Text="{Binding TariffDescription.TarifEntry1.Value}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry1.Value, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="1"
|
|
Grid.Column="1"/>
|
|
<Label
|
|
Text= "{Binding TariffDescription.TarifEntry2.Description}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry2.Description, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="2"/>
|
|
<Label
|
|
Text="{Binding TariffDescription.TarifEntry2.Value}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry2.Value, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="2"
|
|
Grid.Column="1"/>
|
|
<Label
|
|
Text= "{Binding TariffDescription.TarifEntry3.Description}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry3.Description, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="3"/>
|
|
<Label
|
|
Text="{Binding TariffDescription.TarifEntry3.Value}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry3.Value, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="3"
|
|
Grid.Column="1"/>
|
|
<Label
|
|
Text= "{Binding TariffDescription.TarifEntry4.Description}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry4.Description, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="4"/>
|
|
<Label
|
|
Text="{Binding TariffDescription.TarifEntry4.Value}"
|
|
IsVisible="{Binding TariffDescription.TarifEntry4.Value, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="4"
|
|
Grid.Column="1"/>
|
|
<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"/>
|
|
<!-- start tarif- entries (should be a CollectionView) -->
|
|
<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
|
|
Text= "{Binding TariffDescription.InfoEntry5}"
|
|
IsVisible="{Binding TariffDescription.InfoEntry5, Converter={StaticResource Label_Converter}}"
|
|
Grid.Row="14"
|
|
Grid.ColumnSpan="2"/>
|
|
</Grid>
|
|
</StackLayout>
|
|
</ContentView>
|
|
</ViewCell>
|