diff --git a/MainWindow.axaml b/MainWindow.axaml index 47003a1..28371f3 100644 --- a/MainWindow.axaml +++ b/MainWindow.axaml @@ -3,7 +3,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" - x:Class="Logof_Client.MainWindow" + x:Class="Logof_Client.MainWindow" WindowState="Maximized" Title="Logof Client"> @@ -20,30 +20,88 @@ - + + + + + + - - - - - + + + + + + + + + + + + + + - - - - @@ -82,12 +145,75 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs index e4069a9..293ee9e 100644 --- a/MainWindow.axaml.cs +++ b/MainWindow.axaml.cs @@ -17,24 +17,7 @@ public partial class MainWindow : Window { InitializeComponent(); _instance = this; - // try - // { - // var temppath = "kaspersons.csv"; - // var result = DataImport.ImportKasAddressList(new Uri(temppath)); - // if (result.Item1) - // { - // var check_result = new AddressCheck().Perform(result.Item2); - // foreach (var item in check_result.Result) - // { - // Console.WriteLine(); - // Console.Write(item.Item1 + " "); - // foreach (var error in item.Item2) Console.Write(error + ", "); - // } - // } - // } - // catch - // { - // } + WindowState = WindowState.Maximized; } private async void StartAddressCheck(Uri path) @@ -42,20 +25,37 @@ public partial class MainWindow : Window var addresses = DataImport.ImportKasAddressList(path); // Ihr Code hier var progressWindow = new ProgressWindow(); - // Fenster anzeigen (nicht blockierend) progressWindow.Show(_instance); var processor = new AddressCheck(progressWindow); var result = await processor.Perform(addresses.Item2); - // Nach Verarbeitung schließen + progressWindow.Close(); - // Ergebnis anzeigen, z.B. als Dialog + new ResultWindow(result, addresses.Item2).Show(); //await MessageBox.Show(_instance, $"{result.Count} Einträge fehlerhaft.", "Fertig"); } + private async void StartAddressRepair(Uri path) + { + var addresses = DataImport.ImportKasAddressList(path); // Ihr Code hier + var progressWindow = new ProgressWindow(); + + progressWindow.Show(_instance); + + var processor = new AddressRepair(progressWindow); + //var result = await processor.Perform(addresses.Item2, errors); + + + progressWindow.Close(); + + + //new ResultWindow(result, addresses.Item2).Show(); + //await MessageBox.Show(_instance, $"{result.Count} Einträge fehlerhaft.", "Fertig"); + } + private void MnuExit_OnClick(object? sender, RoutedEventArgs e) { Environment.Exit(0); @@ -99,7 +99,7 @@ public partial class MainWindow : Window }); if (file == null) return; - TbFilename.Text = file[0].Path.ToString(); + //TbFilename.Text = file[0].Path.ToString(); filePath = file[0].Path; }