sharee.bike-App/TINK/TINK/View/FindBike/FindBikePage.xaml

140 lines
3.9 KiB
Text
Raw Normal View History

2022-09-16 11:19:46 +02:00
<?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:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:local_bike="clr-namespace:TINK.View.Bike"
2023-02-22 14:03:35 +01:00
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
2023-03-08 13:18:54 +01:00
BackgroundColor="{DynamicResource background-color}">
2022-09-16 11:19:46 +02:00
<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"/>
</ResourceDictionary>
</ContentPage.Resources>
2022-12-07 16:54:52 +01:00
<ContentPage.Content>
2022-09-16 11:19:46 +02:00
2022-12-07 16:54:52 +01:00
<!--Grid for Bike(s) view and Running process in same row-->
2023-02-22 14:03:35 +01:00
<Grid>
2022-09-16 11:19:46 +02:00
2023-02-22 14:03:35 +01:00
<Grid
RowDefinitions="1*,Auto"
2023-03-08 13:18:54 +01:00
RowSpacing="0"
2023-02-22 14:03:35 +01:00
Grid.Row="0">
2022-12-07 16:54:52 +01:00
2023-02-22 14:03:35 +01:00
<StackLayout
Grid.Row="0"
Spacing="0"
Orientation="Vertical">
<!--No Network Connection-->
<sharedGui:NotConnectedToNetView/>
2022-12-07 16:54:52 +01:00
<!--Search bike-->
2023-05-11 17:39:28 +02:00
<Frame
Padding="10"
Margin="0,10,0,5"
2023-02-22 14:03:35 +01:00
IsVisible="{Binding IsSelectBikeVisible}"
2023-05-11 17:39:28 +02:00
HorizontalOptions="FillAndExpand"
BackgroundColor="White">
<StackLayout
2023-03-08 13:18:54 +01:00
Padding="20">
2023-02-22 14:03:35 +01:00
2023-05-11 17:39:28 +02:00
<Label Text="{x:Static resources:AppResources.MarkingFindBikeLabel}"
Margin="0,0,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
x:Name="FindBikeEntry"
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
MaxLength="10"
CursorPosition="0"
Text="{Binding BikeIdUserInput}"/>
<Button
Text="{x:Static resources:AppResources.MarkingSearchBike}"
IsEnabled="{Binding IsSelectBikeEnabled}"
Command="{Binding OnSelectBikeRequest}"/>
2022-09-16 11:19:46 +02:00
2023-05-11 17:39:28 +02:00
</StackLayout>
2022-09-16 11:19:46 +02:00
2023-05-11 17:39:28 +02:00
</Frame>
2023-02-22 14:03:35 +01:00
<!-- Bike -->
<StackLayout
Spacing="0"
IsVisible="{Binding IsBikesListVisible}"
Orientation="Vertical">
2022-09-16 11:19:46 +02:00
2023-02-22 14:03:35 +01:00
<!--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}"/>
2022-12-07 16:54:52 +01:00
</StackLayout>
2023-02-22 14:03:35 +01:00
</StackLayout>
<!--Info text-->
2023-03-08 13:18:54 +01:00
<Label
Grid.Row="1"
2022-12-07 16:54:52 +01:00
Text="{Binding StatusInfoText}"
2023-01-18 14:22:51 +01:00
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
2022-12-07 16:54:52 +01:00
FontSize="Small"
2023-03-08 13:18:54 +01:00
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>
2022-12-07 16:54:52 +01:00
2023-02-22 14:03:35 +01:00
</Grid>
2022-09-16 11:19:46 +02:00
<!--While process is running-->
<sharedGui:RunningProcessView
Grid.Row="0"
2023-01-18 14:22:51 +01:00
IsVisible="{Binding IsProcessWithRunningProcessView}"/>
2022-09-16 11:19:46 +02:00
</Grid>
</ContentPage.Content>
2022-12-07 16:54:52 +01:00
2022-09-16 11:19:46 +02:00
</ContentPage>