38 lines
967 B
C#
38 lines
967 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Interactivity;
|
|
using Avalonia.Media;
|
|
using Project.Controller;
|
|
using Project.Model;
|
|
using Project.Persistence;
|
|
|
|
namespace Project.View;
|
|
|
|
public partial class NewLogin : Window
|
|
{
|
|
readonly AppController? _controller;
|
|
public NewLogin()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
public NewLogin(AppController controller)
|
|
{
|
|
InitializeComponent();
|
|
_controller = controller;
|
|
}
|
|
|
|
private void NewLoginSaveOnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
string username = NewLoginUsernameBox.Text?.Trim();
|
|
string password = NewLoginPasswordBox.Text?.Trim();
|
|
string email = NewLoginEmailBox.Text?.Trim();
|
|
//give strings to appcontroller and keep working on them there
|
|
AppController.NewLoginSave(username, password, email);
|
|
Close();
|
|
}
|
|
|
|
private void NewLoginCancelOnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
} |