mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-22 06:56:25 +01:00
Version 3.0.368
This commit is contained in:
parent
24cdfbb0ca
commit
1a58bf58d3
78 changed files with 3104 additions and 2823 deletions
|
@ -77,7 +77,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.3" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="MonkeyCache">
|
||||
<Version>1.6.3</Version>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<Version>6.3.0.19</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog">
|
||||
<Version>2.12.0</Version>
|
||||
<Version>3.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
|
||||
|
@ -176,24 +176,24 @@
|
|||
<PackageReference Include="Xamarin.Android.Support.v7.RecyclerView" Version="28.0.0.3" />
|
||||
<PackageReference Include="Xamarin.Android.Support.Vector.Drawable" Version="28.0.0.3" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Core">
|
||||
<Version>1.9.0.2</Version>
|
||||
<Version>1.10.1.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
|
||||
<Version>1.3.1.2</Version>
|
||||
<Version>1.4.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette">
|
||||
<Version>1.0.0.16</Version>
|
||||
<Version>1.0.0.18</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.RecyclerView">
|
||||
<Version>1.3.0</Version>
|
||||
<Version>1.3.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
|
||||
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
|
||||
<PackageReference Include="Xamarin.CommunityToolkit">
|
||||
<Version>2.0.5</Version>
|
||||
<Version>2.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials">
|
||||
<Version>1.7.5</Version>
|
||||
<Version>1.7.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
|
||||
<PackageReference Include="Xamarin.Forms.AppLinks">
|
||||
|
@ -203,10 +203,10 @@
|
|||
<Version>5.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.1.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.1.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.2.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.2.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
|
|
|
@ -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.366" android:versionCode="366">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.368" android:versionCode="368">
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
1674
LastenradBayern/TINK.Android/Resources/Resource.Designer.cs
generated
1674
LastenradBayern/TINK.Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -56,8 +56,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>LastenradBayern</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>366</string>
|
||||
<string>368</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.366</string>
|
||||
<string>3.0.368</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Bcl.Build" Version="1.0.21" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.3" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="MonkeyCache">
|
||||
<Version>1.6.3</Version>
|
||||
|
@ -136,7 +136,7 @@
|
|||
<Version>6.3.0.19</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog">
|
||||
<Version>2.12.0</Version>
|
||||
<Version>3.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
|
||||
|
@ -197,10 +197,10 @@
|
|||
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
|
||||
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
|
||||
<PackageReference Include="Xamarin.CommunityToolkit">
|
||||
<Version>2.0.5</Version>
|
||||
<Version>2.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials">
|
||||
<Version>1.7.5</Version>
|
||||
<Version>1.7.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms.GoogleMaps">
|
||||
<Version>5.0.0</Version>
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Plugin.BLE" Version="2.1.3" />
|
||||
<PackageReference Include="Polly" Version="7.2.3" />
|
||||
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.5" />
|
||||
<PackageReference Include="Polly" Version="7.2.4" />
|
||||
<PackageReference Include="Serilog" Version="3.0.1" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.7" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||
<PackageReference Include="Serilog" Version="3.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="MultilingualResources\Resources.Designer.cs">
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.3" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="MonkeyCache">
|
||||
<Version>1.6.3</Version>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<Version>6.3.0.19</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog">
|
||||
<Version>2.12.0</Version>
|
||||
<Version>3.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
|
||||
|
@ -176,24 +176,24 @@
|
|||
<PackageReference Include="Xamarin.Android.Support.v7.RecyclerView" Version="28.0.0.3" />
|
||||
<PackageReference Include="Xamarin.Android.Support.Vector.Drawable" Version="28.0.0.3" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Core">
|
||||
<Version>1.9.0.2</Version>
|
||||
<Version>1.10.1.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
|
||||
<Version>1.3.1.2</Version>
|
||||
<Version>1.4.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette">
|
||||
<Version>1.0.0.16</Version>
|
||||
<Version>1.0.0.18</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.RecyclerView">
|
||||
<Version>1.3.0</Version>
|
||||
<Version>1.3.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
|
||||
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
|
||||
<PackageReference Include="Xamarin.CommunityToolkit">
|
||||
<Version>2.0.5</Version>
|
||||
<Version>2.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials">
|
||||
<Version>1.7.5</Version>
|
||||
<Version>1.7.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
|
||||
<PackageReference Include="Xamarin.Forms.AppLinks">
|
||||
|
@ -203,10 +203,10 @@
|
|||
<Version>5.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.1.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.1.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.2.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.2.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
|
|
|
@ -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.366" android:versionCode="366">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.368" android:versionCode="368">
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
1694
Meinkonrad/TINK.Android/Resources/Resource.Designer.cs
generated
1694
Meinkonrad/TINK.Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -56,8 +56,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>Mein konrad</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>366</string>
|
||||
<string>368</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.366</string>
|
||||
<string>3.0.368</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Bcl.Build" Version="1.0.21" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.3" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="MonkeyCache">
|
||||
<Version>1.6.3</Version>
|
||||
|
@ -137,7 +137,7 @@
|
|||
<Version>6.3.0.19</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog">
|
||||
<Version>2.12.0</Version>
|
||||
<Version>3.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
|
||||
|
@ -198,10 +198,10 @@
|
|||
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
|
||||
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
|
||||
<PackageReference Include="Xamarin.CommunityToolkit">
|
||||
<Version>2.0.5</Version>
|
||||
<Version>2.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials">
|
||||
<Version>1.7.5</Version>
|
||||
<Version>1.7.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms.GoogleMaps">
|
||||
<Version>5.0.0</Version>
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html xml:lang="de" lang="de">
|
||||
<title>TINK Konstanz</title>
|
||||
<meta charset="utf-8"/>
|
||||
<body>
|
||||
<h1>WIE FUNKTIONIERT DAS TRANSPORTRAD-MIETEN?</h1>
|
||||
<h2>Erstmalige Registrierung</h2><br>
|
||||
Vor der ersten Anmietung eines Transportrades ist es notwendig, sich
|
||||
kostenlos als Nutzerin oder Nutzer zu registrieren. Das dauert nur
|
||||
wenige Minuten und geht am einfachsten über den <a href="https://tink-konstanz.de/TINK-Konstanz/Mieten">Mieten</a> Button. Sobald der Account freigeschaltet ist, kann es losgehen.<br><br>
|
||||
<h2>Transportrad mieten</h2><br>
|
||||
Einfach zur nächsten TINK Station gehen (freie Räder siehe Karte) und den Code
|
||||
für das Zahlenschloss mittels SMS anfordern. Die Anleitung, wie es genau
|
||||
geht, findet sich direkt an den Stationen, auf den Rädern oder hier: <br><a href="https://tink-konstanz.de/TINK-Konstanz/Anleitungen#3401">
|
||||
<li>Anleitung Mietvorgang</a><br><a href="https://tink-konstanz.de/TINK-Konstanz/Anleitungen#3402">
|
||||
<li>Anleitung TINK Räder</a><br>
|
||||
<span style="font-weight:bold"> <li>Wichtig:</span> Nach der Nutzung das Rad an eine der TINK Stationen zurückbringen, an der Station anschließen und mittels SMS ausloggen.<br><br>
|
||||
Die erste Version der TINK APP ist verfügbar. Wir freuen uns auf konstruktives feedback.
|
||||
<br><br><h2>Preise</h2><br>
|
||||
Die erste Stunde pro Tag ist kostenfrei, danach kostet jede weitere halbe Stunde 1 Euro. Maximal
|
||||
kostet ein Rad pro 24 Stunden 9 Euro. Es kann ein Rad pro Account
|
||||
gemietet werden. Bezahlung per Abbuchung oder Kreditkarte.<br>Servicegebühren:
|
||||
Bei Abstellen eines Rades außerhalb der Stationen werden
|
||||
entfernungsabhängige Gebühren für die Rückführung berechnet. Aktuelle
|
||||
Preisliste siehe AGBs.</div>
|
||||
<h1>WELCHE TRANSPORTRÄDER GIBT ES BEI TINK?</h1>
|
||||
<div class="content2"><span class="content1">Zweirädriges Transportrad mit Platz für zwei Getränkekisten, Zuladung bis 80 kg. <br>Dreirädriges Transportrad sogar mit Platz für vier Getränkekisten, Zuladung bis 100 kg.</span><br>Jedes
|
||||
Rad verfügt über eine leichtgängige Achtgang-Schaltung und einen
|
||||
höhenverstellbaren Sattel. Im Zweirad können 2 Kinder, im Dreirad sogar 4
|
||||
Kinder bis 6 Jahre mitgenommen werden. Die wegklappbaren Kindersitze
|
||||
verfügen über Sicherheitsgurte.<br>Die Räder sind nach etwas Gewöhnung
|
||||
leicht und sicher zu fahren. Vor der ersten Nutzung empfehlen wir ein
|
||||
kurzes Üben ohne Beladung abseits des Straßenverkehrs. Einfach mal
|
||||
ausprobieren, es macht richtig Spaß!
|
||||
</body>
|
||||
</html>
|
|
@ -32,7 +32,7 @@
|
|||
<Grid
|
||||
Grid.Row="0"
|
||||
RowSpacing="0"
|
||||
RowDefinitions="Auto,1*,Auto">
|
||||
RowDefinitions="1*,Auto">
|
||||
|
||||
<StackLayout
|
||||
Grid.Row="0"
|
||||
|
@ -84,17 +84,26 @@
|
|||
|
||||
</StackLayout>
|
||||
|
||||
<!--No Network Connection-->
|
||||
<!--If Not Connected To Internet-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<StackLayout
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Spacing="0">
|
||||
<!--Bike data-->
|
||||
<Grid
|
||||
RowDefinitions="Auto,Auto"
|
||||
RowSpacing="0">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
<sharedGui:HintForRefreshingPageView
|
||||
Grid.Row="0"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
x:Name="BikesAtStationListView"
|
||||
|
@ -107,21 +116,13 @@
|
|||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
<!--Info at End of Page-->
|
||||
<StackLayout
|
||||
Grid.Row="2"
|
||||
Grid.Row="1"
|
||||
Orientation="Vertical"
|
||||
Spacing="0"
|
||||
Padding="20,0,20,0">
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
<ScrollView>
|
||||
|
||||
<StackLayout
|
||||
x:Name="ContactPageView">
|
||||
x:Name="ContactPageView"
|
||||
Spacing="0">
|
||||
|
||||
<Frame
|
||||
Padding="10"
|
||||
|
|
|
@ -83,14 +83,6 @@
|
|||
Grid.Row="0"
|
||||
Text="{x:Static resources:AppResources.MarkingFindBikeLabel}"
|
||||
Margin="0,5,0,-5">
|
||||
<Label.Triggers>
|
||||
<DataTrigger
|
||||
TargetType="Label"
|
||||
Binding="{Binding Source={x:Reference FindBikeEntry}, Path=Text, TargetNullValue=''}"
|
||||
Value="">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Entry
|
||||
Grid.Column="0"
|
||||
|
@ -123,17 +115,19 @@
|
|||
<!--No Network Connection-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<!-- Bike -->
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Orientation="Vertical">
|
||||
<!--Bike data-->
|
||||
<Grid
|
||||
RowDefinitions="Auto,Auto"
|
||||
RowSpacing="0">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
<sharedGui:HintForRefreshingPageView
|
||||
Grid.Row="0"/>
|
||||
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
<!--Bike-->
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
|
@ -143,8 +137,7 @@
|
|||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
|
|
|
@ -44,34 +44,36 @@
|
|||
<!--No Network Connection-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Orientation="Vertical">
|
||||
<!--Bike data-->
|
||||
<Grid
|
||||
RowDefinitions="Auto,Auto"
|
||||
RowSpacing="0">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
<sharedGui:HintForRefreshingPageView
|
||||
Grid.Row="0"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
HasUnevenRows="True"
|
||||
SeparatorVisibility="None"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
Grid.Row="1"
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
HasUnevenRows="True"
|
||||
SeparatorVisibility="None"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@
|
|||
|
||||
<ScrollView>
|
||||
|
||||
<StackLayout>
|
||||
<StackLayout
|
||||
Spacing="0">
|
||||
|
||||
<Frame
|
||||
Padding="10"
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="Gray"
|
||||
Opacity=".80"
|
||||
HasShadow="False"
|
||||
CornerRadius="0"/>
|
||||
|
||||
<!--Show spinner and info text-->
|
||||
|
@ -29,6 +30,7 @@
|
|||
VerticalOptions="Center"
|
||||
BackgroundColor="White"
|
||||
Padding="10"
|
||||
HasShadow="False"
|
||||
CornerRadius="10">
|
||||
|
||||
<StackLayout Orientation="Vertical">
|
||||
|
|
|
@ -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.366" android:versionCode="366">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.368" android:versionCode="368">
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
Binary file not shown.
1674
TINK/TINK.Android/Resources/Resource.Designer.cs
generated
1674
TINK/TINK.Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load diff
|
@ -77,7 +77,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.3" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="MonkeyCache">
|
||||
<Version>1.6.3</Version>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<Version>6.3.0.19</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog">
|
||||
<Version>2.12.0</Version>
|
||||
<Version>3.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
|
||||
|
@ -176,24 +176,24 @@
|
|||
<PackageReference Include="Xamarin.Android.Support.v7.RecyclerView" Version="28.0.0.3" />
|
||||
<PackageReference Include="Xamarin.Android.Support.Vector.Drawable" Version="28.0.0.3" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Core">
|
||||
<Version>1.9.0.2</Version>
|
||||
<Version>1.10.1.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.MediaRouter">
|
||||
<Version>1.3.1.2</Version>
|
||||
<Version>1.4.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette">
|
||||
<Version>1.0.0.16</Version>
|
||||
<Version>1.0.0.18</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.RecyclerView">
|
||||
<Version>1.3.0</Version>
|
||||
<Version>1.3.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
|
||||
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
|
||||
<PackageReference Include="Xamarin.CommunityToolkit">
|
||||
<Version>2.0.5</Version>
|
||||
<Version>2.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials">
|
||||
<Version>1.7.5</Version>
|
||||
<Version>1.7.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
|
||||
<PackageReference Include="Xamarin.Forms.AppLinks">
|
||||
|
@ -203,10 +203,10 @@
|
|||
<Version>5.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms.GoogleMaps.Bindings" Version="3.0.0" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.1.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.1.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Base" Version="118.2.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Basement" Version="118.2.0.1" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Maps" Version="118.1.0.2" />
|
||||
<PackageReference Include="Xamarin.GooglePlayServices.Tasks" Version="118.0.2.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
|
|
|
@ -56,8 +56,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>sharee.bike</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>366</string>
|
||||
<string>368</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.366</string>
|
||||
<string>3.0.368</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Binary file not shown.
|
@ -121,7 +121,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Bcl.Build" Version="1.0.21" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="7.0.3" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="MonkeyCache">
|
||||
<Version>1.6.3</Version>
|
||||
|
@ -137,7 +137,7 @@
|
|||
<Version>6.3.0.19</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog">
|
||||
<Version>2.12.0</Version>
|
||||
<Version>3.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Xamarin" Version="1.0.0" />
|
||||
|
@ -198,10 +198,10 @@
|
|||
<PackageReference Include="Xamarin.Auth" Version="1.7.0" />
|
||||
<PackageReference Include="Xamarin.Build.Download" Version="0.11.4" />
|
||||
<PackageReference Include="Xamarin.CommunityToolkit">
|
||||
<Version>2.0.5</Version>
|
||||
<Version>2.0.6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials">
|
||||
<Version>1.7.5</Version>
|
||||
<Version>1.7.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Forms.GoogleMaps">
|
||||
<Version>5.0.0</Version>
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
<Grid
|
||||
Grid.Row="0"
|
||||
RowSpacing="0"
|
||||
RowDefinitions="Auto,1*,Auto">
|
||||
|
||||
RowDefinitions="1*,Auto">
|
||||
|
||||
<StackLayout
|
||||
Grid.Row="0"
|
||||
Spacing="0"
|
||||
|
@ -56,17 +56,17 @@
|
|||
RowDefinitions="Auto"
|
||||
Padding="0,0,0,5">
|
||||
|
||||
<!--Station id-->
|
||||
<Label
|
||||
<!--Station id-->
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="Start"
|
||||
TextColor="White"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
TextType="Html"
|
||||
|
@ -74,26 +74,35 @@
|
|||
HorizontalOptions="End"
|
||||
TextColor="White"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--No Network Connection-->
|
||||
<!--If Not Connected To Internet-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<StackLayout
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Spacing="0">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
<!--Bike data-->
|
||||
<Grid
|
||||
RowDefinitions="Auto,Auto"
|
||||
RowSpacing="0">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView
|
||||
Grid.Row="0"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
x:Name="BikesAtStationListView"
|
||||
|
@ -106,21 +115,13 @@
|
|||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
<!--Info at End of Page-->
|
||||
<StackLayout
|
||||
Grid.Row="2"
|
||||
Grid.Row="1"
|
||||
Orientation="Vertical"
|
||||
Spacing="0"
|
||||
Padding="20,0,20,0">
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
<ScrollView>
|
||||
|
||||
<StackLayout
|
||||
x:Name="ContactPageView">
|
||||
x:Name="ContactPageView"
|
||||
Spacing="0">
|
||||
|
||||
<Frame
|
||||
Padding="10"
|
||||
|
|
|
@ -54,14 +54,6 @@
|
|||
Grid.Row="0"
|
||||
Text="{x:Static resources:AppResources.MarkingFindBikeLabel}"
|
||||
Margin="0,5,0,-5">
|
||||
<Label.Triggers>
|
||||
<DataTrigger
|
||||
TargetType="Label"
|
||||
Binding="{Binding Source={x:Reference FindBikeEntry}, Path=Text, TargetNullValue=''}"
|
||||
Value="">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Entry
|
||||
Grid.Column="0"
|
||||
|
@ -94,17 +86,19 @@
|
|||
<!--No Network Connection-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<!-- Bike -->
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Orientation="Vertical">
|
||||
<!--Bike data-->
|
||||
<Grid
|
||||
RowDefinitions="Auto,Auto"
|
||||
RowSpacing="0">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
<sharedGui:HintForRefreshingPageView
|
||||
Grid.Row="0"/>
|
||||
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
<!--Bike-->
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
|
@ -114,8 +108,7 @@
|
|||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
|
||||
<!--Bike(s) view-->
|
||||
<Grid
|
||||
RowDefinitions="1*,Auto"
|
||||
RowDefinitions="1*,Auto"
|
||||
RowSpacing="0"
|
||||
Grid.Row="0">
|
||||
Grid.Row="0">
|
||||
|
||||
<StackLayout
|
||||
Grid.Row="0"
|
||||
|
@ -41,34 +41,36 @@
|
|||
<!--No Network Connection-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Orientation="Vertical">
|
||||
<!--Bike data-->
|
||||
<Grid
|
||||
RowDefinitions="Auto,Auto"
|
||||
RowSpacing="0">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
<sharedGui:HintForRefreshingPageView
|
||||
Grid.Row="0"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
HasUnevenRows="True"
|
||||
SeparatorVisibility="None"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Margin="20"
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
Grid.Row="1"
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
HasUnevenRows="True"
|
||||
SeparatorVisibility="None"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
|
||||
<ScrollView>
|
||||
|
||||
<StackLayout>
|
||||
<StackLayout
|
||||
Spacing="0">
|
||||
|
||||
<Frame
|
||||
Padding="10"
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
|
||||
/// <summary> Id of station a which bike is located, null otherwise.</summary>
|
||||
[DataMember]
|
||||
public string StationId { get; }
|
||||
public string StationId { get; private set; }
|
||||
|
||||
/// <summary> Name of station a which bike is located, null otherwise. </summary>
|
||||
[DataMember]
|
||||
|
@ -128,6 +128,24 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary> Loads a bike object from copri server booking_cancel (cancel reservation)/ booking_update (return bike) response.</summary>
|
||||
/// <param name="bike">Bike object to load response into.</param>
|
||||
/// <param name="notifyLevel">Controls whether notify property changed events are fired or not.</param>
|
||||
/// <param name="stationId">Id of the station if bike station changed, null otherwise.</param>
|
||||
public void Load(
|
||||
NotifyPropertyChangedLevel notifyLevel,
|
||||
string stationId = null)
|
||||
{
|
||||
State.Load(InUseStateEnum.Disposable, notifyLevel: notifyLevel);
|
||||
if (stationId == null)
|
||||
{
|
||||
// Station did not change.
|
||||
return;
|
||||
}
|
||||
|
||||
StationId = stationId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the instance to text.
|
||||
/// </summary>
|
||||
|
|
|
@ -65,10 +65,17 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
DataSource DataSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or set the rental description.
|
||||
/// Gets the rental description.
|
||||
/// </summary>
|
||||
IRentalDescription TariffDescription { get; }
|
||||
|
||||
/// <summary> Loads a bike object from copri server booking_cancel (cancel reservation)/ booking_update (return bike) response.</summary>
|
||||
/// <param name="notifyLevel">Controls whether notify property changed events are fired or not.</param>
|
||||
/// <param name="stationId">Id of the station if bike station changed, null otherwise.</param>
|
||||
void Load(
|
||||
NotifyPropertyChangedLevel notifyLevel,
|
||||
string stationId = null);
|
||||
|
||||
event PropertyChangedEventHandler PropertyChanged;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using TINK.Model.MiniSurvey;
|
||||
using TINK.Model.MiniSurvey;
|
||||
|
||||
namespace TINK.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds tasks to be accoumplished/ information shown to user after booking has finished.
|
||||
/// Holds tasks to be accomplished/ information shown to user after booking has finished.
|
||||
/// </summary>
|
||||
public class BookingFinishedModel : IBookingFinishedModel
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
|
||||
using TINK.Model.Connector.Updater;
|
||||
|
@ -288,7 +289,10 @@ namespace TINK.Model.Connector
|
|||
DoReturnResponse response
|
||||
= (await CopriServer.DoReturn(bike.Id, location, bike.OperatorUri)).GetIsReturnBikeResponseOk(bike.Id);
|
||||
|
||||
bike.Load(Bikes.BikeInfoNS.BC.NotifyPropertyChangedLevel.None);
|
||||
bike.Load(
|
||||
Bikes.BikeInfoNS.BC.NotifyPropertyChangedLevel.None,
|
||||
response.bike_returned.station ?? string.Empty);
|
||||
|
||||
return response?.Create() ?? new BookingFinishedModel();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,14 +17,6 @@ namespace TINK.Model.Connector.Updater
|
|||
/// <todo>Rename to UpdateFromCopri.</todo>
|
||||
public static class UpdaterJSON
|
||||
{
|
||||
/// <summary> Loads a bike object from copri server cancel reservation/ booking update request.</summary>
|
||||
/// <param name="bike">Bike object to load response into.</param>
|
||||
/// <param name="notifyLevel">Controls whether notify property changed events are fired or not.</param>
|
||||
public static void Load(
|
||||
this IBikeInfoMutable bike,
|
||||
NotifyPropertyChangedLevel notifyLevel)
|
||||
=> bike.State.Load(InUseStateEnum.Disposable, notifyLevel: notifyLevel);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all station for station provider and add them into station list.
|
||||
/// </summary>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TINK.MultilingualResources;
|
||||
using TINK.Repository.Exception;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace TINK.Model
|
||||
|
@ -697,6 +698,11 @@ namespace TINK.Model
|
|||
AppResources.ChangeLog_3_0_366_MK_SB,
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
|
||||
},
|
||||
{
|
||||
new Version(3, 0, 368),
|
||||
string.Format("{0} <br /> {1}", AppResources.ChangeLog_PackageUpdates, AppResources.ChangeLog_MinorBugFixes),
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
|
||||
},
|
||||
};
|
||||
|
||||
/// <summary> Manges the whats new information.</summary>
|
||||
|
|
|
@ -812,7 +812,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to We have fixed some bugs. Enjoy the ride!.
|
||||
/// Looks up a localized string similar to - We have fixed a few minor bugs. Enjoy the ride!.
|
||||
/// </summary>
|
||||
public static string ChangeLog_MinorBugFixes {
|
||||
get {
|
||||
|
@ -821,7 +821,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A few small things have been changed in the design..
|
||||
/// Looks up a localized string similar to - A few small things have been changed in the design..
|
||||
/// </summary>
|
||||
public static string ChangeLog_MinorDesignImprovements {
|
||||
get {
|
||||
|
@ -830,7 +830,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Minor improvements..
|
||||
/// Looks up a localized string similar to - Minor improvements..
|
||||
/// </summary>
|
||||
public static string ChangeLog_MinorImprovements {
|
||||
get {
|
||||
|
@ -839,7 +839,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Software packages were updated..
|
||||
/// Looks up a localized string similar to - Software packages were updated..
|
||||
/// </summary>
|
||||
public static string ChangeLog_PackageUpdates {
|
||||
get {
|
||||
|
@ -1716,6 +1716,15 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Location query failed.
|
||||
/// </summary>
|
||||
public static string ErrorQueryGeolocation {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorQueryGeolocation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Your mobile device does not connect to the bike lock. Please step as close as possible to the bike and try again..
|
||||
/// </summary>
|
||||
|
@ -1736,7 +1745,8 @@ namespace TINK.MultilingualResources {
|
|||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End rental at an unknown location is not possible.
|
||||
///Getting geolocation failed..
|
||||
///Make sure you have granted location sharing permission and your location services are enabled.
|
||||
///Try again!.
|
||||
/// </summary>
|
||||
public static string ErrorReturnBikeLockClosedGetGPSExceptionMessage {
|
||||
get {
|
||||
|
|
|
@ -978,7 +978,7 @@ Kleinere Fehlerbehebungen.
|
|||
<value>Die App hat ein neues Design! --- Sie sind Beta-Tester? Geben Sie uns jederzeit hilfreiche Rückmeldung über 'Kontakt - Rückmeldung zur App'. Sie sind noch kein Beta-Tester? Werden Sie es und erhalten Sie tolle neue Features vor allen anderen!</value>
|
||||
</data>
|
||||
<data name="ChangeLog_MinorBugFixes" xml:space="preserve">
|
||||
<value>Wir haben einige Fehler behoben. Genießen Sie die Fahrt!</value>
|
||||
<value>- Wir haben ein paar kleine Fehler behoben. Genießen Sie die Fahrt!</value>
|
||||
</data>
|
||||
<data name="ChangeLog3_0_338_LB_MK" xml:space="preserve">
|
||||
<value>Neben kleineren Fehlerbehebungen haben wir die Kontaktaufnahme vereinfacht:
|
||||
|
@ -1018,7 +1018,7 @@ Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben:
|
|||
<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>
|
||||
<data name="ChangeLog_MinorDesignImprovements" xml:space="preserve">
|
||||
<value>Es wurden ein paar Kleinigkeiten im Design verändert.</value>
|
||||
<value>- Es wurden ein paar Kleinigkeiten im Design verändert.</value>
|
||||
</data>
|
||||
<data name="MarkingContactSupportBusy" xml:space="preserve">
|
||||
<value>{0} <font color="gray"><u>kontaktieren</u></font>.</value>
|
||||
|
@ -1095,7 +1095,7 @@ Probieren Sie es aus!</value>
|
|||
</ul></value>
|
||||
</data>
|
||||
<data name="ChangeLog_PackageUpdates" xml:space="preserve">
|
||||
<value>Softwarepakete wurden aktualisiert.</value>
|
||||
<value>- Softwarepakete wurden aktualisiert.</value>
|
||||
</data>
|
||||
<data name="ChangeLog_3_0_355_MK_SB_iOS" xml:space="preserve">
|
||||
<value>Bluetooth-Kommunikation verbessert.</value>
|
||||
|
@ -1113,7 +1113,7 @@ Probieren Sie es aus!</value>
|
|||
<value>Information</value>
|
||||
</data>
|
||||
<data name="ChangeLog_MinorImprovements" xml:space="preserve">
|
||||
<value>Kleine Verbesserungen.</value>
|
||||
<value>- Kleine Verbesserungen.</value>
|
||||
</data>
|
||||
<data name="ErrorOpenLockBoldStatusIsUnknownMessage" xml:space="preserve">
|
||||
<value>Das Schloss konnte nicht korrekt geöffnet werden. Bitte versuchen Sie es erneut.
|
||||
|
@ -1145,7 +1145,8 @@ Fehler beim Start der Standortabfrage!</value>
|
|||
</data>
|
||||
<data name="ErrorReturnBikeLockClosedGetGPSExceptionMessage" xml:space="preserve">
|
||||
<value>Beenden der Miete an unbekanntem Standort is nicht möglich.
|
||||
Fehler bei der Standortabfrage!</value>
|
||||
Stellen Sie sicher, dass Sie die Erlaubnis zur Standortfreigabe erteilt haben und Ihre Standortdienste aktiviert sind.
|
||||
Versuchen Sie erneut!</value>
|
||||
</data>
|
||||
<data name="Error_ReturnBike_Station_Location_Message" xml:space="preserve">
|
||||
<value>Wir konnten das Rad keiner Station zuordnen. Dazu benötigen wir Ihre Standortinformationen, während Sie direkt neben dem Rad stehen. Nur dann kann Ihre Miete beendet werden!
|
||||
|
@ -1203,4 +1204,7 @@ Außerdem:<br/>
|
|||
<data name="ChangeLog_3_0_366_MK_SB" xml:space="preserve">
|
||||
<value>Auf der Seite "Rad auswählen" können Sie nun nacheinander mehrere Räder suchen und mieten. Im Anschluss finden Sie diese unter "Meine Räder".</value>
|
||||
</data>
|
||||
<data name="ErrorQueryGeolocation" xml:space="preserve">
|
||||
<value>Standortabfrage fehlgeschlagen</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1083,7 +1083,7 @@ Minor bugfixes.</value>
|
|||
<value>The app has a new design! --- You are a beta tester? Give us helpful feedback anytime via ‘Contact - Feedback about the App’. Not a beta tester yet? Become one and get great new features before anyone else!</value>
|
||||
</data>
|
||||
<data name="ChangeLog_MinorBugFixes" xml:space="preserve">
|
||||
<value>We have fixed some bugs. Enjoy the ride!</value>
|
||||
<value>- We have fixed a few minor bugs. Enjoy the ride!</value>
|
||||
</data>
|
||||
<data name="ChangeLog3_0_338_LB_MK" xml:space="preserve">
|
||||
<value>Besides minor bug fixes we have simplified the contact procedure:
|
||||
|
@ -1123,7 +1123,7 @@ You can now see at a glance which app version you have installed: in the menu at
|
|||
<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>
|
||||
<data name="ChangeLog_MinorDesignImprovements" xml:space="preserve">
|
||||
<value>A few small things have been changed in the design.</value>
|
||||
<value>- A few small things have been changed in the design.</value>
|
||||
</data>
|
||||
<data name="MarkingContactSupportBusy" xml:space="preserve">
|
||||
<value><font color="gray"><u>Contact</u></font> {0}.</value>
|
||||
|
@ -1198,7 +1198,7 @@ Try it out!</value>
|
|||
</ul></value>
|
||||
</data>
|
||||
<data name="ChangeLog_PackageUpdates" xml:space="preserve">
|
||||
<value>Software packages were updated.</value>
|
||||
<value>- Software packages were updated.</value>
|
||||
</data>
|
||||
<data name="ChangeLog_3_0_355_MK_SB_iOS" xml:space="preserve">
|
||||
<value>Bluetooth communication improved.</value>
|
||||
|
@ -1220,7 +1220,7 @@ Try it out!</value>
|
|||
<br/>In addition:<ul><li>Software packages were updated.</li><li>Minor bug fixes.</li></ul></value>
|
||||
</data>
|
||||
<data name="ChangeLog_MinorImprovements" xml:space="preserve">
|
||||
<value>Minor improvements.</value>
|
||||
<value>- Minor improvements.</value>
|
||||
</data>
|
||||
<data name="MarkingNoNetworkConnection" xml:space="preserve">
|
||||
<value>Oops, there is no Internet connection.</value>
|
||||
|
@ -1234,7 +1234,8 @@ Start getting geolocation failed.</value>
|
|||
</data>
|
||||
<data name="ErrorReturnBikeLockClosedGetGPSExceptionMessage" xml:space="preserve">
|
||||
<value>End rental at an unknown location is not possible.
|
||||
Getting geolocation failed.</value>
|
||||
Make sure you have granted location sharing permission and your location services are enabled.
|
||||
Try again!</value>
|
||||
</data>
|
||||
<data name="Error_ReturnBike_Station_Location_Message" xml:space="preserve">
|
||||
<value>We could not assign the bike to any station. For this we need your location information while you are standing right next to the bike. Only then your rental can be terminated!
|
||||
|
@ -1292,4 +1293,7 @@ Also:<br/>
|
|||
<data name="ChangeLog_3_0_366_MK_SB" xml:space="preserve">
|
||||
<value>On the "Select bike" page you can now search and rent several bikes one after the other. Afterwards you will find them under "My bikes".</value>
|
||||
</data>
|
||||
<data name="ErrorQueryGeolocation" xml:space="preserve">
|
||||
<value>Location query failed</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1329,8 +1329,8 @@ Kleinere Fehlerbehebungen.
|
|||
<target state="translated">Die App hat ein neues Design! --- Sie sind Beta-Tester? Geben Sie uns jederzeit hilfreiche Rückmeldung über 'Kontakt - Rückmeldung zur App'. Sie sind noch kein Beta-Tester? Werden Sie es und erhalten Sie tolle neue Features vor allen anderen!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog_MinorBugFixes" translate="yes" xml:space="preserve">
|
||||
<source>We have fixed some bugs. Enjoy the ride!</source>
|
||||
<target state="translated">Wir haben einige Fehler behoben. Genießen Sie die Fahrt!</target>
|
||||
<source>- We have fixed a few minor bugs. Enjoy the ride!</source>
|
||||
<target state="translated">- Wir haben ein paar kleine Fehler behoben. Genießen Sie die Fahrt!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog3_0_338_LB_MK" translate="yes" xml:space="preserve">
|
||||
<source>Besides minor bug fixes we have simplified the contact procedure:
|
||||
|
@ -1389,8 +1389,8 @@ Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben:
|
|||
<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>
|
||||
<trans-unit id="ChangeLog_MinorDesignImprovements" translate="yes" xml:space="preserve">
|
||||
<source>A few small things have been changed in the design.</source>
|
||||
<target state="translated">Es wurden ein paar Kleinigkeiten im Design verändert.</target>
|
||||
<source>- A few small things have been changed in the design.</source>
|
||||
<target state="translated">- Es wurden ein paar Kleinigkeiten im Design verändert.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="MarkingContactSupportBusy" translate="yes" xml:space="preserve">
|
||||
<source><bpt id="1"><font color="gray"></bpt><bpt id="2"><u></bpt>Contact<ept id="2"></u></ept><ept id="1"></font></ept> {0}.</source>
|
||||
|
@ -1505,8 +1505,8 @@ Probieren Sie es aus!</target>
|
|||
<ept id="1"></ul></ept></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog_PackageUpdates" translate="yes" xml:space="preserve">
|
||||
<source>Software packages were updated.</source>
|
||||
<target state="translated">Softwarepakete wurden aktualisiert.</target>
|
||||
<source>- Software packages were updated.</source>
|
||||
<target state="translated">- Softwarepakete wurden aktualisiert.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog_3_0_355_MK_SB_iOS" translate="yes" xml:space="preserve">
|
||||
<source>Bluetooth communication improved.</source>
|
||||
|
@ -1529,8 +1529,8 @@ Probieren Sie es aus!</target>
|
|||
<target state="translated">Information</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog_MinorImprovements" translate="yes" xml:space="preserve">
|
||||
<source>Minor improvements.</source>
|
||||
<target state="translated">Kleine Verbesserungen.</target>
|
||||
<source>- Minor improvements.</source>
|
||||
<target state="translated">- Kleine Verbesserungen.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ErrorOpenLockBoldStatusIsUnknownMessage" translate="yes" xml:space="preserve">
|
||||
<source>The lock could not be opened correctly. Try again!
|
||||
|
@ -1576,9 +1576,11 @@ Fehler beim Start der Standortabfrage!</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="ErrorReturnBikeLockClosedGetGPSExceptionMessage" translate="yes" xml:space="preserve">
|
||||
<source>End rental at an unknown location is not possible.
|
||||
Getting geolocation failed.</source>
|
||||
Make sure you have granted location sharing permission and your location services are enabled.
|
||||
Try again!</source>
|
||||
<target state="translated">Beenden der Miete an unbekanntem Standort is nicht möglich.
|
||||
Fehler bei der Standortabfrage!</target>
|
||||
Stellen Sie sicher, dass Sie die Erlaubnis zur Standortfreigabe erteilt haben und Ihre Standortdienste aktiviert sind.
|
||||
Versuchen Sie erneut!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="Error_ReturnBike_Station_Location_Message" translate="yes" xml:space="preserve">
|
||||
<source>We could not assign the bike to any station. For this we need your location information while you are standing right next to the bike. Only then your rental can be terminated!
|
||||
|
@ -1663,6 +1665,10 @@ Außerdem:<br/>
|
|||
<source>On the "Select bike" page you can now search and rent several bikes one after the other. Afterwards you will find them under "My bikes".</source>
|
||||
<target state="translated">Auf der Seite "Rad auswählen" können Sie nun nacheinander mehrere Räder suchen und mieten. Im Anschluss finden Sie diese unter "Meine Räder".</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ErrorQueryGeolocation" translate="yes" xml:space="preserve">
|
||||
<source>Location query failed</source>
|
||||
<target state="translated">Standortabfrage fehlgeschlagen</target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
</file>
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace TINK.Repository
|
|||
IVersionInfo versionInfo) =>
|
||||
await DoUpdateLockingStateAsync(
|
||||
operatorUri?.AbsoluteUri ?? m_oCopriHost.AbsoluteUri,
|
||||
requestBuilder.UpateLockingState(bikeId, state, location, batteryLevel, versionInfo),
|
||||
requestBuilder.UpdateLockingState(bikeId, state, location, batteryLevel, versionInfo),
|
||||
UserAgent);
|
||||
|
||||
/// <summary> Gets booking request. </summary>
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace TINK.Repository.Request
|
|||
/// <param name="location">Geolocation of lock when state change occurred.</param>
|
||||
/// <param name="versionInfo">Information about lock (firmware version, hardware version, ...).</param>
|
||||
/// <returns>Request to update locking state.</returns>
|
||||
string UpateLockingState(
|
||||
string UpdateLockingState(
|
||||
string bikeId,
|
||||
lock_state state,
|
||||
LocationDto location = null,
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace TINK.Repository.Request
|
|||
/// Not supported if user is not logged in. Lock state is only updated after open/ close which is only possible if user is logged in.
|
||||
/// </summary>
|
||||
/// <exception cref="NotSupportedException"></exception>
|
||||
public string UpateLockingState(string bikeId, lock_state state, LocationDto geolocation, double batteryPercentage, IVersionInfo versionInfo)
|
||||
public string UpdateLockingState(string bikeId, lock_state state, LocationDto geolocation, double batteryPercentage, IVersionInfo versionInfo)
|
||||
=> throw new NotSupportedException();
|
||||
|
||||
public string DoBook(string bikeId, Guid guid, double batteryPercentage, LockingAction? nextAction = null)
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace TINK.Repository.Request
|
|||
/// <param name="state">New locking state.</param>
|
||||
/// <param name="versionInfo">Information about lock (firmware version, hardware version, ...).</param>
|
||||
/// <returns>Request to update locking state.</returns>
|
||||
public string UpateLockingState(
|
||||
public string UpdateLockingState(
|
||||
string bikeId,
|
||||
lock_state state,
|
||||
LocationDto geolocation,
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace TINK.Repository.Response
|
|||
[DataMember]
|
||||
public string bike_charge { get; private set; }
|
||||
|
||||
/// <summary> Locking state of the bike. </summary>
|
||||
/// <summary> Locking state. </summary>
|
||||
[DataMember]
|
||||
public string lock_state { get; private set; }
|
||||
|
||||
|
|
|
@ -1,14 +1,50 @@
|
|||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace TINK.Repository.Response
|
||||
{
|
||||
public class DoReturnResponse : BikesReservedOccupiedResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information about the returned bike.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class BikeReturned
|
||||
{
|
||||
/// <summary>
|
||||
/// Rental state.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string state { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id of the bike.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string bike { get; private set; }
|
||||
|
||||
/// <summary> Locking state. </summary>
|
||||
[DataMember]
|
||||
public string lock_state { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Id of the station.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string station { get; private set; }
|
||||
}
|
||||
|
||||
/// <summary> Mini survey.</summary>
|
||||
[DataMember]
|
||||
public MiniSurveyResponse user_miniquery { get; private set; }
|
||||
|
||||
[DataMember]
|
||||
public string co2saving { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Holds information about the returned bike.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public BikeReturned bike_returned { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace TINK.Services.CopriApi
|
|||
? (await copriServer.BookAvailableAndStartOpeningAsync(bike.Id, bike.OperatorUri)).GetIsBookingResponseOk(bike.Id)
|
||||
: (await copriServer.BookReservedAndStartOpeningAsync(bike.Id, bike.OperatorUri)).GetIsBookingResponseOk(bike.Id);
|
||||
|
||||
// Upated locking state.
|
||||
// Updated locking state.
|
||||
var lockingState = await cachedServer.GetOccupiedBikeLockStateAsync(bike.Id);
|
||||
|
||||
var watch = new Stopwatch();
|
||||
|
@ -181,8 +181,10 @@ namespace TINK.Services.CopriApi
|
|||
DoReturnResponse response =
|
||||
await copriServer.ReturnAndStartClosingAsync(bike.Id, bike.OperatorUri);
|
||||
|
||||
// Upate booking state
|
||||
bike.Load(Model.Bikes.BikeInfoNS.BC.NotifyPropertyChangedLevel.None);
|
||||
// Update booking state
|
||||
bike.Load(
|
||||
Model.Bikes.BikeInfoNS.BC.NotifyPropertyChangedLevel.None,
|
||||
response.bike_returned.station ?? string.Empty);
|
||||
|
||||
var lockingState = await cachedServer.GetLockStateAsync(bike.Id);
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<PackageReference Include="Plugin.BLE" Version="2.1.3" />
|
||||
<PackageReference Include="Plugin.BluetoothLE" Version="6.3.0.19" />
|
||||
<PackageReference Include="Plugin.Permissions" Version="6.0.1" />
|
||||
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||
<PackageReference Include="Serilog" Version="3.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="System.Collections" Version="4.3.0" />
|
||||
|
@ -44,7 +44,7 @@
|
|||
<PackageReference Include="System.Xml.XDocument" Version="4.3.0" />
|
||||
<PackageReference Include="Xam.Plugin.Connectivity" Version="3.2.0" />
|
||||
<PackageReference Include="Xam.Plugins.Messaging" Version="5.2.0" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.5" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.7" />
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
|
||||
<PackageReference Include="Xamarin.Forms.GoogleMaps" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace TINK.ViewModel.Bikes.Bike.BC
|
|||
IUser activeUser,
|
||||
IInUseStateInfoProvider stateInfoProvider,
|
||||
IBikesViewModel bikesViewModel,
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, activeUser, stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, activeUser, new ViewContext(PageContext.BikesAtStation), stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
{
|
||||
RequestHandler = activeUser.IsLoggedIn
|
||||
? RequestHandlerFactory.Create(
|
||||
|
@ -107,12 +107,10 @@ namespace TINK.ViewModel.Bikes.Bike.BC
|
|||
public System.Windows.Input.ICommand OnButtonClicked => new Xamarin.Forms.Command(async () =>
|
||||
{
|
||||
var lastHandler = RequestHandler;
|
||||
var lastState = Bike.State.Value;
|
||||
RequestHandler = await RequestHandler.HandleRequest();
|
||||
|
||||
if (lastHandler.IsRemoveBikeRequired)
|
||||
{
|
||||
BikeRemoveDelegate(Id);
|
||||
}
|
||||
CheckRemoveBike(Id, lastState);
|
||||
|
||||
if (lastHandler.GetType() == RequestHandler.GetType())
|
||||
{
|
||||
|
|
|
@ -62,10 +62,6 @@ namespace TINK.ViewModel.Bikes.Bike.BC.RequestHandler
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary> Gets if the bike has to be removed after action has been completed. </summary>
|
||||
public bool IsRemoveBikeRequired { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Constructs the request handler base.
|
||||
/// </summary>
|
||||
|
@ -93,7 +89,6 @@ namespace TINK.ViewModel.Bikes.Bike.BC.RequestHandler
|
|||
SmartDevice = smartDevice;
|
||||
ViewService = viewService;
|
||||
ActiveUser = activeUser;
|
||||
IsRemoveBikeRequired = false;
|
||||
BikesViewModel = bikesViewModel
|
||||
?? throw new ArgumentException($"Can not construct {GetType().Name}-object. {nameof(bikesViewModel)} must not be null.");
|
||||
}
|
||||
|
|
|
@ -60,9 +60,6 @@ namespace TINK.ViewModel.Bikes.Bike.BC.RequestHandler
|
|||
IsConnected = IsConnectedDelegate();
|
||||
|
||||
await ConnectorFactory(IsConnected).Command.DoCancelReservation(SelectedBike);
|
||||
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -59,6 +59,9 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
/// <summary> Reference on the user </summary>
|
||||
protected IUser ActiveUser { get; }
|
||||
|
||||
/// <summary> Holds the view context in which bike view model is used.</summary>
|
||||
protected ViewContext ViewContext { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides context related info.
|
||||
/// </summary>
|
||||
|
@ -89,6 +92,7 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
/// <param name="smartDevice">Provides info about the smart device (phone, tablet, ...).</param>
|
||||
/// <param name="selectedBike">Bike to be displayed.</param>
|
||||
/// <param name="activeUser">Object holding logged in user or an empty user object.</param>
|
||||
/// <param name="viewContext"> Holds the view context in which bike view model is used.</param>
|
||||
/// <param name="stateInfoProvider">Provides in use state information.</param>
|
||||
/// <param name="bikesViewModel">View model to be used for progress report and unlocking/ locking view.</param>
|
||||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
|
@ -101,6 +105,7 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
IViewService viewService,
|
||||
BikeInfoMutable selectedBike,
|
||||
IUser activeUser,
|
||||
ViewContext viewContext,
|
||||
IInUseStateInfoProvider stateInfoProvider,
|
||||
IBikesViewModel bikesViewModel,
|
||||
Action<string> openUrlInBrowser)
|
||||
|
@ -123,6 +128,8 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
ActiveUser = activeUser
|
||||
?? throw new ArgumentException(string.Format("Can not construct {0}- object, user object is null.", typeof(BikeViewModelBase)));
|
||||
|
||||
ViewContext = viewContext;
|
||||
|
||||
StateInfoProvider = stateInfoProvider
|
||||
?? throw new ArgumentException(string.Format("Can not construct {0}- object, user object is null.", typeof(IInUseStateInfoProvider)));
|
||||
|
||||
|
@ -385,5 +392,57 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if bike has to be removed and if yes invoke remove delegate.
|
||||
/// </summary>
|
||||
/// <param name="Id">Id of bike to remove.</param>
|
||||
/// <param name="lastState">Previous state used to decide whether to remove bike or not.</param>
|
||||
public void CheckRemoveBike(string Id, InUseStateEnum lastState)
|
||||
{
|
||||
switch (ViewContext.Page)
|
||||
{
|
||||
case PageContext.MyBikes:
|
||||
// Bike is shown on page My Bikes.
|
||||
switch (Bike.State.Value)
|
||||
{
|
||||
case InUseStateEnum.FeedbackPending:
|
||||
case InUseStateEnum.Reserved:
|
||||
case InUseStateEnum.Booked:
|
||||
// Bike has still to be shown at my bikes page to give feedback or manage bike.
|
||||
break;
|
||||
|
||||
default:
|
||||
BikeRemoveDelegate(Id);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case PageContext.BikesAtStation:
|
||||
// Bike is shown on page Bike At Station.
|
||||
switch (lastState != InUseStateEnum.Booked)
|
||||
{
|
||||
case true:
|
||||
// Only remove bike if bike was rented before.
|
||||
break;
|
||||
|
||||
default:
|
||||
switch (ViewContext.StationId == Bike.StationId)
|
||||
{
|
||||
case true:
|
||||
// Do not remove bike if bike is returned a current station.
|
||||
break;
|
||||
|
||||
default:
|
||||
BikeRemoveDelegate(Id);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
public static class BikeViewModelFactory
|
||||
{
|
||||
/// <param name="smartDevice">Provides info about the smart device (phone, tablet, ...).</param>
|
||||
/// <param name="viewContext"> Holds the view context in which bike view model is used.</param>
|
||||
/// <param name="stateInfoProvider">Provides in use state information.</param>
|
||||
/// <param name="bikesViewModel">View model to be used for progress report and unlocking/ locking view.</param>
|
||||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
|
@ -25,6 +26,7 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
IViewService viewService,
|
||||
Model.Bikes.BikeInfoNS.BC.BikeInfoMutable bikeInfo,
|
||||
IUser activeUser,
|
||||
ViewContext viewContext,
|
||||
IInUseStateInfoProvider stateInfoProvider,
|
||||
IBikesViewModel bikesViewModel,
|
||||
Action<string> openUrlInBrowser)
|
||||
|
@ -42,6 +44,7 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
viewService,
|
||||
bikeInfo as Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfoMutable,
|
||||
activeUser,
|
||||
viewContext,
|
||||
stateInfoProvider,
|
||||
bikesViewModel,
|
||||
openUrlInBrowser);
|
||||
|
@ -57,6 +60,7 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
viewService,
|
||||
bikeInfo,
|
||||
activeUser,
|
||||
viewContext,
|
||||
stateInfoProvider,
|
||||
bikesViewModel,
|
||||
openUrlInBrowser);
|
||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using Plugin.Connectivity;
|
||||
using TINK.Model.Connector;
|
||||
using TINK.Model.Device;
|
||||
using TINK.Model.User;
|
||||
|
@ -86,6 +85,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock
|
|||
/// <param name="smartDevice">Provides info about the smart device (phone, tablet, ...)</param>
|
||||
/// <param name="selectedBike">Bike to be displayed.</param>
|
||||
/// <param name="user">Object holding logged in user or an empty user object.</param>
|
||||
/// <param name="viewContext"> Holds the view context in which bike view model is used.</param>
|
||||
/// <param name="stateInfoProvider">Provides in use state information.</param>
|
||||
/// <param name="bikesViewModel">View model to be used for progress report and unlocking/ locking view.</param>
|
||||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
|
@ -100,9 +100,10 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock
|
|||
IViewService viewService,
|
||||
BikeInfoMutable selectedBike,
|
||||
IUser user,
|
||||
ViewContext viewContext,
|
||||
IInUseStateInfoProvider stateInfoProvider,
|
||||
IBikesViewModel bikesViewModel,
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, user, stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, user, viewContext, stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
{
|
||||
ShowTrackingInfoCommand = new Xamarin.Forms.Command(async () => {
|
||||
|
||||
|
@ -203,15 +204,13 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock
|
|||
private async Task ClickButton(Task<IRequestHandler> handleRequest)
|
||||
{
|
||||
var lastHandler = RequestHandler;
|
||||
var lastState = Bike.State.Value;
|
||||
var lastStateText = StateText;
|
||||
var lastStateColor = StateColor;
|
||||
|
||||
RequestHandler = await handleRequest;
|
||||
|
||||
if (lastHandler.IsRemoveBikeRequired)
|
||||
{
|
||||
BikeRemoveDelegate(Id);
|
||||
}
|
||||
CheckRemoveBike(Id, lastState);
|
||||
|
||||
if (RuntimeHelpers.Equals(lastHandler, RequestHandler))
|
||||
{
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
Log.ForContext<BookedClosed>().Information("Returning closed bike {Bike} is not possible. Cancel geolocation query failed. {Exception}", SelectedBike, ex);
|
||||
|
||||
await ViewService.DisplayAlert(
|
||||
AppResources.ErrorReturnBikeTitle,
|
||||
AppResources.ErrorQueryGeolocation,
|
||||
AppResources.ErrorReturnBikeLockClosedGetGPSExceptionMessage,
|
||||
AppResources.MessageAnswerOk);
|
||||
|
||||
|
@ -215,9 +215,6 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bookingFinished = await ConnectorFactory(IsConnected).Command.DoReturn(
|
||||
SelectedBike,
|
||||
currentLocationDto);
|
||||
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -360,8 +360,6 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
SelectedBike,
|
||||
currentLocationDto,
|
||||
SmartDevice);
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -90,9 +90,6 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
try
|
||||
{
|
||||
await ConnectorFactory(IsConnected).Command.DoCancelReservation(SelectedBike);
|
||||
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -85,9 +85,6 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
try
|
||||
{
|
||||
await ConnectorFactory(IsConnected).Command.DoCancelReservation(SelectedBike);
|
||||
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -228,9 +228,6 @@ namespace TINK.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
try
|
||||
{
|
||||
await ConnectorFactory(IsConnected).Command.DoCancelReservation(SelectedBike);
|
||||
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -77,6 +77,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
/// <param name="smartDevice">Provides info about the smart device (phone, tablet, ...)</param>
|
||||
/// <param name="selectedBike">Bike to be displayed.</param>
|
||||
/// <param name="user">Object holding logged in user or an empty user object.</param>
|
||||
/// <param name="viewContext"> Holds the view context in which bike view model is used.</param>
|
||||
/// <param name="stateInfoProvider">Provides in use state information.</param>
|
||||
/// <param name="bikesViewModel">View model to be used for progress report and unlocking/ locking view.</param>
|
||||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
|
@ -89,9 +90,10 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
IViewService viewService,
|
||||
BikeInfoMutable selectedBike,
|
||||
IUser user,
|
||||
ViewContext viewContext,
|
||||
IInUseStateInfoProvider stateInfoProvider,
|
||||
IBikesViewModel bikesViewModel,
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, user, stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, user, viewContext, stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
{
|
||||
RequestHandler = user.IsLoggedIn
|
||||
? RequestHandlerFactory.Create(
|
||||
|
@ -164,15 +166,13 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
private async Task ClickButton(Task<IRequestHandler> handleRequest)
|
||||
{
|
||||
var lastHandler = RequestHandler;
|
||||
var lastState = Bike.State.Value;
|
||||
var lastStateText = StateText;
|
||||
var lastStateColor = StateColor;
|
||||
|
||||
RequestHandler = await handleRequest;
|
||||
|
||||
if (lastHandler.IsRemoveBikeRequired)
|
||||
{
|
||||
BikeRemoveDelegate(Id);
|
||||
}
|
||||
CheckRemoveBike(Id, lastState);
|
||||
|
||||
if (RuntimeHelpers.Equals(lastHandler, RequestHandler))
|
||||
{
|
||||
|
|
|
@ -84,9 +84,6 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
|
|||
try
|
||||
{
|
||||
await ConnectorFactory(IsConnected).Command.DoCancelReservation(SelectedBike);
|
||||
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
|
@ -21,8 +21,5 @@ namespace TINK.ViewModel.Bikes.Bike
|
|||
|
||||
/// <summary>Gets the is connected state. </summary>
|
||||
bool IsConnected { get; }
|
||||
|
||||
/// <summary> Gets if the bike has to be removed after action has been completed. </summary>
|
||||
bool IsRemoveBikeRequired { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,8 @@ namespace TINK.ViewModel.Bikes
|
|||
/// Constructs bike collection view model.
|
||||
/// </summary>
|
||||
/// </param>
|
||||
/// <param name="p_oUser">Mail address of active user.</param>
|
||||
/// <param name="user">Mail address of active user.</param>
|
||||
/// <param name="viewContext"> Holds the view context in which bikes view model is used.</param>
|
||||
/// <param name="isReportLevelVerbose">True if report level is verbose, false if not.</param>
|
||||
/// <param name="permissions">Holds object to query location permissions.</param>
|
||||
/// <param name="bluetoothLE">Holds object to query bluetooth state.</param>
|
||||
|
@ -94,6 +95,7 @@ namespace TINK.ViewModel.Bikes
|
|||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
public BikesViewModel(
|
||||
User user,
|
||||
ViewContext viewContext,
|
||||
ILocationPermission permissions,
|
||||
IBluetoothLE bluetoothLE,
|
||||
string runtimPlatform,
|
||||
|
@ -144,6 +146,8 @@ namespace TINK.ViewModel.Bikes
|
|||
ViewService = viewService
|
||||
?? throw new ArgumentException("Can not instantiate bikes page view model- object. No view available.");
|
||||
|
||||
ViewContext = viewContext;
|
||||
|
||||
m_oViewUpdateManager = new IdlePollingUpdateTaskManager();
|
||||
|
||||
BikeCollection = new BikeCollectionMutable();
|
||||
|
@ -190,6 +194,7 @@ namespace TINK.ViewModel.Bikes
|
|||
ViewService,
|
||||
bike,
|
||||
User,
|
||||
ViewContext,
|
||||
m_oItemFactory(),
|
||||
this,
|
||||
OpenUrlInBrowser);
|
||||
|
@ -230,6 +235,9 @@ namespace TINK.ViewModel.Bikes
|
|||
|
||||
protected User User { get; private set; }
|
||||
|
||||
/// <summary> Holds the view context in which bikes view model is used.</summary>
|
||||
private ViewContext ViewContext { get; }
|
||||
|
||||
#if USCSHARP9
|
||||
public bool IsReportLevelVerbose { get; init; }
|
||||
#else
|
||||
|
@ -477,6 +485,6 @@ namespace TINK.ViewModel.Bikes
|
|||
/// </summary>
|
||||
public virtual async Task OnDisappearing()
|
||||
=> await m_oViewUpdateManager.StopUpdatePeridically();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
47
TINKLib/ViewModel/Bikes/ViewContext.cs
Normal file
47
TINKLib/ViewModel/Bikes/ViewContext.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
|
||||
namespace TINK.ViewModel.Bikes
|
||||
{
|
||||
/// Holds the view context in which a view model is used.
|
||||
public class ViewContext
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructs object.
|
||||
/// </summary>
|
||||
/// <param name="page">Value identifying the page to which view model relates to.</param>
|
||||
/// <param name="stationId">Holds the id of the station if related page is <see cref="PageContext.BikesAtStation"/> ignored otherwise.</param>
|
||||
public ViewContext(PageContext page, string stationId = null) {
|
||||
Page = page;
|
||||
if (page != PageContext.BikesAtStation)
|
||||
{
|
||||
// Station id must not contain a value if view context is not bikes at station page.
|
||||
return;
|
||||
}
|
||||
|
||||
StationId = stationId ?? string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Holds the page to which view model is related to.
|
||||
/// </summary>
|
||||
public PageContext Page { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the id of the station if related page is <see cref="PageContext.BikesAtStation"/> empty otherwise.
|
||||
/// </summary>
|
||||
public string StationId { get; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Holds the view context in which bikes view model is used.
|
||||
/// </summary>
|
||||
public enum PageContext
|
||||
{
|
||||
/// <summary> Context is bikes at station page. </summary>
|
||||
BikesAtStation,
|
||||
/// <summary> Context is find bike page. </summary>
|
||||
FindBike,
|
||||
/// <summary> Context is my bikes page. </summary>
|
||||
MyBikes
|
||||
}
|
||||
}
|
|
@ -86,7 +86,7 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
Action<string> openUrlInExternalBrowser,
|
||||
Action<SendOrPostCallback, object> postAction,
|
||||
ISmartDevice smartDevice,
|
||||
IViewService viewService) : base(user, permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, polling, postAction, smartDevice, viewService, openUrlInExternalBrowser, () => new BikeAtStationInUseStateInfoProvider())
|
||||
IViewService viewService) : base(user, new ViewContext(PageContext.BikesAtStation, selectedStation.Id), permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, polling, postAction, smartDevice, viewService, openUrlInExternalBrowser, () => new BikeAtStationInUseStateInfoProvider())
|
||||
{
|
||||
Station = selectedStation ?? new NullStation();
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ namespace TINK.ViewModel.FindBike
|
|||
/// <summary>
|
||||
/// Constructs bike collection view model in case information about occupied bikes is available.
|
||||
/// </summary>
|
||||
/// <param name="p_oUser">Mail address of active user.</param>
|
||||
/// <param name="user">Mail address of active user.</param>
|
||||
/// <param name="isReportLevelVerbose">True if report level is verbose, false if not.</param>
|
||||
/// <param name="permissions">Holds object to query location permissions.</param>
|
||||
/// <param name="bluetoothLE">Holds object to query bluetooth state.</param>
|
||||
|
@ -123,7 +123,7 @@ namespace TINK.ViewModel.FindBike
|
|||
/// <param name="viewService">Interface to actuate methods on GUI.</param>
|
||||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
public FindBikePageViewModel(
|
||||
User p_oUser,
|
||||
User user,
|
||||
ILocationPermission permissions,
|
||||
IBluetoothLE bluetoothLE,
|
||||
string runtimPlatform,
|
||||
|
@ -136,7 +136,7 @@ namespace TINK.ViewModel.FindBike
|
|||
Action<SendOrPostCallback, object> postAction,
|
||||
ISmartDevice smartDevice,
|
||||
IViewService viewService,
|
||||
Action<string> openUrlInBrowser) : base(p_oUser, permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, polling, postAction, smartDevice, viewService, openUrlInBrowser, () => new MyBikeInUseStateInfoProvider())
|
||||
Action<string> openUrlInBrowser) : base(user, new ViewContext(PageContext.FindBike), permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, polling, postAction, smartDevice, viewService, openUrlInBrowser, () => new MyBikeInUseStateInfoProvider())
|
||||
{
|
||||
CollectionChanged += (sender, eventargs) =>
|
||||
{
|
||||
|
@ -172,8 +172,6 @@ namespace TINK.ViewModel.FindBike
|
|||
|
||||
Log.ForContext<FindBikePageViewModel>().Information("User request to show page FindBike- page re-appearing");
|
||||
|
||||
ActiveFilteredBikeType = string.Empty;
|
||||
|
||||
IsConnected = IsConnectedDelegate();
|
||||
|
||||
// Stop polling before getting bikes info.
|
||||
|
@ -432,8 +430,6 @@ namespace TINK.ViewModel.FindBike
|
|||
return;
|
||||
}
|
||||
|
||||
BikeIdUserInput = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
/// <summary> Create task which updates my bike view model.</summary>
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace TINK.ViewModel.MyBikes
|
|||
/// <summary>
|
||||
/// Constructs bike collection view model in case information about occupied bikes is available.
|
||||
/// </summary>
|
||||
/// <param name="p_oUser">Mail address of active user.</param>
|
||||
/// <param name="user">Mail address of active user.</param>
|
||||
/// <param name="isReportLevelVerbose">True if report level is verbose, false if not.</param>
|
||||
/// <param name="permissions">Holds object to query location permissions.</param>
|
||||
/// <param name="bluetoothLE">Holds object to query bluetooth state.</param>
|
||||
|
@ -64,13 +64,13 @@ namespace TINK.ViewModel.MyBikes
|
|||
/// <param name="connectorFactory">Connects system to copri.</param>
|
||||
/// <param name="lockService">Service to control lock retrieve info.</param>
|
||||
/// <param name="stations">Stations to get station name from station id.</param>
|
||||
/// <param name="p_oPolling"> Holds whether to poll or not and the period length is polling is on. </param>
|
||||
/// <param name="polling"> Holds whether to poll or not and the period length is polling is on. </param>
|
||||
/// <param name="postAction">Executes actions on GUI thread.</param>
|
||||
/// <param name="smartDevice">Provides info about the smart device (phone, tablet, ...).</param>
|
||||
/// <param name="viewService">Interface to actuate methods on GUI.</param>
|
||||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
public MyBikesPageViewModel(
|
||||
User p_oUser,
|
||||
User user,
|
||||
ILocationPermission permissions,
|
||||
IBluetoothLE bluetoothLE,
|
||||
string runtimPlatform,
|
||||
|
@ -79,11 +79,11 @@ namespace TINK.ViewModel.MyBikes
|
|||
IGeolocationService geolocation,
|
||||
ILocksService lockService,
|
||||
IEnumerable<IStation> stations,
|
||||
PollingParameters p_oPolling,
|
||||
PollingParameters polling,
|
||||
Action<SendOrPostCallback, object> postAction,
|
||||
ISmartDevice smartDevice,
|
||||
IViewService viewService,
|
||||
Action<string> openUrlInBrowser) : base(p_oUser, permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, p_oPolling, postAction, smartDevice, viewService, openUrlInBrowser, () => new MyBikeInUseStateInfoProvider())
|
||||
Action<string> openUrlInBrowser) : base(user, new ViewContext(PageContext.MyBikes), permissions, bluetoothLE, runtimPlatform, isConnectedDelegate, connectorFactory, geolocation, lockService, polling, postAction, smartDevice, viewService, openUrlInBrowser, () => new MyBikeInUseStateInfoProvider())
|
||||
{
|
||||
CollectionChanged += (sender, eventargs) =>
|
||||
{
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NSubstitute" Version="5.0.0" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="nunit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -56,11 +56,11 @@ namespace TestTINKLib
|
|||
new StateRequestedInfo(() => new DateTime(2017, 09, 20), new DateTime(2017, 09, 19), TimeSpan.FromMinutes(15), "a@b", "372").From);
|
||||
|
||||
Assert.IsTrue(
|
||||
new StateRequestedInfo(() => new DateTime(2017, 09, 20, 12, 12, 0), new DateTime(2017, 09, 20, 12, 0, 0), TimeSpan.FromMinutes(15), "a@b", "372").GetIsStillReserved(out TimeSpan? l_oRemainigTime));
|
||||
new StateRequestedInfo(() => new DateTime(2017, 09, 20, 12, 12, 0), new DateTime(2017, 09, 20, 12, 0, 0), TimeSpan.FromMinutes(15), "a@b", "372").GetIsStillReserved(out TimeSpan? remainingTime));
|
||||
|
||||
Assert.AreEqual(
|
||||
3,
|
||||
l_oRemainigTime.Value.Minutes);
|
||||
remainingTime.Value.Minutes);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
|
@ -246,56 +246,56 @@ namespace TestShareeLib.Repository.Request
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocationIsNull()
|
||||
public void TestUpdateLockingStateGeolocationIsNull()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&lock_state=locked&voltage=15.03&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocationIsNullBatteryPercentageIsNAN()
|
||||
public void TestUpdateLockingStateGeolocationIsNullBatteryPercentageIsNAN()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, double.NaN, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, null /* geolocaion */, double.NaN, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&lock_state=locked&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocation_AccuraycyNull()
|
||||
public void TestUpdateLockingStateGeolocation_AccuraycyNull()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 12, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 12, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&gps=21,17&gps_age=0.07&lock_state=locked&voltage=12&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocation_AccuraycyNullBatteryPercentageIsNAN()
|
||||
public void TestUpdateLockingStateGeolocation_AccuraycyNullBatteryPercentageIsNAN()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), double.NaN, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), double.NaN, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&gps=21,17&gps_age=0.07&lock_state=locked&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateGeolocation()
|
||||
public void TestUpdateLockingStateGeolocation()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
builder.UpateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Accuracy = 5.7, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 98, null /* version info */),
|
||||
builder.UpdateLockingState("12", lock_state.locked, new LocationDto.Builder { Latitude = 21, Longitude = 17, Accuracy = 5.7, Age = new TimeSpan(0, 0, 0, 0, 70) }.Build(), 98, null /* version info */),
|
||||
Is.EqualTo("request=booking_update&bike=12&gps=21,17&gps_accuracy=5.7&gps_age=0.07&lock_state=locked&voltage=98&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestUpateLockingStateVersionsInfo()
|
||||
public void TestUpdateLockingStateVersionsInfo()
|
||||
{
|
||||
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
|
||||
Assert.That(
|
||||
WebUtility.UrlDecode(builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.VersionInfo.Builder { FirmwareVersion=13, HardwareVersion=12, LockVersion=14}.Build())),
|
||||
WebUtility.UrlDecode(builder.UpdateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.VersionInfo.Builder { FirmwareVersion=13, HardwareVersion=12, LockVersion=14}.Build())),
|
||||
Is.EqualTo("request=booking_update&bike=12&lock_state=locked&voltage=15.03&firmware=HW 12;FW 13;Lock 14&authcookie=MySessionCookieMyMeranctIt"));
|
||||
}
|
||||
|
||||
|
|
|
@ -27,15 +27,15 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NSubstitute" Version="5.0.0" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.5" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.7" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -283,8 +283,8 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.ActionText = "Start query location...";
|
||||
geolocation.GetAsync(Arg.Any<CancellationToken?>(), Arg.Any<DateTime?>());
|
||||
viewService.DisplayAlert(
|
||||
"Error at ending rental!",
|
||||
"End rental at an unknown location is not possible.\r\nGetting geolocation failed.",
|
||||
"Location query failed",
|
||||
"End rental at an unknown location is not possible.\r\nMake sure you have granted location sharing permission and your location services are enabled.\r\nTry again!",
|
||||
"OK");
|
||||
bikesViewModel.ActionText = "Updating...";
|
||||
bikesViewModel.ActionText = string.Empty;
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel
|
|||
null, // viewService
|
||||
new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfoMutable(new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo(new TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike("42", LockModel.ILockIt), new Drive(), DataSource.Copri, 5200544, new Guid("00000000-0000-0000-0000-000000000001"), "42"), "My Station Name"),
|
||||
NSubstitute.Substitute.For<IUser>(), // user
|
||||
new ViewContext (PageContext.BikesAtStation, "FR1012"), // Context does not matter for this test.
|
||||
NSubstitute.Substitute.For<IInUseStateInfoProvider>(),
|
||||
NSubstitute.Substitute.For<IBikesViewModel>(),
|
||||
url => { }).GetType()); // stateInfoProvider
|
||||
|
@ -74,6 +75,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel
|
|||
null, // viewService
|
||||
new TINK.Model.Bikes.BikeInfoNS.CopriLock.BikeInfoMutable(new TINK.Model.Bikes.BikeInfoNS.CopriLock.BikeInfo(new TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike("42", LockModel.ILockIt), new Drive(), TINK.Model.Bikes.BikeInfoNS.BC.DataSource.Copri, "17", new TINK.Model.Bikes.BikeInfoNS.CopriLock.LockInfo.Builder { State = TINK.Model.Bikes.BikeInfoNS.CopriLock.LockingState.Closed }.Build()), "My Station Name"),
|
||||
NSubstitute.Substitute.For<IUser>(), // user
|
||||
new ViewContext(PageContext.BikesAtStation, "FR1012"), // Context does not matter for this test.
|
||||
NSubstitute.Substitute.For<IInUseStateInfoProvider>(),
|
||||
NSubstitute.Substitute.For<IBikesViewModel>(),
|
||||
url => { }).GetType()); // stateInfoProvider
|
||||
|
@ -94,6 +96,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel
|
|||
null, // viewService
|
||||
new BikeInfoMutableUnsupported(new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo(new TINK.Model.Bikes.BikeInfoNS.BikeNS.Bike("42", TINK.Model.Bikes.BikeInfoNS.BikeNS.LockModel.ILockIt), new Drive(), DataSource.Copri, 5200544, new Guid("00000000-0000-0000-0000-000000000001"), "42"), "My Station Name"),
|
||||
NSubstitute.Substitute.For<IUser>(), // user
|
||||
new ViewContext(PageContext.BikesAtStation, "FR1012"), // Context does not matter for this test.
|
||||
NSubstitute.Substitute.For<IInUseStateInfoProvider>(),
|
||||
NSubstitute.Substitute.For<IBikesViewModel>(),
|
||||
url => { }),
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="3.6.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.2.0">
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<Version>3.13.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NUnit3TestAdapter">
|
||||
<Version>4.4.2</Version>
|
||||
<Version>4.5.0</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
@ -82,7 +82,7 @@
|
|||
<Version>4.3.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.Essentials">
|
||||
<Version>1.7.5</Version>
|
||||
<Version>1.7.7</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue