mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-22 12:56:29 +02:00
Version 3.0.375
This commit is contained in:
parent
2c790239cb
commit
ca080c87c0
194 changed files with 10092 additions and 10464 deletions
|
@ -1,8 +1,5 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
#if USEFLYOUT
|
||||
using TINK.View.MasterDetail;
|
||||
#endif
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
|
@ -13,11 +10,7 @@ namespace TINK.View.Map
|
|||
using TINK.ViewModel.Map;
|
||||
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
#if USEFLYOUT
|
||||
public partial class MapPage : ContentPage, IViewService, IDetailPage
|
||||
#else
|
||||
public partial class MapPage : ContentPage, IViewService
|
||||
#endif
|
||||
{
|
||||
/// <summary> View model to notify about whether page appears or hides. </summary>
|
||||
private MapPageViewModel MapPageViewModel { get; set; }
|
||||
|
@ -75,18 +68,9 @@ namespace TINK.View.Map
|
|||
public new async Task<bool> DisplayAlert(string title, string message, string accept, string cancel)
|
||||
=> await App.Current.MainPage.DisplayAlert(title, message, accept, cancel);
|
||||
|
||||
#if USEFLYOUT
|
||||
/// <summary>
|
||||
/// Creates and a page an shows it.
|
||||
/// </summary>
|
||||
/// <param name="p_oTypeOfPage">Type of page to show.</param>
|
||||
public void ShowPage(ViewTypes type, string title = null)
|
||||
=> NavigationMasterDetail.ShowPage(type.GetViewType(), title);
|
||||
#else
|
||||
/// <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);
|
||||
#endif
|
||||
|
||||
/// <summary> Pushes a page onto the modal stack. </summary>
|
||||
/// <param name="typeOfPage">Type of page to display.</param>
|
||||
|
@ -101,19 +85,12 @@ namespace TINK.View.Map
|
|||
/// <param name="typeOfPage">Page to display.</param>
|
||||
public async Task PushAsync(ViewTypes typeOfPage)
|
||||
{
|
||||
#if USEFLYOUT
|
||||
var page = Activator.CreateInstance(typeOfPage.GetViewType()) as IDetailPage;
|
||||
#else
|
||||
var page = Activator.CreateInstance(typeOfPage.GetViewType());
|
||||
#endif
|
||||
if (page == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if USEFLYOUT
|
||||
page.NavigationMasterDetail = NavigationMasterDetail;
|
||||
#endif
|
||||
|
||||
await Navigation.PushAsync((Page)page);
|
||||
}
|
||||
|
@ -124,11 +101,6 @@ namespace TINK.View.Map
|
|||
public async Task<IUserFeedback> DisplayUserFeedbackPopup(IBatteryMutable battery = null) => throw new NotSupportedException();
|
||||
#endif
|
||||
|
||||
#if USEFLYOUT
|
||||
/// <summary> Delegate to perform navigation.</summary>
|
||||
public INavigationMasterDetail NavigationMasterDetail { private get; set; }
|
||||
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Invoked when page is shown.
|
||||
/// Starts update process.
|
||||
|
@ -144,11 +116,7 @@ namespace TINK.View.Map
|
|||
{
|
||||
Log.ForContext<MapPage>().Verbose("Constructing map page view model.");
|
||||
|
||||
#if TRYNOTBACKSTYLE
|
||||
MapPageViewModel = new MapPageViewModel();
|
||||
#else
|
||||
MapPageViewModel = CreateMapPageViewModel();
|
||||
#endif
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
@ -161,9 +129,6 @@ namespace TINK.View.Map
|
|||
{
|
||||
BindingContext = MapPageViewModel;
|
||||
|
||||
#if USEFLYOUT
|
||||
MapPageViewModel.NavigationMasterDetail = NavigationMasterDetail;
|
||||
#endif
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue