fix keyboard event retrieving for dataset explorer

This commit is contained in:
Alex Bezdieniezhnykh
2024-12-05 00:34:00 +02:00
parent 60519461a1
commit 626767469a
3 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -88,9 +88,8 @@ public partial class App
AppDomain.CurrentDomain.AssemblyResolve += (_, a) => _resourceLoader.LoadAssembly(a.Name);
StartMain();
EventManager.RegisterClassHandler(typeof(UIElement), UIElement.KeyDownEvent, new RoutedEventHandler(GlobalClick));
await _host.StartAsync();
EventManager.RegisterClassHandler(typeof(UIElement), UIElement.KeyDownEvent, new RoutedEventHandler(GlobalClick));
_host.Services.GetRequiredService<MainSuite>().Show();
};
@@ -169,7 +168,6 @@ public partial class App
private void GlobalClick(object sender, RoutedEventArgs e)
{
var args = (KeyEventArgs)e;
var keyEvent = new KeyEvent(sender, args, _formState.ActiveWindow);
_ = ThrottleExt.Throttle(() => _mediator.Publish(keyEvent), TimeSpan.FromMilliseconds(50));
}
+2
View File
@@ -16,6 +16,8 @@ public partial class Login
private void LoginClick(object sender, RoutedEventArgs e)
{
LoginBtn.Cursor = Cursors.Wait;
Cursor = Cursors.Wait;
CredentialsEntered?.Invoke(this, new ApiCredentials(TbEmail.Text, TbPassword.Password));
Close();
}