1 Commits

Author SHA1 Message Date
fierke 56233e6f5c [chore:] tiny improvements for address check 2026-05-02 15:39:42 +02:00
5 changed files with 24 additions and 8 deletions
+5
View File
@@ -212,4 +212,9 @@ public class KasPersonError
return output; return output;
} }
public string ToString(KasPerson person)
{
return "ID:"+person.id + "; Name: " +person.name +"; Errors: " + GetString();
}
} }
+2 -2
View File
@@ -16,9 +16,9 @@ public partial class ProgressWindow : Window
PbProgress.Value = percentage; PbProgress.Value = percentage;
} }
public void AddToLog(string message) public void AddToLog(string message, string percent)
{ {
TbLog.Text = message; TbLog.Text = message + $"\n{percent}%";
//ScvLog.ScrollToEnd(); //ScvLog.ScrollToEnd();
} }
} }
+3 -1
View File
@@ -20,7 +20,9 @@
Margin="10,10,10,10" /> Margin="10,10,10,10" />
</Grid> </Grid>
<ScrollViewer Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"> <ScrollViewer Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel x:Name="StkResults" Orientation="Vertical" Margin="10" /> <!-- <TextBlock x:Name="TbResults"></TextBlock> -->
<ListBox x:Name="LbResults"></ListBox>
<!-- <StackPanel x:Name="StkResults" Orientation="Vertical" Margin="10" /> -->
</ScrollViewer> </ScrollViewer>
</Grid> </Grid>
+12 -4
View File
@@ -32,8 +32,12 @@ public partial class ResultWindow : Window
var result_with_errors = result.Where(p => p.PersonError != null).ToList(); var result_with_errors = result.Where(p => p.PersonError != null).ToList();
LblResultCount.Content = $"{result_with_errors.Count}/{ur_result.Count} Ergebnisse"; LblResultCount.Content = $"{result_with_errors.Count}/{ur_result.Count} Ergebnisse";
StkResults.Children.Clear(); // TbResults.Text = "";
foreach (var person in result_with_errors) StkResults.Children.Add(CreatePersonGrid(person)); // foreach (var person in result_with_errors) TbResults.Text += person.PersonError.GetString()+"\n";
LbResults.Items.Clear();
foreach (var person in result_with_errors) LbResults.Items.Add(person.PersonError.ToString(person));
// StkResults.Children.Clear();
// foreach (var person in result_with_errors) StkResults.Children.Add(CreatePersonGrid(person));
} }
private Grid CreatePersonGrid(KasPerson person) private Grid CreatePersonGrid(KasPerson person)
@@ -201,8 +205,12 @@ public partial class ResultWindow : Window
LblResultCount.Content = $"{temp_result.Count}/{ur_result.Count} Ergebnisse"; LblResultCount.Content = $"{temp_result.Count}/{ur_result.Count} Ergebnisse";
StkResults.Children.Clear(); LbResults.Items.Clear();
foreach (var person in temp_result) StkResults.Children.Add(CreatePersonGrid(person)); foreach (var person in temp_result) LbResults.Items.Add(person.PersonError.ToString(person));
// TbResults.Text = "";
// foreach (var person in temp_result) TbResults.Text += person.PersonError.GetString() +"\n";
// StkResults.Children.Clear();
// foreach (var person in temp_result) StkResults.Children.Add(CreatePersonGrid(person));
} }
+2 -1
View File
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@@ -247,7 +248,7 @@ public class AddressCheck
await Dispatcher.UIThread.InvokeAsync(() => await Dispatcher.UIThread.InvokeAsync(() =>
{ {
if (hasFaults) if (hasFaults)
_progress.AddToLog($"Person mit id {person.id} ist fehlerhaft"); _progress.AddToLog($"Person mit id {person.id} ist fehlerhaft", Convert.ToInt32(percent).ToString());
_progress.ChangePercentage(percent); _progress.ChangePercentage(percent);
}); });