Files
annotations/Azaion.Suite/Login.xaml.cs
T
2024-12-05 00:34:00 +02:00

36 lines
878 B
C#

using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Azaion.Common.DTO;
namespace Azaion.Suite;
public partial class Login
{
public Login()
{
InitializeComponent();
}
public event EventHandler<ApiCredentials>? CredentialsEntered;
private void LoginClick(object sender, RoutedEventArgs e)
{
LoginBtn.Cursor = Cursors.Wait;
Cursor = Cursors.Wait;
CredentialsEntered?.Invoke(this, new ApiCredentials(TbEmail.Text, TbPassword.Password));
Close();
}
private void CloseClick(object sender, RoutedEventArgs e) => Close();
private void MainMouseMove(object sender, MouseEventArgs e)
{
if (e.OriginalSource is Button || e.OriginalSource is TextBox)
return;
if (e.LeftButton == MouseButtonState.Pressed)
DragMove();
}
}