Version 3.0.376

This commit is contained in:
Anja 2023-11-21 15:26:57 +01:00
parent ca080c87c0
commit f963c0a219
158 changed files with 3228 additions and 1279 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.375" android:versionCode="375">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.376" android:versionCode="376">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="33" />
<!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -14,7 +14,7 @@ namespace TINK.Droid
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.1.111")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.2.120")]
public partial class Resource
{

View file

@ -1,104 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
#if ARENDI
using Arendi.BleLibrary;
using Arendi.BleLibrary.Adapter;
using Arendi.BleLibrary.Android;
using Arendi.BleLibrary.Local;
using Arendi.BleLibrary.Remote;
#endif
using Xamarin.Forms;
[assembly: Dependency(typeof(TINK.Droid.Services.BluetoothLock.Arendi.Central))]
namespace TINK.Droid.Services.BluetoothLock.Arendi
{
#if ARENDI
public class Central : ICentral
#else
public class Central
#endif
{
#if ARENDI
private bool disposedValue;
private static ICentral central = CentralFactory.GetCentral();
public global::Arendi.BleLibrary.Adapter.IAdapter Adapter => throw new NotImplementedException();
public BluetoothState BluetoothState => throw new NotImplementedException();
public ISecurityManager SecurityManager => throw new NotImplementedException();
public IBondManager BondManager => throw new NotImplementedException();
public IDictionary<string, string> SystemInformation => throw new NotImplementedException();
public event EventHandler<PeripheralDiscoveredEventArgs> PeripheralDiscovered;
public event EventHandler<BluetoothStateChangedEventArgs> BluetoothStateChanged;
public event EventHandler<EventArgs> SystemInformationUpdated;
public event EventHandler<FatalErrorEventArgs> FatalError;
public IPeripheral CreatePeripheralByUuid(Uuid uuid, string name = null)
=> central.CreatePeripheralByUuid(uuid, name);
public bool IsEnabled()
{
throw new NotImplementedException();
}
public void StartScan()
=> central.StartScan();
public void StartScan(string[] uuids)
{
throw new NotImplementedException();
}
public void StartScan(Uuid[] uuids)
{
throw new NotImplementedException();
}
public void StopScan()
=> central.StopScan();
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
{
if (disposing)
{
// TODO: dispose managed state (managed objects)
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}
// // TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources
// ~Central()
// {
// // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
// Dispose(disposing: false);
// }
public void Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
#endif
}
}

View file

@ -56,9 +56,9 @@
<key>CFBundleDisplayName</key>
<string>Mein konrad</string>
<key>CFBundleVersion</key>
<string>375</string>
<string>376</string>
<key>CFBundleShortVersionString</key>
<string>3.0.375</string>
<string>3.0.376</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
</dict>

View file

@ -10,12 +10,12 @@
<ResourceDictionary>
<xct:InvertedBoolConverter x:Key="InvertedBoolConverter" />
<x:String x:Key="IconMap">&#xf5a0;</x:String>
<x:String x:Key="IconFindBike">&#xf002;</x:String>
<x:String x:Key="IconSelectBike">&#xf002;</x:String>
<x:String x:Key="IconMyBikes">&#xf206;</x:String>
<x:String x:Key="IconAccount">&#xf007;</x:String>
<x:String x:Key="IconLogin">&#xf2f6;</x:String>
<x:String x:Key="IconSettings">&#xf013;</x:String>
<x:String x:Key="IconFeesAndBikes">&#xf128;</x:String>
<x:String x:Key="IconHelp">&#xf128;</x:String>
<x:String x:Key="IconContact">&#xf0e0;</x:String>
<x:String x:Key="IconInfo">&#xf05a;</x:String>
<x:String x:Key="IconClose">&#xf00d;</x:String>

View file

@ -1,4 +1,4 @@
<!DOCTYPE html
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
@ -16,17 +16,21 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div class='container'>
<div id='Contenttxt'>
<div class="content_title2">Version</div>
<div style=""></div>
<br />Version ACTIVE_APPNAME: <b>CURRENT_VERSION_TINKAPP</b>.
<div class="content_title2">Entwickler</div>
<div style=""></div>
<br />Programmierung ACTIVE_APPNAME: O. Hauff, APPSUPPORTMAILADDRESS<br />
<div class="content_title2">Verwendete Bibliotheken</div>
<div style=""></div>
<br /><table>
<div class='container' id='Contenttxt'>
<div class="content_title1" style="">
<b>ACTIVE_APPNAME</b>
</div>
<div class="content_title2" style="">
Version: CURRENT_VERSION_TINKAPP
</div>
<br />
<div class="content_title2" style="">
Entwicklung: O. Hauff und A. Müller-Meißner, APPSUPPORTMAILADDRESS
</div>
<br />
<div class="content_title2" style="">
Verwendete Bibliotheken:<br />
<table>
<tr><th>Paket </th><th>Lizenz </th></tr>
<tr><td>Newtonsoft Json.NET von James Newton-King </td><td><a href="#MITLicense2007">MIT Lizenz 2007</a> </td></tr>
<tr><td>PCLCrypto von AArnott </td><td><a href="#MSPL_Long">Microsoft Public License(Ms-PL)</a> </td></tr>
@ -46,9 +50,10 @@
<tr><td>Xamarin.Forms.GoogleMaps von amay077 </td><td><a href="#MITLicense2016_2017">MIT Lizenz 2016- 2017</a> </td></tr>
<tr><td>Xamarin.Essentials von Microsoft </td><td><a href="#MITLicenseMicrosoft">MIT Lizenz</a> </td></tr>
</table>
<div class="content_title2">Lizenzen</div>
<div style=""></div>
</div>
<br />
<div class="content_title2" style="">
Lizenzen:
<article id="ApacheLicense2.0_2004">
<div class="content2">
<span class='content1'>Apache License</span><br />
@ -665,4 +670,4 @@
</div>
</div>
</body>
</html>
</html>

View file

@ -27,7 +27,6 @@
<DependentUpon>ILockItBike.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\BoolInverterConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)View\Contact\SelectStationPage.xaml.cs">
<DependentUpon>SelectStationPage.xaml</DependentUpon>
<SubType>Code</SubType>
@ -36,11 +35,10 @@
<DependentUpon>FeedbackPopup.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\FindBike\FindBikePage.xaml.cs">
<DependentUpon>FindBikePage.xaml</DependentUpon>
<Compile Include="$(MSBuildThisFileDirectory)View\SelectBike\SelectBikePage.xaml.cs">
<DependentUpon>SelectBikePage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\ListViewAttachedBehavior.cs" />
<Compile Include="$(MSBuildThisFileDirectory)View\MiniSurvey\MiniSurveyPage.xaml.cs">
<DependentUpon>MiniSurveyPage.xaml</DependentUpon>
<SubType>Code</SubType>
@ -65,11 +63,9 @@
<Compile Include="$(MSBuildThisFileDirectory)View\RootShell\AppShell.xaml.cs">
<DependentUpon>AppShell.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\StringNotNullOrEmptyToVisibleConverter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)View\ViewTypesTypeProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Model\Device\SpecialFolder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)View\FeesAndBikes\FeesAndBikesPage.xaml.cs">
<DependentUpon>FeesAndBikesPage.xaml</DependentUpon>
<Compile Include="$(MSBuildThisFileDirectory)View\Help\HelpPage.xaml.cs">
<DependentUpon>HelpPage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\CopriWebView\ManageAccountPage.xaml.cs">
@ -84,14 +80,15 @@
<DependentUpon>PasswordForgottenPage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\WhatsNew\Agb\AgbPage.xaml.cs">
<DependentUpon>AgbPage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\ViewTypesTypeProvider.cs" />
<Compile Include="$(MSBuildThisFileDirectory)View\WhatsNew\WhatsNewPage.xaml.cs">
<DependentUpon>WhatsNewPage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\WhatsNew\Gtc\GtcPage.xaml.cs">
<DependentUpon>GtcPage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\ViewModelResourceHelper.cs" />
<Compile Include="$(MSBuildThisFileDirectory)View\BikesAtStation\BikesAtStationPage.xaml.cs">
<DependentUpon>BikesAtStationPage.xaml</DependentUpon>
@ -101,8 +98,8 @@
<DependentUpon>ContactPage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\Info\InfoTabbedPage.xaml.cs">
<DependentUpon>InfoTabbedPage.xaml</DependentUpon>
<Compile Include="$(MSBuildThisFileDirectory)View\LegalInformation\LegalInformationPage.xaml.cs">
<DependentUpon>LegalInformationPage.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)View\Login\LoginPage.xaml.cs">
@ -165,7 +162,7 @@
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)View\BikesAtStation\" />
<Folder Include="$(MSBuildThisFileDirectory)View\FeesAndBikes\" />
<Folder Include="$(MSBuildThisFileDirectory)View\Help\" />
<Folder Include="$(MSBuildThisFileDirectory)View\Login\" />
<Folder Include="$(MSBuildThisFileDirectory)View\Map\" />
<Folder Include="$(MSBuildThisFileDirectory)View\MyBikes\" />
@ -178,13 +175,13 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\Info\InfoTabbedPage.xaml">
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\LegalInformation\LegalInformationPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\FeesAndBikes\FeesAndBikesPage.xaml">
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\Help\HelpPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</EmbeddedResource>
@ -196,7 +193,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\WhatsNew\Agb\AgbPage.xaml">
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\WhatsNew\Gtc\GtcPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</EmbeddedResource>
@ -250,7 +247,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\FindBike\FindBikePage.xaml">
<EmbeddedResource Include="$(MSBuildThisFileDirectory)View\SelectBike\SelectBikePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>

View file

@ -1,97 +0,0 @@
#if ARENDI
using Arendi.BleLibrary;
using Arendi.BleLibrary.Adapter;
using Arendi.BleLibrary.Local;
using Arendi.BleLibrary.Remote;
#endif
using System;
using System.Collections.Generic;
using System.Text;
namespace TINK.Services.BluetoothLock.Arendi
{
#if ARENDI
public class Central : ICentral
#else
public class Central
#endif
{
#if ARENDI
private bool disposedValue;
public IAdapter Adapter => throw new NotImplementedException();
public BluetoothState BluetoothState => throw new NotImplementedException();
public ISecurityManager SecurityManager => throw new NotImplementedException();
public IBondManager BondManager => throw new NotImplementedException();
public IDictionary<string, string> SystemInformation => throw new NotImplementedException();
public event EventHandler<PeripheralDiscoveredEventArgs> PeripheralDiscovered;
public event EventHandler<BluetoothStateChangedEventArgs> BluetoothStateChanged;
public event EventHandler<EventArgs> SystemInformationUpdated;
public event EventHandler<FatalErrorEventArgs> FatalError;
public IPeripheral CreatePeripheralByUuid(Uuid uuid, string name = null)
{
throw new NotImplementedException();
}
public bool IsEnabled()
{
throw new NotImplementedException();
}
public void StartScan()
{
throw new NotImplementedException();
}
public void StartScan(string[] uuids)
{
throw new NotImplementedException();
}
public void StartScan(Uuid[] uuids)
{
throw new NotImplementedException();
}
public void StopScan()
{
throw new NotImplementedException();
}
protected virtual void Dispose(bool disposing)
{
if (!disposedValue)
{
if (disposing)
{
// TODO: dispose managed state (managed objects)
}
// TODO: free unmanaged resources (unmanaged objects) and override finalizer
// TODO: set large fields to null
disposedValue = true;
}
}
// // TODO: override finalizer only if 'Dispose(bool disposing)' has code to free unmanaged resources
// ~Central()
// {
// // Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
// Dispose(disposing: false);
// }
public void Dispose()
{
// Do not change this code. Put cleanup code in 'Dispose(bool disposing)' method
Dispose(disposing: true);
GC.SuppressFinalize(this);
}
#endif
}
}

View file

@ -3,10 +3,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
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:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
mc:Ignorable="d"
xmlns:conv="clr-namespace:TINK.View"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
xmlns:conv="clr-namespace:TINK.View;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
x:Class="TINK.View.Account.AccountPage"
BackgroundColor="{DynamicResource background-color}">

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:conv="clr-namespace:TINK.View"
xmlns:conv="clr-namespace:TINK.View;assembly=TINKLib"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@ -94,4 +94,4 @@
</Grid>
</StackLayout>
</ContentView>
</ViewCell>
</ViewCell>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:conv="clr-namespace:TINK.View"
xmlns:conv="clr-namespace:TINK.View;assembly=TINKLib"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:conv="clr-namespace:TINK.View"
xmlns:conv="clr-namespace:TINK.View;assembly=TINKLib"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Contact.ContactPage"

View file

@ -3,7 +3,7 @@ using System;
using System.Threading.Tasks;
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
using TINK.Model.Device;
using TINK.ViewModel.Info;
using TINK.ViewModel.Contact;
using Xamarin.Essentials;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

View file

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8" ?>
<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.Help.HelpPage"
Style="{StaticResource TabbedPageStyle}">
<TabbedPage.Resources>
<x:String x:Key="IconSmartphone">&#xf3cd;</x:String>
<x:String x:Key="IconTariff">&#xf153;</x:String>
<x:String x:Key="IconFaq">&#xf059;</x:String>
</TabbedPage.Resources>
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingHelp}"/>
</Grid>
</Shell.TitleView>
<!--Pages can be added as references or in line-->
<ContentPage
x:Name="FaqPage"
IsEnabled="{Binding IsIdle}"
Title="FAQ">
<ContentPage.IconImageSource>
<FontImageSource Glyph="{StaticResource IconFaq}" FontFamily="FA-S" />
</ContentPage.IconImageSource>
<ContentPage.Content>
<Grid
RowDefinitions="Auto,*,Auto"
RowSpacing="0">
<BoxView Grid.Row="0"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<WebView Grid.Row="1"
x:Name="FaqWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding FaqHtml}"/>
<BoxView Grid.Row="2"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<ActivityIndicator Grid.Row="0" Grid.RowSpan="3"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
x:Name="ManualPage"
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabManual}">
<ContentPage.IconImageSource>
<FontImageSource Glyph="{StaticResource IconSmartphone}" FontFamily="FA-S" />
</ContentPage.IconImageSource>
<ContentPage.Content>
<Grid
RowDefinitions="Auto,*,Auto"
RowSpacing="0">
<BoxView Grid.Row="0"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<WebView Grid.Row="1"
x:Name="ManualWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding ManualHtml}"/>
<BoxView Grid.Row="2"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<ActivityIndicator Grid.Row="0" Grid.RowSpan="3"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
x:Name="TariffPage"
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabTariffs}">
<ContentPage.IconImageSource>
<FontImageSource Glyph="{StaticResource IconTariff}" FontFamily="FA-S" />
</ContentPage.IconImageSource>
<ContentPage.Content>
<Grid
RowDefinitions="Auto,*,Auto"
RowSpacing="0">
<BoxView Grid.Row="0"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<WebView Grid.Row="1"
x:Name="TariffsWebView"
HeightRequest="1000"
WidthRequest="1000"
Source="{Binding TariffsHtml}"/>
<BoxView Grid.Row="2"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<ActivityIndicator Grid.Row="0" Grid.RowSpan="3"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
</TabbedPage>

View file

@ -0,0 +1,53 @@
using System.Globalization;
using Serilog;
using TINK.ViewModel;
using TINK.ViewModel.Help;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Help
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class HelpPage : TabbedPage
{
public HelpPageViewModel ViewModel { get; }
public HelpPage()
{
InitializeComponent();
/// Info about renting.
TariffsWebView.Navigating += WebViewHelper.SelectDisplayTarget;
TariffsWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
sender,
ev,
"<html><b>Kann Mietinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
/// Info about types of bikes.
ManualWebView.Navigating += WebViewHelper.SelectDisplayTarget;
ManualWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
sender,
ev,
"<html><b>Kann Radinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
ViewModel = new HelpPageViewModel(
App.ModelRoot.NextActiveUri.Host,
App.ModelRoot.ResourceUrls.TariffsResourcePath,
App.ModelRoot.ResourceUrls.ManualResourcePath,
App.ModelRoot.IsSiteCachingOn,
CultureInfo.CurrentUICulture.TwoLetterISOLanguageName,
() => App.ModelRoot.GetConnector(App.ModelRoot.GetIsConnected()).Query,
resourceUrls => App.ModelRoot.ResourceUrls = resourceUrls);
this.BindingContext = ViewModel;
}
/// <summary> Called when page is shown. </summary>
protected override void OnAppearing()
{
ViewModel.OnAppearing();
}
}
}

View file

@ -0,0 +1,40 @@
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class InfoPage : ContentPage
{
public InfoPage ()
{
InitializeComponent ();
#if __IOS__
var resourcePrefix = "TINK.iOS.";
#endif
#if __ANDROID__
var resourcePrefix = "TINK.Droid.";
#endif
#if WINDOWS_PHONE
var resourcePrefix = "TINK.WinPhone.";
#endif
Debug.WriteLine("Using this resource prefix: " + resourcePrefix);
// note that the prefix includes the trailing period '.' that is required
var assembly = typeof(InfoPage).GetTypeInfo().Assembly;
Stream stream = assembly.GetManifestResourceStream
(resourcePrefix + "HtmlResouces.Info.html");
var l_oHtmlViewSource = new HtmlWebViewSource
{
Html = (new StreamReader(stream, Encoding.UTF8)).ReadToEnd()
};
InfoWebView.Source = l_oHtmlViewSource;
}
}
}

View file

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Info
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class InfoPage : ContentPage
{
public InfoPage ()
{
InitializeComponent ();
}
}
}

View file

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="utf-8" ?>
<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.LegalInformation.LegalInformationPage"
Style="{StaticResource TabbedPageStyle}">
<TabbedPage.Resources>
<x:String x:Key="IconSmartphone">&#xf3cd;</x:String>
<x:String x:Key="IconPersonSafety">&#xf505;</x:String>
<x:String x:Key="IconDataSafety">&#xf56c;</x:String>
<x:String x:Key="IconLegalInfo">&#xf129;</x:String>
</TabbedPage.Resources>
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingLegalInformation}"/>
</Grid>
</Shell.TitleView>
<!--Pages can be added as references or in line-->
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabApp}">
<ContentPage.IconImageSource>
<FontImageSource Glyph="{StaticResource IconSmartphone}" FontFamily="FA-S" />
</ContentPage.IconImageSource>
<ContentPage.Content>
<Grid
RowDefinitions="Auto,*,Auto"
RowSpacing="0">
<BoxView Grid.Row="0"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<WebView Grid.Row="1"
x:Name="InfoLicenses"
Source="{Binding AppHtml}"
HeightRequest="1000"
WidthRequest="1000" />
<BoxView Grid.Row="2"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<ActivityIndicator Grid.Row="0" Grid.RowSpan="3"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabPrivacy}">
<ContentPage.IconImageSource>
<FontImageSource Glyph="{StaticResource IconPersonSafety}" FontFamily="FA-S" />
</ContentPage.IconImageSource>
<ContentPage.Content>
<Grid
RowDefinitions="Auto,*,Auto"
RowSpacing="0">
<BoxView Grid.Row="0"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<WebView Grid.Row="1"
x:Name="PrivacyWebView"
Source="{Binding PrivacyHtml}"
HeightRequest="1000"
WidthRequest="1000" />
<BoxView Grid.Row="2"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<ActivityIndicator Grid.Row="0" Grid.RowSpan="3"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabGtc}">
<ContentPage.IconImageSource>
<FontImageSource Glyph="{StaticResource IconDataSafety}" FontFamily="FA-S" />
</ContentPage.IconImageSource>
<ContentPage.Content>
<Grid
RowDefinitions="Auto,*,Auto"
RowSpacing="0">
<BoxView Grid.Row="0"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<WebView Grid.Row="1"
x:Name="GtcWebView"
Source ="{Binding GtcHtml}"
HeightRequest="1000"
WidthRequest="1000" />
<BoxView Grid.Row="2"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<ActivityIndicator Grid.Row="0" Grid.RowSpan="3"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
<ContentPage
IsEnabled="{Binding IsIdle}"
Title="{x:Static resources:AppResources.MarkingTabImpress}">
<ContentPage.IconImageSource>
<FontImageSource Glyph="{StaticResource IconLegalInfo}" FontFamily="FA-S" />
</ContentPage.IconImageSource>
<ContentPage.Content>
<Grid
RowDefinitions="Auto,*,Auto"
RowSpacing="0">
<BoxView Grid.Row="0"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<WebView Grid.Row="1"
x:Name="ImpressWebView"
Source="{Binding ImpressHtml}"
HeightRequest="1000"
WidthRequest="1000" />
<BoxView Grid.Row="2"
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{x:DynamicResource primary-back-title-color}"/>
<ActivityIndicator Grid.Row="0" Grid.RowSpan="3"
IsRunning="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
IsVisible="{Binding IsIdle, Converter={StaticResource InvertedBoolConverter}}"
Scale="2"
VerticalOptions="CenterAndExpand"
HorizontalOptions="CenterAndExpand"
Color="{x:DynamicResource primary-back-title-color}"/>
</Grid>
</ContentPage.Content>
</ContentPage>
</TabbedPage>

View file

@ -0,0 +1,60 @@
using System.Globalization;
using TINK.ViewModel;
using TINK.ViewModel.LegalInformation;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.LegalInformation
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class LegalInformationPage : TabbedPage
{
public LegalInformationPageViewModel ViewModel { get; }
public LegalInformationPage()
{
InitializeComponent();
ViewModel = new LegalInformationPageViewModel(
App.ModelRoot.NextActiveUri.Host,
App.ModelRoot.ResourceUrls.GtcResourcePath,
App.ModelRoot.ResourceUrls.PrivacyResourcePath,
App.ModelRoot.ResourceUrls.ImpressResourcePath,
App.ModelRoot.IsSiteCachingOn,
resourceName => ViewModelResourceHelper.GetEmbeddedResource(resourceName),
() => App.ModelRoot.GetConnector(App.ModelRoot.GetIsConnected()).Query,
resourceUrls => App.ModelRoot.ResourceUrls = resourceUrls);
this.BindingContext = ViewModel;
InfoLicenses.Navigating += WebViewHelper.SelectDisplayTarget;
InfoLicenses.Navigated += (sender, ev) => WebViewHelper.HandleError(
sender,
ev,
"<html><b>Kann Lizenzinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
PrivacyWebView.Navigating += WebViewHelper.SelectDisplayTarget;
PrivacyWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
sender,
ev,
"<html><b>Kann Datenschutzinformationen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
GtcWebView.Navigating += WebViewHelper.SelectDisplayTarget;
GtcWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
sender,
ev,
"<html><b>Kann allgemeine Geschäftsbedingungen nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
ImpressWebView.Navigating += WebViewHelper.SelectDisplayTarget;
ImpressWebView.Navigated += (sender, ev) => WebViewHelper.HandleError(
sender,
ev,
"<html><b>Kann Impressum nicht anzeigen!</b><br>Verbindung mit Internet ok?</html>");
}
/// <summary> Called when page is shown. </summary>
protected override void OnAppearing()
{
ViewModel.OnAppearing();
}
}
}

View file

@ -2,7 +2,7 @@
<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"
xmlns:conv="clr-namespace:TINK.View"
xmlns:conv="clr-namespace:TINK.View;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
x:Class="TINK.View.Login.LoginPage"
BackgroundColor="{DynamicResource background-color}">

View file

@ -13,7 +13,7 @@
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingMapPage}"/>
Text="{x:Static resources:AppResources.MarkingBikeLocations}"/>
</Grid>
</Shell.TitleView>

View file

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<FlyoutPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.Root.RootPage"
xmlns:pages="clr-namespace:TINK.View.Root"
xmlns:mappage="clr-namespace:TINK.View.Map">
<FlyoutPage.Flyout>
<pages:RootPageFlyout x:Name="FlyoutPage" />
</FlyoutPage.Flyout>
<FlyoutPage.Detail>
<NavigationPage>
<x:Arguments>
<mappage:MapPage />
</x:Arguments>
</NavigationPage>
</FlyoutPage.Detail>
</FlyoutPage>

View file

@ -1,61 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.Root.RootPageFlyout"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:local="clr-namespace:TINK.View"
IconImageSource="menu"
Title="sharee.bike">
<StackLayout>
<ListView x:Name="MenuItemsListView"
SeparatorVisibility="None"
HasUnevenRows="true"
local:ListViewAttachedBehavior.Command="{Binding MenuItemSelected}"
ItemsSource="{Binding MenuItems}">
<ListView.Header>
<Grid BackgroundColor="{DynamicResource Key=primary-back-title-color}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="80"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="10"/>
</Grid.RowDefinitions>
<Label
Grid.Column="1"
Grid.Row="2"
Text="{Binding MasterDetailMenuTitlte}"
Style="{DynamicResource SubtitleStyle}"/>
</Grid>
</ListView.Header>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid Padding="5,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="30"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Image>
<Image.Source>
<FontImageSource Glyph="{Binding GlyphCode}" Color="Black" FontFamily="FA-S"/>
</Image.Source>
</Image>
<Label
Grid.Column="1"
Margin="10, 0, 0, 0"
VerticalOptions="FillAndExpand"
VerticalTextAlignment="Center"
FontSize="18"
Text="{Binding Title}"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</ContentPage>

View file

@ -1,36 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using TINK.Model;
using TINK.Services;
#if USEFLYOUT
using TINK.View.MasterDetail;
#endif
using TINK.View.Themes;
using TINK.ViewModel.Root;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Root
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class RootPageFlyout : ContentPage
{
public ListView ListView;
public RootPageFlyout()
{
InitializeComponent();
BindingContext = new RootPageFlyoutViewModel();
ListView = MenuItemsListView;
}
}
}

View file

@ -3,13 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:mappage="clr-namespace:TINK.View.Map"
xmlns:findbike="clr-namespace:TINK.View.FindBike"
xmlns:findbike="clr-namespace:TINK.View.SelectBike"
xmlns:mybikes="clr-namespace:TINK.View.MyBikes"
xmlns:account="clr-namespace:TINK.View.Account"
xmlns:login="clr-namespace:TINK.View.Login"
xmlns:settings="clr-namespace:TINK.View.Settings"
xmlns:contact="clr-namespace:TINK.View.Contact"
xmlns:info="clr-namespace:TINK.View.Info"
xmlns:help="clr-namespace:TINK.View.Help"
xmlns:info="clr-namespace:TINK.View.LegalInformation"
xmlns:header="clr-namespace:TINK.View.RootShell"
Title="Shell"
x:Class="TINK.View.RootShell.AppShell">
@ -20,7 +21,7 @@
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{x:Static resources:AppResources.MarkingMapPage}"
Title="{x:Static resources:AppResources.MarkingBikeLocations}"
Route="MapPage"
ContentTemplate="{DataTemplate mappage:MapPage}">
<ShellContent.FlyoutIcon>
@ -30,11 +31,11 @@
</FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{x:Static resources:AppResources.MarkingFindBike}"
IsVisible="{Binding IsFindBikePageVisible}"
ContentTemplate="{DataTemplate findbike:FindBikePage}">
Title="{x:Static resources:AppResources.MarkingSelectBike}"
IsVisible="{Binding IsSelectBikePageVisible}"
ContentTemplate="{DataTemplate findbike:SelectBikePage}">
<ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconFindBike}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
<FontImageSource Glyph="{StaticResource IconSelectBike}" Color="{DynamicResource Key=primary-back-title-color}" FontFamily="FA-S" />
</ShellContent.FlyoutIcon>
</ShellContent>
</FlyoutItem>
@ -71,7 +72,7 @@
</FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{x:Static resources:AppResources.MarkingFeedbackAndContact}"
Title="{x:Static resources:AppResources.MarkingContact}"
Route="ContactPage"
ContentTemplate="{DataTemplate contact:ContactPage}">
<ShellContent.FlyoutIcon>
@ -91,17 +92,17 @@
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{x:Static resources:AppResources.MarkingFeesAndBikes}"
ContentTemplate="{DataTemplate contact:FeesAndBikesPage}">
Title="{x:Static resources:AppResources.MarkingHelp}"
ContentTemplate="{DataTemplate help:HelpPage}">
<ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconFeesAndBikes}" Color="DimGray" FontFamily="FA-S"/>
<FontImageSource Glyph="{StaticResource IconHelp}" Color="DimGray" FontFamily="FA-S"/>
</ShellContent.FlyoutIcon>
</ShellContent>
</FlyoutItem>
<FlyoutItem FlyoutDisplayOptions="AsMultipleItems">
<ShellContent
Title="{Binding TabbedPageIngoTitle}"
ContentTemplate="{DataTemplate info:InfoPage}">
Title="{x:Static resources:AppResources.MarkingLegalInformation}"
ContentTemplate="{DataTemplate info:LegalInformationPage}">
<ShellContent.FlyoutIcon>
<FontImageSource Glyph="{StaticResource IconLegalInfo}" Color="DimGray" FontFamily="FA-S" />
</ShellContent.FlyoutIcon>

View file

@ -0,0 +1,209 @@
<?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:xct="http://xamarin.com/schemas/2020/toolkit"
x:Class="TINK.View.SelectBike.SelectBikePage"
xmlns:conv="clr-namespace:TINK.View;assembly=TINKLib"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:local_bike="clr-namespace:TINK.View.Bike"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
xmlns:rental_process="clr-namespace:TINK.ViewModel.Bikes;assembly=TINKLib"
xmlns:bikeRentalProcess="clr-namespace:ShareeSharedGuiLib.View.Bike.RentalProcess"
BackgroundColor="{DynamicResource background-color}"
Shell.NavBarIsVisible="{Binding IsIdle}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingSelectBike}"/>
</Grid>
</Shell.TitleView>
<ContentPage.Resources>
<ResourceDictionary>
<local_bike:BikeViewCellTemplateSelector x:Key="bikeTemplateSelector"/>
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="Label_Converter"/>
<xct:MultiConverter x:Key="RentalProcessToVisibleConverter">
<xct:EnumToBoolConverter>
<xct:EnumToBoolConverter.TrueValues>
<rental_process:CurrentRentalProcess>CloseLock</rental_process:CurrentRentalProcess>
<rental_process:CurrentRentalProcess>EndRental</rental_process:CurrentRentalProcess>
</xct:EnumToBoolConverter.TrueValues>
</xct:EnumToBoolConverter>
<xct:InvertedBoolConverter />
</xct:MultiConverter>
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.Content>
<!--Grid for Bike(s) view and Running process in same row-->
<Grid>
<!-- Grid for Content -->
<Grid
IsVisible="{Binding RentalProcess.State, Converter={StaticResource RentalProcessToVisibleConverter}}"
Grid.Row="0"
RowSpacing="0"
RowDefinitions="1*,Auto">
<StackLayout
Grid.Row="0"
Spacing="0"
Orientation="Vertical">
<StackLayout
BackgroundColor="White"
Padding="20,5,20,0">
<!--Bike type-->
<StackLayout Orientation="Horizontal"
HorizontalOptions="Center"
IsVisible="{Binding ActiveFilteredBikeType, Converter={StaticResource Label_Converter}}"
Spacing="0">
<Label
TextColor="DimGray"
Text="{x:Static resources:AppResources.MarkingSelectBikeTypeOfBikeText}"/>
<Label
TextColor="{DynamicResource primary-back-title-color}"
FontAttributes="Bold"
Text="{Binding ActiveFilteredBikeType}"/>
<Button
Command="{Binding ShowFilterBikeTypeInfoCommand}"
WidthRequest="24"
HeightRequest="24"
BackgroundColor="Transparent"
BorderWidth="0"
Padding="0"
Margin="5,0,0,0">
<Button.ImageSource>
<FontImageSource
Glyph="{StaticResource InfoCircle}"
Color="DimGray"
FontFamily="FA-S"
Size="20"/>
</Button.ImageSource>
</Button>
</StackLayout>
<Grid
RowDefinitions="Auto,Auto"
ColumnDefinitions="*,Auto">
<!--Search bike-->
<Label
Grid.Column="0"
Grid.ColumnSpan="2"
Grid.Row="0"
Text="{x:Static resources:AppResources.MarkingSelectBikeLabel}"
Margin="0,5,0,-5">
</Label>
<Entry
Grid.Column="0"
Grid.Row="1"
x:Name="SelectBikeEntry"
Placeholder="{x:Static resources:AppResources.PlaceholderSelectBike}"
MaxLength="10"
CursorPosition="0"
Text="{Binding BikeIdUserInput, Mode=TwoWay}"/>
<Button
Grid.Column="1"
Grid.Row="1"
WidthRequest="100"
Text="{x:Static resources:AppResources.MarkingSelectBikeButton}"
Command="{Binding OnSelectBikeRequest}">
<Button.Triggers>
<DataTrigger TargetType="Button" Binding="{Binding IsSelectBikeEnabled}" Value="False">
<Setter Property="BorderColor" Value="DimGray" />
<Setter Property="BackgroundColor" Value="DimGray" />
<Setter Property="TextColor" Value="LightGray" />
</DataTrigger>
</Button.Triggers>
</Button>
</Grid>
<!--Line-->
<BoxView
HeightRequest="1"
WidthRequest="400"
HorizontalOptions="Center"
Color="{DynamicResource primary-back-title-color}"/>
</StackLayout>
<!--No Network Connection-->
<sharedGui:NotConnectedToNetView/>
<!--Bike data-->
<Grid
RowDefinitions="Auto,Auto"
RowSpacing="0">
<!--Hint for Outdated Data.-->
<sharedGui:HintForRefreshingPageView
Grid.Row="0"/>
<!--Bike-->
<ListView
Grid.Row="1"
x:Name="SelectBikeListView"
BackgroundColor="{DynamicResource background-color}"
SelectionMode="None"
SelectedItem="{Binding SelectedBike}"
IsEnabled="{Binding IsIdle}"
HasUnevenRows="True"
SeparatorVisibility="None"
ItemTemplate="{StaticResource bikeTemplateSelector}"
IsPullToRefreshEnabled="True"
RefreshCommand="{Binding RefreshCommand}"
IsRefreshing="{Binding IsRefreshing}"/>
</Grid>
</StackLayout>
<!--Info text-->
<Label
Grid.Row="1"
Text="{Binding StatusInfoText}"
IsVisible="{Binding Path=IsProcessWithRunningProcessView, Converter={StaticResource InvertedBoolConverter}}"
FontSize="Small"
Padding="5"
TextColor="DimGray"
HorizontalOptions="CenterAndExpand">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Path=StatusInfoText.Length}" Value="0">
<Setter Property="HeightRequest" Value="0" />
</DataTrigger>
<DataTrigger
TargetType="Label"
Binding="{Binding Path=StatusInfoText}" Value="Offline.">
<Setter Property="HeightRequest" Value="0" />
</DataTrigger>
</Label.Triggers>
</Label>
</Grid>
<!--While process is running-->
<sharedGui:RunningProcessView
Grid.Row="0"
IsVisible="{Binding IsProcessWithRunningProcessView}"/>
<!--CloseLock View-->
<bikeRentalProcess:RentalProcessBookedOpenCloseLock
Grid.Row="0"/>
<!--EndRental View-->
<bikeRentalProcess:RentalProcessBookedClosedEndRental
Grid.Row="0"/>
</Grid>
</ContentPage.Content>
</ContentPage>

View file

@ -0,0 +1,179 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Serilog;
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
using TINK.Model.Device;
using TINK.MultilingualResources;
using TINK.ViewModel.SelectBike;
using Xamarin.CommunityToolkit.Extensions;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.SelectBike
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class SelectBikePage : ContentPage, IViewService
{
/// <summary> Reference to view model. </summary>
SelectBikePageViewModel m_oViewModel = null;
/// <summary>
/// Holds a value indicating whether page already subscribed to shell item changes or not.
/// </summary>
private bool _IsShellItemChangedReceived = false;
public SelectBikePage() { }
/// <summary>
/// Invoked when page is shown.
/// Starts update process.
/// </summary>
protected async override void OnAppearing()
{
if (m_oViewModel != null)
{
// 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.OnAppearingOrRefresh();
return;
}
try
{
var model = App.ModelRoot;
m_oViewModel = new SelectBikePageViewModel(
model.ActiveUser,
model,
App.PermissionsService,
App.BluetoothService,
Device.RuntimePlatform,
() => model.GetIsConnected(),
(isConnected) => model.GetConnector(isConnected),
App.LocationServicesContainer.Active,
model.LocksServices.Active,
model.Stations,
model.Polling,
model.PostAction,
model.SmartDevice,
this,
(url) => DependencyService.Get<IExternalBrowserService>().OpenUrl(url))
{
IsReportLevelVerbose = model.IsReportLevelVerbose
};
}
catch (Exception exception)
{
Log.ForContext<SelectBikePage>().Error("Displaying bikes at station page failed. {Exception}", exception);
await DisplayAlert(
AppResources.ErrorPageNotLoadedTitle,
$"{AppResources.ErrorPageNotLoaded}\r\n{exception.Message}",
AppResources.MessageAnswerOk);
return;
}
InitializeComponent();
BindingContext = m_oViewModel;
SelectBikeListView.ItemsSource = m_oViewModel;
await m_oViewModel.OnAppearingOrRefresh();
}
/// <summary>
/// Invoked when page is disappearing to
/// - stop the update process
/// - to subscribe to events.
/// </summary>
protected async override void OnDisappearing()
{
if (!_IsShellItemChangedReceived && Shell.Current != null)
{
// Subscribe to events.
// Do not do this on startup because Shell.Current is null, if FindeBikePage is startup page.
Shell.Current.Navigated += (sender, e) =>
{
if (e.Source != ShellNavigationSource.ShellItemChanged)
{
// Nothing to do.
return;
}
// Reset previous user input after switch of pages to allow user to select a differnt bike if one has been selected before.
m_oViewModel.BikeIdUserInput = String.Empty;
};
}
_IsShellItemChangedReceived = true;
await (m_oViewModel?.OnDisappearing() ?? Task.CompletedTask);
}
/// <summary>
/// Displays alert message.
/// </summary>
/// <param name="p_strTitle">Title of message.</param>
/// <param name="p_strMessage">Message to display.</param>
/// <param name="p_strCancel">Type of buttons.</param>
public new async Task DisplayAlert(string p_strTitle, string p_strMessage, string p_strCancel)
=> await App.Current.MainPage.DisplayAlert(p_strTitle, p_strMessage, p_strCancel);
/// <summary> Displays alert message.</summary>
/// <param name="title">Title of message.</param>
/// <param name="message">Message to display.</param>
/// <param name="details">Detailed error description.</param>
/// <param name="cancel">Type of buttons.</param>
public async Task DisplayAdvancedAlert(
string title,
string message,
string details,
string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", cancel);
/// <summary> Displays detailed alert message.</summary>
/// <param name="title">Title of message.</param>
/// <param name="message">Message to display.</param>
/// <param name="details">Detailed error description.</param>
/// <param name="accept">Text of accept button.</param>
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary>
/// Displays alert message.
/// </summary>
/// <param name="p_strTitle">Title of message.</param>
/// <param name="p_strMessage">Message to display.</param>
/// <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)
=> await App.Current.MainPage.DisplayAlert(p_strTitle, p_strMessage, p_strAccept, p_strCancel);
/// <summary> Shows a page.</summary>
/// <param name="route">Route of the page to show.</param>
public async Task ShowPage(string route) => await Shell.Current.GoToAsync(route);
/// <summary> Pushes a page onto the modal stack. </summary>
/// <param name="typeOfPage">Page to display.</param>
public async Task PushModalAsync(ViewTypes typeOfPage)
=> await Navigation.PushModalAsync((Page)Activator.CreateInstance(typeOfPage.GetViewType()));
/// <summary> Pops a page from the modal stack. </summary>
public Task PopModalAsync() => throw new NotSupportedException();
/// <summary> Pushes a page onto the stack. </summary>
/// <param name="p_oTypeOfPage">Page to display.</param>
public Task PushAsync(ViewTypes p_oTypeOfPage) => throw new NotSupportedException();
#if USCSHARP9
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
#else
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBatteryMutable battery = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(battery));
#endif
}
}

View file

@ -2,14 +2,16 @@ using System;
using TINK.View.BikesAtStation;
using TINK.View.Contact;
using TINK.View.CopriWebView;
using TINK.View.Info;
using TINK.View.SelectBike;
using TINK.View.LegalInformation;
using TINK.View.Help;
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.WhatsNew.Gtc;
using Xamarin.Forms;
namespace TINK.View
@ -38,17 +40,17 @@ namespace TINK.View
case ViewTypes.SettingsPage:
return typeof(SettingsPage);
case ViewTypes.TabbedPageInfo:
return typeof(InfoPage);
case ViewTypes.LegalInformationPage:
return typeof(LegalInformationPage);
case ViewTypes.FeesAndBikesPage:
return typeof(FeesAndBikesPage);
case ViewTypes.HelpPage:
return typeof(HelpPage);
case ViewTypes.ManageAccountPage:
return typeof(ManageAccountPage);
case ViewTypes.AgbPage:
return typeof(AgbPage);
case ViewTypes.GtcPage:
return typeof(GtcPage);
case ViewTypes.WhatsNewPage:
return typeof(WhatsNewPage);
@ -65,6 +67,9 @@ namespace TINK.View
case ViewTypes.MiniSurvey:
return typeof(MiniSurveyPage);
case ViewTypes.SelectBikePage:
return typeof(SelectBikePage);
default:
return typeof(ContentPage);
}

View file

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.WhatsNew.Gtc.GtcPage">
<ContentPage.Content>
<Frame>
<StackLayout>
<WebView
HeightRequest="1000"
WidthRequest="500"
Source="{Binding GtcHtml}"/>
<Button
Text="OK"
WidthRequest="100"
Command="{Binding OnOk}"
Margin="0,0,0,3"/>
</StackLayout>
</Frame>
</ContentPage.Content>
</ContentPage>

View file

@ -0,0 +1,77 @@
using System;
using System.Threading.Tasks;
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
using TINK.ViewModel;
using TINK.ViewModel.WhatsNew.Gtc;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.WhatsNew.Gtc
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class GtcPage : ContentPage, IViewService
{
public GtcPage()
{
InitializeComponent();
gtcViewModel = new GtcViewModel(
App.ModelRoot.NextActiveUri.Host,
App.ModelRoot.IsSiteCachingOn,
(resourceName) => ViewModelResourceHelper.GetEmbeddedResource(resourceName),
this);
BindingContext = gtcViewModel;
}
/// <summary> Displays alert message.</summary>
/// <param name="title">Title of message.</param>
/// <param name="message">Message to display.</param>
/// <param name="details">Detailed error description.</param>
/// <param name="cancel">Type of buttons.</param>
public async Task DisplayAdvancedAlert(
string title,
string message,
string details,
string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", cancel);
/// <summary> Displays detailed alert message.</summary>
/// <param name="title">Title of message.</param>
/// <param name="message">Message to display.</param>
/// <param name="details">Detailed error description.</param>
/// <param name="accept">Text of accept button.</param>
/// <param name="cancel">Text of cancel button.</param>
/// <returns>True if user pressed accept.</returns>
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, !string.IsNullOrEmpty(details) ? $"{message}\r\nDetails:\r\n{details}" : $"{message}", accept, cancel);
/// <summary> Invoked when page is shown. </summary>
protected async override void OnAppearing()
=> await gtcViewModel.OnAppearing();
/// <summary> Reference to view model.</summary>
GtcViewModel gtcViewModel;
public async Task PopModalAsync()
=> await Navigation.PopModalAsync();
/// <summary> Pushes a page onto the stack. </summary>
/// <param name="p_oTypeOfPage">Page to display.</param>
public Task PushAsync(ViewTypes p_oTypeOfPage)
=> throw new NotImplementedException();
public Task PushModalAsync(ViewTypes p_oTypeOfPage)
=> throw new NotImplementedException();
/// <summary> Shows a page.</summary>
/// <param name="route">Route of the page to show.</param>
public async Task ShowPage(string route) => await Shell.Current.GoToAsync(route);
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBatteryMutable battery = null) => throw new NotSupportedException();
#endif
}
}

View file

@ -3,7 +3,7 @@ using TINK.MultilingualResources;
using TINK.Services;
using TINK.Services.CopriApi.ServerUris;
using TINK.View.Themes;
using TINK.ViewModel.Info;
using TINK.ViewModel.LegalInformation;
namespace TINK.ViewModel.RootShell
{
@ -15,7 +15,7 @@ namespace TINK.ViewModel.RootShell
{
// Login state changed. Update related menu entries.
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsMyBikesPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsFindBikePageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsSelectBikePageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsAccountPageVisible)));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsLoginPageVisible)));
};
@ -56,13 +56,11 @@ namespace TINK.ViewModel.RootShell
public bool IsMyBikesPageVisible => App.ModelRoot.ActiveUser.IsLoggedIn;
public bool IsFindBikePageVisible => App.ModelRoot.ActiveUser.IsLoggedIn;
public bool IsSelectBikePageVisible => App.ModelRoot.ActiveUser.IsLoggedIn;
public bool IsAccountPageVisible => App.ModelRoot.ActiveUser.IsLoggedIn;
public bool IsLoginPageVisible => !App.ModelRoot.ActiveUser.IsLoggedIn;
public string TabbedPageIngoTitle => AppResources.MarkingAbout;
}
}