mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 22:07: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
21
Meinkonrad/TINK/View/WhatsNew/Gtc/GtcPage.xaml
Normal file
21
Meinkonrad/TINK/View/WhatsNew/Gtc/GtcPage.xaml
Normal 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>
|
77
Meinkonrad/TINK/View/WhatsNew/Gtc/GtcPage.xaml.cs
Normal file
77
Meinkonrad/TINK/View/WhatsNew/Gtc/GtcPage.xaml.cs
Normal 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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue