diff --git a/DataStore/DataStructures.cs b/DataStore/DataStructures.cs index b082d93..b715dbd 100644 --- a/DataStore/DataStructures.cs +++ b/DataStore/DataStructures.cs @@ -212,4 +212,9 @@ public class KasPersonError return output; } + + public string ToString(KasPerson person) + { + return "ID:"+person.id + "; Name: " +person.name +"; Errors: " + GetString(); + } } diff --git a/ProgressWindow.axaml.cs b/ProgressWindow.axaml.cs index a9fa277..40cacc6 100644 --- a/ProgressWindow.axaml.cs +++ b/ProgressWindow.axaml.cs @@ -16,9 +16,9 @@ public partial class ProgressWindow : Window 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(); } } \ No newline at end of file diff --git a/ResultWindow.axaml b/ResultWindow.axaml index cdbbbff..7ab0b09 100644 --- a/ResultWindow.axaml +++ b/ResultWindow.axaml @@ -20,7 +20,9 @@ Margin="10,10,10,10" /> - + + + diff --git a/ResultWindow.axaml.cs b/ResultWindow.axaml.cs index 39c7089..096c98a 100644 --- a/ResultWindow.axaml.cs +++ b/ResultWindow.axaml.cs @@ -32,8 +32,12 @@ public partial class ResultWindow : Window var result_with_errors = result.Where(p => p.PersonError != null).ToList(); LblResultCount.Content = $"{result_with_errors.Count}/{ur_result.Count} Ergebnisse"; - StkResults.Children.Clear(); - foreach (var person in result_with_errors) StkResults.Children.Add(CreatePersonGrid(person)); + // TbResults.Text = ""; + // 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) @@ -201,8 +205,12 @@ public partial class ResultWindow : Window LblResultCount.Content = $"{temp_result.Count}/{ur_result.Count} Ergebnisse"; - StkResults.Children.Clear(); - foreach (var person in temp_result) StkResults.Children.Add(CreatePersonGrid(person)); + LbResults.Items.Clear(); + 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)); } diff --git a/Tasks/AddressCheck.cs b/Tasks/AddressCheck.cs index 5e7e455..936871b 100644 --- a/Tasks/AddressCheck.cs +++ b/Tasks/AddressCheck.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -247,7 +248,7 @@ public class AddressCheck await Dispatcher.UIThread.InvokeAsync(() => { 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); });