Compare commits

...

3 Commits

Author SHA1 Message Date
5567d9f25a Bump version to 0.9.2
All checks were successful
Test / Run tests (push) Successful in 2m7s
Deploy / Build and Deploy (push) Successful in 2m50s
2024-08-01 16:06:13 +02:00
4403754ada MemberAdminWindow: Fix error when saving telephone numbers
All checks were successful
Test / Run tests (push) Successful in 2m23s
2024-08-01 15:57:49 +02:00
8db6007264 MainWindow: Fix closing behaviour when other windows are open
All checks were successful
Test / Run tests (push) Successful in 2m24s
2024-08-01 13:49:04 +02:00
5 changed files with 32 additions and 10 deletions

View File

@ -3,6 +3,19 @@ Changelog
=========
[v0.9.2][v0.9.2] (2024-08-01) {#v0.9.2}
---------------------------------------
### Behobene Fehler {#v0.9.2-bugfixes}
* Verhalten beim Schließen des Haupt-Fensters (`MainWindow`) nicht immer richtig. (8db6007264)
* Im Mitglieder-Fenster (`MemberAdminWindow`) führt beim Erstellen eines Mitglied das Eingeben einer Tel.-Nr. zu einem Fehler. (4403754ada)
[v0.9.2]: https://git.necronda.net/winzer/elwig/releases/tag/v0.9.2
[v0.9.1][v0.9.1] (2024-08-01) {#v0.9.1}
---------------------------------------

View File

@ -7,7 +7,7 @@
<UseWPF>true</UseWPF>
<PreserveCompilationContext>true</PreserveCompilationContext>
<ApplicationIcon>Resources\Images\Elwig.ico</ApplicationIcon>
<Version>0.9.1</Version>
<Version>0.9.2</Version>
<SatelliteResourceLanguages>de-AT</SatelliteResourceLanguages>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplicationManifest>app.manifest</ApplicationManifest>

View File

@ -549,7 +549,7 @@ namespace Elwig.Services {
ctx.RemoveRange(ctx.MemberTelephoneNrs.Where(t => t.MgNr == oldMgNr));
ctx.AddRange(vm.PhoneNrs
.Where(input => input.Number != null)
.Where(input => input.Number != null && input.Number != "")
.Select((input, i) => new MemberTelNr {
MgNr = m.MgNr,
Nr = i + 1,

View File

@ -402,7 +402,7 @@ namespace Elwig.Windows {
protected bool InputLostFocus(TextBox input, ValidationResult res, string? msg = null) {
if (DoShowWarningWindows && !res.IsValid && !IsClosing && (IsEditing || IsCreating))
MessageBox.Show(res.ErrorContent.ToString(), msg ?? res.ErrorContent.ToString(), MessageBoxButton.OK, MessageBoxImage.Warning);
MessageBox.Show(res.ErrorContent?.ToString(), msg ?? res.ErrorContent?.ToString(), MessageBoxButton.OK, MessageBoxImage.Warning);
return res.IsValid;
}

View File

@ -13,6 +13,7 @@ using System.IO;
using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@ -37,13 +38,21 @@ namespace Elwig.Windows {
}
private void Window_Closing(object sender, CancelEventArgs evt) {
if (App.NumWindows > 1 && !App.ForceShutdown && !App.Current.Windows.Cast<Window>().Any(w => ((w as AdministrationWindow)?.IsEditing ?? false) || ((w as AdministrationWindow)?.IsCreating ?? false))) {
var res = MessageBox.Show("Es sind noch weitere Fenster geöffnet.\nSollen alle Fenster geschlossen werden?",
"Elwig beenden", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No);
if (res != MessageBoxResult.Yes) {
evt.Cancel = true;
} else {
Application.Current.Shutdown();
if (App.NumWindows > 1 && !App.ForceShutdown) {
foreach (var w in App.Current.Windows.Cast<Window>().Where(w => ((w as AdministrationWindow)?.IsEditing ?? false) || ((w as AdministrationWindow)?.IsCreating ?? false))) {
try {
w.Close();
} catch { }
}
Thread.Sleep(100);
if (App.NumWindows > 1 && !App.Current.Windows.Cast<Window>().Any(w => ((w as AdministrationWindow)?.IsEditing ?? false) || ((w as AdministrationWindow)?.IsCreating ?? false))) {
var res = MessageBox.Show("Es sind noch weitere Fenster geöffnet.\nSollen alle Fenster geschlossen werden?",
"Elwig beenden", MessageBoxButton.YesNo, MessageBoxImage.Warning, MessageBoxResult.No);
if (res != MessageBoxResult.Yes) {
evt.Cancel = true;
} else {
Application.Current.Shutdown();
}
}
}
}