parent
842c6af17c
commit
c4d3ed2043
@ -1,9 +1,26 @@
|
||||
using Model;
|
||||
|
||||
namespace Views;
|
||||
|
||||
public partial class Login : ContentPage
|
||||
{
|
||||
MasterManager Master => (Application.Current as App).Master;
|
||||
|
||||
public Login()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = Master.User;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoginButton_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if (!Master.User.LogIn(login_entry.Text, passwd_entry.Text))
|
||||
{
|
||||
DisplayAlert("Wrong informations", "No mail or an incorrect password have been entered.", "OK");
|
||||
}
|
||||
else
|
||||
{
|
||||
Navigation.PopModalAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,43 +1,37 @@
|
||||
namespace Views;
|
||||
|
||||
public partial class ContainerBase : ContentView
|
||||
{
|
||||
public bool IsConnected
|
||||
{
|
||||
get => container_flayout.IsConnected;
|
||||
set => container_flayout.IsConnected = value;
|
||||
}
|
||||
|
||||
namespace Views;
|
||||
|
||||
public partial class ContainerBase : ContentView
|
||||
{
|
||||
public bool NeedReturn
|
||||
{
|
||||
get => container_flayout.NeedReturn;
|
||||
set => container_flayout.NeedReturn = value;
|
||||
}
|
||||
|
||||
public ContainerBase()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = this;
|
||||
}
|
||||
|
||||
|
||||
// Bind MyContent
|
||||
public static readonly BindableProperty MyContentProperty =
|
||||
BindableProperty.Create("MyContent", typeof(View), typeof(ContainerBase), new Grid());
|
||||
|
||||
public View MyContent
|
||||
{
|
||||
get => (View)GetValue(MyContentProperty);
|
||||
set => SetValue(MyContentProperty, value);
|
||||
}
|
||||
|
||||
// Bind MyFlyoutContent
|
||||
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerBase), new Grid());
|
||||
|
||||
public View MyFlyoutContent
|
||||
{
|
||||
get => (View)GetValue(MyFlyoutContentProperty);
|
||||
set => SetValue(MyFlyoutContentProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ContainerBase()
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = this;
|
||||
}
|
||||
|
||||
|
||||
// Bind MyContent
|
||||
public static readonly BindableProperty MyContentProperty =
|
||||
BindableProperty.Create("MyContent", typeof(View), typeof(ContainerBase), new Grid());
|
||||
|
||||
public View MyContent
|
||||
{
|
||||
get => (View)GetValue(MyContentProperty);
|
||||
set => SetValue(MyContentProperty, value);
|
||||
}
|
||||
|
||||
// Bind MyFlyoutContent
|
||||
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerBase), new Grid());
|
||||
|
||||
public View MyFlyoutContent
|
||||
{
|
||||
get => (View)GetValue(MyFlyoutContentProperty);
|
||||
set => SetValue(MyFlyoutContentProperty, value);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue