mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 13:57:28 +02:00
Version 3.0.337
This commit is contained in:
parent
fd0e63cf10
commit
573fe77e12
2336 changed files with 33688 additions and 86082 deletions
|
@ -5,8 +5,13 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
mc:Ignorable="d"
|
||||
x:Class="TINK.View.Account.AccountPage"
|
||||
Title="{x:Static resources:AppResources.MarkingAccount}">
|
||||
x:Class="TINK.View.Account.AccountPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingAccount}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Content>
|
||||
<Frame>
|
||||
<StackLayout>
|
||||
|
@ -18,9 +23,16 @@
|
|||
<Button Text="{x:Static resources:AppResources.MessageAccountPageManagePersonalData}"
|
||||
Command="{Binding OnManageAccount}"
|
||||
IsEnabled="{Binding IsLogoutPossible}"/>
|
||||
<Button Text="{x:Static resources:AppResources.MessageAccountPageManageLogout}"
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.MessageAccountPageManageLogout}"
|
||||
Command="{Binding OnLogoutRequest}"
|
||||
IsEnabled="{Binding IsLogoutPossible}"/>
|
||||
<!--Possible SecondaryButton Style-->
|
||||
<!--<Button
|
||||
Style="{StaticResource SecondaryButton}"
|
||||
Text="{x:Static resources:AppResources.MessageAccountPageManageLogout}"
|
||||
Command="{Binding OnLogoutRequest}"
|
||||
IsEnabled="{Binding IsLogoutPossible}"/>-->
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</StackLayout>
|
||||
|
|
|
@ -8,6 +8,7 @@ using TINK.View.MasterDetail;
|
|||
using System;
|
||||
using TINK.Model.Device;
|
||||
using TINK.ViewModel.Account;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
|
||||
namespace TINK.View.Account
|
||||
{
|
||||
|
@ -149,7 +150,7 @@ namespace TINK.View.Account
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@
|
|||
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
mc:Ignorable="d"
|
||||
x:Class="TINK.View.Bike.ILockItBike">
|
||||
<ContentView>
|
||||
|
@ -25,6 +26,15 @@
|
|||
HorizontalTextAlignment="Center"
|
||||
IsVisible="{Binding DisplayId, Converter={StaticResource Label_Converter}}"
|
||||
Text="{Binding DisplayId}"/>
|
||||
<!-- Battery level -->
|
||||
<!--<sharedGui:BarLevelView
|
||||
Current="{Binding CurrentChargeBars}"
|
||||
Maximum="{Binding MaxChargeBars}"
|
||||
IsVisible="{Binding IsBatteryChargeVisible}"/>-->
|
||||
<sharedGui:BarLevelView
|
||||
Current="{Binding CurrentChargeBars}"
|
||||
Maximum="{Binding MaxChargeBars}"
|
||||
IsVisible="False"/>
|
||||
<!-- Rental state -->
|
||||
<Label
|
||||
Text="{Binding StateText}"
|
||||
|
@ -33,16 +43,30 @@
|
|||
Text="{Binding ErrorText}"
|
||||
IsVisible="{Binding ErrorText, Converter={StaticResource Label_Converter}}"
|
||||
TextColor="Red"/>
|
||||
<!-- Button for Reserve / End Reservation / Open / Close & End -->
|
||||
<Button
|
||||
Text="{Binding ButtonText}"
|
||||
IsVisible="{Binding IsButtonVisible}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
Command="{Binding OnButtonClicked}"/>
|
||||
<!-- Button for Find Lock / Open & Rent / Close -->
|
||||
<Button
|
||||
Text="{Binding LockitButtonText}"
|
||||
IsVisible="{Binding IsLockitButtonVisible}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
Command="{Binding OnLockitButtonClicked}"/>
|
||||
<!--Possible SecondaryButton Style-->
|
||||
<!--<Button
|
||||
Style="{StaticResource SecondaryButton}"
|
||||
Text="{Binding LockitButtonText}"
|
||||
IsVisible="{Binding IsLockitButtonVisible}"
|
||||
IsEnabled="{Binding IsIdle}"
|
||||
Command="{Binding OnLockitButtonClicked}"/>-->
|
||||
<!-- Copri Lock Label -->
|
||||
<Label
|
||||
Text="{x:Static resources:AppResources.StatusTextCopriLock}"
|
||||
FontSize="Small"
|
||||
IsVisible="{Binding IsBikeWithCopriLock}"/>
|
||||
<!-- Rental description (tarif name, options and rental info -->
|
||||
<Grid
|
||||
RowSpacing="0"
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.Bike.BluetoothLock;
|
||||
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
|
|
|
@ -3,8 +3,13 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
Title="{Binding Title}">
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{Binding Title}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
|
@ -63,7 +68,34 @@
|
|||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
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="#009BDB" iOS="#009BDB" WinPhone="#009BDB" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
<!-- Possible New Design -->
|
||||
<!--<StackLayout
|
||||
Orientation="Vertical">
|
||||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="24"
|
||||
FontSize="Small"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
|
@ -77,11 +109,28 @@
|
|||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
Android="#009BDB" iOS="#009BDB" WinPhone="#009BDB" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
<BoxView HeightRequest="1" Color="{DynamicResource primary-back-title-color}"/>
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding ContactSupportHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding ContactSupportClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
<Label
|
||||
IsVisible="{Binding IsLoginRequiredHintVisible}"
|
||||
TextType="Html"
|
||||
Text="{Binding LoginRequiredHintText}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding LoginRequiredHintClickedCommand}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
</StackLayout>-->
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
using TINK.Model.Bike.BluetoothLock;
|
||||
|
||||
namespace TINK.View.BikesAtStation
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ namespace TINK.View.BikesAtStation
|
|||
using TINK.ViewModel.BikesAtStation;
|
||||
using TINK.ViewModel.Bikes;
|
||||
using Xamarin.CommunityToolkit.Extensions;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
#if USEFLYOUT
|
||||
|
@ -241,7 +242,7 @@ namespace TINK.View.BikesAtStation
|
|||
/// <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));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery, co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -3,8 +3,13 @@
|
|||
xmlns:conv="clr-namespace:TINK.View"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Contact.ContactPage"
|
||||
Title="{x:Static resources:AppResources.MarkingFeedbackAndContact}">
|
||||
x:Class="TINK.View.Contact.ContactPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingContactPageTitle}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<conv:BoolInverterConverter x:Key="BoolInvert_Converter"/>
|
||||
|
@ -36,7 +41,7 @@
|
|||
HorizontalOptions="Center"
|
||||
FontAttributes="Bold"
|
||||
Text="{Binding ProviderNameText}"/>
|
||||
<!--- Mail address -->
|
||||
<!--- Mail to operator -->
|
||||
<Label
|
||||
IsVisible="{Binding MailAddressText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
FormattedText="{Binding MailAddressAndMotivationsText}"/>
|
||||
|
@ -46,23 +51,45 @@
|
|||
Text="{Binding MailAddressText}"
|
||||
IsEnabled="{Binding IsSendMailAvailable}"
|
||||
Command="{Binding OnMailRequest}"/>
|
||||
<!--- Mail address -->
|
||||
<!--- Phone -->
|
||||
<Label
|
||||
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
FormattedText="{Binding PhoneContactText}"/>
|
||||
<Button
|
||||
<Button
|
||||
x:Name="PhoneNumberButton"
|
||||
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
Text="{Binding PhoneNumberText}"
|
||||
IsEnabled="{Binding IsDoPhoncallAvailable}"
|
||||
Command="{Binding OnPhoneRequest}"/>
|
||||
<!--Possible SecondaryButton Style-->
|
||||
<!--<Button
|
||||
Style="{StaticResource SecondaryButton}"
|
||||
x:Name="PhoneNumberButton"
|
||||
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
Text="{Binding PhoneNumberText}"
|
||||
IsEnabled="{Binding IsDoPhoncallAvailable}"
|
||||
Command="{Binding OnPhoneRequest}"/>-->
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
<Frame>
|
||||
<StackLayout>
|
||||
<Label FormattedText="{Binding LikeTinkApp}"/>
|
||||
<Button Text="{x:Static resources:AppResources.ActionContactRate}"
|
||||
Command="{Binding OnRateRequest}"/>
|
||||
<!--- Mail to app- releated support -->
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.ActionContactMailAppReleated}"
|
||||
IsEnabled="{Binding IsSendMailAvailable}"
|
||||
Command="{Binding OnMailAppRelatedRequest}"/>
|
||||
<!--- Link to App Store -->
|
||||
<Label
|
||||
Margin="0,10,0,0"
|
||||
TextType="Html"
|
||||
HorizontalOptions="Center"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{x:Static resources:AppResources.ActionContactRate}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OnRateRequest}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</StackLayout>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using Serilog;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.Model.Device;
|
||||
#if USEFLYOUT
|
||||
using TINK.View.MasterDetail;
|
||||
|
@ -118,7 +119,7 @@ namespace TINK.View.Contact
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
|
|
@ -4,8 +4,13 @@
|
|||
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"
|
||||
Title="{x:Static resources:AppResources.MarkingSelectStationPage}">
|
||||
x:Class="TINK.View.Contact.SelectStationPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingSelectStationPage}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Content>
|
||||
<StackLayout>
|
||||
<Grid
|
||||
|
@ -26,8 +31,9 @@
|
|||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
HeightRequest="24"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
|
@ -40,7 +46,7 @@
|
|||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
Android="#009BDB" iOS="#009BDB" WinPhone="#009BDB" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace TINK.View.Contact
|
|||
{
|
||||
using Serilog;
|
||||
using TINK.Model;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.ViewModel.Contact;
|
||||
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
|
@ -115,7 +116,7 @@ namespace TINK.View.Contact
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.CopriWebView.ManageAccountPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MessageAccountPageManagePersonalData}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<!-- Cross as BackButton -->
|
||||
<!--<Shell.BackButtonBehavior>
|
||||
<BackButtonBehavior IconOverride="{FontImage FontFamily=FA-S, Glyph={StaticResource IconClose}, Color=White, Size=16}" />
|
||||
</Shell.BackButtonBehavior>-->
|
||||
<ContentPage.Content>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Serilog;
|
||||
using System.Globalization;
|
||||
using Serilog;
|
||||
using TINK.Model.Device;
|
||||
using TINK.ViewModel.Login;
|
||||
using Xamarin.Forms;
|
||||
|
@ -51,6 +52,7 @@ namespace TINK.View.CopriWebView
|
|||
ManageAccount.BindingContext = new ManageAccountViewModel(
|
||||
App.ModelRoot.ActiveUser.SessionCookie,
|
||||
Model.TinkApp.MerchantId,
|
||||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
|
||||
App.ModelRoot.NextActiveUri.Host);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.CopriWebView.PasswordForgottenPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.ActionLoginPasswordForgotten}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<!-- Cross as BackButton -->
|
||||
<!--<Shell.BackButtonBehavior>
|
||||
<BackButtonBehavior IconOverride="{FontImage FontFamily=FA-S, Glyph={StaticResource IconClose}, Color=White, Size=16}" />
|
||||
</Shell.BackButtonBehavior>-->
|
||||
<ContentPage.Content>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
using System.Globalization;
|
||||
using Serilog;
|
||||
using TINK.ViewModel.CopriWebView;
|
||||
using Xamarin.Forms;
|
||||
|
@ -43,6 +44,7 @@ namespace TINK.View.CopriWebView
|
|||
|
||||
PasswordForgottenWebView.BindingContext = new PasswordForgottonViewModel(
|
||||
Model.TinkApp.MerchantId,
|
||||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
|
||||
App.ModelRoot.NextActiveUri.Host);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.CopriWebView.RegisterPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.ActionLoginRegister}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<!-- Cross as BackButton -->
|
||||
<!--<Shell.BackButtonBehavior>
|
||||
<BackButtonBehavior IconOverride="{FontImage FontFamily=FA-S, Glyph={StaticResource IconClose}, Color=White, Size=16}" />
|
||||
</Shell.BackButtonBehavior>-->
|
||||
<ContentPage.Content>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
using System.Globalization;
|
||||
using Serilog;
|
||||
using TINK.Model.Device;
|
||||
using TINK.ViewModel.CopriWebView;
|
||||
|
@ -46,6 +47,7 @@ namespace TINK.View.CopriWebView
|
|||
|
||||
RegisterView.BindingContext = new RegisterPageViewModel(
|
||||
Model.TinkApp.MerchantId,
|
||||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
|
||||
App.ModelRoot.NextActiveUri.Host);
|
||||
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
|
||||
xmlns:local="clr-namespace:TINK.View"
|
||||
x:TypeArguments="local:FeedbackPopup+Result"
|
||||
x:Class="TINK.View.FeedbackPopup">
|
||||
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.FeedbackPopup">
|
||||
<xct:Popup.Resources>
|
||||
<x:String x:Key="check_circle"></x:String>
|
||||
</xct:Popup.Resources>
|
||||
|
@ -19,25 +21,28 @@
|
|||
<!--- ok button-->
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Head and title -->
|
||||
<Grid
|
||||
|
||||
<!-- Head and title - Grid.Row 0 -->
|
||||
<Grid Grid.Row="0"
|
||||
Padding="30"
|
||||
BackgroundColor="{DynamicResource primary-back-title-color}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label
|
||||
<Label Grid.Row="0"
|
||||
HorizontalTextAlignment="Center"
|
||||
FontSize="Large"
|
||||
Text="Fahrrad erfolgreich zurückgegeben!"/>
|
||||
TextColor="White"
|
||||
Text="{x:Static resources:AppResources.MarkingReturnBikeMainMessage}"/>
|
||||
<Image Grid.Row="1">
|
||||
<Image.Source>
|
||||
<FontImageSource Size="Header" Glyph="{StaticResource check_circle}" FontFamily="FA-S"/>
|
||||
<FontImageSource Size="Title" Glyph="{StaticResource check_circle}" FontFamily="FA-S"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
</Grid>
|
||||
<!-- Co2saving -->
|
||||
|
||||
<!-- Co2saving - Grid.Row 1 -->
|
||||
<Frame
|
||||
x:Name="Co2SavingFrame"
|
||||
Grid.Row="1">
|
||||
|
@ -45,54 +50,65 @@
|
|||
x:Name="Co2SavingLabel"
|
||||
Text=""/>
|
||||
</Frame>
|
||||
<!-- Checkbox and input elements -->
|
||||
|
||||
<!-- Checkbox and input elements - Grid.Row 2-->
|
||||
<ScrollView Grid.Row="2">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<!--- Battery charge level -->
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!--- Bike is ok GUI -->
|
||||
<RowDefinition Height="Auto"/>
|
||||
<!--- Feedback edit GUI -->
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<StackLayout
|
||||
Orientation="Vertical">
|
||||
<Grid>
|
||||
<!-- Battery level -->
|
||||
<sharedGui:BarLevelInputView Grid.Row="0"
|
||||
x:Name="BarLevelInputView"
|
||||
HorizontalOptions="Center"
|
||||
IsVisible="False"/>
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox x:Name="brockenCheckBox" IsChecked="True"/>
|
||||
<!-- Checkbox Is Broken -->
|
||||
<CheckBox x:Name="brockenCheckBox" IsChecked="True" Grid.Column="0"/>
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
FontSize="Medium"
|
||||
Text="Rad ist in Ordnung"/>
|
||||
Text= "{x:Static resources:AppResources.MarkingReturnBikeBikeStateIsOK}"/>
|
||||
</Grid>
|
||||
<Editor
|
||||
Grid.Row="1"
|
||||
Grid.Row="2"
|
||||
x:Name="feedbackMessage"
|
||||
AutoSize="TextChanges"
|
||||
Placeholder="Bei Bedarf bitte hier Rückmeldung eingeben."
|
||||
Placeholder="{x:Static resources:AppResources.MarkingReturnBikeFeedbackInputPlaceholder}"
|
||||
Text="">
|
||||
<Editor.Triggers>
|
||||
<DataTrigger TargetType="Editor"
|
||||
Binding="{Binding Source={x:Reference brockenCheckBox}, Path=IsChecked}"
|
||||
Value="true">
|
||||
<Setter Property="Placeholder"
|
||||
Value="Bei Bedarf bitte hier Rückmeldung eingeben." />
|
||||
Value="{x:Static resources:AppResources.MarkingReturnBikeFeedbackInputPlaceholder}" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="Editor"
|
||||
Binding="{Binding Source={x:Reference brockenCheckBox}, Path=IsChecked}"
|
||||
Value="false">
|
||||
<Setter Property="Placeholder"
|
||||
Value="Bitte Zustand/ Defekt hier beschreiben." />
|
||||
Value="{x:Static resources:AppResources.MarkingReturnBikeErrorDescriptionInputPlaceholder}" />
|
||||
</DataTrigger>
|
||||
</Editor.Triggers>
|
||||
</Editor>
|
||||
</StackLayout>
|
||||
</Grid>
|
||||
</ScrollView>
|
||||
<!-- Buttons -->
|
||||
|
||||
<!-- Buttons - Grid.Row 3 -->
|
||||
<Button
|
||||
Grid.Row="3"
|
||||
WidthRequest="100"
|
||||
Clicked="OnOkClicked"
|
||||
Text="OK"/>
|
||||
Text="OK"
|
||||
Margin="0,0,0,3"/>
|
||||
</Grid>
|
||||
</xct:Popup>
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using Xamarin.CommunityToolkit.UI.Views;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
|
@ -8,22 +9,41 @@ namespace TINK.View
|
|||
public partial class FeedbackPopup : Popup<FeedbackPopup.Result>
|
||||
{
|
||||
/// <summary> Constructs user feedback popup.</summary>
|
||||
/// <param name="battery">Object holding info about battery. For some batteries charging level might need to be updated by user.</param>
|
||||
/// <param name="co2Saving"> Co2 saving information.</param>
|
||||
public FeedbackPopup(string co2Saving = null)
|
||||
public FeedbackPopup(
|
||||
IBattery battery = null,
|
||||
string co2Saving = null)
|
||||
{
|
||||
InitializeComponent();
|
||||
if (string.IsNullOrEmpty(co2Saving))
|
||||
Co2SavingFrame.IsVisible = false;
|
||||
else
|
||||
Co2SavingLabel.Text = co2Saving;
|
||||
|
||||
if (battery == null
|
||||
|| (battery.IsBackendAccessible.HasValue && battery.IsBackendAccessible.Value))
|
||||
{
|
||||
// Either
|
||||
// - bike has no engine or
|
||||
// - backend can access battery level information
|
||||
// No need to ask user for input.
|
||||
return;
|
||||
}
|
||||
|
||||
BarLevelInputView.IsVisible = battery?.MaxChargeBars != null;
|
||||
BarLevelInputView.Current = battery?.CurrentChargeBars?.ToString() ?? string.Empty;
|
||||
BarLevelInputView.Maximum = battery?.MaxChargeBars != null ? battery?.MaxChargeBars.ToString() : String.Empty;
|
||||
|
||||
}
|
||||
|
||||
protected override FeedbackPopup.Result GetLightDismissResult()
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
Message = feedbackMessage.Text,
|
||||
IsBikeBroken = brockenCheckBox.IsChecked
|
||||
CurrentChargeBars = int.TryParse(BarLevelInputView.Current, out int current) ? (int?)current : null,
|
||||
IsBikeBroken = brockenCheckBox.IsChecked,
|
||||
Message = feedbackMessage.Text
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -31,8 +51,9 @@ namespace TINK.View
|
|||
{
|
||||
var result = new Result
|
||||
{
|
||||
Message = feedbackMessage.Text,
|
||||
IsBikeBroken = brockenCheckBox.IsChecked
|
||||
CurrentChargeBars = int.TryParse(BarLevelInputView.Current, out int current) ? (int?)current : null,
|
||||
IsBikeBroken = brockenCheckBox.IsChecked,
|
||||
Message = feedbackMessage.Text
|
||||
};
|
||||
|
||||
Dismiss(result);
|
||||
|
@ -47,6 +68,11 @@ namespace TINK.View
|
|||
public new class Result : IUserFeedback
|
||||
#endif
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds the current chargeing level of the battery entered by user in bars, null if unkonwn.
|
||||
/// </summary>
|
||||
public int? CurrentChargeBars { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds whether bike is broken or not.
|
||||
/// </summary>
|
||||
|
|
|
@ -2,8 +2,13 @@
|
|||
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Contact.FeesAndBikesPage"
|
||||
Title="{x:Static resources:AppResources.MarkingFeesAndBikes}">
|
||||
x:Class="TINK.View.Contact.FeesAndBikesPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingFeesAndBikes}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<!--Pages can be added as references or inline-->
|
||||
<ContentPage Title="{x:Static resources:AppResources.MarkingTabFees}">
|
||||
<ContentPage.Content>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using TINK.ViewModel;
|
||||
using TINK.ViewModel.Contact;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
using TINK.ViewModel.Contact;
|
||||
|
||||
namespace TINK.View.Contact
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ namespace TINK.View.Contact
|
|||
{
|
||||
public FeesAndBikesPageViewModel ViewModel { get; }
|
||||
|
||||
public FeesAndBikesPage ()
|
||||
public FeesAndBikesPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
@ -26,7 +26,7 @@ namespace TINK.View.Contact
|
|||
InfoRentBikeWebView.Navigating += ViewModelHelper.OnNavigating;
|
||||
|
||||
/// Info about types of bikes.
|
||||
InfoTypesOfBikesWebView.Navigating += ViewModelHelper.OnNavigating;
|
||||
InfoTypesOfBikesWebView.Navigating += ViewModelHelper.OnNavigating;
|
||||
}
|
||||
|
||||
/// <summary> Called when page is shown. </summary>
|
||||
|
|
|
@ -3,8 +3,13 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.FindBike.FindBikePage"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
||||
Title="{x:Static resources:AppResources.MarkingFindBike}">
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingFindBike}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
|
@ -38,8 +43,9 @@
|
|||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
HeightRequest="24"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
|
@ -52,7 +58,7 @@
|
|||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
Android="#009BDB" iOS="#009BDB" WinPhone="#009BDB" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
using Serilog;
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Serilog;
|
||||
using TINK.Model;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.Model.Device;
|
||||
using TINK.ViewModel.FindBike;
|
||||
using Xamarin.CommunityToolkit.Extensions;
|
||||
|
@ -11,13 +12,13 @@ using Xamarin.Forms.Xaml;
|
|||
|
||||
namespace TINK.View.FindBike
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FindBikePage : ContentPage, IViewService
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FindBikePage : ContentPage, IViewService
|
||||
{
|
||||
/// <summary> Refernce to view model. </summary>
|
||||
FindBikePageViewModel m_oViewModel = null;
|
||||
|
||||
public FindBikePage () { }
|
||||
public FindBikePage() { }
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when page is shown.
|
||||
|
@ -145,7 +146,7 @@ namespace TINK.View.FindBike
|
|||
/// <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));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery, co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
#if USEFLYOUT
|
||||
using TINK.View.MasterDetail;
|
||||
#endif
|
||||
|
@ -17,9 +18,9 @@ namespace TINK.View.Info.BikeInfo
|
|||
public partial class BikeInfoCarouselPage : CarouselPage, IViewService
|
||||
#endif
|
||||
{
|
||||
public BikeInfoCarouselPage ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
public BikeInfoCarouselPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ItemsSource = new BikeInfoViewModel(
|
||||
resourceName => ImageSource.FromResource($"{ViewModelResourceHelper.RessourcePrefix}Images.{resourceName}"),
|
||||
|
@ -122,7 +123,7 @@ namespace TINK.View.Info.BikeInfo
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -3,8 +3,13 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Info.InfoPage"
|
||||
x:Name="TabbedInfoPage"
|
||||
Title="{x:Static resources:AppResources.MarkingAbout}">
|
||||
x:Name="TabbedInfoPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingAbout}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<!--Pages can be added as references or inline-->
|
||||
<ContentPage Title="App">
|
||||
<ContentPage.Content>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using TINK.ViewModel;
|
||||
using System.Globalization;
|
||||
using TINK.ViewModel;
|
||||
using TINK.ViewModel.Info;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
@ -20,6 +21,7 @@ namespace TINK.View.Info
|
|||
App.ModelRoot.ResourceUrls.PrivacyResourcePath,
|
||||
App.ModelRoot.ResourceUrls.ImpressResourcePath,
|
||||
App.ModelRoot.IsSiteCachingOn,
|
||||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
|
||||
resourceName => ViewModelResourceHelper.GetSource(resourceName));
|
||||
TabbedInfoPage.BindingContext = ViewModel;
|
||||
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Login.LoginPage"
|
||||
Title="{x:Static resources:AppResources.MarkingLogin}">
|
||||
x:Class="TINK.View.Login.LoginPage">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingLogin}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
|
||||
<ScrollView>
|
||||
<Frame>
|
||||
<StackLayout x:Name="LoginPageView">
|
||||
|
@ -51,4 +57,103 @@
|
|||
</StackLayout>
|
||||
</Frame>
|
||||
</ScrollView>
|
||||
|
||||
<!-- Possible New Design -->
|
||||
<!--<ScrollView>
|
||||
<Frame>
|
||||
<StackLayout x:Name="LoginPageView">
|
||||
<Frame>
|
||||
<StackLayout>
|
||||
<Label Text="{x:Static resources:AppResources.MarkingLoginEmailAddressLabel}"
|
||||
Margin="0,0,0,-10">
|
||||
<Label.Triggers>
|
||||
<DataTrigger
|
||||
TargetType="Label"
|
||||
Binding="{Binding Source={x:Reference EMailEntry}, Path=Text, TargetNullValue=''}"
|
||||
Value="">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Entry
|
||||
Placeholder="{x:Static resources:AppResources.MarkingLoginEmailAddressPlaceholder}"
|
||||
Keyboard="Email"
|
||||
AutomationId="mail_address_text"
|
||||
x:Name="EMailEntry"
|
||||
Text="{Binding MailAddress}"
|
||||
IsEnabled="{Binding IsLoggedOut}"/>
|
||||
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
|
||||
Margin="0,0,0,-10">
|
||||
<Label.Triggers>
|
||||
<DataTrigger
|
||||
TargetType="Label"
|
||||
Binding="{Binding Source={x:Reference PasswordEntry}, Path=Text, TargetNullValue=''}"
|
||||
Value="">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Entry Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
|
||||
AutomationId="password_text"
|
||||
IsPassword="true"
|
||||
x:Name="PasswordEntry"
|
||||
Text="{Binding Password}"
|
||||
IsEnabled="{Binding IsLoggedOut}"/>
|
||||
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"
|
||||
HorizontalOptions="End"
|
||||
Margin="0,-10,0,5"
|
||||
FontSize="Small">
|
||||
<Label.Triggers>
|
||||
<DataTrigger
|
||||
TargetType="Label"
|
||||
Binding="{Binding Source={x:Reference PasswordEntry}, Path=Text, TargetNullValue=''}"
|
||||
Value="">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.ActionLoginLogin}"
|
||||
AutomationId="login_button"
|
||||
Command="{Binding OnLoginRequest}"
|
||||
IsEnabled="{Binding IsLoginRequestAllowed}">
|
||||
</Button>
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.ActionLoginRegister}"
|
||||
AutomationId="register_button"
|
||||
Command="{Binding OnRegisterRequest}"
|
||||
IsVisible="{Binding IsWebViewElementsVisible}">
|
||||
</Button>
|
||||
<Button
|
||||
Style="{StaticResource SecondaryButton}"
|
||||
Text="{x:Static resources:AppResources.ActionLoginRegister}"
|
||||
AutomationId="register_button"
|
||||
Command="{Binding OnRegisterRequest}"
|
||||
IsVisible="{Binding IsWebViewElementsVisible}">
|
||||
</Button>
|
||||
<Label
|
||||
IsVisible="{Binding IsRegisterTargetsInfoVisible}"
|
||||
FormattedText="{Binding RegisterTargetsInfo}">
|
||||
</Label>
|
||||
<Button
|
||||
Text="{x:Static resources:AppResources.ActionLoginPasswordForgotten}"
|
||||
AutomationId="password_forgotten_button"
|
||||
Command="{Binding OnPasswordForgottonRequest}">
|
||||
</Button>
|
||||
<Label
|
||||
Margin="0,10,0,0"
|
||||
TextType="Html"
|
||||
AutomationId="password_forgotten_button"
|
||||
HorizontalOptions="Center"
|
||||
TextColor="{DynamicResource primary-back-title-color}"
|
||||
Text="{x:Static resources:AppResources.ActionLoginPasswordForgotten}">
|
||||
<Label.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding OnPasswordForgottonRequest}"/>
|
||||
</Label.GestureRecognizers>
|
||||
</Label>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</ScrollView>-->
|
||||
</ContentPage>
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.Model.Device;
|
||||
#if USEFLYOUT
|
||||
using TINK.View.MasterDetail;
|
||||
|
@ -17,15 +18,15 @@ namespace TINK.View.Login
|
|||
public partial class LoginPage : ContentPage, IViewService
|
||||
#endif
|
||||
{
|
||||
public LoginPage ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
public LoginPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var l_oModel = App.ModelRoot;
|
||||
#if !BACKSTYLE
|
||||
var l_oViewModel = new LoginPageViewModel(
|
||||
l_oModel,
|
||||
(url) => DependencyService.Get< IExternalBrowserService>().OpenUrl(url),
|
||||
l_oModel,
|
||||
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url),
|
||||
this);
|
||||
|
||||
LoginPageView.BindingContext = l_oViewModel;
|
||||
|
@ -81,7 +82,7 @@ namespace TINK.View.Login
|
|||
|
||||
/// <summary> Pushes a page onto the modal stack. </summary>
|
||||
/// <param name="p_oTypeOfPage">Page to display.</param>
|
||||
public async Task PushModalAsync(ViewTypes typeOfPage)
|
||||
public async Task PushModalAsync(ViewTypes typeOfPage)
|
||||
=> await Navigation.PushModalAsync((Page)Activator.CreateInstance(typeOfPage.GetViewType()));
|
||||
|
||||
|
||||
|
@ -116,7 +117,7 @@ namespace TINK.View.Login
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,13 +4,26 @@
|
|||
xmlns:maps="clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps"
|
||||
xmlns:bindings="clr-namespace:Xamarin.Forms.GoogleMaps.Bindings;assembly=Xamarin.Forms.GoogleMaps.Bindings"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
x:Class="TINK.View.Map.MapPage"
|
||||
Title="{x:Static resources:AppResources.MarkingMapPage}">
|
||||
<StackLayout>
|
||||
<Grid
|
||||
x:Class="TINK.View.Map.MapPage">
|
||||
<!--BackgroundColor="{DynamicResource Key=primary-back-title-color}"-->
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingMapPage}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<Grid
|
||||
RowDefinitions="3,46,1*,33"
|
||||
ColumnDefinitions="1*,Auto,1*"
|
||||
IsEnabled="{Binding IsMapPageEnabled}"
|
||||
VerticalOptions="FillAndExpand">
|
||||
<maps:Map WidthRequest="320" HeightRequest="800"
|
||||
VerticalOptions="FillAndExpand"
|
||||
>
|
||||
<maps:Map
|
||||
Grid.RowSpan="3"
|
||||
Grid.ColumnSpan="3"
|
||||
WidthRequest="320"
|
||||
HeightRequest="800"
|
||||
x:Name="MyMap"
|
||||
IsShowingUser="False"
|
||||
MapType="Street">
|
||||
|
@ -19,38 +32,96 @@
|
|||
<bindings:PinClickedToCommandBehavior Command="{Binding PinClickedCommand}"/>
|
||||
</maps:Map.Behaviors>
|
||||
</maps:Map>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
TextColor ="{Binding TinkColor}"
|
||||
VerticalOptions="Start"
|
||||
HorizontalOptions="StartAndExpand"
|
||||
WidthRequest="80">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
TextColor="{Binding KonradColor}"
|
||||
VerticalOptions="Start"
|
||||
HorizontalOptions="EndAndExpand"
|
||||
WidthRequest="80">
|
||||
</Button>
|
||||
</Grid>
|
||||
<StackLayout
|
||||
<Frame
|
||||
CornerRadius="13"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
BackgroundColor="{DynamicResource secondary-back-title-color}">
|
||||
<StackLayout Orientation="Horizontal"
|
||||
Margin="0"
|
||||
Padding="0">
|
||||
<Button
|
||||
x:Name="KonradButton"
|
||||
AutomationId ="FilterKonrad_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCityBike}"
|
||||
Command="{Binding OnToggleTinkToKonrad}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding KonradColor}"
|
||||
BorderColor="{Binding KonradColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="3,0,0,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoKonradColor}">
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="TINKButton"
|
||||
AutomationId ="FilterTINK_button"
|
||||
Text="{x:Static resources:AppResources.MarkingCargoBike}"
|
||||
Command="{Binding OnToggleKonradToTink}"
|
||||
IsVisible="{Binding IsToggleVisible}"
|
||||
BackgroundColor="{Binding TinkColor}"
|
||||
BorderColor="{Binding TinkColor}"
|
||||
BorderWidth="0"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
WidthRequest="94"
|
||||
HeightRequest="40"
|
||||
BorderRadius="10"
|
||||
Margin="0,0,3,0"
|
||||
FontSize="Small"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding NoTinkColor}">
|
||||
</Button>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
<StackLayout
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="6,3,6,6"
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="24"
|
||||
FontSize="Small"
|
||||
Text="{Binding StatusInfoText}"
|
||||
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="#009BDB" iOS="#009BDB" WinPhone="#009BDB"/>
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
<!-- New StatusInfoText Layout -->
|
||||
<!--<StackLayout
|
||||
Grid.Row="3"
|
||||
Grid.ColumnSpan="3"
|
||||
Margin="6,3,6,6"
|
||||
VerticalOptions="EndAndExpand"
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
Text="{Binding StatusInfoText}"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
HeightRequest="24"
|
||||
FontSize="Small"
|
||||
Text="{Binding StatusInfoText}"
|
||||
TextColor="White"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
IsVisible="{Binding IsRunning}"
|
||||
HeightRequest="20"
|
||||
|
@ -61,9 +132,9 @@
|
|||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
Android="White" iOS="White" WinPhone="White"/>
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
</StackLayout>
|
||||
</StackLayout>-->
|
||||
</Grid>
|
||||
</ContentPage>
|
|
@ -9,6 +9,7 @@ using Xamarin.Forms.Xaml;
|
|||
namespace TINK.View.Map
|
||||
{
|
||||
using Serilog;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.ViewModel.Map;
|
||||
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
|
@ -120,7 +121,7 @@ namespace TINK.View.Map
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
<Button
|
||||
IsEnabled="False"
|
||||
Command="{Binding OnButtonClicked}"
|
||||
Text="OK"/>
|
||||
Text="OK"
|
||||
WidthRequest="100"
|
||||
Margin="0,0,0,3"/>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</ContentPage.Content>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.ViewModel.MiniSurvey;
|
||||
using Xamarin.CommunityToolkit.Extensions;
|
||||
using Xamarin.Forms;
|
||||
|
@ -24,6 +25,7 @@ namespace TINK.View.MiniSurvey
|
|||
BindingContext = vm;
|
||||
MiniSurveyListView.ItemsSource = vm;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays alert message.
|
||||
/// </summary>
|
||||
|
@ -92,7 +94,7 @@ namespace TINK.View.MiniSurvey
|
|||
/// <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));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery, co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -3,12 +3,12 @@ using Xamarin.Forms.Xaml;
|
|||
|
||||
namespace TINK.View.MiniSurvey.Question
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class CheckOneViewCell : ViewCell
|
||||
{
|
||||
public CheckOneViewCell ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class CheckOneViewCell : ViewCell
|
||||
{
|
||||
public CheckOneViewCell()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,12 +4,12 @@ using Xamarin.Forms.Xaml;
|
|||
|
||||
namespace TINK.View.MiniSurvey.Question
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FreeTextViewCell : ViewCell
|
||||
{
|
||||
public FreeTextViewCell ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FreeTextViewCell : ViewCell
|
||||
{
|
||||
public FreeTextViewCell()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,8 +3,13 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="TINK.View.MyBikes.MyBikesPage"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike"
|
||||
Title="{x:Static resources:AppResources.MarkingMyBikes}">
|
||||
xmlns:local_bike="clr-namespace:TINK.View.Bike">
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingMyBikes}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Resources>
|
||||
<ResourceDictionary>
|
||||
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
|
||||
|
@ -34,8 +39,9 @@
|
|||
<StackLayout
|
||||
Orientation="Horizontal">
|
||||
<Label
|
||||
HeightRequest="20"
|
||||
HeightRequest="24"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="FillAndExpand"/>
|
||||
<ActivityIndicator IsRunning="{Binding IsRunning}"
|
||||
|
@ -48,7 +54,7 @@
|
|||
</ActivityIndicator.WidthRequest>
|
||||
<ActivityIndicator.Color>
|
||||
<OnPlatform x:TypeArguments="Color"
|
||||
iOS="#2499CE" WinPhone="#2499CE" />
|
||||
Android="#009BDB" iOS="#009BDB" WinPhone="#009BDB" />
|
||||
</ActivityIndicator.Color>
|
||||
</ActivityIndicator>
|
||||
</StackLayout>
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace TINK.View.MyBikes
|
|||
{
|
||||
using Serilog;
|
||||
using TINK.Model;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.Model.Device;
|
||||
using TINK.ViewModel.MyBikes;
|
||||
using Xamarin.CommunityToolkit.Extensions;
|
||||
|
@ -40,7 +41,7 @@ namespace TINK.View.MyBikes
|
|||
{
|
||||
// Don't repeat the initialization if it has been completed already.
|
||||
if (isInitializationStarted) return;
|
||||
isInitializationStarted = true;
|
||||
isInitializationStarted = true;
|
||||
|
||||
if (m_oViewModel != null)
|
||||
{
|
||||
|
@ -179,7 +180,7 @@ namespace TINK.View.MyBikes
|
|||
/// <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));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery, co2Saving));
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@ namespace TINK.View.Root
|
|||
|
||||
// Any type of split behaviour conflics with map shifting functionality (assuming FlyoutPage behaves same like MasterDetailPage).
|
||||
FlyoutLayoutBehavior = FlyoutLayoutBehavior.Popover;
|
||||
|
||||
|
||||
var navigationPage = Detail as NavigationPage;
|
||||
if (navigationPage == null)
|
||||
{
|
||||
|
|
|
@ -12,8 +12,8 @@ namespace TINK.View
|
|||
}
|
||||
|
||||
public MainPageMenuItem(
|
||||
int p_iId,
|
||||
Type p_oTypeOfPage,
|
||||
int p_iId,
|
||||
Type p_oTypeOfPage,
|
||||
string p_strTitle = null)
|
||||
{
|
||||
TargetType = p_oTypeOfPage;
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
BackgroundColor="#009bda"
|
||||
x:Class="TINK.View.RootShell.FlyoutHeader">
|
||||
BackgroundColor="#009BDB"
|
||||
x:Class="TINK.View.RootShell.FlyoutHeader"
|
||||
HeightRequest="195">
|
||||
|
||||
<Grid Padding="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="55" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
|
|
|
@ -9,12 +9,12 @@ using Xamarin.Forms.Xaml;
|
|||
|
||||
namespace TINK.View.RootShell
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FlyoutHeader : ContentView
|
||||
{
|
||||
public FlyoutHeader ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FlyoutHeader : ContentView
|
||||
{
|
||||
public FlyoutHeader()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,8 +4,7 @@
|
|||
x:Class="TINK.View.Settings.SettingsPage"
|
||||
xmlns:conv="clr-namespace:TINK.View.Settings;assembly=TINKLib"
|
||||
xmlns:account="clr-namespace:TINK.Model.User.Account;assembly=TINKLib"
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
|
||||
Title="{x:Static resources:AppResources.MarkingSettings}">
|
||||
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib">
|
||||
|
||||
<ContentPage.Resources>
|
||||
<conv:BackendPermissionsToVisibleConverter x:Key="Frame_Converter"/>
|
||||
|
@ -20,7 +19,12 @@
|
|||
<conv:PermissionToVisibleConverter x:Key="ShowDiagnostics_Converter" VisibleFlag="{x:Static account:Permissions.ShowDiagnostics}"/>
|
||||
<conv:PermissionToVisibleConverter x:Key="SwitchSiteCaching_Converter" VisibleFlag="{x:Static account:Permissions.SwitchNoSiteCaching}"/>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<Label Style="{StaticResource Label-Navbar}"
|
||||
Text="{x:Static resources:AppResources.MarkingSettings}"/>
|
||||
</Grid>
|
||||
</Shell.TitleView>
|
||||
<ContentPage.Content>
|
||||
<ScrollView>
|
||||
<Frame>
|
||||
|
|
|
@ -8,6 +8,7 @@ using TINK.View.MasterDetail;
|
|||
using System;
|
||||
using TINK.Model.Device;
|
||||
using Xamarin.CommunityToolkit.Extensions;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
|
||||
namespace TINK.View.Settings
|
||||
{
|
||||
|
@ -22,9 +23,9 @@ namespace TINK.View.Settings
|
|||
SettingsPageViewModel m_oViewModel = null;
|
||||
|
||||
/// <summary> Constructs a settings page. </summary>
|
||||
public SettingsPage ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
public SettingsPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var l_oModel = App.ModelRoot;
|
||||
|
||||
|
@ -73,7 +74,7 @@ namespace TINK.View.Settings
|
|||
/// <param name="p_strAccept">Text of accept button.</param>
|
||||
/// <param name="p_strCancel">Text of button.</param>
|
||||
/// <returns>True if user pressed accept.</returns>
|
||||
public new async Task<bool> DisplayAlert(string p_strTitle, string p_strMessage, string p_strAccept, string p_strCancel)
|
||||
public new async Task<bool> DisplayAlert(string p_strTitle, string p_strMessage, string p_strAccept, string p_strCancel)
|
||||
=> await App.Current.MainPage.DisplayAlert(p_strTitle, p_strMessage, p_strAccept, p_strCancel);
|
||||
|
||||
/// <summary>
|
||||
|
@ -104,7 +105,7 @@ namespace TINK.View.Settings
|
|||
/// <summary> Pushes a page onto the modal stack. </summary>
|
||||
/// <param name="p_oTypeOfPage">Page to display.</param>
|
||||
public Task PushModalAsync(ViewTypes p_oTypeOfPage)
|
||||
=> throw new NotImplementedException();
|
||||
=> throw new NotImplementedException();
|
||||
|
||||
/// <summary> Pops a page from the modal stack. </summary>
|
||||
public Task PopModalAsync()
|
||||
|
@ -149,7 +150,7 @@ namespace TINK.View.Settings
|
|||
/// <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));
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery, co2Saving));
|
||||
#endif
|
||||
|
||||
#if USERFEEDBACKDLG_TRYOUT
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
using System;
|
||||
using TINK.View.BikesAtStation;
|
||||
using TINK.View.Contact;
|
||||
using TINK.View.CopriWebView;
|
||||
using TINK.View.Info;
|
||||
using TINK.View.Info.BikeInfo;
|
||||
using TINK.View.Login;
|
||||
using TINK.View.Map;
|
||||
using TINK.View.MiniSurvey;
|
||||
using TINK.View.MyBikes;
|
||||
using TINK.View.Settings;
|
||||
using TINK.View.WhatsNew;
|
||||
using TINK.View.WhatsNew.Agb;
|
||||
using TINK.View.BikesAtStation;
|
||||
using Xamarin.Forms;
|
||||
using TINK.View.MiniSurvey;
|
||||
|
||||
namespace TINK.View
|
||||
{
|
||||
|
|
|
@ -9,8 +9,11 @@
|
|||
HeightRequest="1000"
|
||||
WidthRequest="500"
|
||||
Source="{Binding InfoAgb}"/>
|
||||
<Button Text="OK"
|
||||
Command="{Binding OnOk}"/>
|
||||
<Button
|
||||
Text="OK"
|
||||
WidthRequest="100"
|
||||
Command="{Binding OnOk}"
|
||||
Margin="0,0,0,3"/>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.Globalization;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.ViewModel;
|
||||
using TINK.ViewModel.WhatsNew.Agb;
|
||||
using Xamarin.Forms;
|
||||
|
@ -8,15 +10,16 @@ using Xamarin.Forms.Xaml;
|
|||
namespace TINK.View.WhatsNew.Agb
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class AgbPage : ContentPage, IViewService
|
||||
{
|
||||
public AgbPage ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
public partial class AgbPage : ContentPage, IViewService
|
||||
{
|
||||
public AgbPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
agbViewModel = new AgbViewModel(
|
||||
App.ModelRoot.NextActiveUri.Host,
|
||||
App.ModelRoot.IsSiteCachingOn,
|
||||
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
|
||||
(resourceName) => ViewModelResourceHelper.GetSource(resourceName),
|
||||
this);
|
||||
|
||||
|
@ -47,7 +50,7 @@ namespace TINK.View.WhatsNew.Agb
|
|||
|
||||
/// <summary> Invoked when page is shown. </summary>
|
||||
protected async override void OnAppearing()
|
||||
=> await agbViewModel.OnAppearing();
|
||||
=> await agbViewModel.OnAppearing();
|
||||
|
||||
/// <summary> Reference to view model.</summary>
|
||||
AgbViewModel agbViewModel;
|
||||
|
@ -75,7 +78,7 @@ namespace TINK.View.WhatsNew.Agb
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
}
|
||||
}
|
|
@ -34,7 +34,9 @@
|
|||
|
||||
<Button
|
||||
Text="OK"
|
||||
Command="{Binding OnOk}"/>
|
||||
WidthRequest="100"
|
||||
Command="{Binding OnOk}"
|
||||
Margin="0,0,0,3"/>
|
||||
</StackLayout>
|
||||
</Frame>
|
||||
</ScrollView>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
|
||||
using TINK.Model.Device;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
@ -79,7 +80,7 @@ namespace TINK.View.WhatsNew
|
|||
#if USCSHARP9
|
||||
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
|
||||
#else
|
||||
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
|
||||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBattery battery = null, string co2Saving = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
|
@ -97,7 +98,7 @@ namespace TINK.View.WhatsNew
|
|||
|
||||
WhatsNewViewModel?.OnDisappearing(() =>
|
||||
{
|
||||
App.ModelRoot.SetWhatsNewWasShown();
|
||||
App.ModelRoot.WhatsNew.WasShownInCurrentSession = true;
|
||||
App.ModelRoot.Save();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue