Version 3.0.339

This commit is contained in:
Anja 2022-09-16 11:19:46 +02:00
parent 0468955d49
commit 52c9f6f1d9
43 changed files with 993 additions and 614 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.338" android:versionCode="338"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.339" android:versionCode="339">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" /> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions --> <!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services --> <!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>LastenradBayern</string> <string>LastenradBayern</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>338</string> <string>339</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.0.338</string> <string>3.0.339</string>
</dict> </dict>
</plist> </plist>

View file

@ -11,6 +11,7 @@
xmlns:contact="clr-namespace:TINK.View.Contact" xmlns:contact="clr-namespace:TINK.View.Contact"
xmlns:info="clr-namespace:TINK.View.Info" xmlns:info="clr-namespace:TINK.View.Info"
xmlns:header="clr-namespace:TINK.View.RootShell" xmlns:header="clr-namespace:TINK.View.RootShell"
xmlns:version="clr-namespace:ShareeSharedGuiLib.View"
BackgroundColor="{DynamicResource Key=primary-back-title-color}" BackgroundColor="{DynamicResource Key=primary-back-title-color}"
Title="Shell" Title="Shell"
x:Class="TINK.View.RootShell.AppShell"> x:Class="TINK.View.RootShell.AppShell">
@ -107,4 +108,8 @@
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<Shell.FlyoutFooter>
<version:VersionNumberView/>
</Shell.FlyoutFooter>
</Shell> </Shell>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.338" android:versionCode="338"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.339" android:versionCode="339">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" /> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions --> <!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services --> <!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Mein konrad</string> <string>Mein konrad</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>338</string> <string>339</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.0.338</string> <string>3.0.339</string>
</dict> </dict>
</plist> </plist>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms" <ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:conv="clr-namespace:TINK.View" xmlns:conv="clr-namespace:TINK.View"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
@ -14,54 +14,43 @@
</ContentView.Resources> </ContentView.Resources>
<StackLayout <StackLayout
Padding="10"> Padding="10">
<Grid Padding="0,0,5,10"> <Grid Padding="0,0,5,10">
<Grid.RowDefinitions> <Grid.ColumnDefinitions>
<RowDefinition Height="30" /> <ColumnDefinition Width="Auto" />
<RowDefinition Height="*" /> <ColumnDefinition Width="Auto" />
</Grid.RowDefinitions> <ColumnDefinition Width="*" />
<Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ColumnDefinition Width="80" /> <!-- Icon of the bike -->
<ColumnDefinition Width="20" /> <Image
<ColumnDefinition Width="20" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Icon of the bike -->
<Image
Source="{Binding DisplayedBikeImageSourceString}" Source="{Binding DisplayedBikeImageSourceString}"
HeightRequest="80" HeightRequest="80"
Aspect="AspectFit" Aspect="AspectFit"
HorizontalOptions="Start" HorizontalOptions="Start"
Grid.Row="0" VerticalOptions="End"
Grid.RowSpan="2" Grid.Column="0"/>
Grid.Column="0" <!-- Battery level -->
Grid.ColumnSpan="2"/> <sharedGui:BarLevelView
<!-- Battery level -->
<sharedGui:BarLevelView
Current="{Binding CurrentChargeBars}" Current="{Binding CurrentChargeBars}"
Maximum="{Binding MaxChargeBars}" Maximum="{Binding MaxChargeBars}"
Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" VerticalOptions="End"
IsVisible="{Binding IsBatteryChargeVisible}"/> IsVisible="{Binding IsBatteryChargeVisible}"/>
<!-- Name of the bike --> <!-- Name of the bike -->
<Label <StackLayout Grid.Column="2">
FontAttributes="Bold" <Label
FontSize="Large" FontAttributes="Bold"
HorizontalTextAlignment="Right" FontSize="Large"
Text="{Binding Name}" HorizontalTextAlignment="Right"
Grid.Row="0" Text="{Binding Name}"/>
Grid.Column="1" <!-- Id of the bike -->
Grid.ColumnSpan="3"/> <Label
<!-- Id of the bike --> FontAttributes="Bold"
<Label HorizontalTextAlignment="Right"
FontAttributes="Bold" IsVisible="{Binding DisplayId, Converter={StaticResource Label_Converter}}"
HorizontalTextAlignment="Right" Text="{Binding DisplayId}"/>
IsVisible="{Binding DisplayId, Converter={StaticResource Label_Converter}}" </StackLayout>
Text="{Binding DisplayId}" </Grid>
Grid.Row="1" <!-- Rental state -->
Grid.Column="3"/>
</Grid>
<!-- Rental state -->
<Label <Label
Text="{Binding StateText}" Text="{Binding StateText}"
TextColor="{Binding StateColor}"/> TextColor="{Binding StateColor}"/>

View file

@ -1,28 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" <ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:version="clr-namespace:ShareeSharedGuiLib.View"
xmlns:local="clr-namespace:TINK.View;assembly=TINKLib" xmlns:local="clr-namespace:TINK.View;assembly=TINKLib"
x:Class="TINK.View.RootShell.FlyoutFooter"> x:Class="TINK.View.RootShell.FlyoutFooter">
<Grid Padding="20,0,0,20"> <ContentView.Content>
<Grid.RowDefinitions> <Grid Padding="20,0,0,0">
<RowDefinition Height="35"/> <Grid.RowDefinitions>
<RowDefinition Height="20" /> <RowDefinition Height="35" />
</Grid.RowDefinitions> <RowDefinition Height="20"/>
<Image <RowDefinition Height="30" />
</Grid.RowDefinitions>
<Image
Grid.Row="0" Grid.Row="0"
HeightRequest="35" HeightRequest="35"
HorizontalOptions="StartAndExpand" HorizontalOptions="StartAndExpand"
Aspect="AspectFit" Aspect="AspectFit"
Source="konrad_nobg.png" /> Source="konrad_nobg.png" />
<Label <Label
Grid.Row="1" Grid.Row="1"
HorizontalOptions="Start" HorizontalOptions="Start"
FontSize="12" FontSize="12"
TextColor="{DynamicResource primary-back-title-color}" TextColor="{DynamicResource primary-back-title-color}"
TextType="Html" TextType="Html"
Text="Powered by &lt;b&gt;Stadtwerke Konstanz&lt;/b&gt;"/> Text="Powered by &lt;b&gt;Stadtwerke Konstanz&lt;/b&gt;"/>
<!--<Label <!--<Label
Grid.Row="1" Grid.Row="2"
HorizontalOptions="Start" HorizontalOptions="Start"
FontSize="12" FontSize="12"
TextColor="{DynamicResource primary-back-title-color}"> TextColor="{DynamicResource primary-back-title-color}">
@ -34,6 +37,8 @@
Url="https://www.stadtwerke-konstanz.de" /> Url="https://www.stadtwerke-konstanz.de" />
</FormattedString> </FormattedString>
</Label.FormattedText> </Label.FormattedText>
</Label>--> </Label>-->
</Grid> <version:VersionNumberView x:Name="VersionNumber" Grid.Row="2"/>
</Grid>
</ContentView.Content>
</ContentView> </ContentView>

View file

@ -12,6 +12,10 @@
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\BarLevelView.xaml"> <EmbeddedResource Include="$(MSBuildThisFileDirectory)View\BarLevelView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\VersionNumberView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Bar.cs" /> <Compile Include="$(MSBuildThisFileDirectory)ViewModel\Bar.cs" />
@ -25,10 +29,23 @@
<DependentUpon>BarLevelView.xaml</DependentUpon> <DependentUpon>BarLevelView.xaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\RunningProcessView.xaml.cs">
<DependentUpon>RunningProcessView.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\VersionNumberView.xaml.cs">
<DependentUpon>VersionNumberView.xaml</DependentUpon>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\BarLevelInputView.xaml"> <EmbeddedResource Include="$(MSBuildThisFileDirectory)View\BarLevelInputView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator> <Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\RunningProcessView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
</Project> </Project>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms" <ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShareeSharedGuiLib.View.BarLevelView"> x:Class="ShareeSharedGuiLib.View.BarLevelView">
@ -8,6 +8,8 @@
<Image <Image
x:Name="BarLevelImage" x:Name="BarLevelImage"
WidthRequest="50" WidthRequest="50"
HeightRequest="30"
Aspect="AspectFit"
IsVisible="{Binding IsBatteryChargeLevelImageVisible}" IsVisible="{Binding IsBatteryChargeLevelImageVisible}"
Source="{Binding BatteryChargeLevelImageSourceString}"/> Source="{Binding BatteryChargeLevelImageSourceString}"/>
<!-- Text describing filling level batteries with 1...4 and 6..N bars --> <!-- Text describing filling level batteries with 1...4 and 6..N bars -->

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShareeSharedGuiLib.View.RunningProcessView">
<ContentView.Content>
<!--Grid for different Opacity values-->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!--Background White, half transparent-->
<Frame
Grid.Row="0"
Grid.RowSpan="2"
BackgroundColor="White"
Opacity=".75"
CornerRadius="10"/>
<!--Show spinner and info text-->
<!--Spinner-->
<ActivityIndicator
Grid.Row="0"
IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
<!--Info text-->
<Label
Grid.Row="1"
Text="{Binding StatusInfoText}"
FontSize="Small"
HorizontalOptions="Center"
Padding="0,0,0,10"/>
</Grid>
</ContentView.Content>
</ContentView>

View file

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace ShareeSharedGuiLib.View
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class RunningProcessView : ContentView
{
public RunningProcessView()
{
InitializeComponent();
}
}
}

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="ShareeSharedGuiLib.View.VersionNumberView">
<ContentView.Content>
<StackLayout HorizontalOptions="Center"
Orientation="Horizontal"
Padding="0,0,0,10">
<Label
HorizontalOptions="End"
FontSize="12"
TextColor="DimGray"
Text="App Version"/>
<Label
HorizontalOptions="Start"
FontSize="12"
TextColor="DimGray"
x:Name="CurrentAppVersionNumber"/>
</StackLayout>
</ContentView.Content>
</ContentView>

View file

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace ShareeSharedGuiLib.View
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class VersionNumberView : ContentView
{
public VersionNumberView()
{
InitializeComponent();
CurrentAppVersionNumber.Text = TINK.Model.CurrentAppInfos.CurrentAppVersion;
}
}
}

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.338" android:versionCode="338"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.339" android:versionCode="339">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" /> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions --> <!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services --> <!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>sharee.bike</string> <string>sharee.bike</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>338</string> <string>339</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.0.338</string> <string>3.0.339</string>
</dict> </dict>
</plist> </plist>

View file

@ -1,95 +1,107 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns="http://xamarin.com/schemas/2014/forms"
x:Class="TINK.View.BikesAtStation.BikesAtStationPage" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local_bike="clr-namespace:TINK.View.Bike" x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"> xmlns:local_bike="clr-namespace:TINK.View.Bike"
<Shell.TitleView> xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
<Grid ColumnDefinitions="Auto, 1*"> xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View">
<Label Style="{StaticResource Label-Navbar}"
Text="{Binding Title}"/> <Shell.TitleView>
</Grid> <Grid ColumnDefinitions="Auto, 1*">
</Shell.TitleView> <Label Style="{StaticResource Label-Navbar}"
<ContentPage.Resources> Text="{Binding Title}"/>
<ResourceDictionary> </Grid>
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/> </Shell.TitleView>
</ResourceDictionary>
</ContentPage.Resources> <ContentPage.Resources>
<ContentPage.Content> <ResourceDictionary>
<Frame> <local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
<StackLayout </ResourceDictionary>
Orientation="Vertical"> </ContentPage.Resources>
<!-- Title bar stack layout-->
<StackLayout <ContentPage.Content>
Orientation="Vertical">
<Label <Frame>
HorizontalOptions="Center"
FontAttributes="Bold" <!--Grid for Bike(s) view and Running process in same row-->
TextColor="{DynamicResource primary-back-title-color}" <Grid>
Text="{Binding StationDetailText}"/> <Grid.RowDefinitions>
<BoxView <RowDefinition Height="Auto"/>
HeightRequest="1" <RowDefinition Height="*"/>
Color="{DynamicResource primary-back-title-color}"/> <RowDefinition Height="Auto"/>
</StackLayout> </Grid.RowDefinitions>
<!-- Center stack layout -->
<StackLayout <!--Bike(s) view-->
Orientation="Vertical" <StackLayout Grid.Row="0"
VerticalOptions="CenterAndExpand"> Orientation="Vertical">
<ListView
x:Name="BikesAtStationListView" <!--Title-->
SelectionMode="None" <Label
SelectedItem="{Binding SelectedBike}" HorizontalOptions="Center"
IsEnabled="{Binding IsIdle}" FontAttributes="Bold"
IsVisible="{Binding IsBikesListVisible}" TextColor="{DynamicResource primary-back-title-color}"
HasUnevenRows="True" Text="{Binding StationDetailText}"/>
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<Label <!--Line-->
IsVisible="{Binding IsNoBikesAtStationVisible}" <BoxView
Text="{Binding NoBikesAtStationText}"/> HeightRequest="1"
</StackLayout> Color="{DynamicResource primary-back-title-color}"/>
<!-- Status bar stack layout--> </StackLayout>
<StackLayout
Orientation="Vertical"> <!--Bike(s)-->
<StackLayout <ListView
Orientation="Horizontal"> Grid.Row="1"
<Label x:Name="BikesAtStationListView"
HeightRequest="24" SelectionMode="None"
FontSize="Small" SelectedItem="{Binding SelectedBike}"
Text="{Binding StatusInfoText}" IsEnabled="{Binding IsIdle}"
VerticalOptions="Center" IsVisible="{Binding IsBikesListVisible}"
HorizontalOptions="FillAndExpand"/> HasUnevenRows="True"
<ActivityIndicator IsRunning="{Binding IsRunning}" ItemTemplate="{StaticResource bikeTemplateSelector}"/>
IsVisible="{Binding IsRunning}"
HeightRequest="20" <!--No Bikes-->
VerticalOptions="CenterAndExpand" <Label
HorizontalOptions="End"> Grid.Row="1"
<ActivityIndicator.WidthRequest> IsVisible="{Binding IsNoBikesAtStationVisible}"
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" /> Text="{Binding NoBikesAtStationText}"/>
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color> <!-- Contact and Login at end of page-->
<OnPlatform x:TypeArguments="Color" <StackLayout
Android="#009899" iOS="#009899" WinPhone="#009899" /> Orientation="Vertical"
</ActivityIndicator.Color> Grid.Row="2">
</ActivityIndicator>
</StackLayout> <!--Line-->
<BoxView HeightRequest="1" Color="{DynamicResource primary-back-title-color}"/> <BoxView HeightRequest="1" Color="{DynamicResource primary-back-title-color}"/>
<Label
TextType="Html" <!--Contact to operator-->
Text="{Binding ContactSupportHintText}"> <Label
<Label.GestureRecognizers> TextType="Html"
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/> Text="{Binding ContactSupportHintText}">
</Label.GestureRecognizers> <Label.GestureRecognizers>
</Label> <TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
<Label </Label.GestureRecognizers>
IsVisible="{Binding IsLoginRequiredHintVisible}" </Label>
TextType="Html"
Text="{Binding LoginRequiredHintText}"> <!--Login required-->
<Label.GestureRecognizers> <Label
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/> IsVisible="{Binding IsLoginRequiredHintVisible}"
</Label.GestureRecognizers> TextType="Html"
</Label> Text="{Binding LoginRequiredHintText}">
</StackLayout> <Label.GestureRecognizers>
</StackLayout> <TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
</Frame> </Label.GestureRecognizers>
</ContentPage.Content> </Label>
</StackLayout>
<!--While process is running-->
<sharedGui:RunningProcessView
IsVisible="{Binding IsRunning}"
Grid.Row="1"/>
</Grid>
</Frame>
</ContentPage.Content>
</ContentPage> </ContentPage>

View file

@ -1,33 +1,43 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.CopriWebView.ManageAccountPage"> xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
<Shell.TitleView> x:Class="TINK.View.CopriWebView.ManageAccountPage">
<Grid ColumnDefinitions="Auto, 1*">
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MessageAccountPageManagePersonalData}"/>
</Grid>
</Shell.TitleView>
<Shell.BackButtonBehavior>
<!--<BackButtonBehavior IconOverride="x_icon.png" />-->
<BackButtonBehavior IconOverride="{FontImage FontFamily=FA-S, Glyph={StaticResource IconClose}, Color=White, Size=16}" />
</Shell.BackButtonBehavior>
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WebView x:Name="ManageAccount" <Shell.TitleView>
HeightRequest="1400" <Grid ColumnDefinitions="Auto, 1*">
WidthRequest="1000" <Label Style="{StaticResource Label-Navbar}"
Source="{Binding Uri}" /> Text="{x:Static resources:AppResources.MessageAccountPageManagePersonalData}"/>
<ActivityIndicator </Grid>
x:Name="ActivityIndicatorLoading" </Shell.TitleView>
HeightRequest="100"
VerticalOptions="CenterAndExpand" <Shell.BackButtonBehavior>
HorizontalOptions="CenterAndExpand"/> <BackButtonBehavior IconOverride="{FontImage FontFamily=FA-S, Glyph={StaticResource IconClose}, Color=White, Size=16}" />
</Grid> </Shell.BackButtonBehavior>
</ContentPage.Content>
<ContentPage.Content>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WebView
Grid.Row="0"
x:Name="ManageAccount"
HeightRequest="1400"
WidthRequest="1000"
Source="{Binding Uri}" />
<ActivityIndicator Grid.Row="0"
x:Name="ActivityIndicatorLoading"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage> </ContentPage>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
@ -21,11 +21,13 @@
HeightRequest="1400" HeightRequest="1400"
WidthRequest="1000" WidthRequest="1000"
Source="{Binding Uri}" /> Source="{Binding Uri}" />
<ActivityIndicator
x:Name="ActivityIndicatorLoading" <ActivityIndicator Grid.Row="0"
HeightRequest="100" x:Name="ActivityIndicatorLoading"
VerticalOptions="CenterAndExpand" Scale="2"
HorizontalOptions="CenterAndExpand"/> VerticalOptions="CenterAndExpand"
</Grid> HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content> </ContentPage.Content>
</ContentPage> </ContentPage>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
@ -21,11 +21,13 @@
HeightRequest="1400" HeightRequest="1400"
WidthRequest="1000" WidthRequest="1000"
Source="{Binding Uri}" /> Source="{Binding Uri}" />
<ActivityIndicator
x:Name="ActivityIndicatorLoading" <ActivityIndicator Grid.Row="0"
HeightRequest="100" x:Name="ActivityIndicatorLoading"
VerticalOptions="CenterAndExpand" Scale="2"
HorizontalOptions="CenterAndExpand"/> VerticalOptions="CenterAndExpand"
</Grid> HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content> </ContentPage.Content>
</ContentPage> </ContentPage>

View file

@ -1,68 +1,68 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns="http://xamarin.com/schemas/2014/forms"
x:Class="TINK.View.FindBike.FindBikePage" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" x:Class="TINK.View.FindBike.FindBikePage"
xmlns:local_bike="clr-namespace:TINK.View.Bike"> xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
<Shell.TitleView> xmlns:local_bike="clr-namespace:TINK.View.Bike"
<Grid ColumnDefinitions="Auto, 1*"> xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View">
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingFindBike}"/> <Shell.TitleView>
</Grid> <Grid ColumnDefinitions="Auto, 1*">
</Shell.TitleView> <Label Style="{StaticResource Label-Navbar}"
<ContentPage.Resources> Text="{x:Static resources:AppResources.MarkingFindBike}"/>
<ResourceDictionary> </Grid>
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/> </Shell.TitleView>
</ResourceDictionary>
</ContentPage.Resources> <ContentPage.Resources>
<ContentPage.Content> <ResourceDictionary>
<Frame> <local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
<StackLayout> </ResourceDictionary>
<Entry </ContentPage.Resources>
Placeholder="Fahrrad-Nummer bitte hier eingeben"
IsVisible="{Binding IsSelectBikeVisible}" <ContentPage.Content>
MaxLength="10"
CursorPosition="0" <Frame>
Text="{Binding BikeIdUserInput}">
</Entry> <!--Grid for Bike(s) view and Running process in same row-->
<Button <Grid>
Text="Rad Wählen" <Grid.RowDefinitions>
IsEnabled="{Binding IsSelectBikeEnabled}" <RowDefinition Height="*"/>
IsVisible="{Binding IsSelectBikeVisible}" </Grid.RowDefinitions>
Command="{Binding OnSelectBikeRequest}">
</Button> <!--Search bike-->
<ListView <StackLayout Grid.Row="0">
x:Name="FindBikeListView" <Entry
SelectionMode="None" Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
SelectedItem="{Binding SelectedBike}" IsVisible="{Binding IsSelectBikeVisible}"
IsEnabled="{Binding IsIdle}" MaxLength="10"
IsVisible="{Binding IsBikesListVisible}" CursorPosition="0"
HasUnevenRows="True" Text="{Binding BikeIdUserInput}"/>
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<StackLayout <Button
VerticalOptions="EndAndExpand" Text="{x:Static resources:AppResources.MarkingFindBike}"
Orientation="Horizontal"> IsEnabled="{Binding IsSelectBikeEnabled}"
<Label IsVisible="{Binding IsSelectBikeVisible}"
HeightRequest="20" Command="{Binding OnSelectBikeRequest}"/>
Text="{Binding StatusInfoText}"
FontSize="Small" <ListView
VerticalOptions="Center" x:Name="FindBikeListView"
HorizontalOptions="FillAndExpand"/> SelectionMode="None"
<ActivityIndicator IsRunning="{Binding IsRunning}" SelectedItem="{Binding SelectedBike}"
IsVisible="{Binding IsRunning}" IsEnabled="{Binding IsIdle}"
HeightRequest="20" IsVisible="{Binding IsBikesListVisible}"
VerticalOptions="CenterAndExpand" HasUnevenRows="True"
HorizontalOptions="End"> ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" /> </StackLayout>
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color> <!--While process is running-->
<OnPlatform x:TypeArguments="Color" <sharedGui:RunningProcessView
Android="#009899" iOS="#009899" WinPhone="#009899" /> Grid.Row="0"
</ActivityIndicator.Color> IsVisible="{Binding IsRunning}"/>
</ActivityIndicator>
</StackLayout> </Grid>
</StackLayout>
</Frame> </Frame>
</ContentPage.Content> </ContentPage.Content>
</ContentPage> </ContentPage>

View file

@ -1,112 +1,116 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps" xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings" xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Map.MapPage" x:Class="TINK.View.Map.MapPage"
BackgroundColor="{DynamicResource Key=primary-back-title-color}"> BackgroundColor="{DynamicResource Key=primary-back-title-color}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*"> <Shell.TitleView >
<Label Style="{StaticResource Label-Navbar}" <Grid ColumnDefinitions="Auto, 1*">
Text="{x:Static resources:AppResources.MarkingMapPage}"/> <Label Style="{StaticResource Label-Navbar}"
</Grid> Text="{x:Static resources:AppResources.MarkingMapPage}"/>
</Shell.TitleView> </Grid>
<Grid </Shell.TitleView>
RowDefinitions="3,46,1*,33"
ColumnDefinitions="1*,Auto,1*" <!--Grid for Map with Buttons and Running process-->
IsEnabled="{Binding IsMapPageEnabled}" <Grid
VerticalOptions="FillAndExpand" RowDefinitions="3,46,1*,Auto"
> ColumnDefinitions="1*,Auto,1*"
<maps:Map IsEnabled="{Binding IsMapPageEnabled}"
Grid.RowSpan="3" VerticalOptions="FillAndExpand">
Grid.ColumnSpan="3"
WidthRequest="320" <!--Map-->
HeightRequest="800" <maps:Map
x:Name="MyMap" Grid.RowSpan="3"
IsShowingUser="False" Grid.ColumnSpan="3"
MapType="Street"> WidthRequest="320"
<maps:Map.Behaviors> HeightRequest="800"
<bindings:BindingPinsBehavior Value="{Binding Pins}"/> x:Name="MyMap"
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/> IsShowingUser="False"
</maps:Map.Behaviors> MapType="Street">
</maps:Map> <maps:Map.Behaviors>
<Frame <bindings:BindingPinsBehavior Value="{Binding Pins}"/>
CornerRadius="13" <bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
Grid.Row="1" </maps:Map.Behaviors>
Grid.Column="1" </maps:Map>
Margin="0"
Padding="0" <!--Buttons for choosing bike type-->
BackgroundColor="{DynamicResource secondary-back-title-color}"> <Frame
<StackLayout Orientation="Horizontal" CornerRadius="13"
Margin="0" Grid.Row="1"
Padding="0"> Grid.Column="1"
<Button Margin="0"
x:Name="KonradButton" Padding="0"
AutomationId ="FilterKonrad_button" BackgroundColor="{DynamicResource secondary-back-title-color}">
Text="{x:Static resources:AppResources.MarkingCityBike}" <StackLayout
Command="{Binding OnToggleTinkToKonrad}" Orientation="Horizontal"
IsVisible="{Binding IsToggleVisible}" Margin="0"
BackgroundColor="{Binding KonradColor}" Padding="0">
BorderColor="{Binding KonradColor}" <Button
BorderWidth="0" x:Name="KonradButton"
VerticalOptions="Center" AutomationId ="FilterKonrad_button"
HorizontalOptions="Center" Text="{x:Static resources:AppResources.MarkingCityBike}"
WidthRequest="94" Command="{Binding OnToggleTinkToKonrad}"
HeightRequest="40" IsVisible="{Binding IsToggleVisible}"
BorderRadius="10" BackgroundColor="{Binding KonradColor}"
Margin="3,0,0,0" BorderColor="{Binding KonradColor}"
FontSize="Small" BorderWidth="0"
FontAttributes="Bold" VerticalOptions="Center"
TextColor="{Binding NoKonradColor}"> HorizontalOptions="Center"
</Button> WidthRequest="94"
<Button HeightRequest="40"
x:Name="TINKButton" BorderRadius="10"
AutomationId ="FilterTINK_button" Margin="3,0,0,0"
Text="{x:Static resources:AppResources.MarkingCargoBike}" FontSize="Small"
Command="{Binding OnToggleKonradToTink}" FontAttributes="Bold"
IsVisible="{Binding IsToggleVisible}" TextColor="{Binding NoKonradColor}">
BackgroundColor="{Binding TinkColor}" </Button>
BorderColor="{Binding TinkColor}" <Button
BorderWidth="0" x:Name="TINKButton"
VerticalOptions="Center" AutomationId ="FilterTINK_button"
HorizontalOptions="Center" Text="{x:Static resources:AppResources.MarkingCargoBike}"
WidthRequest="94" Command="{Binding OnToggleKonradToTink}"
HeightRequest="40" IsVisible="{Binding IsToggleVisible}"
BorderRadius="10" BackgroundColor="{Binding TinkColor}"
Margin="0,0,3,0" BorderColor="{Binding TinkColor}"
FontSize="Small" BorderWidth="0"
FontAttributes="Bold" VerticalOptions="Center"
TextColor="{Binding NoTinkColor}"> HorizontalOptions="Center"
</Button> WidthRequest="94"
</StackLayout> HeightRequest="40"
</Frame> BorderRadius="10"
<StackLayout Margin="0,0,3,0"
Grid.Row="3" FontSize="Small"
Grid.ColumnSpan="3" FontAttributes="Bold"
Margin="6,3,6,6" TextColor="{Binding NoTinkColor}">
VerticalOptions="EndAndExpand" </Button>
Orientation="Horizontal"> </StackLayout>
<Label </Frame>
HeightRequest="24"
FontSize="Small" <!--While process is running-->
Text="{Binding StatusInfoText}" <!--Spinner-->
TextColor="White" <ActivityIndicator
VerticalOptions="Center" Grid.RowSpan="4"
HorizontalOptions="FillAndExpand"/> Grid.ColumnSpan="3"
<ActivityIndicator IsRunning="{Binding IsRunning}" IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}" IsVisible="{Binding IsRunning}"
HeightRequest="20" Scale="2"
VerticalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"
HorizontalOptions="End"> HorizontalOptions="CenterAndExpand"
<ActivityIndicator.WidthRequest> Color="{x:DynamicResource primary-back-title-color}"/>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
</ActivityIndicator.WidthRequest> <!--Info text-->
<ActivityIndicator.Color> <Label
<OnPlatform x:TypeArguments="Color" Grid.Row="3"
Android="White" iOS="White" WinPhone="White"/> Grid.ColumnSpan="3"
</ActivityIndicator.Color> Text="{Binding StatusInfoText}"
</ActivityIndicator> TextColor="White"
</StackLayout> FontSize="Small"
</Grid> HorizontalOptions="Center"
Padding="0,0,0,10"/>
</Grid>
</ContentPage> </ContentPage>

View file

@ -1,64 +1,65 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" <ContentPage
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns="http://xamarin.com/schemas/2014/forms"
x:Class="TINK.View.MyBikes.MyBikesPage" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" x:Class="TINK.View.MyBikes.MyBikesPage"
xmlns:local_bike="clr-namespace:TINK.View.Bike"> xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
<Shell.TitleView> xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
<Grid ColumnDefinitions="Auto, 1*"> xmlns:local_bike="clr-namespace:TINK.View.Bike">
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingMyBikes}"/> <Shell.TitleView>
</Grid> <Grid ColumnDefinitions="Auto, 1*">
</Shell.TitleView> <Label Style="{StaticResource Label-Navbar}"
<ContentPage.Resources> Text="{x:Static resources:AppResources.MarkingMyBikes}"/>
<ResourceDictionary> </Grid>
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/> </Shell.TitleView>
</ResourceDictionary>
</ContentPage.Resources> <ContentPage.Resources>
<ContentPage.Content> <ResourceDictionary>
<Frame> <local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
<StackLayout </ResourceDictionary>
Orientation="Vertical"> </ContentPage.Resources>
<!-- Center stack layout -->
<StackLayout <ContentPage.Content>
VerticalOptions="CenterAndExpand"
Orientation="Vertical"> <Frame>
<ListView
x:Name="MyBikesListView" <!--Grid for Bike(s) view and Running process in same row-->
SelectionMode="None" <Grid>
SelectedItem="{Binding SelectedBike}" <Grid.RowDefinitions>
IsEnabled="{Binding IsIdle}" <RowDefinition Height="*"/>
IsVisible="{Binding IsBikesListVisible}" </Grid.RowDefinitions>
HasUnevenRows="True"
ItemTemplate="{StaticResource bikeTemplateSelector}"/> <!--Bike(s) view-->
<Label <StackLayout Grid.Row="0"
IsVisible="{Binding IsNoBikesOccupiedVisible}" VerticalOptions="CenterAndExpand"
Text="{Binding NoBikesOccupiedText}"/> Orientation="Vertical">
</StackLayout>
<!-- Status bar stack layout--> <!--Bike(s)-->
<StackLayout <ListView
Orientation="Horizontal"> x:Name="MyBikesListView"
<Label SelectionMode="None"
HeightRequest="24" SelectedItem="{Binding SelectedBike}"
Text="{Binding StatusInfoText}" IsEnabled="{Binding IsIdle}"
FontSize="Small" IsVisible="{Binding IsBikesListVisible}"
VerticalOptions="Center" HasUnevenRows="True"
HorizontalOptions="FillAndExpand"/> ItemTemplate="{StaticResource bikeTemplateSelector}"/>
<ActivityIndicator IsRunning="{Binding IsRunning}"
IsVisible="{Binding IsRunning}" <!--No Bikes-->
HeightRequest="20" <Label
VerticalOptions="CenterAndExpand" IsVisible="{Binding IsNoBikesOccupiedVisible}"
HorizontalOptions="End"> Text="{Binding NoBikesOccupiedText}"/>
<ActivityIndicator.WidthRequest>
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" /> </StackLayout>
</ActivityIndicator.WidthRequest>
<ActivityIndicator.Color> <!--While process is running-->
<OnPlatform x:TypeArguments="Color" <sharedGui:RunningProcessView
Android="#009899" iOS="#009899" WinPhone="#009899" /> Grid.Row="0"
</ActivityIndicator.Color> IsVisible="{Binding IsRunning}"/>
</ActivityIndicator>
</StackLayout> </Grid>
</StackLayout>
</Frame> </Frame>
</ContentPage.Content>
</ContentPage.Content>
</ContentPage> </ContentPage>

View file

@ -11,100 +11,105 @@
xmlns:contact="clr-namespace:TINK.View.Contact" xmlns:contact="clr-namespace:TINK.View.Contact"
xmlns:info="clr-namespace:TINK.View.Info" xmlns:info="clr-namespace:TINK.View.Info"
xmlns:header="clr-namespace:TINK.View.RootShell" xmlns:header="clr-namespace:TINK.View.RootShell"
xmlns:version="clr-namespace:ShareeSharedGuiLib.View"
BackgroundColor="{DynamicResource Key=primary-back-title-color}" BackgroundColor="{DynamicResource Key=primary-back-title-color}"
Title="Shell" Title="Shell"
x:Class="TINK.View.RootShell.AppShell"> x:Class="TINK.View.RootShell.AppShell">
<Shell.FlyoutHeader> <Shell.FlyoutHeader>
<header:FlyoutHeader/> <header:FlyoutHeader/>
</Shell.FlyoutHeader> </Shell.FlyoutHeader>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingMapPage}" Title="{x:Static resources:AppResources.MarkingMapPage}"
Route="MapPage" Route="MapPage"
ContentTemplate="{DataTemplate mappage:MapPage}"> ContentTemplate="{DataTemplate mappage:MapPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconMap}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconMap}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingFindBike}" Title="{x:Static resources:AppResources.MarkingFindBike}"
IsVisible="{Binding IsFindBikePageVisible}" IsVisible="{Binding IsFindBikePageVisible}"
ContentTemplate="{DataTemplate findbike:FindBikePage}"> ContentTemplate="{DataTemplate findbike:FindBikePage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconFindBike}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconFindBike}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingMyBikes}" Title="{x:Static resources:AppResources.MarkingMyBikes}"
IsVisible="{Binding IsMyBikesPageVisible}" IsVisible="{Binding IsMyBikesPageVisible}"
ContentTemplate="{DataTemplate mybikes:MyBikesPage}"> ContentTemplate="{DataTemplate mybikes:MyBikesPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconMyBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconMyBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingAccount}" Title="{x:Static resources:AppResources.MarkingAccount}"
IsVisible="{Binding IsAccountPageVisible}" IsVisible="{Binding IsAccountPageVisible}"
ContentTemplate="{DataTemplate account:AccountPage}"> ContentTemplate="{DataTemplate account:AccountPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconAccount}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconAccount}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingLogin}" Title="{x:Static resources:AppResources.MarkingLogin}"
Route="LoginPage" Route="LoginPage"
IsVisible="{Binding IsLoginPageVisible}" IsVisible="{Binding IsLoginPageVisible}"
ContentTemplate="{DataTemplate login:LoginPage}"> ContentTemplate="{DataTemplate login:LoginPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconLogin}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconLogin}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingSettings}" Title="{x:Static resources:AppResources.MarkingSettings}"
IsVisible="{Binding IsSettingsPageVisible}" IsVisible="{Binding IsSettingsPageVisible}"
ContentTemplate="{DataTemplate settings:SettingsPage}"> ContentTemplate="{DataTemplate settings:SettingsPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconSettings}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconSettings}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingFeesAndBikes}" Title="{x:Static resources:AppResources.MarkingFeesAndBikes}"
ContentTemplate="{DataTemplate contact:FeesAndBikesPage}"> ContentTemplate="{DataTemplate contact:FeesAndBikesPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconFeesAndBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconFeesAndBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{x:Static resources:AppResources.MarkingFeedbackAndContact}" Title="{x:Static resources:AppResources.MarkingFeedbackAndContact}"
Route="ContactPage" Route="ContactPage"
ContentTemplate="{DataTemplate contact:ContactPage}"> ContentTemplate="{DataTemplate contact:ContactPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconContact}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconContact}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems"> <FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent <ShellContent
Title="{Binding TabbedPageIngoTitle}" Title="{Binding TabbedPageIngoTitle}"
ContentTemplate="{DataTemplate info:InfoPage}"> ContentTemplate="{DataTemplate info:InfoPage}">
<ShellContent.FlyoutIcon> <ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconInfo}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" /> <FontImageSource Glyph="{StaticResource IconInfo}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon> </ShellContent.FlyoutIcon>
</ShellContent> </ShellContent>
</FlyoutItem> </FlyoutItem>
<Shell.FlyoutFooter>
<version:VersionNumberView/>
</Shell.FlyoutFooter>
</Shell> </Shell>

View file

@ -0,0 +1,9 @@
using Xamarin.Essentials;
namespace TINK.Model
{
public static class CurrentAppInfos
{
public static string CurrentAppVersion => VersionTracking.CurrentVersion;
}
}

View file

@ -1,4 +1,4 @@
using Xamarin.Essentials; using Xamarin.Essentials;
namespace TINK.Model.Device namespace TINK.Model.Device
{ {
@ -14,6 +14,7 @@ namespace TINK.Model.Device
/// <summary> Device Model (SMG-950U, iPhone10,6). </summary> /// <summary> Device Model (SMG-950U, iPhone10,6). </summary>
string Model { get; } string Model { get; }
/// <summary> Operation system. </summary>
DevicePlatform Platform { get; } DevicePlatform Platform { get; }
/// <summary> Operating System Version Number (7.0) as text</summary> /// <summary> Operating System Version Number (7.0) as text</summary>

View file

@ -0,0 +1,16 @@
using System;
using Serilog;
using TINK.Model.Device;
namespace TINK.Model.Logging
{
public class AppAndEnvironmentInfo
{
public void LogHeader(ISmartDevice device, AppFlavor appFlavor, Version appVersion)
{
Log.ForContext<AppAndEnvironmentInfo>().Information($"App: {appFlavor.GetDisplayName()}, version {appVersion}");
Log.ForContext<AppAndEnvironmentInfo>().Information($"OS: {device.Platform}, version: {device.VersionText}");
Log.ForContext<AppAndEnvironmentInfo>().Information($"Device: {device.Model}, manufacturer: {device.Manufacturer}");
}
}
}

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Threading; using System.Threading;
@ -190,6 +190,9 @@ namespace TINK.Model
Flavor = flavor; Flavor = flavor;
// Log application and environment information.
new AppAndEnvironmentInfo().LogHeader(device, flavor, currentVersion);
var locksServices = locksService != null var locksServices = locksService != null
? new HashSet<ILocksService> { locksService } ? new HashSet<ILocksService> { locksService }
: new HashSet<ILocksService> { : new HashSet<ILocksService> {
@ -440,15 +443,50 @@ namespace TINK.Model
LoggingLevelSwitch levelSwitch, LoggingLevelSwitch levelSwitch,
string logFilePath) string logFilePath)
{ {
bool LogToFileFilter(LogEvent e)
{
if (e.Level >= levelSwitch.MinimumLevel)
{
// If level is above global logging level do log.
return true;
}
if (!e.Properties.ContainsKey(Constants.SourceContextPropertyName))
{
// Do not log if source context is not available.
return false;
}
var sourceContex = e.Properties[Constants.SourceContextPropertyName].ToString();
if ((e.Level == LogEventLevel.Information) &&
(sourceContex.Contains(typeof(AppAndEnvironmentInfo).Namespace) /* Log App and enviroment info. */
|| sourceContex.Contains(typeof(ViewModel.Bikes.Bike.BluetoothLock.RequestHandler.Base).Namespace /* Log info-level messages to provide context for bluetooth log. */ )))
{
return true;
}
if (e.Level >= LogEventLevel.Debug
&& sourceContex.Contains(typeof(LockItBase).Namespace /*Scanning, connect and management functionality */))
{
return true;
}
return false;
}
Log.Logger = new LoggerConfiguration() Log.Logger = new LoggerConfiguration()
.MinimumLevel.ControlledBy(levelSwitch) .MinimumLevel.Verbose()
.MinimumLevel.Override("TINK.Services.BluetoothLock.BLE", LogEventLevel.Debug) /* Scanning, connect and management functionality */ .WriteTo.Logger(consoleLoggerConfig => consoleLoggerConfig
.MinimumLevel.Override("TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler", LogEventLevel.Information) /* Provides use case context */ .MinimumLevel.Information()
.WriteTo.Debug() .WriteTo.Debug()
.WriteTo.File(logFilePath, Logging.RollingInterval.Session) )
.WriteTo.Logger(lg => lg .WriteTo.Logger(fileLoggerConfig => fileLoggerConfig
.MinimumLevel.ControlledBy(new LoggingLevelSwitch(LogEventLevel.Debug)) .Filter.ByIncludingOnly(e => LogToFileFilter(e))
.Filter.ByIncludingOnly(Matching.FromSource("TINK.Services.BluetoothLock.BLE")) .WriteTo.File(logFilePath, Logging.RollingInterval.Session)
)
.WriteTo.Logger(copriLoggerConfig => copriLoggerConfig
.MinimumLevel.Debug()
.Filter.ByIncludingOnly(Matching.FromSource(typeof(LockItBase/*Scanning, connect and management functionality */).Namespace))
.WriteTo.MemoryQueueSink() .WriteTo.MemoryQueueSink()
) )
.CreateLogger(); .CreateLogger();

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using TINK.MultilingualResources; using TINK.MultilingualResources;
using Xamarin.Essentials; using Xamarin.Essentials;
@ -584,6 +584,16 @@ namespace TINK.Model
new Version(3, 0, 338), new Version(3, 0, 338),
AppResources.ChangeLog3_0_338_SB, AppResources.ChangeLog3_0_338_SB,
new List<AppFlavor> { AppFlavor.ShareeBike } new List<AppFlavor> { AppFlavor.ShareeBike }
},
{
new Version(3, 0, 339),
AppResources.ChangeLog3_0_339_SB_LB,
new List<AppFlavor> { AppFlavor.LastenradBayern, AppFlavor.ShareeBike }
},
{
new Version(3, 0, 339),
AppResources.ChangeLog3_0_339_MK,
new List<AppFlavor> { AppFlavor.MeinKonrad }
} }
}; };

View file

@ -1210,6 +1210,26 @@ namespace TINK.MultilingualResources {
} }
} }
/// <summary>
/// Looks up a localized string similar to The cargo bikes from the suburbs now show their home station in their name. These bikes must be returned there!
///
///You can now see at a glance which app version you have installed: in the menu at the very bottom. Please update the app regularly to be up to date in functionality and design!.
/// </summary>
public static string ChangeLog3_0_339_MK {
get {
return ResourceManager.GetString("ChangeLog3_0_339_MK", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You can now see at a glance which app version you have installed: in the menu at the very bottom. Please update the app regularly to be up to date in functionality and design!.
/// </summary>
public static string ChangeLog3_0_339_SB_LB {
get {
return ResourceManager.GetString("ChangeLog3_0_339_SB_LB", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Failed to query available bikes.. /// Looks up a localized string similar to Failed to query available bikes..
/// </summary> /// </summary>
@ -2636,6 +2656,15 @@ namespace TINK.MultilingualResources {
} }
} }
/// <summary>
/// Looks up a localized string similar to Enter bike number here.
/// </summary>
public static string PlaceholderFindBike {
get {
return ResourceManager.GetString("PlaceholderFindBike", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to No. /// Looks up a localized string similar to No.
/// </summary> /// </summary>

View file

@ -1020,4 +1020,15 @@ Außerdem: Kleine Grafiken lassen auf einen Blick erkennen um was für einen Rad
<data name="QuestionSupportmailTitle" xml:space="preserve"> <data name="QuestionSupportmailTitle" xml:space="preserve">
<value>Einwilligung</value> <value>Einwilligung</value>
</data> </data>
<data name="PlaceholderFindBike" xml:space="preserve">
<value>Fahrrad-Nummer hier eingeben</value>
</data>
<data name="ChangeLog3_0_339_MK" xml:space="preserve">
<value>Die Lastenräder aus den Vororten zeigen nun ihre Heimatstation im Namen an. Diese Räder müssen dort wieder abgeben werden!
Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben: im Menü ganz unten. Bitte aktualisieren Sie die App regelmäßig, um in Funktionalität und Design auf dem neuesten Stand zu sein!</value>
</data>
<data name="ChangeLog3_0_339_SB_LB" xml:space="preserve">
<value>Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben: im Menü ganz unten. Bitte aktualisieren Sie die App regelmäßig, um in Funktionalität und Design auf dem neuesten Stand zu sein!</value>
</data>
</root> </root>

View file

@ -1112,4 +1112,15 @@ In addition: Small graphics let you see at a glance what type of bike it is.</va
<data name="QuestionSupportmailTitle" xml:space="preserve"> <data name="QuestionSupportmailTitle" xml:space="preserve">
<value>Consent</value> <value>Consent</value>
</data> </data>
<data name="PlaceholderFindBike" xml:space="preserve">
<value>Enter bike number here</value>
</data>
<data name="ChangeLog3_0_339_MK" xml:space="preserve">
<value>The cargo bikes from the suburbs now show their home station in their name. These bikes must be returned there!
You can now see at a glance which app version you have installed: in the menu at the very bottom. Please update the app regularly to be up to date in functionality and design!</value>
</data>
<data name="ChangeLog3_0_339_SB_LB" xml:space="preserve">
<value>You can now see at a glance which app version you have installed: in the menu at the very bottom. Please update the app regularly to be up to date in functionality and design!</value>
</data>
</root> </root>

View file

@ -1384,6 +1384,22 @@ Außerdem: Kleine Grafiken lassen auf einen Blick erkennen um was für einen Rad
<source>Consent</source> <source>Consent</source>
<target state="translated">Einwilligung</target> <target state="translated">Einwilligung</target>
</trans-unit> </trans-unit>
<trans-unit id="PlaceholderFindBike" translate="yes" xml:space="preserve">
<source>Enter bike number here</source>
<target state="translated">Fahrrad-Nummer hier eingeben</target>
</trans-unit>
<trans-unit id="ChangeLog3_0_339_MK" translate="yes" xml:space="preserve">
<source>The cargo bikes from the suburbs now show their home station in their name. These bikes must be returned there!
You can now see at a glance which app version you have installed: in the menu at the very bottom. Please update the app regularly to be up to date in functionality and design!</source>
<target state="translated">Die Lastenräder aus den Vororten zeigen nun ihre Heimatstation im Namen an. Diese Räder müssen dort wieder abgeben werden!
Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben: im Menü ganz unten. Bitte aktualisieren Sie die App regelmäßig, um in Funktionalität und Design auf dem neuesten Stand zu sein!</target>
</trans-unit>
<trans-unit id="ChangeLog3_0_339_SB_LB" translate="yes" xml:space="preserve">
<source>You can now see at a glance which app version you have installed: in the menu at the very bottom. Please update the app regularly to be up to date in functionality and design!</source>
<target state="translated">Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben: im Menü ganz unten. Bitte aktualisieren Sie die App regelmäßig, um in Funktionalität und Design auf dem neuesten Stand zu sein!</target>
</trans-unit>
</group> </group>
</body> </body>
</file> </file>

View file

@ -1,11 +1,13 @@
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace TINK.Repository.Exception namespace TINK.Repository.Exception
{ {
public class NotAtStationException : InvalidResponseException public class NotAtStationException : InvalidResponseException
{ {
/// <summary> COPRI response status regular expression. </summary> public const string RETURNBIKE_FAILURE_STATUS_MESSAGE_CODE = "FAILURE 2178:";
public const string RETURNBIKE_FAILURE_STATUS_MESSAGE_UPPERCASE = "(FAILURE 2178: BIKE [0-9]+ OUT OF GEO FENCING\\. )([0-9]+)( METER DISTANCE TO NEXT STATION )([0-9]+)";
/// <summary> COPRI response status regular expression to extract detail information. </summary>
public const string RETURNBIKE_FAILURE_STATUS_MESSAGE_UPPERCASE = "(BIKE [A-Za-z0-9_]+ OUT OF GEO FENCING\\. )([0-9]+)( METER DISTANCE TO NEXT STATION )([A-Za-z0-9_]+)";
/// <summary> Prevents invalid use of exception. </summary> /// <summary> Prevents invalid use of exception. </summary>
private NotAtStationException() : base(typeof(NotAtStationException).Name) private NotAtStationException() : base(typeof(NotAtStationException).Name)
@ -15,25 +17,36 @@ namespace TINK.Repository.Exception
public static bool IsNotAtStation(string responseState, out NotAtStationException exception) public static bool IsNotAtStation(string responseState, out NotAtStationException exception)
{ {
// Check if there are too many bikes requested/ booked. // Check if there are too many bikes requested/ booked.
var match = Regex.Match( var response = responseState.Trim().ToUpper();
responseState.ToUpper(),
RETURNBIKE_FAILURE_STATUS_MESSAGE_UPPERCASE); if (!response.StartsWith(RETURNBIKE_FAILURE_STATUS_MESSAGE_CODE))
if (match.Groups.Count != 5
|| !int.TryParse(match.Groups[2].ToString(), out int meters)
|| !int.TryParse(match.Groups[4].ToString(), out int stationNr))
{ {
exception = null; exception = null;
return false; return false;
} }
exception = new NotAtStationException { Distance = meters, StationNr = stationNr }; var match = Regex.Match(
responseState.ToUpper(),
RETURNBIKE_FAILURE_STATUS_MESSAGE_UPPERCASE);
if (match.Groups.Count != 5
|| !int.TryParse(match.Groups[2].ToString(), out int meters))
{
exception = new NotAtStationException();
return true;
}
exception = new NotAtStationException {
Distance = meters,
StationNr = match.Groups[4].ToString()
};
return true; return true;
} }
/// <summary> Holds the maximum count of bikes allowed to reserve/ book.</summary> /// <summary> Holds the maximum count of bikes allowed to reserve/ book.</summary>
public int Distance { get; private set; } public int? Distance { get; private set; } = null;
/// <summary> Holds the maximum count of bikes allowed to reserve/ book.</summary> /// <summary> Holds the maximum count of bikes allowed to reserve/ book.</summary>
public int StationNr { get; private set; } public string StationNr { get; private set; } = string.Empty;
} }
} }

View file

@ -63,6 +63,14 @@
<ProjectReference Include="..\LockItBLE\LockItBLE.csproj" /> <ProjectReference Include="..\LockItBLE\LockItBLE.csproj" />
<ProjectReference Include="..\LockItShared\LockItShared.csproj" /> <ProjectReference Include="..\LockItShared\LockItShared.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="Mono.Android">
<HintPath>..\..\..\..\..\..\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v11.0\Mono.Android.dll</HintPath>
</Reference>
<Reference Include="Xamarin.iOS">
<HintPath>..\..\..\..\..\..\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\Xamarin.iOS\v1.0\Xamarin.iOS.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="MultilingualResources\AppResources.Designer.cs"> <Compile Update="MultilingualResources\AppResources.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>

View file

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms" <ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.Themes.ShareeBike"> x:Class="TINK.Themes.ShareeBike">
<Color x:Key="primary-back-title-color">#009899</Color> <!--Main color-->
<Color x:Key="primary-back-title-color">#009899</Color>
<!--Primary Button-->
<Style TargetType="Button"> <Style TargetType="Button">
<Setter Property="WidthRequest" Value="400" /> <Setter Property="WidthRequest" Value="400" />
<Setter Property="HorizontalOptions" Value="Center" /> <Setter Property="HorizontalOptions" Value="Center" />
@ -27,6 +29,8 @@
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<!--Secondary Button-->
<Style x:Key="SecondaryButton" TargetType="Button"> <Style x:Key="SecondaryButton" TargetType="Button">
<Setter Property="WidthRequest" Value="400" /> <Setter Property="WidthRequest" Value="400" />
<Setter Property="HorizontalOptions" Value="Center" /> <Setter Property="HorizontalOptions" Value="Center" />
@ -50,6 +54,7 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<!--Switch-->
<Style TargetType="Switch"> <Style TargetType="Switch">
<Style.Triggers> <Style.Triggers>
<Trigger TargetType="Switch" <Trigger TargetType="Switch"
@ -64,17 +69,24 @@
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
<!--Slider-->
<Style TargetType="Slider"> <Style TargetType="Slider">
<Setter Property="ThumbColor" Value="{DynamicResource Key=primary-back-title-color}"/> <Setter Property="ThumbColor" Value="{DynamicResource Key=primary-back-title-color}"/>
<Setter Property="Background" Value="LightGray"/> <Setter Property="Background" Value="LightGray"/>
</Style> </Style>
<!--Label-->
<Style TargetType="Label"> <Style TargetType="Label">
<Setter Property="FontSize" Value="Default"/> <Setter Property="FontSize" Value="Default"/>
</Style> </Style>
<!--Flyout Item-->
<Style TargetType="FlyoutItem"> <Style TargetType="FlyoutItem">
<Setter Property="Shell.BackgroundColor" Value="{DynamicResource Key=primary-back-title-color}" /> <Setter Property="Shell.BackgroundColor" Value="{DynamicResource Key=primary-back-title-color}" />
</Style> </Style>
<!--Navbar-->
<Style x:Key="Label-Navbar" TargetType="Label"> <Style x:Key="Label-Navbar" TargetType="Label">
<Setter Property="FontSize" Value="20"/> <Setter Property="FontSize" Value="20"/>
<!--<Setter Property="TextTransform" Value="Uppercase"/>--> <!--<Setter Property="TextTransform" Value="Uppercase"/>-->
@ -83,10 +95,10 @@
<Setter Property="HorizontalOptions" Value="Start"/> <Setter Property="HorizontalOptions" Value="Start"/>
<Setter Property="Grid.Column" Value="1"/> <Setter Property="Grid.Column" Value="1"/>
</Style> </Style>
<Style x:Key="Image-Navbar" TargetType="Image"> <Style x:Key="Image-Navbar" TargetType="Image">
<Setter Property="Source" Value="swk_theme.png"/> <Setter Property="Source" Value="swk_theme.png"/>
<Setter Property="Aspect" Value="AspectFill"/> <Setter Property="Aspect" Value="AspectFill"/>
<Setter Property="Grid.ColumnSpan" Value="2"/> <Setter Property="Grid.ColumnSpan" Value="2"/>
</Style> </Style>
</ResourceDictionary> </ResourceDictionary>

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -174,7 +174,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
if (exception is WebConnectFailureException) if (exception is WebConnectFailureException)
{ {
// Copri server is not reachable. // Copri server is not reachable.
Log.ForContext<BookedClosed>().Information("User selected booked bike {bike} but returing failed (Copri server not reachable).", SelectedBike); Log.ForContext<BookedClosed>().Information("User selected booked bike {bike} but returning failed (Copri server not reachable).", SelectedBike);
await ViewService.DisplayAdvancedAlert( await ViewService.DisplayAdvancedAlert(
AppResources.ErrorReturnBikeNoWebTitle, AppResources.ErrorReturnBikeNoWebTitle,
@ -185,7 +185,10 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
else if (exception is NotAtStationException notAtStationException) else if (exception is NotAtStationException notAtStationException)
{ {
// COPRI returned an error. // COPRI returned an error.
Log.ForContext<BookedClosed>().Information("User selected booked bike {bike} but returning failed. COPRI returned an not at station error.", SelectedBike); Log.ForContext<BookedClosed>().Information(
"User selected booked bike {bike} but returning failed. COPRI returned out of GEO fencing error. Postion send to COPRI {@position}.",
SelectedBike,
currentLocationDto);
await ViewService.DisplayAlert( await ViewService.DisplayAlert(
AppResources.ErrorReturnBikeTitle, AppResources.ErrorReturnBikeTitle,
@ -195,7 +198,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
else if (exception is NoGPSDataException) else if (exception is NoGPSDataException)
{ {
// COPRI returned an error. // COPRI returned an error.
Log.ForContext<BookedClosed>().Information("User selected booked bike {bike} but returing failed. COPRI returned an no GPS- data error.", SelectedBike); Log.ForContext<BookedClosed>().Information("User selected booked bike {bike} but returning failed. COPRI returned an no GPS- data error.", SelectedBike);
await ViewService.DisplayAlert( await ViewService.DisplayAlert(
AppResources.ErrorReturnBikeTitle, AppResources.ErrorReturnBikeTitle,
@ -205,7 +208,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
else if (exception is ResponseException copriException) else if (exception is ResponseException copriException)
{ {
// COPRI returned an error. // COPRI returned an error.
Log.ForContext<BookedClosed>().Information("User selected booked bike {bike} but returing failed. COPRI returned an error.", SelectedBike); Log.ForContext<BookedClosed>().Information("User selected booked bike {bike} but returning failed. COPRI returned an error.", SelectedBike);
await ViewService.DisplayAdvancedAlert( await ViewService.DisplayAdvancedAlert(
"Statusfehler beim Zurückgeben des Rads!", "Statusfehler beim Zurückgeben des Rads!",

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -145,7 +145,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
if (exception is WebConnectFailureException) if (exception is WebConnectFailureException)
{ {
// Copri server is not reachable. // Copri server is not reachable.
Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returing failed (Copri server not reachable).", SelectedBike); Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returning failed (Copri server not reachable).", SelectedBike);
await ViewService.DisplayAdvancedAlert( await ViewService.DisplayAdvancedAlert(
AppResources.ErrorReturnBikeNoWebTitle, AppResources.ErrorReturnBikeNoWebTitle,
@ -343,20 +343,23 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
IsConnected = IsConnectedDelegate(); IsConnected = IsConnectedDelegate();
var feedBackUri = SelectedBike?.OperatorUri; var feedBackUri = SelectedBike?.OperatorUri;
LocationDto currentLocationDto = null;
BookingFinishedModel bookingFinished; BookingFinishedModel bookingFinished;
try try
{ {
bookingFinished = await ConnectorFactory(IsConnected).Command.DoReturn( currentLocationDto = currentLocation != null
SelectedBike, ? new LocationDto.Builder
currentLocation != null
? new LocationDto.Builder
{ {
Latitude = currentLocation.Latitude, Latitude = currentLocation.Latitude,
Longitude = currentLocation.Longitude, Longitude = currentLocation.Longitude,
Accuracy = currentLocation.Accuracy ?? double.NaN, Accuracy = currentLocation.Accuracy ?? double.NaN,
Age = timeStamp.Subtract(currentLocation.Timestamp.DateTime), Age = timeStamp.Subtract(currentLocation.Timestamp.DateTime),
}.Build() }.Build()
: null, : null;
bookingFinished = await ConnectorFactory(IsConnected).Command.DoReturn(
SelectedBike,
currentLocationDto,
SmartDevice); SmartDevice);
// If canceling bike succedes remove bike because it is not ready to be booked again // If canceling bike succedes remove bike because it is not ready to be booked again
IsRemoveBikeRequired = true; IsRemoveBikeRequired = true;
@ -367,7 +370,8 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
if (exception is WebConnectFailureException) if (exception is WebConnectFailureException)
{ {
// Copri server is not reachable. // Copri server is not reachable.
Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returing failed (Copri server not reachable).", SelectedBike); Log.ForContext<BookedOpen>().Information(
"User selected booked bike {bike} but returning failed (Copri server not reachable).", SelectedBike);
await ViewService.DisplayAdvancedAlert( await ViewService.DisplayAdvancedAlert(
AppResources.ErrorReturnBikeNoWebTitle, AppResources.ErrorReturnBikeNoWebTitle,
@ -378,7 +382,10 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
else if (exception is NotAtStationException notAtStationException) else if (exception is NotAtStationException notAtStationException)
{ {
// COPRI returned an error. // COPRI returned an error.
Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returing failed. COPRI returned an error.", SelectedBike); Log.ForContext<BookedOpen>().Information(
"User selected booked bike {bike} but returning failed. COPRI returned out of GEO fencing error. Postion send to COPRI {@position}.",
SelectedBike,
currentLocationDto);
await ViewService.DisplayAlert( await ViewService.DisplayAlert(
AppResources.ErrorReturnBikeTitle, AppResources.ErrorReturnBikeTitle,
@ -388,7 +395,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
else if (exception is NoGPSDataException) else if (exception is NoGPSDataException)
{ {
// COPRI returned an error. // COPRI returned an error.
Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returing failed. COPRI returned an no GPS- data error.", SelectedBike); Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returning failed. COPRI returned an no GPS- data error.", SelectedBike);
await ViewService.DisplayAlert( await ViewService.DisplayAlert(
AppResources.ErrorReturnBikeTitle, AppResources.ErrorReturnBikeTitle,
@ -398,7 +405,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
else if (exception is ResponseException copriException) else if (exception is ResponseException copriException)
{ {
// Copri server is not reachable. // Copri server is not reachable.
Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returing failed. COPRI returned an error.", SelectedBike); Log.ForContext<BookedOpen>().Information("User selected booked bike {bike} but returning failed. COPRI returned an error.", SelectedBike);
await ViewService.DisplayAdvancedAlert( await ViewService.DisplayAdvancedAlert(
"Statusfehler beim Zurückgeben des Rads!", "Statusfehler beim Zurückgeben des Rads!",

View file

@ -1,4 +1,4 @@
using TINK.Model.Device; using TINK.Model.Device;
using Xamarin.Essentials; using Xamarin.Essentials;
namespace TestFramework.Model.Device namespace TestFramework.Model.Device
@ -10,13 +10,13 @@ namespace TestFramework.Model.Device
/// </summary> /// </summary>
private string m_strDeviceId = "522c6ff6886198fd"; private string m_strDeviceId = "522c6ff6886198fd";
public string Manufacturer => throw new System.NotImplementedException(); public string Manufacturer => "Faiphone";
public string Model => throw new System.NotImplementedException(); public string Model => "987";
public DevicePlatform Platform => DevicePlatform.UWP; public DevicePlatform Platform => DevicePlatform.UWP;
public string VersionText => throw new System.NotImplementedException(); public string VersionText => "17.11";
/// <summary> /// <summary>
/// Constructs a device mock object setting device id to default value. /// Constructs a device mock object setting device id to default value.

View file

@ -0,0 +1,71 @@
using NUnit.Framework;
using TINK.Repository.Exception;
namespace TestTINKLib.Fixtures.ObjectTests.Repository.Exception
{
[TestFixture]
public class TestNotAtStationException
{
[Test]
public void TestIsNotAtStationNumericBikeAndStationId()
{
const string responseText = "Failure 2178: bike 1545 out of GEO fencing. 15986 meter distance to next station 105. OK: bike 1545 locked confirmed";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(true));
Assert.That(() => exception.StationNr,
Is.EqualTo("105"));
Assert.That(() => exception.Distance,
Is.EqualTo(15986));
}
[Test]
public void TestIsNotAtStationAlphanumBikeAndStationId()
{
const string responseText = "Failure 2178: bike KN247 out of GEO fencing. 764 meter distance to next station KN20 . OK: bike KN247 locked confirmed";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(true));
Assert.That(() => exception.StationNr,
Is.EqualTo("KN20"));
Assert.That(() => exception.Distance,
Is.EqualTo(764));
}
[Test]
public void TestIsNotAtStationUnexpected()
{
const string responseText = "Failure 2178: Message from COPRI does not match expectations.";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(true));
Assert.That(() => exception.StationNr,
Is.EqualTo(string.Empty));
Assert.That(() => exception.Distance,
Is.Null);
}
[Test]
public void TestIsNotAtStation_InvalidFailureNr()
{
const string responseText = "Failure 2177: bike 1545 out of GEO fencing. 15986 meter distance to next station 105. OK: bike 1545 locked confirmed";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(false));
}
}
}

View file

@ -1,37 +0,0 @@
using NUnit.Framework;
using TINK.Repository.Exception;
namespace TestTINKLib.Fixtures.ObjectTests.Repository.Exception
{
[TestFixture]
public class TestNotAtStationException
{
[Test]
public void TestIsNotAtStation()
{
const string responseText = "Failure 2178: bike 1545 out of GEO fencing. 15986 meter distance to next station 105. OK: bike 1545 locked confirmed";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(true));
Assert.That(() => exception.StationNr,
Is.EqualTo(105));
Assert.That(() => exception.Distance,
Is.EqualTo(15986));
}
[Test]
public void TestIsNotAtStation_InvalidNr()
{
const string responseText = "Failure 2177: bike 1545 out of GEO fencing. 15986 meter distance to next station 105. OK: bike 1545 locked confirmed";
NotAtStationException exception = null;
Assert.That(() => NotAtStationException.IsNotAtStation(responseText, out exception),
Is.EqualTo(false));
}
}
}

View file

@ -38,9 +38,6 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Fixtures\ObjectTests\Repository\Exception\TestBookingDeclinedException.cs" />
<Compile Include="Fixtures\ObjectTests\Repository\Exception\TestNoGPSDataException.cs" />
<Compile Include="Fixtures\ObjectTests\Repository\Exception\TestNotAtStationException.cs" />
<Compile Include="Fixtures\ObjectTests\Services\BluetoothLock\Tdo\TestLockInfoAuthTdo.cs" /> <Compile Include="Fixtures\ObjectTests\Services\BluetoothLock\Tdo\TestLockInfoAuthTdo.cs" />
<Compile Include="Fixtures\ObjectTests\Services\TestLocksServicesContainerMutable.cs" /> <Compile Include="Fixtures\ObjectTests\Services\TestLocksServicesContainerMutable.cs" />
<Compile Include="Fixtures\ObjectTests\Services\TestServicesContainerMutable.cs" /> <Compile Include="Fixtures\ObjectTests\Services\TestServicesContainerMutable.cs" />