mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
3.0.267 merged
This commit is contained in:
parent
b6fb6394db
commit
67999ef4ae
171 changed files with 6473 additions and 1093 deletions
|
@ -149,7 +149,7 @@ namespace TINK.View.Account
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -37,6 +37,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
@ -84,6 +85,12 @@
|
|||
IsVisible="{Binding TariffDescription.AboEuroPerMonth, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"/>
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding TariffDescription.OperatorAgb}"
|
||||
IsVisible="{Binding TariffDescription.OperatorAgb, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="5"
|
||||
Grid.ColumnSpan="3"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ContentView>
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
|
@ -96,6 +97,12 @@
|
|||
IsVisible="{Binding TariffDescription.AboEuroPerMonth, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"/>
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding TariffDescription.OperatorAgb}"
|
||||
IsVisible="{Binding TariffDescription.OperatorAgb, Converter={StaticResource Label_Converter}}"
|
||||
Grid.Row="5"
|
||||
Grid.ColumnSpan="3"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ContentView>
|
||||
|
|
|
@ -14,58 +14,73 @@
|
|||
<Frame>
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
<ListView
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Label
|
||||
<!-- Title bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<Label
|
||||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{Binding StationDetailText}"/>
|
||||
<BoxView
|
||||
HeightRequest="1"
|
||||
Color="{DynamicResource primary-back-title-color}"/>
|
||||
</StackLayout>
|
||||
<!-- Center stack layout -->
|
||||
<StackLayout
|
||||
Orientation="Vertical"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<ListView
|
||||
x:Name="BikesAtStationListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesAtStationVisible}"
|
||||
VerticalOptions="EndAndExpand"
|
||||
Text="{Binding NoBikesAtStationText}"/>
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label
|
||||
</StackLayout>
|
||||
<!-- Status bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<StackLayout
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
<ActivityIndicator.WidthRequest>
|
||||
<OnPlatform x:TypeArguments="x:Double" iOS="40" Android="40" WinPhone="40" />
|
||||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace TINK.View.BikesAtStation
|
|||
using System.Threading.Tasks;
|
||||
using TINK.Model.Device;
|
||||
#if USEFLYOUT
|
||||
using TINK.View.MasterDetail;
|
||||
using TINK.View.MasterDetail;
|
||||
#endif
|
||||
using TINK.ViewModel;
|
||||
using TINK.Model;
|
||||
|
@ -33,6 +33,9 @@ using TINK.View.MasterDetail;
|
|||
{
|
||||
|
||||
private BikesAtStationPageViewModel m_oViewModel;
|
||||
|
||||
/// <summary> Initialization status to ensure initialization logic is not called multiple times. </summary>
|
||||
private bool isInitializationStarted = false;
|
||||
#if TRYNOTBACKSTYLE
|
||||
public BikesAtStationPage()
|
||||
{
|
||||
|
@ -62,6 +65,10 @@ using TINK.View.MasterDetail;
|
|||
/// </summary>
|
||||
protected async override void OnAppearing()
|
||||
{
|
||||
// Don't repeat the initialization if it has been completed already.
|
||||
if (isInitializationStarted) return;
|
||||
isInitializationStarted = true;
|
||||
|
||||
if (m_oViewModel != null)
|
||||
{
|
||||
#if BACKSTYLE
|
||||
|
@ -167,7 +174,7 @@ using TINK.View.MasterDetail;
|
|||
/// <param name="cancel">Text of button.</param>
|
||||
/// <returns>True if user pressed accept.</returns>
|
||||
public new async Task<bool> DisplayAlert(string title, string message, string accept, string cancel)
|
||||
=> await App.Current.MainPage.DisplayAlert(title, message, accept, cancel);
|
||||
=> await App.Current.MainPage.DisplayAlert(title, message, accept, cancel);
|
||||
|
||||
/// <summary> Displays detailed alert message.</summary>
|
||||
/// <param name="title">Title of message.</param>
|
||||
|
@ -228,7 +235,10 @@ using TINK.View.MasterDetail;
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -88,7 +88,7 @@ namespace TINK.View.Contact
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
|
|
@ -114,7 +114,7 @@ namespace TINK.View.Contact
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
|
|
@ -12,11 +12,14 @@
|
|||
<Grid.RowDefinitions>
|
||||
<!-- Head and title row -->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--- Co2saving-->
|
||||
<RowDefinition Height="auto"/>
|
||||
<!--- checkbox and input elements-->
|
||||
<RowDefinition Height="*"/>
|
||||
<!--- ok button-->
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Head and title -->
|
||||
<Grid
|
||||
Padding="30"
|
||||
BackgroundColor="{DynamicResource primary-back-title-color}">
|
||||
|
@ -34,7 +37,16 @@
|
|||
</Image.Source>
|
||||
</Image>
|
||||
</Grid>
|
||||
<ScrollView Grid.Row="1">
|
||||
<!-- Co2saving -->
|
||||
<Frame
|
||||
x:Name="Co2SavingFrame"
|
||||
Grid.Row="1">
|
||||
<Label
|
||||
x:Name="Co2SavingLabel"
|
||||
Text=""/>
|
||||
</Frame>
|
||||
<!-- Checkbox and input elements -->
|
||||
<ScrollView Grid.Row="2">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
|
@ -77,8 +89,9 @@
|
|||
</StackLayout>
|
||||
</Grid>
|
||||
</ScrollView>
|
||||
<!-- Buttons -->
|
||||
<Button
|
||||
Grid.Row="2"
|
||||
Grid.Row="3"
|
||||
Clicked="OnOkClicked"
|
||||
Text="OK"/>
|
||||
</Grid>
|
||||
|
|
|
@ -7,9 +7,15 @@ namespace TINK.View
|
|||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FeedbackPopup : Popup<FeedbackPopup.Result>
|
||||
{
|
||||
public FeedbackPopup()
|
||||
/// <summary> Constructs user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
public FeedbackPopup(string co2Saving = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (string.IsNullOrEmpty(co2Saving))
|
||||
Co2SavingFrame.IsVisible = false;
|
||||
else
|
||||
Co2SavingLabel.Text = co2Saving;
|
||||
}
|
||||
|
||||
protected override FeedbackPopup.Result GetLightDismissResult()
|
||||
|
|
|
@ -138,7 +138,10 @@ namespace TINK.View.FindBike
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -122,7 +122,7 @@ namespace TINK.View.Info.BikeInfo
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -116,7 +116,7 @@ namespace TINK.View.Login
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@
|
|||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="TINK"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
TextColor ="{Binding TinkColor}"
|
||||
|
@ -33,7 +33,7 @@
|
|||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="Konrad"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
TextColor="{Binding KonradColor}"
|
||||
|
|
|
@ -21,6 +21,9 @@ namespace TINK.View.Map
|
|||
/// <summary> View model to notify about whether page appears or hides. </summary>
|
||||
private MapPageViewModel MapPageViewModel { get; set; }
|
||||
|
||||
/// <summary> Initialization status to ensure initialization logic is not called multiple times. </summary>
|
||||
private bool isInitializationStarted = false;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs map page instance.
|
||||
/// </summary>
|
||||
|
@ -117,7 +120,7 @@ namespace TINK.View.Map
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
@ -131,6 +134,10 @@ namespace TINK.View.Map
|
|||
/// </summary>
|
||||
protected async override void OnAppearing()
|
||||
{
|
||||
// Don't repeat the initialization if it has been completed already.
|
||||
if (isInitializationStarted) return;
|
||||
isInitializationStarted = true;
|
||||
|
||||
// Pass reference to member Navigation to show bikes at station x dialog.
|
||||
try
|
||||
{
|
||||
|
@ -139,18 +146,11 @@ namespace TINK.View.Map
|
|||
#if TRYNOTBACKSTYLE
|
||||
MapPageViewModel = new MapPageViewModel();
|
||||
#else
|
||||
MapPageViewModel = new MapPageViewModel(
|
||||
App.ModelRoot,
|
||||
App.PermissionsService,
|
||||
App.BluetoothService,
|
||||
App.GeolocationServicesContainer.Active,
|
||||
(mapspan) => MyMap.MoveToRegion(mapspan),
|
||||
this,
|
||||
Navigation);
|
||||
MapPageViewModel = CreateMapPageViewModel();
|
||||
#endif
|
||||
} catch (Exception exception)
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
Log.ForContext<MapPage>().Error("Constructing map page view model failed. {Exception}", exception);
|
||||
return;
|
||||
}
|
||||
|
@ -171,15 +171,7 @@ namespace TINK.View.Map
|
|||
|
||||
try
|
||||
{
|
||||
if (Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
TINKButton.BackgroundColor = Color.LightGray;
|
||||
TINKButton.BorderColor = Color.Black;
|
||||
TINKButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
KonradButton.BackgroundColor = Color.LightGray;
|
||||
KonradButton.BorderColor = Color.Black;
|
||||
KonradButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
}
|
||||
ApplyCustomiOSStyling();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
@ -201,13 +193,9 @@ namespace TINK.View.Map
|
|||
try
|
||||
{
|
||||
// Pre move and scanle maps to avoid initial display of map in Rome.
|
||||
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
|
||||
MapPageViewModel.MoveAndScale(
|
||||
(mapSpan) => MyMap.MoveToRegion(mapSpan),
|
||||
App.ModelRoot.Uris.ActiveUri,
|
||||
App.ModelRoot.GroupFilterMapPage);
|
||||
PremoveAndScaleMap();
|
||||
}
|
||||
catch(Exception exception)
|
||||
catch (Exception exception)
|
||||
{
|
||||
// Continue because a map not beeing moved/ scaled is no reason for aborting startup.
|
||||
Log.ForContext<MapPage>().Error("Moving and scaling map failed. {Exception}", exception);
|
||||
|
@ -225,6 +213,49 @@ namespace TINK.View.Map
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Premoves the Map to a certain location.
|
||||
/// </summary>
|
||||
private void PremoveAndScaleMap()
|
||||
{
|
||||
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
|
||||
MapPageViewModel.MoveAndScale(
|
||||
(mapSpan) => MyMap.MoveToRegion(mapSpan),
|
||||
App.ModelRoot.ActiveMapSpan);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the Map Page's view model.
|
||||
/// </summary>
|
||||
private MapPageViewModel CreateMapPageViewModel()
|
||||
{
|
||||
Log.ForContext<MapPage>().Verbose("Constructing map page view model.");
|
||||
return new MapPageViewModel(
|
||||
App.ModelRoot,
|
||||
App.PermissionsService,
|
||||
App.BluetoothService,
|
||||
App.GeolocationServicesContainer.Active,
|
||||
(mapspan) => MyMap.MoveToRegion(mapspan),
|
||||
this,
|
||||
Navigation);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies iOS specific styling to branded Buttons.
|
||||
/// </summary>
|
||||
private void ApplyCustomiOSStyling()
|
||||
{
|
||||
if (Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
TINKButton.BackgroundColor = Color.LightGray;
|
||||
TINKButton.BorderColor = Color.Black;
|
||||
TINKButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
KonradButton.BackgroundColor = Color.LightGray;
|
||||
KonradButton.BorderColor = Color.Black;
|
||||
KonradButton.Margin = new Thickness(10, 10, 10, 10);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when pages is closed/ hidden.
|
||||
/// Stops update process.
|
||||
|
|
|
@ -89,7 +89,10 @@ namespace TINK.View.MiniSurvey
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -12,38 +12,43 @@
|
|||
</ContentPage.Resources>
|
||||
<ContentPage.Content>
|
||||
<Frame>
|
||||
<StackLayout>
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<StackLayout
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<!-- Center stack layout -->
|
||||
<StackLayout
|
||||
VerticalOptions="CenterAndExpand"
|
||||
Orientation="Vertical">
|
||||
<ListView
|
||||
x:Name="MyBikesListView"
|
||||
SelectionMode="None"
|
||||
SelectedItem="{Binding SelectedBike}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
IsVisible="{Binding IsBikesListVisible}"
|
||||
HasUnevenRows="True"
|
||||
ItemTemplate="{StaticResource bikeTemplateSelector}"/>
|
||||
<Label
|
||||
IsVisible="{Binding IsNoBikesOccupiedVisible}"
|
||||
VerticalOptions="StartAndExpand"
|
||||
Text="{Binding NoBikesOccupiedText}"/>
|
||||
</StackLayout>
|
||||
<!-- Status bar stack layout-->
|
||||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
VerticalOptions="CenterAndExpand"
|
||||
HorizontalOptions="End">
|
||||
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"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
|
|
|
@ -20,6 +20,9 @@ namespace TINK.View.MyBikes
|
|||
/// <summary> Refernce to view model. </summary>
|
||||
MyBikesPageViewModel m_oViewModel = null;
|
||||
|
||||
/// <summary> Initialization status to ensure initialization logic is not called multiple times. </summary>
|
||||
private bool isInitializationStarted = false;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a my bikes page.
|
||||
/// </summary>
|
||||
|
@ -33,6 +36,10 @@ namespace TINK.View.MyBikes
|
|||
/// </summary>
|
||||
protected async override void OnAppearing()
|
||||
{
|
||||
// Don't repeat the initialization if it has been completed already.
|
||||
if (isInitializationStarted) return;
|
||||
isInitializationStarted = true;
|
||||
|
||||
if (m_oViewModel != null)
|
||||
{
|
||||
// No need to create view model, set binding context an items source if already done.
|
||||
|
@ -163,7 +170,10 @@ namespace TINK.View.MyBikes
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -146,7 +146,10 @@ namespace TINK.View.Settings
|
|||
#if USCSHARP9
|
||||
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
#else
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
|
||||
/// <summary> Displays user feedback popup.</summary>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
/// <returns>User feedback.</returns>
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
|
||||
#endif
|
||||
|
||||
#if USERFEEDBACKDLG_TRYOUT
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace TINK.View.WhatsNew.Agb
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -79,7 +79,7 @@ namespace TINK.View.WhatsNew
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue