sharee.bike-App/LastenradBayern/ShareeBike/View/Contact/SelectStationPage.xaml

151 lines
4.4 KiB
Text
Raw Normal View History

2022-12-07 16:54:52 +01: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"
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"
xmlns:sharedGui="clr-namespace:SharedGui.View"
x:Class="ShareeBike.View.Contact.SelectStationPage"
2022-12-07 16:54:52 +01:00
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Label Style="{StaticResource Label-Navbar}"
2022-08-30 15:42:25 +02:00
Text="{x:Static resources:AppResources.MarkingSelectStationPage}"/>
2022-12-07 16:54:52 +01:00
</Grid>
</Shell.TitleView>
<ContentPage.Content>
<!--Grid for Map with Buttons and Running process-->
<Grid
2023-03-08 13:18:54 +01:00
RowDefinitions="3,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">
<!--Map-->
<maps:Map
Grid.RowSpan="3"
Grid.ColumnSpan="3"
WidthRequest="320"
HeightRequest="800"
x:Name="MyMap"
2022-12-13 10:53:08 +01:00
MyLocationEnabled="True"
2022-12-07 16:54:52 +01:00
MapType="Street">
<maps:Map.Behaviors>
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
</maps:Map.Behaviors>
</maps:Map>
<!--Buttons for choosing bike type-->
<Frame
CornerRadius="13"
Grid.Row="1"
Grid.Column="1"
Margin="0"
Padding="0"
BackgroundColor="{DynamicResource secondary-back-title-color}">
<StackLayout
Orientation="Horizontal"
Margin="0"
Padding="0">
<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="false"
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-05-11 17:39:28 +02: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}">
2022-12-07 16:54:52 +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="false"
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-05-11 17:39:28 +02: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}">
2022-12-07 16:54:52 +01:00
</Button>
</StackLayout>
</Frame>
<!--Center to currentLocation Button-->
<ImageButton
Grid.RowSpan="3"
Grid.ColumnSpan="3"
x:Name="CurrentLocation"
AutomationId ="currentLocaton_button"
Command="{Binding OnCurrentLocationButtonClicked}"
IsVisible="False"
BackgroundColor="Transparent"
BorderWidth="1"
BorderColor="LightGray"
VerticalOptions="End"
HorizontalOptions="Center"
Margin="0,0,0,12"
Source="Location_Button.png"
WidthRequest="40"
HeightRequest="40"
CornerRadius="20">
</ImageButton>
<!--Info text-->
<Label
2023-08-31 12:20:06 +02:00
Grid.Row="3"
Grid.ColumnSpan="3"
Text="{Binding StatusInfoText}"
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
FontSize="Small"
Padding="5"
TextColor="DimGray"
HorizontalOptions="CenterAndExpand">
2023-03-08 13:18:54 +01:00
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Path=StatusInfoText.Length}" Value="0">
<Setter Property="HeightRequest" Value="0" />
</DataTrigger>
2023-08-31 12:20:06 +02:00
<DataTrigger
TargetType="Label"
Binding="{Binding Path=StatusInfoText}" Value="Offline.">
<Setter Property="HeightRequest" Value="0" />
</DataTrigger>
2023-03-08 13:18:54 +01:00
</Label.Triggers>
</Label>
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}"
2022-12-07 16:54:52 +01:00
Grid.RowSpan="4"
Grid.ColumnSpan="3"/>
</Grid>
</ContentPage.Content>
</ContentPage>