2021-05-13 20:16:41 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
2022-09-16 11:19:46 +02:00
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
|
|
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
|
|
|
|
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
2024-04-09 12:53:23 +02:00
|
|
|
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
|
|
|
x:Class="ShareeBike.View.Map.MapPage"
|
|
|
|
xmlns:sharedGui="clr-namespace:SharedGui.View"
|
2022-12-07 16:54:52 +01:00
|
|
|
Shell.NavBarIsVisible="{Binding IsNavBarVisible}"
|
2023-03-08 13:18:54 +01:00
|
|
|
BackgroundColor="{DynamicResource Key=background-color}">
|
2022-09-16 11:19:46 +02:00
|
|
|
|
|
|
|
<Shell.TitleView >
|
|
|
|
<Grid ColumnDefinitions="Auto, 1*">
|
|
|
|
<Label Style="{StaticResource Label-Navbar}"
|
2023-11-21 15:26:57 +01:00
|
|
|
Text="{x:Static resources:AppResources.MarkingBikeLocations}"/>
|
2022-09-16 11:19:46 +02:00
|
|
|
</Grid>
|
|
|
|
</Shell.TitleView>
|
|
|
|
|
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 Map with Buttons and Running process-->
|
2023-02-22 14:03:35 +01:00
|
|
|
<Grid>
|
|
|
|
|
|
|
|
<StackLayout
|
|
|
|
Spacing="0"
|
|
|
|
Grid.Row="0">
|
|
|
|
|
2024-04-09 12:53:23 +02:00
|
|
|
<sharedGui:NotConnectedToNetView/>
|
2023-02-22 14:03:35 +01:00
|
|
|
|
|
|
|
<Grid
|
2023-03-08 13:18:54 +01:00
|
|
|
RowDefinitions="20,46,1*,Auto"
|
2022-12-07 16:54:52 +01:00
|
|
|
ColumnDefinitions="1*,Auto,1*"
|
2023-03-08 13:18:54 +01:00
|
|
|
RowSpacing="0"
|
2022-12-07 16:54:52 +01:00
|
|
|
IsEnabled="{Binding IsMapPageEnabled}"
|
|
|
|
VerticalOptions="FillAndExpand">
|
|
|
|
|
2024-04-09 12:53:23 +02:00
|
|
|
<!--Map-->
|
|
|
|
<maps:Map
|
2022-09-16 11:19:46 +02:00
|
|
|
Grid.RowSpan="3"
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
WidthRequest="320"
|
|
|
|
HeightRequest="800"
|
|
|
|
x:Name="MyMap"
|
|
|
|
MapType="Street">
|
2024-04-09 12:53:23 +02:00
|
|
|
<maps:Map.Behaviors>
|
|
|
|
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
|
|
|
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
|
|
|
</maps:Map.Behaviors>
|
|
|
|
</maps:Map>
|
2022-12-07 16:54:52 +01:00
|
|
|
|
2024-04-09 12:53:23 +02:00
|
|
|
<!--Buttons for choosing bike type-->
|
2023-03-08 13:18:54 +01:00
|
|
|
<Frame
|
2022-12-07 16:54:52 +01:00
|
|
|
CornerRadius="13"
|
|
|
|
Grid.Row="1"
|
|
|
|
Grid.Column="1"
|
|
|
|
Margin="0"
|
|
|
|
Padding="0"
|
|
|
|
IsVisible="{Binding IsNavBarVisible}"
|
|
|
|
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
2023-03-08 13:18:54 +01:00
|
|
|
<StackLayout
|
2022-12-07 16:54:52 +01:00
|
|
|
Orientation="Horizontal"
|
|
|
|
Margin="0"
|
|
|
|
Padding="0">
|
2023-03-08 13:18:54 +01:00
|
|
|
<Button
|
2024-04-09 12:53:23 +02:00
|
|
|
x:Name="CitybikeButton"
|
|
|
|
AutomationId ="FilterCitybike_button"
|
2022-12-07 16:54:52 +01:00
|
|
|
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
2024-04-09 12:53:23 +02:00
|
|
|
Command="{Binding OnToggleCargoToCitybike}"
|
2022-12-07 16:54:52 +01:00
|
|
|
IsVisible="{Binding IsToggleVisible}"
|
2024-04-09 12:53:23 +02:00
|
|
|
BackgroundColor="{Binding CitybikeColor}"
|
|
|
|
BorderColor="{Binding CitybikeColor}"
|
2022-12-07 16:54:52 +01:00
|
|
|
BorderWidth="0"
|
|
|
|
VerticalOptions="Center"
|
|
|
|
HorizontalOptions="Center"
|
|
|
|
WidthRequest="94"
|
|
|
|
HeightRequest="40"
|
2023-03-08 13:18:54 +01:00
|
|
|
CornerRadius="10"
|
2022-12-07 16:54:52 +01:00
|
|
|
Margin="3,0,0,0"
|
|
|
|
FontSize="Small"
|
|
|
|
FontAttributes="Bold"
|
2024-04-09 12:53:23 +02:00
|
|
|
TextColor="{Binding NoCitybikeColor}">
|
2023-03-08 13:18:54 +01:00
|
|
|
</Button>
|
|
|
|
<Button
|
2024-04-09 12:53:23 +02:00
|
|
|
x:Name="CargoButton"
|
|
|
|
AutomationId ="FilterCargo_button"
|
2022-12-07 16:54:52 +01:00
|
|
|
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
2024-04-09 12:53:23 +02:00
|
|
|
Command="{Binding OnToggleCitybikeToCargo}"
|
2022-12-07 16:54:52 +01:00
|
|
|
IsVisible="{Binding IsToggleVisible}"
|
2024-04-09 12:53:23 +02:00
|
|
|
BackgroundColor="{Binding CargoColor}"
|
|
|
|
BorderColor="{Binding CargoColor}"
|
2022-12-07 16:54:52 +01:00
|
|
|
BorderWidth="0"
|
|
|
|
VerticalOptions="Center"
|
|
|
|
HorizontalOptions="Center"
|
|
|
|
WidthRequest="94"
|
|
|
|
HeightRequest="40"
|
2023-03-08 13:18:54 +01:00
|
|
|
CornerRadius="10"
|
2022-12-07 16:54:52 +01:00
|
|
|
Margin="0,0,3,0"
|
|
|
|
FontSize="Small"
|
|
|
|
FontAttributes="Bold"
|
2024-04-09 12:53:23 +02:00
|
|
|
TextColor="{Binding NoCargoColor}">
|
2023-03-08 13:18:54 +01:00
|
|
|
</Button>
|
|
|
|
</StackLayout>
|
|
|
|
</Frame>
|
2022-09-16 11:19:46 +02:00
|
|
|
|
2023-03-08 13:18:54 +01:00
|
|
|
<!--MyBikes-->
|
|
|
|
<Frame
|
|
|
|
Grid.Row="2"
|
|
|
|
Grid.Column="0"
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
Margin="0,0,0,20"
|
|
|
|
Padding="0"
|
|
|
|
BackgroundColor="White"
|
|
|
|
HasShadow="True"
|
|
|
|
VerticalOptions="End"
|
|
|
|
HorizontalOptions="CenterAndExpand"
|
|
|
|
BorderColor="{DynamicResource primary-back-title-color}"
|
|
|
|
CornerRadius="10">
|
|
|
|
<Frame.Triggers>
|
|
|
|
<DataTrigger
|
|
|
|
TargetType="Frame"
|
|
|
|
Binding="{Binding Path=MyBikesCountText.Length}" Value="0">
|
|
|
|
<Setter Property="IsVisible" Value="false" />
|
|
|
|
</DataTrigger>
|
|
|
|
</Frame.Triggers>
|
|
|
|
<Frame.GestureRecognizers>
|
|
|
|
<TapGestureRecognizer Command="{Binding OnMyBikesButtonClicked}" />
|
|
|
|
</Frame.GestureRecognizers>
|
|
|
|
<Grid
|
2023-08-31 12:31:38 +02:00
|
|
|
RowDefinitions="20,Auto,1*"
|
2023-03-08 13:18:54 +01:00
|
|
|
ColumnDefinitions="Auto"
|
|
|
|
RowSpacing="0">
|
|
|
|
<Image
|
|
|
|
Grid.Row="1"
|
2023-08-31 12:31:38 +02:00
|
|
|
Margin="-3">
|
2023-03-08 13:18:54 +01:00
|
|
|
<Image.Source>
|
|
|
|
<FontImageSource
|
|
|
|
Glyph="{StaticResource IconMyBikes}"
|
|
|
|
Color="DimGray" FontFamily="FA-S"/>
|
|
|
|
</Image.Source>
|
|
|
|
</Image>
|
|
|
|
<BoxView
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
BackgroundColor="{DynamicResource primary-back-title-color}"
|
|
|
|
WidthRequest="20"
|
|
|
|
HeightRequest="20"
|
|
|
|
CornerRadius="10"
|
|
|
|
HorizontalOptions="End"
|
|
|
|
VerticalOptions="Start"
|
|
|
|
Margin="5"/>
|
|
|
|
<Frame
|
|
|
|
Grid.Row="0"
|
|
|
|
Grid.RowSpan="2"
|
|
|
|
BackgroundColor="{DynamicResource primary-back-title-color}"
|
|
|
|
WidthRequest="20"
|
|
|
|
HeightRequest="20"
|
|
|
|
CornerRadius="50"
|
|
|
|
HasShadow="False"
|
|
|
|
HorizontalOptions="End"
|
|
|
|
VerticalOptions="Start"
|
|
|
|
Padding="0"
|
|
|
|
Margin="5">
|
|
|
|
<Label
|
|
|
|
Text="{Binding MyBikesCountText}"
|
|
|
|
FontSize="Medium"
|
|
|
|
FontAttributes="Bold"
|
|
|
|
VerticalOptions="Center"
|
|
|
|
HorizontalOptions="Center"
|
|
|
|
TextColor="White"
|
|
|
|
Padding="0"
|
|
|
|
Margin="-10"/>
|
|
|
|
</Frame>
|
|
|
|
<Label
|
|
|
|
Grid.Row="2"
|
|
|
|
Text="{x:Static resources:AppResources.MarkingMyBikes}"
|
|
|
|
FontSize="Micro"
|
|
|
|
TextColor="DimGray"
|
|
|
|
VerticalOptions="Center"
|
|
|
|
Margin="10,0,10,5"
|
|
|
|
Padding="0"/>
|
|
|
|
</Grid>
|
|
|
|
</Frame>
|
2022-09-16 11:19:46 +02:00
|
|
|
|
2023-03-08 13:18:54 +01:00
|
|
|
<!--Info text-->
|
|
|
|
<Label
|
|
|
|
Grid.Row="3"
|
|
|
|
Grid.ColumnSpan="3"
|
|
|
|
Text="{Binding StatusInfoText}"
|
|
|
|
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
|
|
|
FontSize="Small"
|
|
|
|
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>
|
2024-04-09 12:53:23 +02:00
|
|
|
|
2023-03-08 13:18:54 +01:00
|
|
|
</Grid>
|
2023-02-22 14:03:35 +01:00
|
|
|
|
|
|
|
</StackLayout>
|
|
|
|
|
2022-12-07 16:54:52 +01:00
|
|
|
<!--While process is running-->
|
|
|
|
<sharedGui:RunningProcessView
|
2023-01-18 14:22:51 +01:00
|
|
|
IsVisible="{Binding IsProcessWithRunningProcessView}"
|
2023-02-22 14:03:35 +01:00
|
|
|
Grid.Row="0"/>
|
2022-12-07 16:54:52 +01:00
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</ContentPage.Content>
|
2022-09-16 11:19:46 +02:00
|
|
|
|
|
|
|
</ContentPage>
|