mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 03:27:29 +02:00
Version 3.0.381
This commit is contained in:
parent
f963c0a219
commit
3a363acf3a
1525 changed files with 60589 additions and 125098 deletions
131
LastenradBayern/ShareeBike/View/Help/HelpPage.xaml
Normal file
131
LastenradBayern/ShareeBike/View/Help/HelpPage.xaml
Normal file
|
@ -0,0 +1,131 @@
|
|||
<?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:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
x:Class="ShareeBike.View.Help.HelpPage"
|
||||
Style="{StaticResource TabbedPageStyle}">
|
||||
|
||||
<TabbedPage.Resources>
|
||||
<x:String x:Key="IconSmartphone"></x:String>
|
||||
<x:String x:Key="IconTariff"></x:String>
|
||||
<x:String x:Key="IconFaq"></x:String>
|
||||
</TabbedPage.Resources>
|
||||
|
||||
<Shell.TitleView>
|
||||
<Grid ColumnDefinitions="Auto, 1*">
|
||||
<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>
|
54
LastenradBayern/ShareeBike/View/Help/HelpPage.xaml.cs
Normal file
54
LastenradBayern/ShareeBike/View/Help/HelpPage.xaml.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using System.Globalization;
|
||||
using Serilog;
|
||||
using ShareeBike.ViewModel;
|
||||
using ShareeBike.ViewModel.Help;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace ShareeBike.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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue