mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-15 06:36:38 +01:00
196 lines
5.1 KiB
XML
196 lines
5.1 KiB
XML
<?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.BikesAtStation.BikesAtStationPage"
|
|
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
|
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
|
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
|
BackgroundColor="{DynamicResource background-color}"
|
|
Shell.FlyoutBehavior="Disabled"
|
|
Shell.NavBarIsVisible="{Binding IsIdle}">
|
|
|
|
<Shell.TitleView>
|
|
<Grid ColumnDefinitions="Auto, 1*">
|
|
<Image Style="{StaticResource Image-Navbar}"/>
|
|
<Label Style="{StaticResource Label-Navbar}"
|
|
Text="{Binding Title}"/>
|
|
</Grid>
|
|
</Shell.TitleView>
|
|
|
|
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
|
|
<ContentPage.Content>
|
|
|
|
<!--Grid for Bike(s) view and Running process in same row-->
|
|
<Grid>
|
|
<!-- Grid for Content -->
|
|
<Grid
|
|
Grid.Row="0"
|
|
RowSpacing="0"
|
|
RowDefinitions="1*,Auto">
|
|
|
|
<StackLayout
|
|
Grid.Row="0"
|
|
Spacing="0"
|
|
Orientation="Vertical">
|
|
|
|
<!--Station-->
|
|
<StackLayout
|
|
BackgroundColor="{DynamicResource secondary-back-title-color}"
|
|
IsVisible="{Binding IsIdle}"
|
|
Padding="20,0,20,0">
|
|
|
|
<!--Line-->
|
|
<BoxView
|
|
HeightRequest="1"
|
|
WidthRequest="400"
|
|
HorizontalOptions="Center"
|
|
Color="White"/>
|
|
|
|
<Grid
|
|
ColumnDefinitions="Auto,1*"
|
|
RowDefinitions="Auto"
|
|
Padding="0,0,0,5">
|
|
|
|
<!--Station id-->
|
|
<Label
|
|
Grid.Column="0"
|
|
Grid.Row="0"
|
|
FontSize="Small"
|
|
HorizontalOptions="Start"
|
|
TextColor="White"
|
|
Text="{Binding StationDetailText}"/>
|
|
|
|
<!--Contact to operator-->
|
|
<Label
|
|
Grid.Column="1"
|
|
Grid.Row="0"
|
|
TextType="Html"
|
|
FontSize="Small"
|
|
HorizontalOptions="End"
|
|
TextColor="White"
|
|
Text="{Binding ContactSupportHintText}">
|
|
<Label.GestureRecognizers>
|
|
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
|
</Label.GestureRecognizers>
|
|
</Label>
|
|
|
|
</Grid>
|
|
|
|
</StackLayout>
|
|
|
|
<!--If Not Connected To Internet-->
|
|
<sharedGui:NotConnectedToNetView/>
|
|
|
|
<!--Bike data-->
|
|
<Grid
|
|
RowDefinitions="Auto,Auto"
|
|
RowSpacing="0">
|
|
|
|
<!--Hint for Outdated Data.-->
|
|
<sharedGui:HintForRefreshingPageView
|
|
Grid.Row="0"/>
|
|
|
|
<!--No Bikes-->
|
|
<Label
|
|
Grid.Row="1"
|
|
Margin="20"
|
|
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
|
Text="{Binding NoBikesAtStationText}"/>
|
|
|
|
<!--Bike(s)-->
|
|
<ListView
|
|
Grid.Row="1"
|
|
x:Name="BikesAtStationListView"
|
|
SelectionMode="None"
|
|
SelectedItem="{Binding SelectedBike}"
|
|
IsEnabled="{Binding IsIdle}"
|
|
HasUnevenRows="True"
|
|
SeparatorVisibility="None"
|
|
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
|
IsPullToRefreshEnabled="True"
|
|
RefreshCommand="{Binding RefreshCommand}"
|
|
IsRefreshing="{Binding IsRefreshing}"/>
|
|
</Grid>
|
|
|
|
</StackLayout>
|
|
|
|
<!--Info at End of Page-->
|
|
<StackLayout
|
|
Grid.Row="1"
|
|
Orientation="Vertical"
|
|
Spacing="0"
|
|
Padding="20,0,20,0">
|
|
|
|
<!--Info text-->
|
|
<Label
|
|
Text="{Binding StatusInfoText}"
|
|
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
|
FontSize="Small"
|
|
TextColor="DimGray"
|
|
Padding="5"
|
|
HorizontalOptions="CenterAndExpand">
|
|
<Label.Triggers>
|
|
<DataTrigger
|
|
TargetType="Label"
|
|
Binding="{Binding Path=StatusInfoText.Length}" Value="0">
|
|
<Setter Property="HeightRequest" Value="0" />
|
|
</DataTrigger>
|
|
<DataTrigger
|
|
TargetType="Label"
|
|
Binding="{Binding Path=StatusInfoText}" Value="Offline.">
|
|
<Setter Property="HeightRequest" Value="0" />
|
|
</DataTrigger>
|
|
</Label.Triggers>
|
|
</Label>
|
|
|
|
<!--Login-->
|
|
<StackLayout Spacing="0">
|
|
<StackLayout.Triggers>
|
|
<DataTrigger TargetType="StackLayout"
|
|
Binding="{Binding IsLoginRequiredHintVisible}"
|
|
Value="false">
|
|
<Setter Property="HeightRequest" Value="0" />
|
|
</DataTrigger>
|
|
</StackLayout.Triggers>
|
|
|
|
<!--Line-->
|
|
<BoxView
|
|
HeightRequest="1"
|
|
WidthRequest="400"
|
|
HorizontalOptions="Center"
|
|
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
|
Color="DimGray" />
|
|
|
|
<!--Login required-->
|
|
<Label
|
|
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
|
TextType="Html"
|
|
TextColor="DimGray"
|
|
Text="{Binding LoginRequiredHintText}">
|
|
<Label.GestureRecognizers>
|
|
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
|
</Label.GestureRecognizers>
|
|
</Label>
|
|
|
|
</StackLayout>
|
|
|
|
</StackLayout>
|
|
|
|
</Grid>
|
|
|
|
<!--While process is running-->
|
|
<sharedGui:RunningProcessView
|
|
IsVisible="{Binding IsProcessWithRunningProcessView}"
|
|
Grid.Row="0"/>
|
|
|
|
</Grid>
|
|
|
|
</ContentPage.Content>
|
|
|
|
</ContentPage>
|