Version 3.0.353
|
@ -85,21 +85,21 @@ namespace TINK.Droid
|
|||
}
|
||||
};
|
||||
|
||||
await Permissions.RequestAsync<BLEAndLocationPermissions>();
|
||||
|
||||
LoadApplication(new App());
|
||||
|
||||
await Permissions.RequestAsync<BLEPermissions>();
|
||||
await Permissions.RequestAsync<Permissions.LocationWhenInUse>();
|
||||
}
|
||||
|
||||
//Bluetooth Permission on Android 12 "Detect Devices nearby"
|
||||
// https://stackoverflow.com/questions/71028853/xamarin-forms-ble-plugin-scan-issue-android-12
|
||||
public class BLEAndLocationPermissions : BasePlatformPermission
|
||||
public class BLEPermissions : BasePlatformPermission
|
||||
{
|
||||
public override (string androidPermission, bool isRuntime)[] RequiredPermissions => new List<(string androidPermission, bool isRuntime)>
|
||||
{
|
||||
(Android.Manifest.Permission.BluetoothScan, true),
|
||||
(Android.Manifest.Permission.BluetoothConnect, true),
|
||||
(Android.Manifest.Permission.AccessFineLocation, true)
|
||||
//(Android.Manifest.Permission.AccessFineLocation, true)
|
||||
}.ToArray();
|
||||
}
|
||||
|
||||
|
|
|
@ -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.352" android:versionCode="352">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.353" android:versionCode="353">
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -55,8 +55,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>LastenradBayern</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>352</string>
|
||||
<string>353</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.352</string>
|
||||
<string>3.0.353</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -41,7 +41,7 @@ endobj
|
|||
6 0 obj
|
||||
<< /Producer (cairo 1.17.4 (https://cairographics.org))
|
||||
/Creator <FEFF0049006E006B0073006300610070006500200031002E0031002E00320020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029>
|
||||
/CreationDate (D:20221124081702+01'00)
|
||||
/CreationDate (D:20221206105042+01'00)
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
@ -322,7 +322,7 @@ namespace TINK
|
|||
if (_PermissionsService != null)
|
||||
return _PermissionsService;
|
||||
|
||||
_PermissionsService = new TINK.Services.Permissions.Essentials.Permissions();
|
||||
_PermissionsService = new TINK.Services.Permissions.Essentials.LocationPermissions();
|
||||
return _PermissionsService;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
<sharedGui:RunningProcessViewBay
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.Row="1"/>
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
|
||||
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Contact.SelectStationPage">
|
||||
x:Class="TINK.View.Contact.SelectStationPage"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
|
@ -52,4 +53,4 @@
|
|||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
</ContentPage>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
<sharedGui:RunningProcessViewBay
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsRunning}"/>
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
<sharedGui:RunningProcessViewBay
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsRunning}"/>
|
||||
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
|
@ -85,21 +85,21 @@ namespace TINK.Droid
|
|||
}
|
||||
};
|
||||
|
||||
await Permissions.RequestAsync<BLEAndLocationPermissions>();
|
||||
|
||||
LoadApplication(new App());
|
||||
|
||||
await Permissions.RequestAsync<BLEPermissions>();
|
||||
await Permissions.RequestAsync<Permissions.LocationWhenInUse>();
|
||||
}
|
||||
|
||||
//Bluetooth Permission on Android 12 "Detect Devices nearby"
|
||||
// https://stackoverflow.com/questions/71028853/xamarin-forms-ble-plugin-scan-issue-android-12
|
||||
public class BLEAndLocationPermissions : BasePlatformPermission
|
||||
public class BLEPermissions : BasePlatformPermission
|
||||
{
|
||||
public override (string androidPermission, bool isRuntime)[] RequiredPermissions => new List<(string androidPermission, bool isRuntime)>
|
||||
{
|
||||
(Android.Manifest.Permission.BluetoothScan, true),
|
||||
(Android.Manifest.Permission.BluetoothConnect, true),
|
||||
(Android.Manifest.Permission.AccessFineLocation, true)
|
||||
//(Android.Manifest.Permission.AccessFineLocation, true)
|
||||
}.ToArray();
|
||||
}
|
||||
|
||||
|
|
|
@ -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.352" android:versionCode="352">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.353" android:versionCode="353">
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -55,8 +55,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>Mein konrad</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>352</string>
|
||||
<string>353</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.352</string>
|
||||
<string>3.0.353</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -41,7 +41,7 @@ endobj
|
|||
6 0 obj
|
||||
<< /Producer (cairo 1.17.4 (https://cairographics.org))
|
||||
/Creator <FEFF0049006E006B0073006300610070006500200031002E0031002E00320020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029>
|
||||
/CreationDate (D:20221124081702+01'00)
|
||||
/CreationDate (D:20221206105042+01'00)
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
@ -320,7 +320,7 @@ namespace TINK
|
|||
if (_PermissionsService != null)
|
||||
return _PermissionsService;
|
||||
|
||||
_PermissionsService = new TINK.Services.Permissions.Essentials.Permissions();
|
||||
_PermissionsService = new TINK.Services.Permissions.Essentials.LocationPermissions();
|
||||
return _PermissionsService;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
Shell.FlyoutBehavior="Disabled"
|
||||
Shell.NavBarIsVisible="{Binding IsIdle}">
|
||||
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Image Style="{StaticResource Image-Navbar}"/>
|
||||
|
@ -15,7 +15,7 @@
|
|||
Text="{Binding Title}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
|
@ -24,36 +24,37 @@
|
|||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<StackLayout Grid.Row="0"
|
||||
Orientation="Vertical">
|
||||
<!-- Grid for Content -->
|
||||
<Grid
|
||||
RowDefinitions="Auto,1*,Auto,Auto">
|
||||
|
||||
<!--Title-->
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
<!--Station-->
|
||||
<StackLayout
|
||||
Grid.Row="0"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
</StackLayout>
|
||||
<!--Title-->
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView Grid.Row="1"
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
|
@ -62,48 +63,62 @@
|
|||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
<!--No Bikes-->
|
||||
<Label Grid.Row="1"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
<!-- Contact and Login at end of page-->
|
||||
<StackLayout
|
||||
Orientation="Vertical"
|
||||
Grid.Row="2">
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
<!--Line-->
|
||||
<BoxView HeightRequest="1" Color="{DynamicResource primary-back-title-color}"/>
|
||||
<!-- Contact and Login at end of page-->
|
||||
<StackLayout
|
||||
Grid.Row="3"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
<!--Login required-->
|
||||
<Label
|
||||
<!--Login required-->
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
</StackLayout>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.Row="1"/>
|
||||
Grid.Row="0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -1,56 +1,137 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
|
||||
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Contact.SelectStationPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Image Style="{StaticResource Image-Navbar}"/>
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
x:Class="TINK.View.Contact.SelectStationPage"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Image Style="{StaticResource Image-Navbar}"/>
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingSelectStationPage}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Content>
|
||||
<StackLayout>
|
||||
<Grid
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
<maps:Map WidthRequest="320" HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
</Grid>
|
||||
<StackLayout
|
||||
Margin="6,3,6,6"
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="24"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
Android="#D21113" iOS="#D21113" WinPhone="#D21113" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,32"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="false"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="false"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<!--Center to currentLocation Button-->
|
||||
<ImageButton
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
x:Name="CurrentLocation"
|
||||
AutomationId ="currentLocaton_button"
|
||||
Command="{Binding OnCurrentLocationButtonClicked}"
|
||||
IsVisible="False"
|
||||
BackgroundColor="Transparent"
|
||||
BorderWidth="1"
|
||||
BorderColor="LightGray"
|
||||
VerticalOptions="End"
|
||||
HorizontalOptions="Center"
|
||||
Margin="0,0,0,12"
|
||||
Source="Location_Button.png"
|
||||
WidthRequest="40"
|
||||
HeightRequest="40"
|
||||
CornerRadius="20">
|
||||
</ImageButton>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -21,47 +21,61 @@
|
|||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
|
||||
<!--Search bike-->
|
||||
<StackLayout Grid.Row="0">
|
||||
<Entry
|
||||
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
MaxLength="10"
|
||||
CursorPosition="0"
|
||||
Text="{Binding BikeIdUserInput}"/>
|
||||
<Grid
|
||||
RowDefinitions="1*,32">
|
||||
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"
|
||||
IsEnabled="{Binding IsSelectBikeEnabled}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
Command="{Binding OnSelectBikeRequest}"/>
|
||||
<!--Search bike-->
|
||||
<StackLayout Grid.Row="0">
|
||||
<Entry
|
||||
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
MaxLength="10"
|
||||
CursorPosition="0"
|
||||
Text="{Binding BikeIdUserInput}"/>
|
||||
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"
|
||||
IsEnabled="{Binding IsSelectBikeEnabled}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
Command="{Binding OnSelectBikeRequest}"/>
|
||||
|
||||
</StackLayout>
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
</StackLayout>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsRunning}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -5,9 +5,11 @@
|
|||
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Map.MapPage"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
Shell.NavBarIsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
|
||||
<Shell.TitleView>
|
||||
|
||||
<Shell.TitleView >
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Image Style="{StaticResource Image-Navbar}"/>
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
|
@ -15,15 +17,17 @@
|
|||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,Auto"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
<ContentPage.Content>
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,32"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
|
@ -31,76 +35,75 @@
|
|||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
IsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<!--Center to currentLocation Button-->
|
||||
<ImageButton
|
||||
Grid.Row="2"
|
||||
<!--Center to currentLocation Button-->
|
||||
<ImageButton
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
x:Name="CurrentLocation"
|
||||
AutomationId ="currentLocaton_button"
|
||||
Command="{Binding OnCurrentLocationButtonClicked}"
|
||||
IsVisible="True"
|
||||
BackgroundColor="Transparent"
|
||||
BorderWidth="1"
|
||||
BorderColor="LightGray"
|
||||
BackgroundColor="GhostWhite"
|
||||
VerticalOptions="End"
|
||||
HorizontalOptions="Center"
|
||||
Margin="0,0,0,12"
|
||||
|
@ -108,29 +111,27 @@
|
|||
WidthRequest="40"
|
||||
HeightRequest="40"
|
||||
CornerRadius="20">
|
||||
</ImageButton>
|
||||
</ImageButton>
|
||||
|
||||
<!--While process is running-->
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"
|
||||
IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Scale="2"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="Center"
|
||||
Padding="0,0,0,10"/>
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
<ContentPage
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.MyBikes.MyBikesPage"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
|
@ -9,6 +10,7 @@
|
|||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Image Style="{StaticResource Image-Navbar}"/>
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingMyBikes}"/>
|
||||
</Grid>
|
||||
|
@ -22,21 +24,19 @@
|
|||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<StackLayout Grid.Row="0"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
Orientation="Vertical">
|
||||
<Grid
|
||||
RowDefinitions="1*,32">
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="0"
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
|
@ -47,19 +47,30 @@
|
|||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
|
||||
</StackLayout>
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsRunning}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -33,6 +33,9 @@
|
|||
<DependentUpon>RunningProcessView.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)View\RunningProcessViewBay.xaml.cs">
|
||||
<DependentUpon>RunningProcessViewBay.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)View\VersionNumberView.xaml.cs">
|
||||
<DependentUpon>VersionNumberView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -58,4 +61,10 @@
|
|||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\RunningProcessViewBay.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
|
@ -10,12 +10,14 @@
|
|||
Text="{x:Static resources:AppResources.MarkingDriveBatteryTitel}"/>
|
||||
<sharedGui:BarLevelView
|
||||
x:Name="BarLevelElement"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Current="{Binding CurrentText, Mode=TwoWay}"
|
||||
Maximum="{Binding MaximumText}"/>
|
||||
<Stepper
|
||||
x:Name="BarLevelStepper"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Value ="{Binding CurrentText, Mode=TwoWay}"
|
||||
Maximum="{Binding MaximumText}"/>
|
||||
</StackLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
||||
</ContentView>
|
||||
|
|
|
@ -10,11 +10,13 @@
|
|||
WidthRequest="50"
|
||||
HeightRequest="30"
|
||||
Aspect="AspectFit"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
IsVisible="{Binding IsBatteryChargeLevelImageVisible}"
|
||||
Source="{Binding BatteryChargeLevelImageSourceString}"/>
|
||||
<!-- Text describing filling level batteries with 1...4 and 6..N bars -->
|
||||
<Label
|
||||
x:Name="BarLevelLabel"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Text="{Binding BatteryChargeLevelBarsText}"
|
||||
IsVisible="{Binding IsBatteryChargeLevelLabelVisible}"/>
|
||||
</StackLayout>
|
||||
|
|
|
@ -3,46 +3,59 @@
|
|||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShareeSharedGuiLib.View.RunningProcessView">
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<ContentView.Content>
|
||||
<!--Grid for different Opacity values-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Background White, half transparent-->
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="White"
|
||||
Opacity=".75"
|
||||
CornerRadius="10"/>
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="Gray"
|
||||
Opacity=".80"
|
||||
CornerRadius="0"/>
|
||||
|
||||
<!--Show spinner and info text-->
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator
|
||||
Grid.Row="0"
|
||||
IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Scale="2"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
<!--Background White-->
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
WidthRequest="240"
|
||||
HorizontalOptions="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
Padding="0,0,0,10"/>
|
||||
VerticalOptions="Center"
|
||||
BackgroundColor="White"
|
||||
Padding="10"
|
||||
CornerRadius="10">
|
||||
|
||||
<StackLayout Orientation="Vertical">
|
||||
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator
|
||||
IsRunning="{Binding IsRunning}"
|
||||
Scale="2"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
Margin="20"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
WidthRequest="200"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
HorizontalTextAlignment="Center"
|
||||
Padding="0"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
||||
|
|
48
ShareeSharedGuiLib/View/RunningProcessViewBay.xaml
Normal file
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="ShareeSharedGuiLib.View.RunningProcessViewBay">
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<!--Grid for different Opacity values-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Background White, half transparent-->
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="White"
|
||||
Opacity=".75"
|
||||
CornerRadius="10"/>
|
||||
|
||||
<!--Show spinner and info text-->
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator
|
||||
Grid.Row="0"
|
||||
IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Scale="2"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="Center"
|
||||
HorizontalTextAlignment="Center"
|
||||
Padding="0,0,0,10"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
20
ShareeSharedGuiLib/View/RunningProcessViewBay.xaml.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace ShareeSharedGuiLib.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RunningProcessViewBay : ContentView
|
||||
{
|
||||
public RunningProcessViewBay()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
|
@ -85,21 +85,21 @@ namespace TINK.Droid
|
|||
}
|
||||
};
|
||||
|
||||
await Permissions.RequestAsync<BLEAndLocationPermissions>();
|
||||
|
||||
LoadApplication(new App());
|
||||
|
||||
await Permissions.RequestAsync<BLEPermissions>();
|
||||
await Permissions.RequestAsync<Permissions.LocationWhenInUse>();
|
||||
}
|
||||
|
||||
//Bluetooth Permission on Android 12 "Detect Devices nearby"
|
||||
// https://stackoverflow.com/questions/71028853/xamarin-forms-ble-plugin-scan-issue-android-12
|
||||
public class BLEAndLocationPermissions : BasePlatformPermission
|
||||
public class BLEPermissions : BasePlatformPermission
|
||||
{
|
||||
public override (string androidPermission, bool isRuntime)[] RequiredPermissions => new List<(string androidPermission, bool isRuntime)>
|
||||
{
|
||||
(Android.Manifest.Permission.BluetoothScan, true),
|
||||
(Android.Manifest.Permission.BluetoothConnect, true),
|
||||
(Android.Manifest.Permission.AccessFineLocation, true)
|
||||
//(Android.Manifest.Permission.AccessFineLocation, true)
|
||||
}.ToArray();
|
||||
}
|
||||
|
||||
|
|
|
@ -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.352" android:versionCode="352">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.353" android:versionCode="353">
|
||||
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="31" />
|
||||
<!-- Google Maps related permissions -->
|
||||
<!-- Permission to receive remote notifications from Google Play Services -->
|
||||
|
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -55,8 +55,8 @@
|
|||
<key>CFBundleDisplayName</key>
|
||||
<string>sharee.bike</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>352</string>
|
||||
<string>353</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.0.352</string>
|
||||
<string>3.0.353</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -41,7 +41,7 @@ endobj
|
|||
6 0 obj
|
||||
<< /Producer (cairo 1.17.4 (https://cairographics.org))
|
||||
/Creator <FEFF0049006E006B0073006300610070006500200031002E0031002E00320020002800680074007400700073003A002F002F0069006E006B00730063006100700065002E006F007200670029>
|
||||
/CreationDate (D:20221124081702+01'00)
|
||||
/CreationDate (D:20221206105042+01'00)
|
||||
>>
|
||||
endobj
|
||||
7 0 obj
|
||||
|
|
|
@ -327,7 +327,7 @@ namespace TINK
|
|||
if (_PermissionsService != null)
|
||||
return _PermissionsService;
|
||||
|
||||
_PermissionsService = new Services.Permissions.Essentials.Permissions();
|
||||
_PermissionsService = new Services.Permissions.Essentials.LocationPermissions();
|
||||
return _PermissionsService;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,39 +21,40 @@
|
|||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<StackLayout Grid.Row="0"
|
||||
Orientation="Vertical">
|
||||
<!-- Grid for Content -->
|
||||
<Grid
|
||||
RowDefinitions="Auto,1*,Auto,Auto">
|
||||
|
||||
<!--Title-->
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
<!--Station-->
|
||||
<StackLayout
|
||||
Grid.Row="0"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
</StackLayout>
|
||||
<!--Title-->
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="1"
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView Grid.Row="1"
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
|
@ -63,47 +64,61 @@
|
|||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
<Label Grid.Row="1"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
<!-- Contact and Login at end of page-->
|
||||
<StackLayout
|
||||
Orientation="Vertical"
|
||||
Grid.Row="2">
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
<!--Line-->
|
||||
<BoxView HeightRequest="1" Color="{DynamicResource primary-back-title-color}"/>
|
||||
<!-- Contact and Login at end of page-->
|
||||
<StackLayout
|
||||
Grid.Row="3"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
<!--Login required-->
|
||||
<Label
|
||||
<!--Login required-->
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
</StackLayout>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.Row="1"/>
|
||||
Grid.Row="0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -1,55 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
|
||||
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Contact.SelectStationPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
x:Class="TINK.View.Contact.SelectStationPage"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingSelectStationPage}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Content>
|
||||
<StackLayout>
|
||||
<Grid
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
<maps:Map WidthRequest="320" HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
</Grid>
|
||||
<StackLayout
|
||||
Margin="6,3,6,6"
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="24"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
Android="#009899" iOS="#009899" WinPhone="#009899" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,32"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="false"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="false"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<!--Center to currentLocation Button-->
|
||||
<ImageButton
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
x:Name="CurrentLocation"
|
||||
AutomationId ="currentLocaton_button"
|
||||
Command="{Binding OnCurrentLocationButtonClicked}"
|
||||
IsVisible="False"
|
||||
BackgroundColor="Transparent"
|
||||
BorderWidth="1"
|
||||
BorderColor="LightGray"
|
||||
VerticalOptions="End"
|
||||
HorizontalOptions="Center"
|
||||
Margin="0,0,0,12"
|
||||
Source="Location_Button.png"
|
||||
WidthRequest="40"
|
||||
HeightRequest="40"
|
||||
CornerRadius="20">
|
||||
</ImageButton>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -19,42 +19,56 @@
|
|||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Search bike-->
|
||||
<StackLayout Grid.Row="0">
|
||||
<Entry
|
||||
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
MaxLength="10"
|
||||
CursorPosition="0"
|
||||
Text="{Binding BikeIdUserInput}"/>
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"
|
||||
IsEnabled="{Binding IsSelectBikeEnabled}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
Command="{Binding OnSelectBikeRequest}"/>
|
||||
<Grid
|
||||
RowDefinitions="1*,32">
|
||||
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<!--Search bike-->
|
||||
<StackLayout Grid.Row="0">
|
||||
<Entry
|
||||
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
MaxLength="10"
|
||||
CursorPosition="0"
|
||||
Text="{Binding BikeIdUserInput}"/>
|
||||
|
||||
</StackLayout>
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"
|
||||
IsEnabled="{Binding IsSelectBikeEnabled}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
Command="{Binding OnSelectBikeRequest}"/>
|
||||
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
|
@ -63,6 +77,6 @@
|
|||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Map.MapPage"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
Shell.NavBarIsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource Key=primary-back-title-color}">
|
||||
|
||||
<Shell.TitleView >
|
||||
|
@ -14,15 +16,17 @@
|
|||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,Auto"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
<ContentPage.Content>
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,32"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
|
@ -30,76 +34,75 @@
|
|||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
<maps:Map.Behaviors>
|
||||
<bindings:BindingPinsBehavior Value="{Binding Pins}"/>
|
||||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
|
||||
<!--Center to currentLocation Button-->
|
||||
<ImageButton
|
||||
Grid.Row="2"
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
IsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<!--Center to currentLocation Button-->
|
||||
<ImageButton
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
x:Name="CurrentLocation"
|
||||
AutomationId ="currentLocaton_button"
|
||||
Command="{Binding OnCurrentLocationButtonClicked}"
|
||||
IsVisible="True"
|
||||
BackgroundColor="Transparent"
|
||||
BorderWidth="1"
|
||||
BorderColor="LightGray"
|
||||
BackgroundColor="GhostWhite"
|
||||
VerticalOptions="End"
|
||||
HorizontalOptions="Center"
|
||||
Margin="0,0,0,12"
|
||||
|
@ -107,30 +110,27 @@
|
|||
WidthRequest="40"
|
||||
HeightRequest="40"
|
||||
CornerRadius="20">
|
||||
</ImageButton>
|
||||
</ImageButton>
|
||||
|
||||
<!--While process is running-->
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"
|
||||
IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Scale="2"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="Center"
|
||||
Padding="0,0,0,10"/>
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsRunning}"
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -14,30 +14,28 @@
|
|||
Text="{x:Static resources:AppResources.MarkingMyBikes}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
</ResourceDictionary>
|
||||
</ContentPage.Resources>
|
||||
|
||||
|
||||
<ContentPage.Content>
|
||||
|
||||
<Frame>
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<StackLayout Grid.Row="0"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
Orientation="Vertical">
|
||||
<Grid
|
||||
RowDefinitions="1*,32">
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="0"
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
|
@ -48,19 +46,30 @@
|
|||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsRunning, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsRunning}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentPage.Content>
|
||||
|
||||
</ContentPage>
|
||||
|
|
|
@ -652,6 +652,11 @@ namespace TINK.Model
|
|||
AppResources.ChangeLog_MinorDesignImprovements,
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
|
||||
},
|
||||
{
|
||||
new Version(3, 0, 353),
|
||||
AppResources.ChangeLog_3_0_353_MK_SB,
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
|
||||
},
|
||||
};
|
||||
|
||||
/// <summary> Manges the whats new information.</summary>
|
||||
|
|
|
@ -259,7 +259,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>.
|
||||
/// Looks up a localized string similar to <h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>.
|
||||
/// </summary>
|
||||
public static string ActivityTextClosingLock {
|
||||
get {
|
||||
|
@ -349,7 +349,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No location info available..
|
||||
/// Looks up a localized string similar to No location info available. Activate your device's location services..
|
||||
/// </summary>
|
||||
public static string ActivityTextErrorQueryLocationWhenAny {
|
||||
get {
|
||||
|
@ -628,7 +628,7 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Updateing.....
|
||||
/// Looks up a localized string similar to Updating.....
|
||||
/// </summary>
|
||||
public static string ActivityTextUpdating {
|
||||
get {
|
||||
|
@ -725,6 +725,19 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Improvements in
|
||||
///<ul>
|
||||
///<li/>- Management of location services
|
||||
///<li/>- Design of processes
|
||||
///</ul>.
|
||||
/// </summary>
|
||||
public static string ChangeLog_3_0_353_MK_SB {
|
||||
get {
|
||||
return ResourceManager.GetString("ChangeLog_3_0_353_MK_SB", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to We have fixed some bugs. Enjoy the ride!.
|
||||
/// </summary>
|
||||
|
@ -2524,6 +2537,15 @@ namespace TINK.MultilingualResources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Turn on your device's location services to center the map on your current location..
|
||||
/// </summary>
|
||||
public static string MessageErrorLocationIsOff {
|
||||
get {
|
||||
return ResourceManager.GetString("MessageErrorLocationIsOff", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Attention: Lock is closed!
|
||||
///{0}
|
||||
|
|
|
@ -334,7 +334,7 @@ Freigabedialog öffen?</value>
|
|||
<value>Einen Moment bitte...</value>
|
||||
</data>
|
||||
<data name="ActivityTextOpeningLock" xml:space="preserve">
|
||||
<value><h4><b>Schloss öffnet.<br/>Bitte warten Sie, bis es komplett geöffnet ist.</b></h4></value>
|
||||
<value><h4><b>Schloss öffnet.<br/>Bitte warten Sie bis es komplett geöffnet ist.</b></h4></value>
|
||||
</data>
|
||||
<data name="ActivityTextStartingUpdater" xml:space="preserve">
|
||||
<value>Starte Aktualisierung...</value>
|
||||
|
@ -355,7 +355,7 @@ Freigabedialog öffen?</value>
|
|||
<value>Kein Netz beim Aktualisieren des Schlossstatusses.</value>
|
||||
</data>
|
||||
<data name="ActivityTextClosingLock" xml:space="preserve">
|
||||
<value><h4><b>Schloss schließt.<br/>Bitte überprüfen Sie visuell, ob es komplett geschlossen ist.</b></h4></value>
|
||||
<value><h4><b>Schloss schließt.<br/>Bitte warten Sie bis es komplett geschlossen ist.</b></h4></value>
|
||||
</data>
|
||||
<data name="ChangeLog3_0_203" xml:space="preserve">
|
||||
<value>Aktualisierrt auf aktuelle Schloss-Firmware.</value>
|
||||
|
@ -666,7 +666,7 @@ Kleinere Verbesserungen.</value>
|
|||
<value>Fehler beim Start der Standortabfrage!</value>
|
||||
</data>
|
||||
<data name="ActivityTextErrorQueryLocationWhenAny" xml:space="preserve">
|
||||
<value>Keine Standortinfo verfügbar.</value>
|
||||
<value>Keine Standortinfo verfügbar. Aktivieren Sie die Standortdienste Ihres Geräts.</value>
|
||||
</data>
|
||||
<data name="ActivityTextErrorQueryLocationQuery" xml:space="preserve">
|
||||
<value>Standortabfrage nicht möglich.</value>
|
||||
|
@ -1098,4 +1098,14 @@ Beim Login können Sie nun Ihr eingegebenes Passwort einsehen.<br/>
|
|||
<br/>
|
||||
Probieren Sie es aus!</value>
|
||||
</data>
|
||||
<data name="MessageErrorLocationIsOff" xml:space="preserve">
|
||||
<value>Schalten Sie die Standortdienste Ihres Geräts ein, um die Karte auf Ihren aktuellen Standort zu zentrieren.</value>
|
||||
</data>
|
||||
<data name="ChangeLog_3_0_353_MK_SB" xml:space="preserve">
|
||||
<value>Verbesserungen im
|
||||
<ul>
|
||||
<li/>- Management der Standortdienste
|
||||
<li/>- Design von Prozessen
|
||||
</ul></value>
|
||||
</data>
|
||||
</root>
|
|
@ -460,7 +460,7 @@ Open sharing dialog?</value>
|
|||
<value>No web error on updating locking status.</value>
|
||||
</data>
|
||||
<data name="ActivityTextClosingLock" xml:space="preserve">
|
||||
<value><h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4></value>
|
||||
<value><h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4></value>
|
||||
</data>
|
||||
<data name="ChangeLog3_0_203" xml:space="preserve">
|
||||
<value>Updated to latest lock firmware.</value>
|
||||
|
@ -662,7 +662,7 @@ Please contact the support for help.</value>
|
|||
<value>Submitting feedback failed!</value>
|
||||
</data>
|
||||
<data name="ActivityTextUpdating" xml:space="preserve">
|
||||
<value>Updateing....</value>
|
||||
<value>Updating....</value>
|
||||
</data>
|
||||
<data name="ChangeLog3_0_231" xml:space="preserve">
|
||||
<value>Minor improvements.</value>
|
||||
|
@ -756,7 +756,7 @@ Minor fixes.</value>
|
|||
<value>Can not query location info.</value>
|
||||
</data>
|
||||
<data name="ActivityTextErrorQueryLocationWhenAny" xml:space="preserve">
|
||||
<value>No location info available.</value>
|
||||
<value>No location info available. Activate your device's location services.</value>
|
||||
</data>
|
||||
<data name="ActivityTextQueryLocation" xml:space="preserve">
|
||||
<value>Query location...</value>
|
||||
|
@ -1188,4 +1188,14 @@ When logging in, you can now view the password you entered. <br/>
|
|||
<br/>
|
||||
Try it out!</value>
|
||||
</data>
|
||||
<data name="MessageErrorLocationIsOff" xml:space="preserve">
|
||||
<value>Turn on your device's location services to center the map on your current location.</value>
|
||||
</data>
|
||||
<data name="ChangeLog_3_0_353_MK_SB" xml:space="preserve">
|
||||
<value>Improvements in
|
||||
<ul>
|
||||
<li/>- Management of location services
|
||||
<li/>- Design of processes
|
||||
</ul></value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -442,7 +442,7 @@ Freigabedialog öffen?</target>
|
|||
</trans-unit>
|
||||
<trans-unit id="ActivityTextOpeningLock" translate="yes" xml:space="preserve">
|
||||
<source><bpt id="1"><h4></bpt><bpt id="2"><b></bpt>Lock is opening.<br/>Please wait until it is completely open.<ept id="2"></b></ept><ept id="1"></h4></ept></source>
|
||||
<target state="translated"><bpt id="1"><h4></bpt><bpt id="2"><b></bpt>Schloss öffnet.<br/>Bitte warten Sie, bis es komplett geöffnet ist.<ept id="2"></b></ept><ept id="1"></h4></ept></target>
|
||||
<target state="translated"><bpt id="1"><h4></bpt><bpt id="2"><b></bpt>Schloss öffnet.<br/>Bitte warten Sie bis es komplett geöffnet ist.<ept id="2"></b></ept><ept id="1"></h4></ept></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ActivityTextStartingUpdater" translate="yes" xml:space="preserve">
|
||||
<source>Updating...</source>
|
||||
|
@ -469,8 +469,8 @@ Freigabedialog öffen?</target>
|
|||
<target state="translated">Kein Netz beim Aktualisieren des Schlossstatusses.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ActivityTextClosingLock" translate="yes" xml:space="preserve">
|
||||
<source><bpt id="1"><h4></bpt><bpt id="2"><b></bpt>Lock is closing.<br/>Please visually check if it is completely closed.<ept id="2"></b></ept><ept id="1"></h4></ept></source>
|
||||
<target state="translated"><bpt id="1"><h4></bpt><bpt id="2"><b></bpt>Schloss schließt.<br/>Bitte überprüfen Sie visuell, ob es komplett geschlossen ist.<ept id="2"></b></ept><ept id="1"></h4></ept></target>
|
||||
<source><bpt id="1"><h4></bpt><bpt id="2"><b></bpt>Lock is closing.<br/>Please wait until it is completely closed.<ept id="2"></b></ept><ept id="1"></h4></ept></source>
|
||||
<target state="translated"><bpt id="1"><h4></bpt><bpt id="2"><b></bpt>Schloss schließt.<br/>Bitte warten Sie bis es komplett geschlossen ist.<ept id="2"></b></ept><ept id="1"></h4></ept></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog3_0_203" translate="yes" xml:space="preserve">
|
||||
<source>Updated to latest lock firmware.</source>
|
||||
|
@ -744,7 +744,7 @@ Bitte kontaktieren sie den Support!</target>
|
|||
<target state="translated">Übermittlung der Rückmeldung fehlgeschlagen!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ActivityTextUpdating" translate="yes" xml:space="preserve">
|
||||
<source>Updateing....</source>
|
||||
<source>Updating....</source>
|
||||
<target state="translated">Aktualisiere....</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog3_0_231" translate="yes" xml:space="preserve">
|
||||
|
@ -892,8 +892,8 @@ Kleinere Verbesserungen.</target>
|
|||
<target state="translated">Fehler beim Start der Standortabfrage!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ActivityTextErrorQueryLocationWhenAny" translate="yes" xml:space="preserve">
|
||||
<source>No location info available.</source>
|
||||
<target state="translated">Keine Standortinfo verfügbar.</target>
|
||||
<source>No location info available. Activate your device's location services.</source>
|
||||
<target state="translated">Keine Standortinfo verfügbar. Aktivieren Sie die Standortdienste Ihres Geräts.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ActivityTextErrorQueryLocationQuery" translate="yes" xml:space="preserve">
|
||||
<source>Can not query location info.</source>
|
||||
|
@ -1500,6 +1500,22 @@ Beim Login können Sie nun Ihr eingegebenes Passwort einsehen.<br/>
|
|||
<br/>
|
||||
Probieren Sie es aus!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="MessageErrorLocationIsOff" translate="yes" xml:space="preserve">
|
||||
<source>Turn on your device's location services to center the map on your current location.</source>
|
||||
<target state="translated">Schalten Sie die Standortdienste Ihres Geräts ein, um die Karte auf Ihren aktuellen Standort zu zentrieren.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ChangeLog_3_0_353_MK_SB" translate="yes" xml:space="preserve">
|
||||
<source>Improvements in
|
||||
<bpt id="1"><ul></bpt>
|
||||
<li/>- Management of location services
|
||||
<li/>- Design of processes
|
||||
<ept id="1"></ul></ept></source>
|
||||
<target state="translated">Verbesserungen im
|
||||
<bpt id="1"><ul></bpt>
|
||||
<li/>- Management der Standortdienste
|
||||
<li/>- Design von Prozessen
|
||||
<ept id="1"></ul></ept></target>
|
||||
</trans-unit>
|
||||
</group>
|
||||
</body>
|
||||
</file>
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace TINK.Services.Permissions.Essentials
|
||||
{
|
||||
using XamPermission = Xamarin.Essentials.Permissions;
|
||||
using XamPermissionStatus = PermissionStatus;
|
||||
|
||||
public class LocationPermissions : ILocationPermission
|
||||
{
|
||||
/// <summary> Checks the permission status.</summary>
|
||||
/// <returns>Current permission status.</returns>
|
||||
public async Task<Status> CheckStatusAsync()
|
||||
{
|
||||
var status = await XamPermission.CheckStatusAsync<XamPermission.LocationWhenInUse>();
|
||||
if (status == XamPermissionStatus.Granted)
|
||||
{
|
||||
return Status.Granted;
|
||||
}
|
||||
|
||||
if (status == XamPermissionStatus.Denied
|
||||
&& DeviceInfo.Platform == DevicePlatform.iOS)
|
||||
{
|
||||
// Prompt the user to turn on in settings
|
||||
// On iOS once a permission has been denied it may not be requested again from the application
|
||||
return Status.DeniedRequiresSettingsUI;
|
||||
}
|
||||
|
||||
if (XamPermission.ShouldShowRationale<XamPermission.LocationWhenInUse>())
|
||||
{
|
||||
// Prompt the user with additional information as to why the permission is needed
|
||||
return Status.Denied;
|
||||
}
|
||||
|
||||
switch (status)
|
||||
{
|
||||
case XamPermissionStatus.Unknown:
|
||||
case XamPermissionStatus.Denied: // Map Denied to unknown because "denied means user did not allow access to location".
|
||||
return Status.Unknown;
|
||||
|
||||
default:
|
||||
// Comprises:
|
||||
// - XamPermissionStatus.Restricted:
|
||||
// - XamPermissionStatus.Disabled
|
||||
// Perission XamPermissionStatus.Granted is handled above.
|
||||
return Status.DeniedRequiresSettingsUI;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Requests location permission.</summary>
|
||||
/// <returns>Permission status after request.</returns>
|
||||
public async Task<Status> RequestAsync()
|
||||
{
|
||||
switch (await XamPermission.RequestAsync<XamPermission.LocationWhenInUse>())
|
||||
{
|
||||
case XamPermissionStatus.Unknown:
|
||||
return Status.Unknown;
|
||||
|
||||
case XamPermissionStatus.Denied:
|
||||
return Status.Denied;
|
||||
|
||||
case XamPermissionStatus.Granted:
|
||||
return Status.Granted;
|
||||
|
||||
default:
|
||||
// Comprises:
|
||||
// - XamPermissionStatus.Restricted:
|
||||
// - XamPermissionStatus.Disabled
|
||||
return Status.DeniedRequiresSettingsUI;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Opens app settings dialog.</summary>
|
||||
public bool OpenAppSettings()
|
||||
{
|
||||
AppInfo.ShowSettingsUI();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
59
TINKLib/Services/Permissions/Plugin/LocationPermissions.cs
Normal file
|
@ -0,0 +1,59 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace TINK.Services.Permissions.Plugin
|
||||
{
|
||||
using global::Plugin.Permissions;
|
||||
|
||||
public class LocationPermissions : ILocationPermission
|
||||
{
|
||||
/// <summary> Checks the permission status.</summary>
|
||||
public async Task<Status> CheckStatusAsync()
|
||||
{
|
||||
switch (await CrossPermissions.Current.CheckPermissionStatusAsync<LocationPermission>())
|
||||
{
|
||||
case global::Plugin.Permissions.Abstractions.PermissionStatus.Denied:
|
||||
return Status.Denied;
|
||||
|
||||
case global::Plugin.Permissions.Abstractions.PermissionStatus.Granted:
|
||||
return Status.Granted;
|
||||
|
||||
case global::Plugin.Permissions.Abstractions.PermissionStatus.Unknown:
|
||||
return Status.Unknown;
|
||||
|
||||
default:
|
||||
// Comprises
|
||||
// - PermissionStatus.Disabled and
|
||||
// - PermissionStatus.Restricted.
|
||||
return Status.DeniedRequiresSettingsUI;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Requests location permission.</summary>
|
||||
/// <returns>Permission status after request.</returns>
|
||||
public async Task<Status> RequestAsync()
|
||||
{
|
||||
switch (await CrossPermissions.Current.RequestPermissionAsync<LocationPermission>())
|
||||
{
|
||||
case global::Plugin.Permissions.Abstractions.PermissionStatus.Denied:
|
||||
return Status.Denied;
|
||||
|
||||
case global::Plugin.Permissions.Abstractions.PermissionStatus.Granted:
|
||||
return Status.Granted;
|
||||
|
||||
case global::Plugin.Permissions.Abstractions.PermissionStatus.Unknown:
|
||||
return Status.Unknown;
|
||||
|
||||
default:
|
||||
// Comprises
|
||||
// - PermissionStatus.Disabled and
|
||||
// - PermissionStatus.Restricted.
|
||||
return Status.DeniedRequiresSettingsUI;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Opens app settings dialog.</summary>
|
||||
public bool OpenAppSettings()
|
||||
=> CrossPermissions.Current.OpenAppSettings();
|
||||
}
|
||||
}
|
|
@ -244,15 +244,12 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
|
||||
// Check location permissions.
|
||||
if (bikesAtStation.GetLockIt().Count > 0
|
||||
&& RuntimePlatform == Device.Android)
|
||||
&& RuntimePlatform == Device.Android
|
||||
)
|
||||
{
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (status != Status.Granted)
|
||||
{
|
||||
var permissionResult = await PermissionsService.RequestAsync();
|
||||
|
||||
if (permissionResult != Status.Granted)
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageBikesManagementLocationPermissionOpenDialog,
|
||||
|
@ -270,10 +267,11 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
IsIdle = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Open permissions dialog.
|
||||
PermissionsService.OpenAppSettings();
|
||||
}
|
||||
else if (dialogResult)
|
||||
{
|
||||
// Open permissions dialog.
|
||||
PermissionsService.OpenAppSettings();
|
||||
}
|
||||
}
|
||||
|
||||
if (Geolocation.IsGeolcationEnabled == false)
|
||||
|
|
|
@ -191,28 +191,32 @@ namespace TINK.ViewModel.Contact
|
|||
}
|
||||
|
||||
//Add blue dot for showing current location of user
|
||||
Location currentLocation = null;
|
||||
try
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (status == Status.Granted)
|
||||
{
|
||||
currentLocation = await GeolocationService.GetAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
if (currentLocation != null)
|
||||
{
|
||||
var currentLocationPin = new Pin()
|
||||
Location currentLocation = null;
|
||||
try
|
||||
{
|
||||
Position = new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
Label = "currentLocationPin",
|
||||
Type = PinType.Place,
|
||||
Tag = "NotClickable",
|
||||
Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName)
|
||||
};
|
||||
currentLocation = await GeolocationService.GetAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
Pins.Add(currentLocationPin);
|
||||
if (currentLocation != null)
|
||||
{
|
||||
var currentLocationPin = new Pin()
|
||||
{
|
||||
Position = new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
Label = "currentLocationPin",
|
||||
Type = PinType.Place,
|
||||
Tag = "NotClickable",
|
||||
Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName)
|
||||
};
|
||||
|
||||
Pins.Add(currentLocationPin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -313,17 +317,15 @@ namespace TINK.ViewModel.Contact
|
|||
|
||||
if (Pins.Count <= 0)
|
||||
{
|
||||
ActionText = AppResources.ActivityTextRequestingLocationPermissions;
|
||||
|
||||
// Check location permission
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (TinkApp.CenterMapToCurrentLocation
|
||||
&& !GeolocationService.IsSimulation
|
||||
&& status != Status.Granted)
|
||||
// Move and scale before getting stations and bikes which takes some time.
|
||||
if (TinkApp.CenterMapToCurrentLocation)
|
||||
{
|
||||
var permissionResult = await PermissionsService.RequestAsync();
|
||||
ActionText = AppResources.ActivityTextRequestingLocationPermissions;
|
||||
|
||||
if (permissionResult != Status.Granted)
|
||||
// Check location permission
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (!GeolocationService.IsSimulation
|
||||
&& status != Status.Granted)
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
|
@ -341,23 +343,25 @@ namespace TINK.ViewModel.Contact
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (status == Status.Granted)
|
||||
{
|
||||
ActionText = AppResources.ActivityTextCenterMap;
|
||||
|
||||
// Move and scale before getting stations and bikes which takes some time.
|
||||
ActionText = AppResources.ActivityTextCenterMap;
|
||||
Location currentLocation = null;
|
||||
try
|
||||
{
|
||||
currentLocation = TinkApp.CenterMapToCurrentLocation
|
||||
? await GeolocationService.GetAsync()
|
||||
: null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<SelectStationPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
Location currentLocation = null;
|
||||
try
|
||||
{
|
||||
currentLocation = TinkApp.CenterMapToCurrentLocation
|
||||
? await GeolocationService.GetAsync()
|
||||
: null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<SelectStationPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.Uris.ActiveUri, currentLocation);
|
||||
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.Uris.ActiveUri, currentLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ActionText = AppResources.ActivityTextMapLoadingStationsAndBikes;
|
||||
|
|
|
@ -235,36 +235,63 @@ namespace TINK.ViewModel.FindBike
|
|||
ActionText = AppResources.ActivityTextCheckBluetoothState;
|
||||
|
||||
if (bikeCollection.FirstOrDefault(x => x is BikeInfo btBike) != null
|
||||
&& RuntimePlatform == Device.Android)
|
||||
//&& RuntimePlatform == Device.Android
|
||||
)
|
||||
{
|
||||
// Check location permission
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (status != Status.Granted)
|
||||
{
|
||||
var permissionResult = await PermissionsService.RequestAsync();
|
||||
|
||||
if (permissionResult != Status.Granted)
|
||||
if (RuntimePlatform == Device.Android)
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageBikesManagementLocationPermissionOpenDialog,
|
||||
AppResources.MessageAnswerYes,
|
||||
AppResources.MessageAnswerNo);
|
||||
var permissionResult = await PermissionsService.RequestAsync();
|
||||
|
||||
if (!dialogResult)
|
||||
if (permissionResult != Status.Granted)
|
||||
{
|
||||
// User decided not to give access to locations permissions.
|
||||
BikeCollection.Update(bikeCollection, Stations);
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageBikesManagementLocationPermissionOpenDialog,
|
||||
AppResources.MessageAnswerYes,
|
||||
AppResources.MessageAnswerNo);
|
||||
|
||||
await StartUpdateTask(() => UpdateTask());
|
||||
if (!dialogResult)
|
||||
{
|
||||
// User decided not to give access to locations permissions.
|
||||
BikeCollection.Update(bikeCollection, Stations);
|
||||
|
||||
ActionText = "";
|
||||
IsIdle = true;
|
||||
return;
|
||||
await StartUpdateTask(() => UpdateTask());
|
||||
|
||||
ActionText = "";
|
||||
IsIdle = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Open permissions dialog.
|
||||
PermissionsService.OpenAppSettings();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageBikesManagementLocationPermissionOpenDialog,
|
||||
AppResources.MessageAnswerYes,
|
||||
AppResources.MessageAnswerNo);
|
||||
|
||||
// Open permissions dialog.
|
||||
PermissionsService.OpenAppSettings();
|
||||
if (!dialogResult)
|
||||
{
|
||||
// User decided not to give access to locations permissions.
|
||||
BikeCollection.Update(bikeCollection, Stations);
|
||||
|
||||
await StartUpdateTask(() => UpdateTask());
|
||||
|
||||
ActionText = "";
|
||||
IsIdle = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// Open permissions dialog.
|
||||
PermissionsService.OpenAppSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ using TINK.Repository;
|
|||
using TINK.Services.Geolocation;
|
||||
using TINK.Model.State;
|
||||
|
||||
|
||||
#if !TRYNOTBACKSTYLE
|
||||
#endif
|
||||
|
||||
|
@ -55,6 +56,8 @@ namespace TINK.ViewModel.Map
|
|||
/// </summary>
|
||||
private ILocationPermission PermissionsService { get; }
|
||||
|
||||
private IGeolocation Geolocation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Service to manage bluetooth stack.
|
||||
/// </summary>
|
||||
|
@ -227,28 +230,32 @@ namespace TINK.ViewModel.Map
|
|||
}
|
||||
|
||||
//Add blue dot for showing current location of user
|
||||
Location currentLocation = null;
|
||||
try
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (status == Status.Granted)
|
||||
{
|
||||
currentLocation = await GeolocationService.GetAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
if (currentLocation != null)
|
||||
{
|
||||
var currentLocationPin = new Pin()
|
||||
Location currentLocation = null;
|
||||
try
|
||||
{
|
||||
Position = new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
Label = "currentLocationPin",
|
||||
Type = PinType.Place,
|
||||
Tag = "NotClickable",
|
||||
Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName)
|
||||
};
|
||||
currentLocation = await GeolocationService.GetAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
Pins.Add(currentLocationPin);
|
||||
if (currentLocation != null)
|
||||
{
|
||||
var currentLocationPin = new Pin()
|
||||
{
|
||||
Position = new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
Label = "currentLocationPin",
|
||||
Type = PinType.Place,
|
||||
Tag = "NotClickable",
|
||||
Icon = BitmapDescriptorFactory.FromBundle(currentLocationPinName)
|
||||
};
|
||||
|
||||
Pins.Add(currentLocationPin);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -343,7 +350,14 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
try
|
||||
{
|
||||
//Request Location Permission on iOS
|
||||
if(DeviceInfo.Platform == DevicePlatform.iOS)
|
||||
{
|
||||
var status = await PermissionsService.RequestAsync();
|
||||
}
|
||||
|
||||
IsRunning = true;
|
||||
IsNavBarVisible = false;
|
||||
// Process map page.
|
||||
Polling = TinkApp.Polling;
|
||||
|
||||
|
@ -354,9 +368,6 @@ namespace TINK.ViewModel.Map
|
|||
// Update map page filter
|
||||
ActiveFilterMap = TinkApp.GroupFilterMapPage;
|
||||
|
||||
ActionText = AppResources.ActivityTextRequestingLocationPermissions;
|
||||
var status = await RequestLocationPermission();
|
||||
|
||||
ActionText = AppResources.ActivityTextMapLoadingStationsAndBikes;
|
||||
IsConnected = TinkApp.GetIsConnected();
|
||||
var resultStationsAndBikes = await TinkApp.GetConnector(IsConnected).Query.GetBikesAndStationsAsync();
|
||||
|
@ -394,11 +405,15 @@ namespace TINK.ViewModel.Map
|
|||
|
||||
// Get map display area
|
||||
Model.Map.IMapSpan mapSpan = null;
|
||||
if (TinkApp.CenterMapToCurrentLocation && status == Status.Granted)
|
||||
if (TinkApp.CenterMapToCurrentLocation)
|
||||
{
|
||||
// Get from smart device
|
||||
mapSpan = await GetFromLocationService(status);
|
||||
}
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (status == Status.Granted)
|
||||
{
|
||||
// Get from smart device
|
||||
mapSpan = await GetFromLocationService(status);
|
||||
}
|
||||
}
|
||||
|
||||
if (mapSpan == null)
|
||||
{
|
||||
|
@ -433,6 +448,7 @@ namespace TINK.ViewModel.Map
|
|||
Exception = resultStationsAndBikes.Exception;
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsNavBarVisible = true;
|
||||
IsMapPageEnabled = true;
|
||||
}
|
||||
catch (Exception l_oException)
|
||||
|
@ -440,6 +456,7 @@ namespace TINK.ViewModel.Map
|
|||
Log.ForContext<MapPageViewModel>().Error($"An error occurred showing bike stations page.\r\n{l_oException.Message}");
|
||||
|
||||
IsRunning = false;
|
||||
IsNavBarVisible = true;
|
||||
|
||||
await ViewService.DisplayAlert(
|
||||
"Fehler",
|
||||
|
@ -552,19 +569,15 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
// Check location permission
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (TinkApp.CenterMapToCurrentLocation
|
||||
&& !GeolocationService.IsSimulation
|
||||
if (!GeolocationService.IsSimulation
|
||||
// && DeviceInfo.Platform == DevicePlatform.Android
|
||||
&& status != Status.Granted)
|
||||
{
|
||||
status = await PermissionsService.RequestAsync();
|
||||
|
||||
if (status != Status.Granted)
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageCenterMapLocationPermissionOpenDialog,
|
||||
AppResources.MessageAnswerYes,
|
||||
AppResources.MessageAnswerNo);
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageCenterMapLocationPermissionOpenDialog,
|
||||
AppResources.MessageAnswerYes,
|
||||
AppResources.MessageAnswerNo);
|
||||
|
||||
if (dialogResult)
|
||||
{
|
||||
|
@ -572,9 +585,9 @@ namespace TINK.ViewModel.Map
|
|||
PermissionsService.OpenAppSettings();
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsNavBarVisible = true;
|
||||
IsMapPageEnabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
@ -598,7 +611,7 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
// Start task which periodically updates pins.
|
||||
return new PollingUpdateTaskManager(
|
||||
async () =>
|
||||
() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -660,6 +673,7 @@ namespace TINK.ViewModel.Map
|
|||
null);
|
||||
|
||||
Log.ForContext<MapPageViewModel>().Verbose("Leaving update cycle.");
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
@ -845,6 +859,21 @@ namespace TINK.ViewModel.Map
|
|||
}
|
||||
}
|
||||
|
||||
private bool isNavBarVisible = true;
|
||||
|
||||
public bool IsNavBarVisible
|
||||
{
|
||||
get => isNavBarVisible;
|
||||
set
|
||||
{
|
||||
if (value == isNavBarVisible)
|
||||
return;
|
||||
|
||||
Log.ForContext<MapPageViewModel>().Debug($"Switch value of {nameof(isNavBarVisible)} to {value}.");
|
||||
isNavBarVisible = value;
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsNavBarVisible)));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary> Holds information whether app is connected to web or not. </summary>
|
||||
private bool? isConnected = null;
|
||||
|
@ -895,6 +924,9 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
try
|
||||
{
|
||||
IsRunning = true;
|
||||
ActionText = AppResources.ActivityTextCenterMap;
|
||||
|
||||
IsMapPageEnabled = false;
|
||||
|
||||
Log.ForContext<MapPageViewModel>().Information($"Request to center to current position.");
|
||||
|
@ -913,127 +945,92 @@ namespace TINK.ViewModel.Map
|
|||
TinkApp.UpdateConnector();
|
||||
|
||||
// Check location permission
|
||||
//ActionText = AppResources.ActivityTextRequestingLocationPermissions;
|
||||
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (!GeolocationService.IsSimulation
|
||||
&& status != Status.Granted)
|
||||
var status = await RequestLocationPermission();
|
||||
if (status == Status.Granted)
|
||||
{
|
||||
status = await PermissionsService.RequestAsync();
|
||||
|
||||
if (status != Status.Granted)
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageCenterMapLocationPermissionOpenDialog,
|
||||
AppResources.MessageAnswerYes,
|
||||
AppResources.MessageAnswerNo);
|
||||
if (dialogResult)
|
||||
{
|
||||
// User decided to give access to locations permissions.
|
||||
PermissionsService.OpenAppSettings();
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsMapPageEnabled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Do not use property .State to get bluetooth state due
|
||||
// to issue https://hausource.visualstudio.com/TINK/_workitems/edit/116 /
|
||||
// see https://github.com/xabre/xamarin-bluetooth-le/issues/112#issuecomment-380994887
|
||||
if (await BluetoothService.GetBluetoothState() != Plugin.BLE.Abstractions.Contracts.BluetoothState.On)
|
||||
{
|
||||
await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageBikesManagementBluetoothActivation,
|
||||
AppResources.MessageAnswerOk);
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsMapPageEnabled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Move and scale before getting stations and bikes which takes some time.
|
||||
Location currentLocation = null;
|
||||
try
|
||||
{
|
||||
currentLocation = await GeolocationService.GetAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
if (currentLocation != null)
|
||||
{
|
||||
IsRunning = true;
|
||||
ActionText = AppResources.ActivityTextCenterMap;
|
||||
|
||||
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
|
||||
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
TinkApp.ActiveMapSpan.Radius);
|
||||
|
||||
TinkApp.Save();
|
||||
|
||||
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
|
||||
|
||||
//Pins.Clear();
|
||||
|
||||
//// Update stations
|
||||
//ActionText = AppResources.ActivityTextMapLoadingStationsAndBikes;
|
||||
//IsConnected = TinkApp.GetIsConnected();
|
||||
//var resultStationsAndBikes = await TinkApp.GetConnector(IsConnected).Query.GetBikesAndStationsAsync();
|
||||
|
||||
//// Set pins to their positions on map.
|
||||
//InitializePins(resultStationsAndBikes.Response.StationsAll);
|
||||
//Log.ForContext<MapPageViewModel>().Verbose("Update of pins done...");
|
||||
|
||||
//// Update pin colors.
|
||||
//Log.ForContext<MapPageViewModel>().Verbose("Starting update pins color...");
|
||||
//var l_oColors = GetStationColors(
|
||||
// Pins.Select(x => x.Tag.ToString()).ToList(),
|
||||
// resultStationsAndBikes.Response.Bikes);
|
||||
|
||||
//// Update pins color form count of bikes located at station.
|
||||
//UpdatePinsColor(l_oColors);
|
||||
|
||||
//Log.ForContext<MapPageViewModel>().Verbose("Update pins color done.");
|
||||
|
||||
// Move and scale.
|
||||
Location currentLocation = null;
|
||||
try
|
||||
{
|
||||
// Update bikes at station or my bikes depending on context.
|
||||
await m_oViewUpdateManager.StartUpdateAyncPeridically(Polling);
|
||||
currentLocation = await GeolocationService.GetAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Excpetions are handled insde update task;
|
||||
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
if (currentLocation != null)
|
||||
{
|
||||
IsRunning = true;
|
||||
ActionText = AppResources.ActivityTextCenterMap;
|
||||
|
||||
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
|
||||
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
TinkApp.ActiveMapSpan.Radius);
|
||||
|
||||
TinkApp.Save();
|
||||
|
||||
MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
|
||||
|
||||
Pins.Clear();
|
||||
|
||||
// Update stations
|
||||
IsConnected = TinkApp.GetIsConnected();
|
||||
var resultStationsAndBikes = await TinkApp.GetConnector(IsConnected).Query.GetBikesAndStationsAsync();
|
||||
|
||||
// Set pins to their positions on map.
|
||||
ActionText = AppResources.ActivityTextMapLoadingStationsAndBikes;
|
||||
InitializePins(resultStationsAndBikes.Response.StationsAll);
|
||||
Log.ForContext<MapPageViewModel>().Verbose("Update of pins done...");
|
||||
|
||||
// Update pin colors.
|
||||
Log.ForContext<MapPageViewModel>().Verbose("Starting update pins color...");
|
||||
var l_oColors = GetStationColors(
|
||||
Pins.Select(x => x.Tag.ToString()).ToList(),
|
||||
resultStationsAndBikes.Response.Bikes);
|
||||
|
||||
// Update pins color form count of bikes located at station.
|
||||
UpdatePinsColor(l_oColors);
|
||||
|
||||
Log.ForContext<MapPageViewModel>().Verbose("Update pins color done.");
|
||||
|
||||
try
|
||||
{
|
||||
// Update bikes at station or my bikes depending on context.
|
||||
await m_oViewUpdateManager.StartUpdateAyncPeridically(Polling);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// Excpetions are handled insde update task;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageErrorLocationIsOff,
|
||||
AppResources.MessageAnswerOk);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ActionText = AppResources.ActivityTextErrorQueryLocationWhenAny;
|
||||
}
|
||||
|
||||
IsRunning = false;
|
||||
IsMapPageEnabled = true;
|
||||
Log.ForContext<MapPageViewModel>().Information($"Center to current Position done.");
|
||||
ActionText = "";
|
||||
ActionText = String.Empty;
|
||||
}
|
||||
catch (Exception l_oException)
|
||||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("An error occurred while centering to current position.");
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
ActionText = String.Empty;
|
||||
|
||||
await ViewService.DisplayAlert(
|
||||
"Fehler",
|
||||
AppResources.MessageMapPageErrorSwitch,
|
||||
String.Format(AppResources.MessageMapPageErrorSwitch, l_oException.Message),
|
||||
String.Format(AppResources.MessageErrorQueryLocationMessage, l_oException.Message),
|
||||
AppResources.MessageAnswerOk);
|
||||
|
||||
IsMapPageEnabled = true;
|
||||
IsRunning = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1080,6 +1077,7 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
IsMapPageEnabled = false;
|
||||
IsRunning = true;
|
||||
IsNavBarVisible = false;
|
||||
|
||||
Log.ForContext<MapPageViewModel>().Information($"Request to toggle to \"{selectedFilter}\".");
|
||||
|
||||
|
@ -1101,76 +1099,42 @@ namespace TINK.ViewModel.Map
|
|||
|
||||
Pins.Clear();
|
||||
|
||||
// Check location permission
|
||||
//ActionText = AppResources.ActivityTextRequestingLocationPermissions;
|
||||
//// Move and scale before getting stations and bikes which takes some time.
|
||||
//if (TinkApp.CenterMapToCurrentLocation)
|
||||
//{
|
||||
// // Check location permission
|
||||
// //ActionText = AppResources.ActivityTextRequestingLocationPermissions;
|
||||
// var status = await RequestLocationPermission();
|
||||
// if (status == Status.Granted)
|
||||
// {
|
||||
// //ActionText = AppResources.ActivityTextCenterMap;
|
||||
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (TinkApp.CenterMapToCurrentLocation
|
||||
&& !GeolocationService.IsSimulation
|
||||
&& status != Status.Granted)
|
||||
{
|
||||
status = await PermissionsService.RequestAsync();
|
||||
// Location currentLocation = null;
|
||||
// try
|
||||
// {
|
||||
// currentLocation = await GeolocationService.GetAsync();
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
// }
|
||||
|
||||
if (status != Status.Granted)
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageCenterMapLocationPermissionOpenDialog,
|
||||
AppResources.MessageAnswerYes,
|
||||
AppResources.MessageAnswerNo);
|
||||
if (dialogResult)
|
||||
{
|
||||
// User decided to give access to locations permissions.
|
||||
PermissionsService.OpenAppSettings();
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsMapPageEnabled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if (currentLocation != null)
|
||||
// {
|
||||
// TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
|
||||
// new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
// TinkApp.ActiveMapSpan.Radius);
|
||||
|
||||
// Do not use property .State to get bluetooth state due
|
||||
// to issue https://hausource.visualstudio.com/TINK/_workitems/edit/116 /
|
||||
// see https://github.com/xabre/xamarin-bluetooth-le/issues/112#issuecomment-380994887
|
||||
if (await BluetoothService.GetBluetoothState() != Plugin.BLE.Abstractions.Contracts.BluetoothState.On)
|
||||
{
|
||||
await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
AppResources.MessageBikesManagementBluetoothActivation,
|
||||
AppResources.MessageAnswerOk);
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsMapPageEnabled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// TinkApp.Save();
|
||||
|
||||
// Move and scale before getting stations and bikes which takes some time.
|
||||
if (TinkApp.CenterMapToCurrentLocation)
|
||||
{
|
||||
//ActionText = AppResources.ActivityTextCenterMap;
|
||||
|
||||
Location currentLocation = null;
|
||||
try
|
||||
{
|
||||
currentLocation = await GeolocationService.GetAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("Getting location failed. {Exception}", ex);
|
||||
}
|
||||
|
||||
if (currentLocation != null)
|
||||
{
|
||||
TinkApp.UserMapSpan = MapSpan.FromCenterAndRadius(
|
||||
new Xamarin.Forms.GoogleMaps.Position(currentLocation.Latitude, currentLocation.Longitude),
|
||||
TinkApp.ActiveMapSpan.Radius);
|
||||
|
||||
TinkApp.Save();
|
||||
|
||||
//MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
|
||||
}
|
||||
}
|
||||
// //MoveAndScale(m_oMoveToRegionDelegate, TinkApp.ActiveMapSpan);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// ActionText = AppResources.ActivityTextErrorQueryLocationWhenAny;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// Update stations
|
||||
ActionText = AppResources.ActivityTextMapLoadingStationsAndBikes;
|
||||
|
@ -1204,6 +1168,7 @@ namespace TINK.ViewModel.Map
|
|||
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsNavBarVisible = true;
|
||||
IsMapPageEnabled = true;
|
||||
Log.ForContext<MapPageViewModel>().Information($"Toggle to \"{selectedFilter}\" done.");
|
||||
}
|
||||
|
@ -1212,6 +1177,7 @@ namespace TINK.ViewModel.Map
|
|||
Log.ForContext<MapPageViewModel>().Error("An error occurred switching view Cargobike/ Citybike.{}");
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsNavBarVisible = true;
|
||||
|
||||
await ViewService.DisplayAlert(
|
||||
"Fehler",
|
||||
|
|
|
@ -154,7 +154,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Query location...";
|
||||
bikesViewModel.ActionText = "Returning bike...";
|
||||
|
@ -226,7 +226,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
bike.LockInfo.State = LockingState.UnknownDisconnected;
|
||||
|
@ -431,7 +431,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
bike.LockInfo.State = LockingState.UnknownDisconnected;
|
||||
|
@ -503,7 +503,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
bike.LockInfo.State = LockingState.Open;
|
||||
|
@ -577,7 +577,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bike.LockInfo.State = LockingState.Open;
|
||||
bikesViewModel.ActionText = "";
|
||||
|
@ -648,7 +648,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Query location...";
|
||||
bikesViewModel.ActionText = "";
|
||||
|
@ -720,7 +720,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Query location...";
|
||||
bikesViewModel.ActionText = "Returning bike...";
|
||||
|
@ -797,7 +797,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Query location...";
|
||||
bikesViewModel.ActionText = "Returning bike...";
|
||||
|
@ -873,7 +873,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Query location...";
|
||||
bikesViewModel.ActionText = "Returning bike...";
|
||||
|
@ -949,7 +949,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Query location...";
|
||||
bikesViewModel.ActionText = "Returning bike...";
|
||||
|
@ -1023,7 +1023,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "Starting bike return...";
|
||||
connector.Command.StartReturningBike(bike); // Notify about start
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Query location...";
|
||||
bikesViewModel.ActionText = "Returning bike...";
|
||||
|
@ -1084,7 +1084,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -1144,7 +1144,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Lock cannot be closed until bike is near.", "OK");
|
||||
|
@ -1204,7 +1204,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Exception message.", "OK");
|
||||
|
@ -1265,7 +1265,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -1327,7 +1327,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -1390,7 +1390,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
|
|
@ -779,7 +779,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -839,7 +839,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Lock cannot be closed until bike is near.", "OK");
|
||||
|
@ -899,7 +899,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Exception message.", "OK");
|
||||
|
@ -960,7 +960,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -1022,7 +1022,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -1085,7 +1085,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "Disconnecting lock...";
|
||||
locks.DisconnectAsync(Arg.Any<int>(), Arg.Any<Guid>());
|
||||
|
@ -154,7 +154,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Lock cannot be closed until bike is near.", "OK");
|
||||
|
@ -217,7 +217,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Exception message.", "OK");
|
||||
|
|
|
@ -288,7 +288,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "Canceling reservation...";
|
||||
connector.Command.DoCancelReservation(bike);
|
||||
|
@ -360,7 +360,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert(
|
||||
|
@ -434,7 +434,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert(
|
||||
|
@ -512,7 +512,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "Canceling reservation...";
|
||||
connector.Command.DoCancelReservation(bike);
|
||||
|
@ -583,7 +583,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "Canceling reservation...";
|
||||
connector.Command.DoCancelReservation(bike);
|
||||
|
@ -654,7 +654,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel.Bikes.Bike.BluetoothLock.Re
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks[0].CloseAsync();
|
||||
bikesViewModel.ActionText = "Canceling reservation...";
|
||||
connector.Command.DoCancelReservation(bike);
|
||||
|
|
|
@ -652,7 +652,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -708,7 +708,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Lock cannot be closed until bike is near.", "OK");
|
||||
|
@ -768,7 +768,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "";
|
||||
viewService.DisplayAlert("Lock can not be closed!", "Exception message.", "OK");
|
||||
|
@ -830,7 +830,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -892,7 +892,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
@ -955,7 +955,7 @@ namespace TestShareeLib.ViewModel.Bikes.Bike.BluetoothLock.RequestHandler
|
|||
bikesViewModel.Received(1).IsIdle = false; // GUI must be locked
|
||||
bikesViewModel.ActionText = "One moment please...";
|
||||
pollingManager.StopUpdatePeridically(); // Polling must be stopped before any COPR and lock service action
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please visually check if it is completely closed.</b></h4>";
|
||||
bikesViewModel.ActionText = "<h4><b>Lock is closing.<br/>Please wait until it is completely closed.</b></h4>";
|
||||
locks.Received()[0].CloseAsync(); // Lock must be closed
|
||||
bikesViewModel.ActionText = "Updating lock state...";
|
||||
connector.Command.UpdateLockingStateAsync(bike, Arg.Any<LocationDto>());
|
||||
|
|
|
@ -389,7 +389,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel
|
|||
{
|
||||
permissions.CheckStatusAsync();
|
||||
var glDummy = geolocation.Active.Received().IsGeolcationEnabled;
|
||||
permissions.RequestAsync(); // Ask user from permissions.
|
||||
// permissions.RequestAsync(); // Ask user from permissions (disabled, since no secondary request allowed).
|
||||
viewService.DisplayAlert(
|
||||
"Hint",
|
||||
"Please allow location sharing so that bike lock/locks can be managed.\r\nOpen sharing dialog?",
|
||||
|
@ -398,7 +398,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel
|
|||
permissions.OpenAppSettings();
|
||||
});
|
||||
|
||||
Assert.IsEmpty(bikesAtStation.StatusInfoText);
|
||||
Assert.IsTrue(new List<string> { "Updating...", string.Empty }.Contains(bikesAtStation.StatusInfoText));
|
||||
|
||||
// Verify list of bikes
|
||||
Assert.AreEqual(4, bikesAtStation.Count);
|
||||
|
@ -517,7 +517,7 @@ namespace TestTINKLib.Fixtures.ObjectTests.ViewModel
|
|||
{
|
||||
permissions.CheckStatusAsync();
|
||||
var glDummy = geolocation.Active.Received().IsGeolcationEnabled;
|
||||
permissions.RequestAsync(); // Ask user from permissions.
|
||||
//permissions.RequestAsync(); // Ask user from permissions (disabled, since no secondary request allowed).
|
||||
viewService.DisplayAlert(
|
||||
"Hint",
|
||||
"Please allow location sharing so that bike lock/locks can be managed.\r\nOpen sharing dialog?",
|
||||
|
|