mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 13:57:28 +02:00
Version 3.0.376
This commit is contained in:
parent
ca080c87c0
commit
f963c0a219
158 changed files with 3228 additions and 1279 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
20
Meinkonrad/TINK/View/LegalInformation/InfoPage.xaml.cs~HEAD
Normal file
20
Meinkonrad/TINK/View/LegalInformation/InfoPage.xaml.cs~HEAD
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace TINK.View.Info
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class InfoPage : ContentPage
|
||||
{
|
||||
public InfoPage ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
164
Meinkonrad/TINK/View/LegalInformation/LegalInformationPage.xaml
Normal file
164
Meinkonrad/TINK/View/LegalInformation/LegalInformationPage.xaml
Normal 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"></x:String>
|
||||
<x:String x:Key="IconPersonSafety"></x:String>
|
||||
<x:String x:Key="IconDataSafety"></x:String>
|
||||
<x:String x:Key="IconLegalInfo"></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>
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue