You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.6 KiB
51 lines
1.6 KiB
using Microsoft.VisualBasic;
|
|
using CommunityToolkit.Maui.Views;
|
|
|
|
namespace Stim;
|
|
public partial class UserInfo : ContentView
|
|
{
|
|
public bool IsPswd
|
|
{
|
|
get => (bool)GetValue(IsPswdProperty);
|
|
set => SetValue(IsPswdProperty, value);
|
|
}
|
|
public static readonly BindableProperty IsPswdProperty =
|
|
BindableProperty.Create(nameof(Name), typeof(bool), typeof(UserInfo), false);
|
|
public int LabelHeight
|
|
{
|
|
get => (int)GetValue(LabelHeightProperty);
|
|
set => SetValue(LabelHeightProperty, value);
|
|
}
|
|
public static readonly BindableProperty LabelHeightProperty =
|
|
BindableProperty.Create(nameof(Name), typeof(int), typeof(UserInfo), 32);
|
|
public event EventHandler PopUp;
|
|
public void popUp(object sender, EventArgs e)
|
|
{
|
|
PopUp?.Invoke(sender, e);
|
|
}
|
|
public string Name
|
|
{
|
|
get => (string)GetValue(NameProperty);
|
|
set => SetValue(NameProperty, value);
|
|
}
|
|
public static readonly BindableProperty NameProperty =
|
|
BindableProperty.Create(nameof(Name), typeof(string), typeof(UserInfo), "Erreur");
|
|
|
|
public int Button
|
|
{
|
|
get => (int)GetValue(ButtonProperty);
|
|
set => SetValue(ButtonProperty, value);
|
|
}
|
|
public static readonly BindableProperty ButtonProperty =
|
|
BindableProperty.Create(nameof(Button), typeof(int), typeof(UserInfo), 4);
|
|
|
|
public UserInfo()
|
|
{
|
|
InitializeComponent();
|
|
if (IsPswd)
|
|
{
|
|
Label.IsVisible = false;
|
|
}
|
|
else Label.IsVisible = true;
|
|
}
|
|
} |