[chore:] tiny improvements for address check
This commit is contained in:
@@ -212,4 +212,9 @@ public class KasPersonError
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public string ToString(KasPerson person)
|
||||
{
|
||||
return "ID:"+person.id + "; Name: " +person.name +"; Errors: " + GetString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -20,7 +20,9 @@
|
||||
Margin="10,10,10,10" />
|
||||
</Grid>
|
||||
<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>
|
||||
|
||||
</Grid>
|
||||
|
||||
+12
-4
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user