2023-08-31 12:20:06 +02:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
2024-04-09 12:53:23 +02:00
|
|
|
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
|
|
|
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
|
|
|
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
|
|
|
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
|
|
|
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcessBookedClosedOpenLock"
|
2023-08-31 12:20:06 +02:00
|
|
|
IsVisible="False">
|
|
|
|
|
|
|
|
<ContentView.Triggers>
|
|
|
|
<DataTrigger TargetType="ContentView"
|
|
|
|
Binding="{Binding RentalProcess.State}"
|
2024-04-09 12:53:23 +02:00
|
|
|
Value="{x:Static rental_process:CurrentRentalProcess.OpenLock}">
|
2023-08-31 12:20:06 +02:00
|
|
|
<Setter Property="IsVisible" Value="True" />
|
|
|
|
</DataTrigger>
|
|
|
|
</ContentView.Triggers>
|
|
|
|
|
|
|
|
<ContentView.Resources>
|
|
|
|
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
|
|
|
<x:String x:Key="Glasses"></x:String>
|
|
|
|
<x:String x:Key="Bluetooth"></x:String>
|
|
|
|
<x:String x:Key="Upload"></x:String>
|
|
|
|
</ContentView.Resources>
|
|
|
|
|
|
|
|
<ContentView.Content>
|
|
|
|
|
|
|
|
<Frame
|
|
|
|
Grid.Row="0"
|
|
|
|
HorizontalOptions="FillAndExpand"
|
|
|
|
VerticalOptions="FillAndExpand"
|
|
|
|
BackgroundColor="White"
|
|
|
|
Padding="0"
|
|
|
|
Margin="0">
|
|
|
|
|
|
|
|
<Grid RowDefinitions="60,Auto,Auto,1*"
|
|
|
|
RowSpacing="0">
|
|
|
|
|
|
|
|
<!-- Title of rental process -->
|
|
|
|
<Frame Grid.Row="0"
|
|
|
|
HorizontalOptions="FillAndExpand"
|
|
|
|
VerticalOptions="FillAndExpand"
|
|
|
|
BackgroundColor="{DynamicResource primary-back-title-color}"
|
|
|
|
Padding="0"
|
|
|
|
Margin="0">
|
|
|
|
<Label
|
2024-04-09 12:53:23 +02:00
|
|
|
Text="{x:Static resources:AppResources.ActionOpenLock}"
|
2023-08-31 12:20:06 +02:00
|
|
|
FontSize="Large"
|
|
|
|
TextColor="White"
|
|
|
|
HorizontalOptions="Center"
|
|
|
|
VerticalOptions="Center"/>
|
|
|
|
</Frame>
|
|
|
|
|
|
|
|
<!--Bike info-->
|
|
|
|
<sharedGui:RentalProcessBikeInfo Grid.Row="1"/>
|
|
|
|
|
|
|
|
<!-- Progress bar -->
|
2024-04-09 12:53:23 +02:00
|
|
|
<sharedGui:RentalProcess1StepBar Grid.Row="2"/>
|
2023-08-31 12:20:06 +02:00
|
|
|
|
2024-04-09 12:53:23 +02:00
|
|
|
<!--OpenLock Content-->
|
2023-08-31 12:20:06 +02:00
|
|
|
<Grid Grid.Row="3"
|
|
|
|
RowSpacing="10"
|
|
|
|
RowDefinitions="Auto,1*,Auto"
|
|
|
|
Margin="0,40,0,20">
|
|
|
|
<Grid.Triggers>
|
|
|
|
<MultiTrigger TargetType="Grid">
|
|
|
|
<MultiTrigger.Conditions>
|
2024-04-09 12:53:23 +02:00
|
|
|
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
|
|
|
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
2023-08-31 12:20:06 +02:00
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="IsVisible" Value="False"/>
|
|
|
|
<Setter Property="HeightRequest" Value="0"/>
|
|
|
|
</MultiTrigger>
|
|
|
|
</Grid.Triggers>
|
|
|
|
|
|
|
|
<!--Step-->
|
|
|
|
<Grid Grid.Row="0"
|
|
|
|
Padding="30,0,0,0"
|
|
|
|
ColumnDefinitions="20,Auto,1*,20"
|
|
|
|
ColumnSpacing="10"
|
|
|
|
HorizontalOptions="CenterAndExpand">
|
|
|
|
|
|
|
|
<!--Step icon-->
|
|
|
|
<Image
|
|
|
|
Grid.Column="1"
|
|
|
|
HorizontalOptions="End">
|
|
|
|
<Image.Triggers>
|
|
|
|
<MultiTrigger TargetType="Image">
|
|
|
|
<MultiTrigger.Conditions>
|
2024-04-09 12:53:23 +02:00
|
|
|
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessOpenLockStepOpenLock}"/>
|
2023-08-31 12:20:06 +02:00
|
|
|
|
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Source">
|
|
|
|
<Setter.Value>
|
|
|
|
<FontImageSource
|
2024-04-09 12:53:23 +02:00
|
|
|
Glyph="{StaticResource Bluetooth}"
|
|
|
|
FontFamily="FA-B"
|
|
|
|
Size="40"
|
|
|
|
Color="Black"/>
|
2023-08-31 12:20:06 +02:00
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</MultiTrigger>
|
|
|
|
<MultiTrigger TargetType="Image">
|
|
|
|
<MultiTrigger.Conditions>
|
2024-04-09 12:53:23 +02:00
|
|
|
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessOpenLockStepUpload}"/>
|
2023-08-31 12:20:06 +02:00
|
|
|
</MultiTrigger.Conditions>
|
|
|
|
<Setter Property="Source">
|
|
|
|
<Setter.Value>
|
|
|
|
<FontImageSource
|
2024-04-09 12:53:23 +02:00
|
|
|
Glyph="{StaticResource Upload}"
|
|
|
|
FontFamily="FA-S"
|
|
|
|
Size="40"
|
|
|
|
Color="Black"/>
|
2023-08-31 12:20:06 +02:00
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</MultiTrigger>
|
|
|
|
</Image.Triggers>
|
|
|
|
</Image>
|
|
|
|
|
|
|
|
<!--Step text-->
|
|
|
|
<Label
|
|
|
|
Grid.Column="2"
|
|
|
|
TextType="Html"
|
|
|
|
Text="{Binding RentalProcess.StepInfoText}"
|
|
|
|
FontSize="Large"
|
|
|
|
HorizontalOptions="Start"
|
|
|
|
VerticalOptions="Center"
|
|
|
|
TextColor="Black"
|
|
|
|
Padding="0">
|
|
|
|
</Label>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
2024-04-09 12:53:23 +02:00
|
|
|
<!--Spinner & Info text-->
|
|
|
|
<Grid Grid.Row="1"
|
2023-08-31 12:20:06 +02:00
|
|
|
Margin="30,30,30,0"
|
2024-04-09 12:53:23 +02:00
|
|
|
RowDefinitions="Auto,1*"
|
|
|
|
RowSpacing="30"
|
|
|
|
IsVisible="True">
|
2023-08-31 12:20:06 +02:00
|
|
|
|
|
|
|
<!--Spinner-->
|
2024-04-09 12:53:23 +02:00
|
|
|
<ActivityIndicator Grid.Row="0"
|
2023-08-31 12:20:06 +02:00
|
|
|
IsRunning="{Binding IsProcessWithRunningProcessView}"
|
|
|
|
Scale="2"
|
|
|
|
HorizontalOptions="Center"
|
2024-04-09 12:53:23 +02:00
|
|
|
VerticalOptions="StartAndExpand"
|
2023-08-31 12:20:06 +02:00
|
|
|
Color="{x:DynamicResource primary-back-title-color}"/>
|
|
|
|
|
|
|
|
<!--Info text-->
|
2024-04-09 12:53:23 +02:00
|
|
|
<Label Grid.Row="1"
|
2023-08-31 12:20:06 +02:00
|
|
|
TextType="Html"
|
|
|
|
Text="{Binding StatusInfoText}"
|
|
|
|
FontSize="Medium"
|
|
|
|
TextColor="DimGray"
|
|
|
|
HorizontalOptions="CenterAndExpand"
|
|
|
|
HorizontalTextAlignment="Center"/>
|
|
|
|
|
2024-04-09 12:53:23 +02:00
|
|
|
</Grid>
|
2023-08-31 12:20:06 +02:00
|
|
|
|
|
|
|
<!--Attention: Important info-->
|
|
|
|
<Frame Grid.Row="2"
|
2023-09-28 15:37:44 +02:00
|
|
|
Margin="0,20,0,20"
|
2023-08-31 12:20:06 +02:00
|
|
|
Padding="10"
|
|
|
|
HorizontalOptions="FillAndExpand"
|
|
|
|
HasShadow="False"
|
|
|
|
IsVisible="{Binding RentalProcess.ImportantStepInfoText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
|
|
|
BackgroundColor="{DynamicResource important-text-color}">
|
|
|
|
|
|
|
|
<Grid
|
|
|
|
ColumnDefinitions="20,*,Auto,20"
|
|
|
|
RowDefinitions="Auto">
|
|
|
|
|
|
|
|
<Label
|
|
|
|
Grid.Column="1"
|
|
|
|
HorizontalOptions="End"
|
|
|
|
IsVisible="True"
|
|
|
|
TextColor="White"
|
|
|
|
FontSize="Large"
|
|
|
|
Text="{Binding RentalProcess.ImportantStepInfoText}"
|
|
|
|
FontAttributes="Bold">
|
|
|
|
</Label>
|
|
|
|
|
|
|
|
<Image
|
|
|
|
Grid.Column="2"
|
|
|
|
HorizontalOptions="Start">
|
|
|
|
<Image.Source>
|
|
|
|
<FontImageSource
|
|
|
|
Glyph="{StaticResource Glasses}"
|
|
|
|
FontFamily="FA-S"
|
|
|
|
Size="40"
|
|
|
|
Color="White"/>
|
|
|
|
</Image.Source>
|
|
|
|
</Image>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</Frame>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</Frame>
|
|
|
|
|
|
|
|
</ContentView.Content>
|
|
|
|
|
|
|
|
</ContentView>
|