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

View file

@ -103,7 +103,7 @@ namespace TINK.View.Map
#if USEFLYOUT
var page = Activator.CreateInstance(typeOfPage.GetViewType()) as IDetailPage;
#else
var page = Activator.CreateInstance(p_oTypeOfPage.GetViewType());
var page = Activator.CreateInstance(typeOfPage.GetViewType());
#endif
if (page == null)
{

View file

@ -7,6 +7,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="30" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Image
HeightRequest="140"
@ -16,6 +17,12 @@
HorizontalOptions="CenterAndExpand"
FontSize="Large"
Grid.Row="1"
Text="{Binding MasterDetailMenuTitlte}"/>
Text="{Binding MasterDetailMenuTitlte}"/>
<Label
HorizontalOptions="CenterAndExpand"
FontSize="Micro"
HorizontalTextAlignment="Center"
Grid.Row="2"
Text="gefördert vom Bayrischen Staatministerium für Wohnen, Bau und Verkehr"/>
</Grid>
</ContentView>