Files
annotations/Azaion.Suite/Login.xaml.cs
T
Alex Bezdieniezhnykh 60519461a1 rework to have only 1 exe!
2024-12-04 20:51:26 +02:00

34 lines
807 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)
{
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();
}
}