parent
842c6af17c
commit
c4d3ed2043
@ -1,9 +1,26 @@
|
|||||||
|
using Model;
|
||||||
|
|
||||||
namespace Views;
|
namespace Views;
|
||||||
|
|
||||||
public partial class Login : ContentPage
|
public partial class Login : ContentPage
|
||||||
{
|
{
|
||||||
|
MasterManager Master => (Application.Current as App).Master;
|
||||||
|
|
||||||
public Login()
|
public Login()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
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;
|
namespace Views;
|
||||||
|
|
||||||
public partial class ContainerBase : ContentView
|
public partial class ContainerBase : ContentView
|
||||||
{
|
{
|
||||||
public bool IsConnected
|
|
||||||
{
|
|
||||||
get => container_flayout.IsConnected;
|
|
||||||
set => container_flayout.IsConnected = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool NeedReturn
|
public bool NeedReturn
|
||||||
{
|
{
|
||||||
get => container_flayout.NeedReturn;
|
get => container_flayout.NeedReturn;
|
||||||
set => container_flayout.NeedReturn = value;
|
set => container_flayout.NeedReturn = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ContainerBase()
|
public ContainerBase()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
BindingContext = this;
|
BindingContext = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Bind MyContent
|
// Bind MyContent
|
||||||
public static readonly BindableProperty MyContentProperty =
|
public static readonly BindableProperty MyContentProperty =
|
||||||
BindableProperty.Create("MyContent", typeof(View), typeof(ContainerBase), new Grid());
|
BindableProperty.Create("MyContent", typeof(View), typeof(ContainerBase), new Grid());
|
||||||
|
|
||||||
public View MyContent
|
public View MyContent
|
||||||
{
|
{
|
||||||
get => (View)GetValue(MyContentProperty);
|
get => (View)GetValue(MyContentProperty);
|
||||||
set => SetValue(MyContentProperty, value);
|
set => SetValue(MyContentProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bind MyFlyoutContent
|
// Bind MyFlyoutContent
|
||||||
public static readonly BindableProperty MyFlyoutContentProperty =
|
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||||
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerBase), new Grid());
|
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerBase), new Grid());
|
||||||
|
|
||||||
public View MyFlyoutContent
|
public View MyFlyoutContent
|
||||||
{
|
{
|
||||||
get => (View)GetValue(MyFlyoutContentProperty);
|
get => (View)GetValue(MyFlyoutContentProperty);
|
||||||
set => SetValue(MyFlyoutContentProperty, value);
|
set => SetValue(MyFlyoutContentProperty, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue