sample_demo/ServiceApp/MainWindow.axaml.cs

27 lines
692 B
C#

using Avalonia.Controls;
namespace ServiceApp
{
public partial class MainWindow : Window
{
private string _secretCode = "0000";
public MainWindow()
{
InitializeComponent();
}
private void LoginClientButton_Click(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
new ServiceWindow().Show();
this.Close();
}
private void LoginAdminButton_Click(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
if (CodeTextBox.Text == _secretCode) {
new ServiceAdminWindow().Show();
this.Close();
}
}
}
}