Compare commits

..

4 Commits

Author SHA1 Message Date
4b8cd2a0d7 Bump version to 1.0.0.4
All checks were successful
Test / Run tests (push) Successful in 1m40s
Deploy / Build and Deploy (push) Successful in 1m45s
2025-09-01 22:03:46 +02:00
104798d4f2 DeliveryAdminWindow: Enable WineQualityLevelInput in Übernahme
All checks were successful
Test / Run tests (push) Successful in 2m14s
2025-09-01 21:55:22 +02:00
4653a4f129 LogWindow: Improve loading time
All checks were successful
Test / Run tests (push) Successful in 1m46s
2025-08-20 16:33:25 +02:00
07f9a0f522 Utils: Fix thread error when sending emails
All checks were successful
Test / Run tests (push) Successful in 2m27s
2025-08-19 15:42:47 +02:00
5 changed files with 53 additions and 36 deletions

View File

@@ -2,6 +2,23 @@
Changelog
=========
[v1.0.0.4][v1.0.0.4] (2025-09-01) {#v1.0.0.4}
---------------------------------------------
### Behobene Fehler {#v1.0.0.4-bugfixes}
* Absturz beim Verschicken von einzelnen E-Mails außerhalb des Rundschreiben-Fensters (`MailWindow`) behoben. (07f9a0f522)
### Sonstiges {#v1.0.0.4-misc}
* Ladezeit des Fehler-Protokoll-Fensters (`LogWindow`) verbessert. (4653a4f129)
* Im Übernahme-Fenster (`DeliveryAdminWindow`) ist es nun möglich die Qualitätsstufe zu verändern. (104798d4f2)
[v1.0.0.4]: https://git.necronda.net/winzer/elwig/releases/tag/v1.0.0.4
[v1.0.0.3][v1.0.0.3] (2025-08-11) {#v1.0.0.3}
---------------------------------------------

View File

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

View File

@@ -498,10 +498,7 @@ namespace Elwig.Helpers {
public static async Task<bool> SendEmail(Member member, string subject, string text, IEnumerable<Document> docs) {
if (App.Config.Smtp == null)
return false;
Mouse.OverrideCursor = Cursors.Wait;
var success = await Task.Run(async () => {
return await Task.Run(async () => {
SmtpClient? client = null;
try {
client = await GetSmtpClient();
@@ -529,18 +526,15 @@ namespace Elwig.Helpers {
}
return true;
});
Mouse.OverrideCursor = null;
return success;
}
public static async Task ExportDocument(Document doc, ExportMode mode, string? filename = null, (Member, string, string)? emailData = null) {
public static async Task ExportDocument(Document doc, ExportMode mode, string? filename = null, (Member Member, string Subject, string Text)? emailData = null) {
if (mode == ExportMode.Print && !App.Config.Debug) {
await doc.Generate();
await doc.Print();
} else if (mode == ExportMode.Email && emailData is (Member, string, string) e) {
await doc.Generate();
var success = await SendEmail(e.Item1, e.Item2, e.Item3, [doc]);
var success = await SendEmail(e.Member, e.Subject, e.Text, [doc]);
if (success)
MessageBox.Show("Die E-Mail wurde erfolgreich verschickt!", "E-Mail verschickt",
MessageBoxButton.OK, MessageBoxImage.Information);
@@ -567,9 +561,7 @@ namespace Elwig.Helpers {
Log = "Application",
Source = ".NET Runtime",
};
return log.Entries.Cast<EventLogEntry>()
.Where(e => e.Message.StartsWith("Application: Elwig.exe"))
.ToList();
return [.. log.Entries.OfType<EventLogEntry>().Where(e => e.InstanceId == 1026).Where(e => e.Message.StartsWith("Application: Elwig.exe"))];
}
public static int GetEntityIdetifierForPk(params object?[] primaryKey) {

View File

@@ -350,7 +350,7 @@ namespace Elwig.Windows {
ViewModel.IsGebunden = null;
InitialDefaultInputs();
WineQualityLevelInput.IsEnabled = false;
//WineQualityLevelInput.IsEnabled = false; // disable wine quality level input in Übernahme
ValidateRequiredInputs();
}

View File

@@ -1,7 +1,9 @@
using Elwig.Helpers;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace Elwig.Windows {
public partial class LogWindow : Window {
@@ -11,28 +13,34 @@ namespace Elwig.Windows {
WindowState = WindowState.Maximized;
}
private void Window_Loaded(object sender, RoutedEventArgs evt) {
var log = Utils.GetLogEntries();
EventList.ItemsSource = log
.Select(e => new {
Event = e,
Lines = e.Message.Split('\n').ToArray(),
})
.Select(e => new {
e.Event,
Exception = e.Lines.FirstOrDefault(l => l.StartsWith("Exception Info: "))?[16..].Trim().Split(':', 2),
Location = e.Lines.FirstOrDefault(l => l.StartsWith(" at Elwig."))?[5..].Trim(),
})
.Select(e => new {
e.Event,
e.Exception,
ExceptionName = e.Exception?[0].Trim(),
ExceptionMessage = e.Exception?.Length >= 2 ? e.Exception?[1].Trim() : null,
e.Location,
})
.OrderByDescending(e => e.Event.TimeGenerated)
.ToList();
EventList.SelectedIndex = 0;
private async void Window_Loaded(object sender, RoutedEventArgs evt) {
Mouse.OverrideCursor = Cursors.Wait;
await Task.Run(async () => {
var list = Utils.GetLogEntries()
.Select(e => new {
Event = e,
Lines = e.Message.Split('\n').ToArray(),
})
.Select(e => new {
e.Event,
Exception = e.Lines.FirstOrDefault(l => l.StartsWith("Exception Info: "))?[16..].Trim().Split(':', 2),
Location = e.Lines.FirstOrDefault(l => l.StartsWith(" at Elwig."))?[5..].Trim(),
})
.Select(e => new {
e.Event,
e.Exception,
ExceptionName = e.Exception?[0].Trim(),
ExceptionMessage = e.Exception?.Length >= 2 ? e.Exception?[1].Trim() : null,
e.Location,
})
.OrderByDescending(e => e.Event.TimeGenerated)
.ToList();
await App.MainDispatcher.BeginInvoke(() => {
EventList.ItemsSource = list;
EventList.SelectedIndex = 0;
});
});
Mouse.OverrideCursor = null;
}
private void EventList_SelectionChanged(object sender, RoutedEventArgs evt) {