mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-20 12:06:29 +02:00
Version 3.0.361
This commit is contained in:
parent
faf68061f4
commit
cba4da9357
88 changed files with 1119 additions and 1502 deletions
|
@ -7,7 +7,7 @@
|
|||
x:Class="TINK.View.Map.MapPage"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
Shell.NavBarIsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
BackgroundColor="{DynamicResource Key=background-color}">
|
||||
|
||||
<Shell.TitleView >
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
|
@ -17,6 +17,7 @@
|
|||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
|
@ -28,21 +29,22 @@
|
|||
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
RowDefinitions="3,46,1*,32"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
<Grid
|
||||
RowDefinitions="20,46,1*,Auto"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
RowSpacing="0"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
MyLocationEnabled="True"
|
||||
MapType="Street">
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
MyLocationEnabled="True"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
|
@ -51,68 +53,159 @@
|
|||
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
IsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
IsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
CornerRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
CornerRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<!--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
|
||||
RowDefinitions="18,Auto,1*"
|
||||
ColumnDefinitions="Auto"
|
||||
RowSpacing="0">
|
||||
<Image
|
||||
Grid.Row="1"
|
||||
Margin="-5">
|
||||
<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>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
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>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
@ -122,9 +215,8 @@
|
|||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsProcessWithRunningProcessView}"
|
||||
Grid.Row="0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -175,16 +175,6 @@ namespace TINK.View.Map
|
|||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
ApplyCustomiOSStyling();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
// Continue because styling is not essential.
|
||||
Log.ForContext<MapPage>().Error("IOS specific styling of map page failed. {Exception}", exception);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
base.OnAppearing();
|
||||
|
@ -250,22 +240,6 @@ namespace TINK.View.Map
|
|||
Navigation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies iOS specific styling to branded Buttons.
|
||||
/// </summary>
|
||||
private void ApplyCustomiOSStyling()
|
||||
{
|
||||
if (Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
TINKButton.BackgroundColor = Color.LightGray;
|
||||
TINKButton.BorderColor = Color.Black;
|
||||
TINKButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
KonradButton.BackgroundColor = Color.LightGray;
|
||||
KonradButton.BorderColor = Color.Black;
|
||||
KonradButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when pages is closed/ hidden.
|
||||
/// Stops update process.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue