mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Version 3.0.360
This commit is contained in:
parent
5c0b2e70c9
commit
faf68061f4
160 changed files with 2114 additions and 1932 deletions
|
@ -27,10 +27,10 @@
|
|||
<x:String x:Key="EyeOpen"></x:String>
|
||||
<x:String x:Key="EyeClose"></x:String>
|
||||
|
||||
<!--Triangle exclamation-->
|
||||
<x:String x:Key="Attention"></x:String>
|
||||
|
||||
<!-- Add more resources here -->
|
||||
<!--Arrow down from line-->
|
||||
<x:String x:Key="ArrowDown"></x:String>
|
||||
|
||||
<!-- Add more resources here -->
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<!-- Add more resource dictionaries here -->
|
||||
<themes:Konrad/>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
|
@ -125,6 +125,8 @@ namespace TINK
|
|||
Log.Debug("Get auth cookie.");
|
||||
IStore store = null;
|
||||
|
||||
// Version of last version used or null for initial installation.
|
||||
// Used for updating purposes.
|
||||
var lastVersion = JsonSettingsDictionary.GetAppVersion(settingsJSON);
|
||||
if (new Version(3, 0, 290) <= lastVersion)
|
||||
{
|
||||
|
@ -138,9 +140,11 @@ namespace TINK
|
|||
|
||||
Barrel.ApplicationId = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
||||
|
||||
// Get main thread synchronization context to be able to update gui elements from worker threads.
|
||||
var context = SynchronizationContext.Current;
|
||||
|
||||
var appInfoService = DependencyService.Get<IAppInfo>();
|
||||
var smartDevice = DependencyService.Get<ISmartDevice>();
|
||||
|
||||
const string MERCHANTID = "0000000000";
|
||||
|
||||
|
@ -157,13 +161,14 @@ namespace TINK
|
|||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
|
||||
sessionCookie,
|
||||
mail,
|
||||
smartDevice,
|
||||
expiresAfter),
|
||||
merchantId: MERCHANTID,
|
||||
bluetoothService: BluetoothService, /* locksService */
|
||||
locationPermissionsService: PermissionsService,
|
||||
locationServicesContainer: LocationServicesContainer,
|
||||
locksService: null,
|
||||
device: DependencyService.Get<ISmartDevice>(),
|
||||
device: smartDevice,
|
||||
specialFolder: specialFolders,
|
||||
cipher: new Cipher(),
|
||||
new TINK.Services.ThemeNS.Theme(Application.Current.Resources.MergedDictionaries),
|
||||
|
|
|
@ -69,32 +69,13 @@
|
|||
IsVisible="{Binding IsButtonVisible}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
Command="{Binding OnButtonClicked}"/>
|
||||
<Button
|
||||
<Button
|
||||
Style="{StaticResource SecondaryButton}"
|
||||
Text="{Binding LockitButtonText}"
|
||||
IsVisible="{Binding IsLockitButtonVisible}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
Command="{Binding OnLockitButtonClicked}"/>
|
||||
<!--Hint for Cache Daten.-->
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
IsVisible="{Binding IsDataFromCache}">
|
||||
<Image>
|
||||
<Image.Source>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Attention}"
|
||||
Color="Red"
|
||||
FontFamily="FA-S"
|
||||
Size="Small"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<Label
|
||||
TextColor="Red"
|
||||
FontSize="Small"
|
||||
Text="{x:Static resources:AppResources.MarkingDataIsFromCache}"/>
|
||||
</StackLayout>
|
||||
<!-- Rental description (tarif name, options and rental info -->
|
||||
<!-- Rental description (tarif name, options and rental info -->
|
||||
<Grid
|
||||
RowSpacing="0"
|
||||
IsVisible="{Binding TariffDescription.Header, Converter={StaticResource Label_Converter}}">
|
||||
|
@ -237,8 +218,8 @@
|
|||
Grid.Row="13"
|
||||
Grid.ColumnSpan="2"/>
|
||||
<Label
|
||||
Text= "{Binding TariffDescription.InfoEntry5}"
|
||||
IsVisible="{Binding TariffDescription.InfoEntry5, Converter={StaticResource Label_Converter}}"
|
||||
Text= "{Binding TariffDescription.TrackingInfoText}"
|
||||
IsVisible="{Binding TariffDescription.TrackingInfoText, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="14"
|
||||
Grid.ColumnSpan="2"/>
|
||||
</Grid>
|
||||
|
|
|
@ -27,93 +27,108 @@
|
|||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
<StackLayout Grid.Row="0" Spacing="0">
|
||||
|
||||
<!-- Grid for Content -->
|
||||
<Grid
|
||||
RowDefinitions="Auto,1*,Auto,Auto">
|
||||
<!--No Network Connection-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<!--Station-->
|
||||
<StackLayout
|
||||
Grid.Row="0"
|
||||
Orientation="Vertical">
|
||||
<Frame>
|
||||
|
||||
<!--Title-->
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
<!-- Grid for Content -->
|
||||
<Grid
|
||||
RowDefinitions="Auto,1*,Auto,Auto">
|
||||
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
<!--Station-->
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
|
||||
</StackLayout>
|
||||
<!--Title-->
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView Grid.Row="1"
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label Grid.Row="1"
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
</StackLayout>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
<!--Bike(s)-->
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
Grid.Row="1"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!-- Contact and Login at end of page-->
|
||||
<StackLayout
|
||||
Grid.Row="3"
|
||||
Orientation="Vertical">
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
<ListView
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
|
||||
<!--Login required-->
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
|
||||
</StackLayout>
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="2"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
||||
FontSize="Small"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
</Grid>
|
||||
<!-- Contact and Login at end of page-->
|
||||
<StackLayout
|
||||
Grid.Row="3"
|
||||
Orientation="Vertical">
|
||||
|
||||
</Frame>
|
||||
<!--Line-->
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Contact to operator-->
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
<!--Login required-->
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace TINK.View.BikesAtStation
|
|||
|
||||
// No need to create view model, set binding context an items source if already done.
|
||||
// If done twice tap events are fired multiple times (when hiding page using home button).
|
||||
await m_oViewModel.OnAppearing();
|
||||
await m_oViewModel.OnAppearingOrRefresh();
|
||||
isInitializationStarted = false;
|
||||
return;
|
||||
}
|
||||
|
@ -89,9 +89,6 @@ namespace TINK.View.BikesAtStation
|
|||
{
|
||||
var model = App.ModelRoot;
|
||||
|
||||
// Backup synchronization context when called from GUI-thread.
|
||||
var synchronizationContext = SynchronizationContext.Current;
|
||||
|
||||
m_oViewModel = new BikesAtStationPageViewModel(
|
||||
model.ActiveUser,
|
||||
App.PermissionsService,
|
||||
|
@ -104,7 +101,7 @@ namespace TINK.View.BikesAtStation
|
|||
model.LocksServices.Active,
|
||||
model.Polling,
|
||||
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url),
|
||||
(d, obj) => synchronizationContext.Post(d, obj),
|
||||
model.PostAction,
|
||||
model.SmartDevice,
|
||||
this)
|
||||
{
|
||||
|
@ -129,7 +126,7 @@ namespace TINK.View.BikesAtStation
|
|||
BindingContext = m_oViewModel;
|
||||
BikesAtStationListView.ItemsSource = m_oViewModel;
|
||||
|
||||
await m_oViewModel.OnAppearing();
|
||||
await m_oViewModel.OnAppearingOrRefresh();
|
||||
isInitializationStarted = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,44 +23,56 @@
|
|||
|
||||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
<StackLayout Grid.Row="0">
|
||||
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
<!--No Network Connection-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<Grid
|
||||
<Frame>
|
||||
|
||||
<Grid
|
||||
RowDefinitions="1*,32">
|
||||
|
||||
<!--Search bike-->
|
||||
<StackLayout Grid.Row="0">
|
||||
<Entry
|
||||
<!--Search bike-->
|
||||
<StackLayout>
|
||||
<Entry
|
||||
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
MaxLength="10"
|
||||
CursorPosition="0"
|
||||
Text="{Binding BikeIdUserInput}"/>
|
||||
|
||||
<Button
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"
|
||||
IsEnabled="{Binding IsSelectBikeEnabled}"
|
||||
IsVisible="{Binding IsSelectBikeVisible}"
|
||||
Command="{Binding OnSelectBikeRequest}"/>
|
||||
|
||||
<ListView
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
|
||||
<ListView
|
||||
x:Name="FindBikeListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
</StackLayout>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
||||
|
@ -68,9 +80,11 @@
|
|||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
</Frame>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace TINK.View.FindBike
|
|||
{
|
||||
// No need to create view model, set binding context an items source if already done.
|
||||
// If done twice tap events are fired multiple times (when hiding page using home button).
|
||||
await m_oViewModel.OnAppearing();
|
||||
await m_oViewModel.OnAppearingOrRefresh();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,6 @@ namespace TINK.View.FindBike
|
|||
{
|
||||
var model = App.ModelRoot;
|
||||
|
||||
// Backup synchronization context when called from GUI-thread.
|
||||
var synchronizationContext = SynchronizationContext.Current;
|
||||
|
||||
m_oViewModel = new FindBikePageViewModel(
|
||||
model.ActiveUser,
|
||||
App.PermissionsService,
|
||||
|
@ -56,7 +53,7 @@ namespace TINK.View.FindBike
|
|||
model.LocksServices.Active,
|
||||
model.Stations,
|
||||
model.Polling,
|
||||
(d, obj) => synchronizationContext.Post(d, obj),
|
||||
model.PostAction,
|
||||
model.SmartDevice,
|
||||
this,
|
||||
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url))
|
||||
|
@ -77,7 +74,7 @@ namespace TINK.View.FindBike
|
|||
BindingContext = m_oViewModel;
|
||||
FindBikeListView.ItemsSource = m_oViewModel;
|
||||
|
||||
await m_oViewModel.OnAppearing();
|
||||
await m_oViewModel.OnAppearingOrRefresh();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -20,14 +20,22 @@
|
|||
<ContentPage.Content>
|
||||
|
||||
<!--Grid for Map with Buttons and Running process-->
|
||||
<Grid
|
||||
<Grid>
|
||||
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
Grid.Row="0">
|
||||
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
RowDefinitions="3,46,1*,32"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
<!--Map-->
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
|
@ -35,14 +43,14 @@
|
|||
x:Name="MyMap"
|
||||
MyLocationEnabled="True"
|
||||
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
|
||||
<!--Buttons for choosing bike type-->
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
|
@ -50,11 +58,11 @@
|
|||
Padding="0"
|
||||
IsVisible="{Binding IsNavBarVisible}"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
|
@ -72,8 +80,8 @@
|
|||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
|
@ -91,12 +99,12 @@
|
|||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Text="{Binding StatusInfoText}"
|
||||
|
@ -106,11 +114,14 @@
|
|||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
IsVisible="{Binding IsProcessWithRunningProcessView}"
|
||||
Grid.RowSpan="4"
|
||||
Grid.ColumnSpan="3"/>
|
||||
Grid.Row="0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
|
|
@ -27,35 +27,47 @@
|
|||
<!--Grid for Bike(s) view and Running process in same row-->
|
||||
<Grid>
|
||||
|
||||
<Frame
|
||||
Grid.Row="0">
|
||||
<StackLayout Grid.Row="0">
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<Grid
|
||||
<!--No Network Connection-->
|
||||
<sharedGui:NotConnectedToNetView/>
|
||||
|
||||
<Frame>
|
||||
|
||||
<!--Bike(s) view-->
|
||||
<Grid
|
||||
RowDefinitions="1*,32">
|
||||
|
||||
<!--Bike(s)-->
|
||||
<ListView
|
||||
Grid.Row="0"
|
||||
<!--Bike(s)-->
|
||||
<StackLayout
|
||||
Spacing="0"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
Orientation="Vertical">
|
||||
|
||||
<!--Hint for Outdated Data.-->
|
||||
<sharedGui:HintForRefreshingPageView/>
|
||||
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"
|
||||
IsPullToRefreshEnabled="True"
|
||||
RefreshCommand="{Binding RefreshCommand}"
|
||||
IsRefreshing="{Binding IsRefreshing}"/>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
</StackLayout>
|
||||
|
||||
<!--No Bikes-->
|
||||
<Label
|
||||
Grid.Row="0"
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
<!--Info text-->
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Text="{Binding StatusInfoText}"
|
||||
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
|
||||
|
@ -63,9 +75,11 @@
|
|||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
</Frame>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
<!--While process is running-->
|
||||
<sharedGui:RunningProcessView
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Plugin.Connectivity;
|
||||
using Plugin.Connectivity;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -47,7 +47,7 @@ namespace TINK.View.MyBikes
|
|||
{
|
||||
// No need to create view model, set binding context an items source if already done.
|
||||
// If done twice tap events are fired multiple times (when hiding page using home button).
|
||||
await m_oViewModel.OnAppearing();
|
||||
await m_oViewModel.OnAppearingOrRefresh();
|
||||
isInitializationStarted = false;
|
||||
return;
|
||||
}
|
||||
|
@ -56,9 +56,6 @@ namespace TINK.View.MyBikes
|
|||
{
|
||||
var model = App.ModelRoot;
|
||||
|
||||
// Backup synchronization context when called from GUI-thread.
|
||||
var synchronizationContext = SynchronizationContext.Current;
|
||||
|
||||
m_oViewModel = new MyBikesPageViewModel(
|
||||
model.ActiveUser,
|
||||
App.PermissionsService,
|
||||
|
@ -70,7 +67,7 @@ namespace TINK.View.MyBikes
|
|||
model.LocksServices.Active,
|
||||
model.Stations,
|
||||
model.Polling,
|
||||
(d, obj) => synchronizationContext.Post(d, obj),
|
||||
model.PostAction,
|
||||
model.SmartDevice,
|
||||
this,
|
||||
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url))
|
||||
|
@ -91,7 +88,7 @@ namespace TINK.View.MyBikes
|
|||
BindingContext = m_oViewModel;
|
||||
MyBikesListView.ItemsSource = m_oViewModel;
|
||||
|
||||
await m_oViewModel.OnAppearing();
|
||||
await m_oViewModel.OnAppearingOrRefresh();
|
||||
isInitializationStarted = false;
|
||||
}
|
||||
|
||||
|
@ -183,4 +180,4 @@ namespace TINK.View.MyBikes
|
|||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery, co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue