BaseDataWindow: Use Cursors.Wait instead of Cursors.AppStarting

This commit is contained in:
2024-10-13 21:34:57 +02:00
parent 39d749ad2d
commit ca1fb0f5e8
2 changed files with 5 additions and 6 deletions

View File

@ -157,7 +157,7 @@ namespace Elwig.Windows {
}
var d = new NewSeasonDialog(s, currencies);
if (d.ShowDialog() == true) {
Mouse.OverrideCursor = Cursors.AppStarting;
Mouse.OverrideCursor = Cursors.Wait;
try {
using var ctx = new AppDbContext();
ctx.Add(new Season {
@ -209,7 +209,7 @@ namespace Elwig.Windows {
$"Soll die Saison {s.Year} wirklich unwiderruflich gelöscht werden?",
"Saison löschen", MessageBoxButton.OKCancel, MessageBoxImage.Warning, MessageBoxResult.Cancel);
if (r == MessageBoxResult.OK) {
Mouse.OverrideCursor = Cursors.AppStarting;
Mouse.OverrideCursor = Cursors.Wait;
try {
using var ctx = new AppDbContext();
ctx.Remove(s);

View File

@ -318,8 +318,7 @@ namespace Elwig.Windows {
private async void SaveButton_Click(object? sender, RoutedEventArgs? evt) {
SaveButton.IsEnabled = false;
Mouse.OverrideCursor = Cursors.AppStarting;
Mouse.OverrideCursor = Cursors.Wait;
try {
await Save();
} catch (Exception exc) {
@ -327,9 +326,8 @@ namespace Elwig.Windows {
if (exc.InnerException != null) str += "\n\n" + exc.InnerException.Message;
MessageBox.Show(str, "Stammdaten aktualisieren", MessageBoxButton.OK, MessageBoxImage.Error);
SaveButton.IsEnabled = true;
return;
} finally {
Mouse.OverrideCursor = null;
return;
}
IsEditing = false;
@ -349,6 +347,7 @@ namespace Elwig.Windows {
}
App.HintContextChange();
Mouse.OverrideCursor = null;
}
private void FillInputs(ClientParameters p, Season? s) {