commit
31fec8e200
@ -1,39 +1,49 @@
|
|||||||
namespace Views;
|
using DataPersistence;
|
||||||
|
using Model;
|
||||||
public partial class ContainerFlyout : ContentView
|
|
||||||
{
|
namespace Views;
|
||||||
public ContainerFlyout()
|
|
||||||
{
|
public partial class ContainerFlyout : ContentView
|
||||||
InitializeComponent();
|
{
|
||||||
}
|
public DataManager DataMgr => (App.Current as App).DataMgr;
|
||||||
|
public User user => (App.Current as App).user;
|
||||||
// Bind MyFlyoutContent
|
|
||||||
public static readonly BindableProperty MyFlyoutContentProperty =
|
|
||||||
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerFlyout), new Grid());
|
public ContainerFlyout()
|
||||||
|
{
|
||||||
public View MyFlyoutContent
|
InitializeComponent();
|
||||||
{
|
BindingContext = this;
|
||||||
get => (View)GetValue(MyFlyoutContentProperty);
|
|
||||||
set => SetValue(MyFlyoutContentProperty, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bind IsNotConnected
|
// Bind MyFlyoutContent
|
||||||
public static readonly BindableProperty IsNotConnectedProperty =
|
public static readonly BindableProperty MyFlyoutContentProperty =
|
||||||
BindableProperty.Create("IsNotConnected", typeof(bool), typeof(Button), true);
|
BindableProperty.Create("MyFlyoutContent", typeof(View), typeof(ContainerFlyout), new Grid());
|
||||||
|
|
||||||
public bool IsNotConnected
|
public View MyFlyoutContent
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(IsNotConnectedProperty);
|
get => (View)GetValue(MyFlyoutContentProperty);
|
||||||
set => SetValue(IsNotConnectedProperty, value);
|
set => SetValue(MyFlyoutContentProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// bind NeedReturn
|
// Bind IsNotConnected
|
||||||
public static readonly BindableProperty NeedReturnProperty =
|
public static readonly BindableProperty IsNotConnectedProperty =
|
||||||
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
BindableProperty.Create("IsNotConnected", typeof(bool), typeof(Button), true);
|
||||||
|
|
||||||
public bool NeedReturn
|
public bool IsNotConnected
|
||||||
{
|
{
|
||||||
get => (bool)GetValue(NeedReturnProperty);
|
get => (bool)GetValue(IsNotConnectedProperty);
|
||||||
set => SetValue(NeedReturnProperty, value);
|
set => SetValue(IsNotConnectedProperty, value);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// bind NeedReturn
|
||||||
|
public static readonly BindableProperty NeedReturnProperty =
|
||||||
|
BindableProperty.Create("NeedReturn", typeof(bool), typeof(Border), false);
|
||||||
|
|
||||||
|
public bool NeedReturn
|
||||||
|
{
|
||||||
|
get => (bool)GetValue(NeedReturnProperty);
|
||||||
|
set => SetValue(NeedReturnProperty, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,9 +1,31 @@
|
|||||||
namespace Views;
|
using CommunityToolkit.Maui.Behaviors;
|
||||||
|
using DataPersistence;
|
||||||
public partial class MyProfil : ContentPage
|
using Model;
|
||||||
{
|
using System.Diagnostics;
|
||||||
public MyProfil()
|
|
||||||
{
|
namespace Views;
|
||||||
InitializeComponent();
|
|
||||||
}
|
public partial class MyProfil : ContentPage
|
||||||
|
{
|
||||||
|
public DataManager DataMgr => (App.Current as App).DataMgr;
|
||||||
|
public User user => (App.Current as App).user;
|
||||||
|
public User userBis {get; set; }
|
||||||
|
|
||||||
|
public MyProfil()
|
||||||
|
{
|
||||||
|
userBis = new User(user);
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
BindingContext = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Validation_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (String.IsNullOrEmpty(userBis.Name) || String.IsNullOrEmpty(userBis.Surname)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
user.Name = userBis.Name;
|
||||||
|
user.Surname = userBis.Surname;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in new issue