mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-15 06:36:38 +01:00
185 lines
5.2 KiB
XML
185 lines
5.2 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.FindBike.FindBikePage"
|
|
xmlns:conv="clr-namespace:TINK.View"
|
|
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
|
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
|
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
|
BackgroundColor="{DynamicResource background-color}">
|
|
|
|
<Shell.TitleView>
|
|
<Grid ColumnDefinitions="Auto, 1*">
|
|
<Label Style="{StaticResource Label-Navbar}"
|
|
Text="{x:Static resources:AppResources.MarkingFindBike}"/>
|
|
</Grid>
|
|
</Shell.TitleView>
|
|
|
|
<ContentPage.Resources>
|
|
<ResourceDictionary>
|
|
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
|
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="Label_Converter"/>
|
|
</ResourceDictionary>
|
|
</ContentPage.Resources>
|
|
|
|
<ContentPage.Content>
|
|
|
|
<!--Grid for Bike(s) view and Running process in same row-->
|
|
<Grid>
|
|
|
|
<!-- Grid for Content -->
|
|
<Grid
|
|
RowDefinitions="1*,Auto"
|
|
RowSpacing="0"
|
|
Grid.Row="0">
|
|
|
|
<StackLayout
|
|
Grid.Row="0"
|
|
Spacing="0"
|
|
Orientation="Vertical">
|
|
|
|
<StackLayout
|
|
BackgroundColor="White"
|
|
Padding="20,5,20,0">
|
|
|
|
<!--Bike type-->
|
|
<StackLayout Orientation="Horizontal"
|
|
HorizontalOptions="Center"
|
|
IsVisible="{Binding ActiveFilteredBikeType, Converter={StaticResource Label_Converter}}"
|
|
Spacing="0">
|
|
<Label
|
|
TextColor="DimGray"
|
|
Text="{x:Static resources:AppResources.MarkingFindBikeTypeOfBikeText}"/>
|
|
<Label
|
|
TextColor="{DynamicResource primary-back-title-color}"
|
|
FontAttributes="Bold"
|
|
Text="{Binding ActiveFilteredBikeType}"/>
|
|
<Button
|
|
Command="{Binding ShowFilterBikeTypeInfoCommand}"
|
|
WidthRequest="24"
|
|
HeightRequest="24"
|
|
BackgroundColor="Transparent"
|
|
BorderWidth="0"
|
|
Padding="0"
|
|
Margin="5,0,0,0">
|
|
<Button.ImageSource>
|
|
<FontImageSource
|
|
Glyph="{StaticResource InfoCircle}"
|
|
Color="DimGray"
|
|
FontFamily="FA-S"
|
|
Size="20"/>
|
|
</Button.ImageSource>
|
|
</Button>
|
|
</StackLayout>
|
|
|
|
<Grid
|
|
RowDefinitions="Auto,Auto"
|
|
ColumnDefinitions="*,Auto">
|
|
|
|
<!--Search bike-->
|
|
<Label
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Grid.Row="0"
|
|
Text="{x:Static resources:AppResources.MarkingFindBikeLabel}"
|
|
Margin="0,5,0,-5">
|
|
<Label.Triggers>
|
|
<DataTrigger
|
|
TargetType="Label"
|
|
Binding="{Binding Source={x:Reference FindBikeEntry}, Path=Text, TargetNullValue=''}"
|
|
Value="">
|
|
<Setter Property="IsVisible" Value="False" />
|
|
</DataTrigger>
|
|
</Label.Triggers>
|
|
</Label>
|
|
<Entry
|
|
Grid.Column="0"
|
|
Grid.Row="1"
|
|
x:Name="FindBikeEntry"
|
|
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
|
|
MaxLength="10"
|
|
CursorPosition="0"
|
|
Text="{Binding BikeIdUserInput, Mode=TwoWay}"/>
|
|
|
|
<Button
|
|
Grid.Column="1"
|
|
Grid.Row="1"
|
|
WidthRequest="100"
|
|
Text="{x:Static resources:AppResources.MarkingFindBikeButton}"
|
|
IsEnabled="{Binding IsSelectBikeEnabled}"
|
|
Command="{Binding OnSelectBikeRequest}"/>
|
|
|
|
</Grid>
|
|
|
|
<!--Line-->
|
|
<BoxView
|
|
HeightRequest="1"
|
|
WidthRequest="400"
|
|
HorizontalOptions="Center"
|
|
Color="{DynamicResource primary-back-title-color}"/>
|
|
|
|
</StackLayout>
|
|
|
|
<!--No Network Connection-->
|
|
<sharedGui:NotConnectedToNetView/>
|
|
|
|
<!-- Bike -->
|
|
<StackLayout
|
|
Spacing="0"
|
|
IsVisible="{Binding IsBikesListVisible}"
|
|
Orientation="Vertical">
|
|
|
|
<!--Hint for Outdated Data.-->
|
|
<sharedGui:HintForRefreshingPageView/>
|
|
|
|
<ListView
|
|
x:Name="FindBikeListView"
|
|
SelectionMode="None"
|
|
SelectedItem="{Binding SelectedBike}"
|
|
IsEnabled="{Binding IsIdle}"
|
|
HasUnevenRows="True"
|
|
SeparatorVisibility="None"
|
|
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
|
IsPullToRefreshEnabled="True"
|
|
RefreshCommand="{Binding RefreshCommand}"
|
|
IsRefreshing="{Binding IsRefreshing}"/>
|
|
|
|
</StackLayout>
|
|
|
|
</StackLayout>
|
|
|
|
<!--Info text-->
|
|
<Label
|
|
Grid.Row="1"
|
|
Text="{Binding StatusInfoText}"
|
|
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
|
FontSize="Small"
|
|
Padding="5"
|
|
TextColor="DimGray"
|
|
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>
|
|
|
|
</Grid>
|
|
|
|
<!--While process is running-->
|
|
<sharedGui:RunningProcessView
|
|
Grid.Row="0"
|
|
IsVisible="{Binding IsProcessWithRunningProcessView}"/>
|
|
|
|
</Grid>
|
|
|
|
</ContentPage.Content>
|
|
|
|
</ContentPage>
|