This commit is contained in:
Oliver Hauff 2022-01-22 18:32:22 +01:00
parent 6ed1579494
commit 3c97e2f4aa
34 changed files with 278 additions and 135 deletions

View file

@ -1,7 +1,9 @@
using System;
using System.Threading.Tasks;
using TINK.Model.Device;
#if USEFLYOUT
using TINK.View.MasterDetail;
#endif
using TINK.ViewModel.Info;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
@ -9,8 +11,11 @@ using Xamarin.Forms.Xaml;
namespace TINK.View.Contact
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class ContactPage : ContentPage, IViewService, IDetailPage
#if USEFLYOUT
public partial class ContactPage : ContentPage, IViewService, IDetailPage
#else
public partial class ContactPage : ContentPage, IViewService
#endif
{
public ContactPage ()
{
@ -71,8 +76,8 @@ namespace TINK.View.Contact
/// <summary> Pushes a page onto the stack. </summary>
/// <param name="typeOfPage">Page to display.</param>
public async Task PushAsync(ViewTypes typeOfPage)
{
{
#if USEFLYOUT
if (!(Activator.CreateInstance(typeOfPage.GetViewType()) is IDetailPage detailPage))
{
await Task.CompletedTask;
@ -83,6 +88,7 @@ namespace TINK.View.Contact
detailPage.NavigationMasterDetail = NavigationMasterDetail;
await Navigation.PushAsync((Page)detailPage);
#endif
}
#if USCSHARP9