Files
annotations/Azaion.Suite/Login.xaml.cs
T
Alex Bezdieniezhnykh 6429ad62c2 refactor external clients
put model batch size as parameter in config
2025-03-24 00:33:41 +02:00

40 lines
999 B
C#

using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Azaion.Common.DTO;
using Azaion.CommonSecurity.DTO;
namespace Azaion.Suite;
public partial class Login
{
public bool MainSuiteOpened { get; set; } = false;
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));
MainSuiteOpened = true;
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();
}
}