mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-22 06:56:25 +01:00
Version 3.0.339
This commit is contained in:
parent
0468955d49
commit
52c9f6f1d9
43 changed files with 993 additions and 614 deletions
|
@ -1,5 +1,5 @@
|
|||
<?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" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
|
@ -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">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
|
@ -55,8 +55,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>LastenradBayern</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>338</string>
|
||||
<string>339</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.338</string>
|
||||
<string>3.0.339</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
xmlns:contact="clr-namespace:TINK.View.Contact"
|
||||
xmlns:info="clr-namespace:TINK.View.Info"
|
||||
xmlns:header="clr-namespace:TINK.View.RootShell"
|
||||
xmlns:version="clr-namespace:ShareeSharedGuiLib.View"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}"
|
||||
Title="Shell"
|
||||
x:Class="TINK.View.RootShell.AppShell">
|
||||
|
@ -107,4 +108,8 @@
|
|||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
|
||||
<Shell.FlyoutFooter>
|
||||
<version:VersionNumberView/>
|
||||
</Shell.FlyoutFooter>
|
||||
</Shell>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?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" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
|
@ -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">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
|
@ -55,8 +55,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>Mein konrad</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>338</string>
|
||||
<string>339</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.338</string>
|
||||
<string>3.0.339</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -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"
|
||||
xmlns:conv="clr-namespace:TINK.View"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
|
@ -14,54 +14,43 @@
|
|||
</ContentView.Resources>
|
||||
<StackLayout
|
||||
Padding="10">
|
||||
<Grid Padding="0,0,5,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80" />
|
||||
<ColumnDefinition Width="20" />
|
||||
<ColumnDefinition Width="20" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Icon of the bike -->
|
||||
<Image
|
||||
<Grid Padding="0,0,5,10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Icon of the bike -->
|
||||
<Image
|
||||
Source="{Binding DisplayedBikeImageSourceString}"
|
||||
HeightRequest="80"
|
||||
Aspect="AspectFit"
|
||||
HorizontalOptions="Start"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"/>
|
||||
<!-- Battery level -->
|
||||
<sharedGui:BarLevelView
|
||||
VerticalOptions="End"
|
||||
Grid.Column="0"/>
|
||||
<!-- Battery level -->
|
||||
<sharedGui:BarLevelView
|
||||
Current="{Binding CurrentChargeBars}"
|
||||
Maximum="{Binding MaxChargeBars}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="2"
|
||||
VerticalOptions="End"
|
||||
IsVisible="{Binding IsBatteryChargeVisible}"/>
|
||||
<!-- Name of the bike -->
|
||||
<Label
|
||||
FontAttributes="Bold"
|
||||
FontSize="Large"
|
||||
HorizontalTextAlignment="Right"
|
||||
Text="{Binding Name}"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Grid.ColumnSpan="3"/>
|
||||
<!-- Id of the bike -->
|
||||
<Label
|
||||
FontAttributes="Bold"
|
||||
HorizontalTextAlignment="Right"
|
||||
IsVisible="{Binding DisplayId, Converter={StaticResource Label_Converter}}"
|
||||
Text="{Binding DisplayId}"
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"/>
|
||||
</Grid>
|
||||
<!-- Rental state -->
|
||||
<!-- Name of the bike -->
|
||||
<StackLayout Grid.Column="2">
|
||||
<Label
|
||||
FontAttributes="Bold"
|
||||
FontSize="Large"
|
||||
HorizontalTextAlignment="Right"
|
||||
Text="{Binding Name}"/>
|
||||
<!-- Id of the bike -->
|
||||
<Label
|
||||
FontAttributes="Bold"
|
||||
HorizontalTextAlignment="Right"
|
||||
IsVisible="{Binding DisplayId, Converter={StaticResource Label_Converter}}"
|
||||
Text="{Binding DisplayId}"/>
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
<!-- Rental state -->
|
||||
<Label
|
||||
Text="{Binding StateText}"
|
||||
TextColor="{Binding StateColor}"/>
|
||||
|
@ -249,4 +238,4 @@
|
|||
</Grid>
|
||||
</StackLayout>
|
||||
</ContentView>
|
||||
</ViewCell>
|
||||
</ViewCell>
|
||||
|
|
|
@ -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"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:version="clr-namespace:ShareeSharedGuiLib.View"
|
||||
xmlns:local="clr-namespace:TINK.View;assembly=TINKLib"
|
||||
x:Class="TINK.View.RootShell.FlyoutFooter">
|
||||
<Grid Padding="20,0,0,20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="20" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image
|
||||
<ContentView.Content>
|
||||
<Grid Padding="20,0,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="35" />
|
||||
<RowDefinition Height="20"/>
|
||||
<RowDefinition Height="30" />
|
||||
</Grid.RowDefinitions>
|
||||
<Image
|
||||
Grid.Row="0"
|
||||
HeightRequest="35"
|
||||
HorizontalOptions="StartAndExpand"
|
||||
Aspect="AspectFit"
|
||||
Source="konrad_nobg.png" />
|
||||
<Label
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
HorizontalOptions="Start"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
TextType="Html"
|
||||
Text="Powered by <b>Stadtwerke Konstanz</b>"/>
|
||||
<!--<Label
|
||||
Grid.Row="1"
|
||||
<!--<Label
|
||||
Grid.Row="2"
|
||||
HorizontalOptions="Start"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource primary-back-title-color}">
|
||||
|
@ -34,6 +37,8 @@
|
|||
Url="https://www.stadtwerke-konstanz.de" />
|
||||
</FormattedString>
|
||||
</Label.FormattedText>
|
||||
</Label>-->
|
||||
</Grid>
|
||||
</ContentView>
|
||||
</Label>-->
|
||||
<version:VersionNumberView x:Name="VersionNumber" Grid.Row="2"/>
|
||||
</Grid>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\BarLevelView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\VersionNumberView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Bar.cs" />
|
||||
|
@ -25,10 +29,23 @@
|
|||
<DependentUpon>BarLevelView.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</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>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\BarLevelInputView.xaml">
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\RunningProcessView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -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"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShareeSharedGuiLib.View.BarLevelView">
|
||||
|
@ -8,6 +8,8 @@
|
|||
<Image
|
||||
x:Name="BarLevelImage"
|
||||
WidthRequest="50"
|
||||
HeightRequest="30"
|
||||
Aspect="AspectFit"
|
||||
IsVisible="{Binding IsBatteryChargeLevelImageVisible}"
|
||||
Source="{Binding BatteryChargeLevelImageSourceString}"/>
|
||||
<!-- Text describing filling level batteries with 1...4 and 6..N bars -->
|
||||
|
@ -17,4 +19,4 @@
|
|||
IsVisible="{Binding IsBatteryChargeLevelLabelVisible}"/>
|
||||
</StackLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
||||
</ContentView>
|
||||
|
|
46
ShareeSharedGuiLib/View/RunningProcessView.xaml
Normal file
46
ShareeSharedGuiLib/View/RunningProcessView.xaml
Normal 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>
|
20
ShareeSharedGuiLib/View/RunningProcessView.xaml.cs
Normal file
20
ShareeSharedGuiLib/View/RunningProcessView.xaml.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
21
ShareeSharedGuiLib/View/VersionNumberView.xaml
Normal file
21
ShareeSharedGuiLib/View/VersionNumberView.xaml
Normal 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>
|
23
ShareeSharedGuiLib/View/VersionNumberView.xaml.cs
Normal file
23
ShareeSharedGuiLib/View/VersionNumberView.xaml.cs
Normal 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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<?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" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
|
@ -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">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
|
@ -55,8 +55,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>sharee.bike</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>338</string>
|
||||
<string>339</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.338</string>
|
||||
<string>3.0.339</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -1,95 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{Binding Title}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<ContentPage.Content>
|
||||
<Frame>
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<!-- Title bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
</StackLayout>
|
||||
<!-- Center stack layout -->
|
||||
<StackLayout
|
||||
Orientation="Vertical"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<ListView
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
</StackLayout>
|
||||
<!-- Status bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="24"
|
||||
FontSize="Small"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
Android="#009899" iOS="#009899" WinPhone="#009899" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
<BoxView HeightRequest="1" Color="{DynamicResource primary-back-title-color}"/>
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View">
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{Binding Title}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<StackLayout Grid.Row="0"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Title-->
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
</StackLayout>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
<!-- Contact and Login at end of page-->
|
||||
<StackLayout
|
||||
Orientation="Vertical"
|
||||
Grid.Row="2">
|
||||
|
||||
<!--Line-->
|
||||
<BoxView HeightRequest="1" Color="{DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
<!--Login required-->
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.Row="1"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
|
|
|
@ -1,33 +1,43 @@
|
|||
<?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:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.CopriWebView.ManageAccountPage">
|
||||
<Shell.TitleView>
|
||||
<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>
|
||||
<?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:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.CopriWebView.ManageAccountPage">
|
||||
|
||||
<WebView x:Name="ManageAccount"
|
||||
HeightRequest="1400"
|
||||
WidthRequest="1000"
|
||||
Source="{Binding Uri}" />
|
||||
<ActivityIndicator
|
||||
x:Name="ActivityIndicatorLoading"
|
||||
HeightRequest="100"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"/>
|
||||
</Grid>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MessageAccountPageManagePersonalData}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<Shell.BackButtonBehavior>
|
||||
<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
|
||||
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>
|
||||
|
|
|
@ -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"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
|
@ -21,11 +21,13 @@
|
|||
HeightRequest="1400"
|
||||
WidthRequest="1000"
|
||||
Source="{Binding Uri}" />
|
||||
<ActivityIndicator
|
||||
x:Name="ActivityIndicatorLoading"
|
||||
HeightRequest="100"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"/>
|
||||
</Grid>
|
||||
|
||||
<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>
|
||||
|
|
|
@ -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"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
|
@ -21,11 +21,13 @@
|
|||
HeightRequest="1400"
|
||||
WidthRequest="1000"
|
||||
Source="{Binding Uri}" />
|
||||
<ActivityIndicator
|
||||
x:Name="ActivityIndicatorLoading"
|
||||
HeightRequest="100"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"/>
|
||||
</Grid>
|
||||
|
||||
<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>
|
||||
|
|
|
@ -1,68 +1,68 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.FindBike.FindBikePage"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<ContentPage.Content>
|
||||
<Frame>
|
||||
<StackLayout>
|
||||
<Entry
|
||||
Placeholder="Fahrrad-Nummer bitte hier eingeben"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
MaxLength="10"
|
||||
CursorPosition="0"
|
||||
Text="{Binding BikeIdUserInput}">
|
||||
</Entry>
|
||||
<Button
|
||||
Text="Rad Wählen"
|
||||
IsEnabled="{Binding IsSelectBikeEnabled}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
Command="{Binding OnSelectBikeRequest}">
|
||||
</Button>
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<StackLayout
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
Android="#009899" iOS="#009899" WinPhone="#009899" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.FindBike.FindBikePage"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View">
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Search bike-->
|
||||
<StackLayout Grid.Row="0">
|
||||
<Entry
|
||||
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
MaxLength="10"
|
||||
CursorPosition="0"
|
||||
Text="{Binding BikeIdUserInput}"/>
|
||||
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"
|
||||
IsEnabled="{Binding IsSelectBikeEnabled}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
Command="{Binding OnSelectBikeRequest}"/>
|
||||
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsRunning}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
|
|
|
@ -1,112 +1,116 @@
|
|||
<?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"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Map.MapPage"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingMapPage}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,33"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand"
|
||||
>
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
<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
|
||||
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}">
|
||||
</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}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
<StackLayout
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="6,3,6,6"
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="24"
|
||||
FontSize="Small"
|
||||
Text="{Binding StatusInfoText}"
|
||||
TextColor="White"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
Android="White" iOS="White" WinPhone="White"/>
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
</ContentPage>
|
||||
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"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Map.MapPage"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
|
||||
<Shell.TitleView >
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingMapPage}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,Auto"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
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
|
||||
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}">
|
||||
</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}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<!--While process is running-->
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"
|
||||
IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Scale="2"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="Center"
|
||||
Padding="0,0,0,10"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -1,64 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.MyBikes.MyBikesPage"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingMyBikes}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
<ContentPage.Content>
|
||||
<Frame>
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<!-- Center stack layout -->
|
||||
<StackLayout
|
||||
VerticalOptions="CenterAndExpand"
|
||||
Orientation="Vertical">
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
</StackLayout>
|
||||
<!-- Status bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="24"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
Android="#009899" iOS="#009899" WinPhone="#009899" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.MyBikes.MyBikesPage"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike">
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingMyBikes}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<StackLayout Grid.Row="0"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsRunning}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
|
|
|
@ -11,100 +11,105 @@
|
|||
xmlns:contact="clr-namespace:TINK.View.Contact"
|
||||
xmlns:info="clr-namespace:TINK.View.Info"
|
||||
xmlns:header="clr-namespace:TINK.View.RootShell"
|
||||
xmlns:version="clr-namespace:ShareeSharedGuiLib.View"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}"
|
||||
Title="Shell"
|
||||
x:Class="TINK.View.RootShell.AppShell">
|
||||
<Shell.FlyoutHeader>
|
||||
<header:FlyoutHeader/>
|
||||
</Shell.FlyoutHeader>
|
||||
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<Shell.FlyoutHeader>
|
||||
<header:FlyoutHeader/>
|
||||
</Shell.FlyoutHeader>
|
||||
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingMapPage}"
|
||||
Route="MapPage"
|
||||
ContentTemplate="{DataTemplate mappage:MapPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconMap}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconMap}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingFindBike}"
|
||||
IsVisible="{Binding IsFindBikePageVisible}"
|
||||
ContentTemplate="{DataTemplate findbike:FindBikePage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconFindBike}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconFindBike}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingMyBikes}"
|
||||
IsVisible="{Binding IsMyBikesPageVisible}"
|
||||
ContentTemplate="{DataTemplate mybikes:MyBikesPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconMyBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconMyBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingAccount}"
|
||||
IsVisible="{Binding IsAccountPageVisible}"
|
||||
ContentTemplate="{DataTemplate account:AccountPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconAccount}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconAccount}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingLogin}"
|
||||
Route="LoginPage"
|
||||
IsVisible="{Binding IsLoginPageVisible}"
|
||||
ContentTemplate="{DataTemplate login:LoginPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconLogin}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconLogin}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingSettings}"
|
||||
IsVisible="{Binding IsSettingsPageVisible}"
|
||||
ContentTemplate="{DataTemplate settings:SettingsPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconSettings}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconSettings}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingFeesAndBikes}"
|
||||
ContentTemplate="{DataTemplate contact:FeesAndBikesPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconFeesAndBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconFeesAndBikes}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{x:Static resources:AppResources.MarkingFeedbackAndContact}"
|
||||
Route="ContactPage"
|
||||
ContentTemplate="{DataTemplate contact:ContactPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconContact}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconContact}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
|
||||
<ShellContent
|
||||
Title="{Binding TabbedPageIngoTitle}"
|
||||
ContentTemplate="{DataTemplate info:InfoPage}">
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconInfo}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
<ShellContent.FlyoutIcon>
|
||||
<FontImageSource Glyph="{StaticResource IconInfo}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
|
||||
</ShellContent.FlyoutIcon>
|
||||
</ShellContent>
|
||||
</FlyoutItem>
|
||||
|
||||
<Shell.FlyoutFooter>
|
||||
<version:VersionNumberView/>
|
||||
</Shell.FlyoutFooter>
|
||||
</Shell>
|
||||
|
|
9
TINKLib/Model/CurrentAppInfos.cs
Normal file
9
TINKLib/Model/CurrentAppInfos.cs
Normal file
|
@ -0,0 +1,9 @@
|
|||
using Xamarin.Essentials;
|
||||
|
||||
namespace TINK.Model
|
||||
{
|
||||
public static class CurrentAppInfos
|
||||
{
|
||||
public static string CurrentAppVersion => VersionTracking.CurrentVersion;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using Xamarin.Essentials;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace TINK.Model.Device
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ namespace TINK.Model.Device
|
|||
/// <summary> Device Model (SMG-950U, iPhone10,6). </summary>
|
||||
string Model { get; }
|
||||
|
||||
/// <summary> Operation system. </summary>
|
||||
DevicePlatform Platform { get; }
|
||||
|
||||
/// <summary> Operating System Version Number (7.0) as text</summary>
|
||||
|
|
16
TINKLib/Model/Logging/AppAndEnvironmentInfo.cs
Normal file
16
TINKLib/Model/Logging/AppAndEnvironmentInfo.cs
Normal 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}");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Threading;
|
||||
|
@ -190,6 +190,9 @@ namespace TINK.Model
|
|||
|
||||
Flavor = flavor;
|
||||
|
||||
// Log application and environment information.
|
||||
new AppAndEnvironmentInfo().LogHeader(device, flavor, currentVersion);
|
||||
|
||||
var locksServices = locksService != null
|
||||
? new HashSet<ILocksService> { locksService }
|
||||
: new HashSet<ILocksService> {
|
||||
|
@ -440,15 +443,50 @@ namespace TINK.Model
|
|||
LoggingLevelSwitch levelSwitch,
|
||||
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()
|
||||
.MinimumLevel.ControlledBy(levelSwitch)
|
||||
.MinimumLevel.Override("TINK.Services.BluetoothLock.BLE", LogEventLevel.Debug) /* Scanning, connect and management functionality */
|
||||
.MinimumLevel.Override("TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler", LogEventLevel.Information) /* Provides use case context */
|
||||
.WriteTo.Debug()
|
||||
.WriteTo.File(logFilePath, Logging.RollingInterval.Session)
|
||||
.WriteTo.Logger(lg => lg
|
||||
.MinimumLevel.ControlledBy(new LoggingLevelSwitch(LogEventLevel.Debug))
|
||||
.Filter.ByIncludingOnly(Matching.FromSource("TINK.Services.BluetoothLock.BLE"))
|
||||
.MinimumLevel.Verbose()
|
||||
.WriteTo.Logger(consoleLoggerConfig => consoleLoggerConfig
|
||||
.MinimumLevel.Information()
|
||||
.WriteTo.Debug()
|
||||
)
|
||||
.WriteTo.Logger(fileLoggerConfig => fileLoggerConfig
|
||||
.Filter.ByIncludingOnly(e => LogToFileFilter(e))
|
||||
.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()
|
||||
)
|
||||
.CreateLogger();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TINK.MultilingualResources;
|
||||
using Xamarin.Essentials;
|
||||
|
@ -584,6 +584,16 @@ namespace TINK.Model
|
|||
new Version(3, 0, 338),
|
||||
AppResources.ChangeLog3_0_338_SB,
|
||||
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 }
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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>
|
||||
/// Looks up a localized string similar to Failed to query available bikes..
|
||||
/// </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>
|
||||
/// Looks up a localized string similar to No.
|
||||
/// </summary>
|
||||
|
|
|
@ -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">
|
||||
<value>Einwilligung</value>
|
||||
</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>
|
|
@ -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">
|
||||
<value>Consent</value>
|
||||
</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>
|
|
@ -1384,6 +1384,22 @@ Außerdem: Kleine Grafiken lassen auf einen Blick erkennen um was für einen Rad
|
|||
<source>Consent</source>
|
||||
<target state="translated">Einwilligung</target>
|
||||
</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>
|
||||
</body>
|
||||
</file>
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
using System.Text.RegularExpressions;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace TINK.Repository.Exception
|
||||
{
|
||||
public class NotAtStationException : InvalidResponseException
|
||||
{
|
||||
/// <summary> COPRI response status regular expression. </summary>
|
||||
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]+)";
|
||||
public const string RETURNBIKE_FAILURE_STATUS_MESSAGE_CODE = "FAILURE 2178:";
|
||||
|
||||
/// <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>
|
||||
private NotAtStationException() : base(typeof(NotAtStationException).Name)
|
||||
|
@ -15,25 +17,36 @@ namespace TINK.Repository.Exception
|
|||
public static bool IsNotAtStation(string responseState, out NotAtStationException exception)
|
||||
{
|
||||
// Check if there are too many bikes requested/ booked.
|
||||
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)
|
||||
|| !int.TryParse(match.Groups[4].ToString(), out int stationNr))
|
||||
var response = responseState.Trim().ToUpper();
|
||||
|
||||
if (!response.StartsWith(RETURNBIKE_FAILURE_STATUS_MESSAGE_CODE))
|
||||
{
|
||||
exception = null;
|
||||
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;
|
||||
}
|
||||
|
||||
/// <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>
|
||||
public int StationNr { get; private set; }
|
||||
public string StationNr { get; private set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,14 @@
|
|||
<ProjectReference Include="..\LockItBLE\LockItBLE.csproj" />
|
||||
<ProjectReference Include="..\LockItShared\LockItShared.csproj" />
|
||||
</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>
|
||||
<Compile Update="MultilingualResources\AppResources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
|
|
|
@ -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"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
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">
|
||||
<Setter Property="WidthRequest" Value="400" />
|
||||
<Setter Property="HorizontalOptions" Value="Center" />
|
||||
|
@ -27,6 +29,8 @@
|
|||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!--Secondary Button-->
|
||||
<Style x:Key="SecondaryButton" TargetType="Button">
|
||||
<Setter Property="WidthRequest" Value="400" />
|
||||
<Setter Property="HorizontalOptions" Value="Center" />
|
||||
|
@ -50,6 +54,7 @@
|
|||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!--Switch-->
|
||||
<Style TargetType="Switch">
|
||||
<Style.Triggers>
|
||||
<Trigger TargetType="Switch"
|
||||
|
@ -64,17 +69,24 @@
|
|||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!--Slider-->
|
||||
<Style TargetType="Slider">
|
||||
<Setter Property="ThumbColor" Value="{DynamicResource Key=primary-back-title-color}"/>
|
||||
<Setter Property="Background" Value="LightGray"/>
|
||||
</Style>
|
||||
|
||||
<!--Label-->
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="FontSize" Value="Default"/>
|
||||
</Style>
|
||||
|
||||
|
||||
<!--Flyout Item-->
|
||||
<Style TargetType="FlyoutItem">
|
||||
<Setter Property="Shell.BackgroundColor" Value="{DynamicResource Key=primary-back-title-color}" />
|
||||
</Style>
|
||||
|
||||
<!--Navbar-->
|
||||
<Style x:Key="Label-Navbar" TargetType="Label">
|
||||
<Setter Property="FontSize" Value="20"/>
|
||||
<!--<Setter Property="TextTransform" Value="Uppercase"/>-->
|
||||
|
@ -83,10 +95,10 @@
|
|||
<Setter Property="HorizontalOptions" Value="Start"/>
|
||||
<Setter Property="Grid.Column" Value="1"/>
|
||||
</Style>
|
||||
<Style x:Key="Image-Navbar" TargetType="Image">
|
||||
<Setter Property="Source" Value="swk_theme.png"/>
|
||||
<Setter Property="Aspect" Value="AspectFill"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="2"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
<Style x:Key="Image-Navbar" TargetType="Image">
|
||||
<Setter Property="Source" Value="swk_theme.png"/>
|
||||
<Setter Property="Aspect" Value="AspectFill"/>
|
||||
<Setter Property="Grid.ColumnSpan" Value="2"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -174,7 +174,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
if (exception is WebConnectFailureException)
|
||||
{
|
||||
// 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(
|
||||
AppResources.ErrorReturnBikeNoWebTitle,
|
||||
|
@ -185,7 +185,10 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
else if (exception is NotAtStationException notAtStationException)
|
||||
{
|
||||
// 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(
|
||||
AppResources.ErrorReturnBikeTitle,
|
||||
|
@ -195,7 +198,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
else if (exception is NoGPSDataException)
|
||||
{
|
||||
// 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(
|
||||
AppResources.ErrorReturnBikeTitle,
|
||||
|
@ -205,7 +208,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
else if (exception is ResponseException copriException)
|
||||
{
|
||||
// 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(
|
||||
"Statusfehler beim Zurückgeben des Rads!",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -145,7 +145,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
if (exception is WebConnectFailureException)
|
||||
{
|
||||
// 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(
|
||||
AppResources.ErrorReturnBikeNoWebTitle,
|
||||
|
@ -343,20 +343,23 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
IsConnected = IsConnectedDelegate();
|
||||
|
||||
var feedBackUri = SelectedBike?.OperatorUri;
|
||||
LocationDto currentLocationDto = null;
|
||||
BookingFinishedModel bookingFinished;
|
||||
try
|
||||
{
|
||||
bookingFinished = await ConnectorFactory(IsConnected).Command.DoReturn(
|
||||
SelectedBike,
|
||||
currentLocation != null
|
||||
? new LocationDto.Builder
|
||||
currentLocationDto = currentLocation != null
|
||||
? new LocationDto.Builder
|
||||
{
|
||||
Latitude = currentLocation.Latitude,
|
||||
Longitude = currentLocation.Longitude,
|
||||
Accuracy = currentLocation.Accuracy ?? double.NaN,
|
||||
Age = timeStamp.Subtract(currentLocation.Timestamp.DateTime),
|
||||
}.Build()
|
||||
: null,
|
||||
: null;
|
||||
|
||||
bookingFinished = await ConnectorFactory(IsConnected).Command.DoReturn(
|
||||
SelectedBike,
|
||||
currentLocationDto,
|
||||
SmartDevice);
|
||||
// If canceling bike succedes remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
|
@ -367,7 +370,8 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
if (exception is WebConnectFailureException)
|
||||
{
|
||||
// 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(
|
||||
AppResources.ErrorReturnBikeNoWebTitle,
|
||||
|
@ -378,7 +382,10 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
else if (exception is NotAtStationException notAtStationException)
|
||||
{
|
||||
// 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(
|
||||
AppResources.ErrorReturnBikeTitle,
|
||||
|
@ -388,7 +395,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
else if (exception is NoGPSDataException)
|
||||
{
|
||||
// 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(
|
||||
AppResources.ErrorReturnBikeTitle,
|
||||
|
@ -398,7 +405,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
else if (exception is ResponseException copriException)
|
||||
{
|
||||
// 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(
|
||||
"Statusfehler beim Zurückgeben des Rads!",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using TINK.Model.Device;
|
||||
using TINK.Model.Device;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace TestFramework.Model.Device
|
||||
|
@ -10,13 +10,13 @@ namespace TestFramework.Model.Device
|
|||
/// </summary>
|
||||
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 string VersionText => throw new System.NotImplementedException();
|
||||
public string VersionText => "17.11";
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a device mock object setting device id to default value.
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -38,9 +38,6 @@
|
|||
<Reference Include="System.Xml" />
|
||||
</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\TestLocksServicesContainerMutable.cs" />
|
||||
<Compile Include="Fixtures\ObjectTests\Services\TestServicesContainerMutable.cs" />
|
||||
|
|
Loading…
Reference in a new issue