[chore:] massive ui changes
This commit is contained in:
168
MainWindow.axaml
168
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">
|
||||
<Border>
|
||||
<Grid RowDefinitions="30,*">
|
||||
@@ -20,30 +20,88 @@
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<TabControl Grid.Row="1">
|
||||
<TabItem Header="Adressverwaltung">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="MapPinHouse" Width="32" Height="32" Size="32" />
|
||||
<Label FontSize="20" Content="Addressverwaltung" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<Grid RowDefinitions="*,*">
|
||||
<Grid Grid.Row="0">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<TextBox x:Name="TbFilename" Watermark="Dateipfad" Width="400" VerticalContentAlignment="Center" />
|
||||
<Button x:Name="BtnChooseFile" Margin="10,0,0,0" Click="BtnChooseFile_OnClick">
|
||||
<Grid ColumnDefinitions="*,*" Grid.Row="0">
|
||||
<!-- Kunden -->
|
||||
<Grid Margin="30,30,10,30">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0">
|
||||
<LucideIcon Kind="CircleUser" Width="16" Height="16" Size="16" />
|
||||
<Label Content="Kunden" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
<ListBox Grid.Row="1"
|
||||
Margin="0,5,0,0"
|
||||
x:Name="LstCustomers"
|
||||
Background="AliceBlue"
|
||||
SelectionMode="Single" />
|
||||
</Grid>
|
||||
|
||||
<!-- Address-Sets -->
|
||||
<Grid Margin="10,30,30,30" Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0">
|
||||
<LucideIcon Kind="NotebookTabs" Width="16" Height="16" Size="16" />
|
||||
<Label Content="Address-Sets" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
|
||||
<ListBox Grid.Row="1"
|
||||
x:Name="LstCustomerAdressSets"
|
||||
Background="AliceBlue"
|
||||
Margin="0,5,0,5"
|
||||
SelectionMode="Multiple,Toggle" />
|
||||
|
||||
<Button Grid.Row="2" HorizontalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="FolderOpen" Width="16" Height="16" Size="16" />
|
||||
<Label Content="Öffnen" VerticalContentAlignment="Center" />
|
||||
<LucideIcon Kind="Plus" Width="16" Height="16" Size="16" />
|
||||
<Label Content="Importieren" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<!-- <Grid Grid.Row="0"> -->
|
||||
<!-- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" -->
|
||||
<!-- HorizontalAlignment="Center"> -->
|
||||
<!-- <TextBox x:Name="TbFilename" Watermark="Dateipfad" Width="400" -->
|
||||
<!-- VerticalContentAlignment="Center" /> -->
|
||||
<!-- <Button x:Name="BtnChooseFile" Margin="10,0,0,0" Click="BtnChooseFile_OnClick"> -->
|
||||
<!-- <StackPanel Orientation="Horizontal"> -->
|
||||
<!-- <LucideIcon Kind="FolderOpen" Width="16" Height="16" Size="16" /> -->
|
||||
<!-- <Label Content="Öffnen" VerticalContentAlignment="Center" /> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </Button> -->
|
||||
<!-- </StackPanel> -->
|
||||
<!-- </Grid> -->
|
||||
<Grid Grid.ColumnDefinitions="*,*" Grid.Row="1">
|
||||
<StackPanel Grid.Column="0" Width="250" Orientation="Vertical" HorizontalAlignment="Right"
|
||||
Margin="0,0,5,0">
|
||||
<Button HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" Margin="0,0,0,10"
|
||||
<Button HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
||||
Margin="0,0,0,10"
|
||||
x:Name="BtnCheck" Click="BtnCheck_OnClick">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="SpellCheck" Width="36" Height="36" />
|
||||
<Label Content="Prüfen" VerticalContentAlignment="Center" FontSize="15" FontWeight="Bold" />
|
||||
<Label Content="Prüfen" VerticalContentAlignment="Center" FontSize="15"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="True" HorizontalContentAlignment="Center"
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="True"
|
||||
HorizontalContentAlignment="Center"
|
||||
Click="BtnCombine_OnClick" x:Name="BtnCombine"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -52,7 +110,8 @@
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="False" HorizontalContentAlignment="Center"
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="False"
|
||||
HorizontalContentAlignment="Center"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="Hammer" Width="36" Height="36" />
|
||||
@@ -63,18 +122,22 @@
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Width="250" Orientation="Vertical" HorizontalAlignment="Left"
|
||||
Margin="5,0,0,0">
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="False" HorizontalContentAlignment="Center"
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="False"
|
||||
HorizontalContentAlignment="Center"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="ListX" Width="36" Height="36" />
|
||||
<Label Content="Kürzen" VerticalContentAlignment="Center" FontSize="15" FontWeight="Bold" />
|
||||
<Label Content="Kürzen" VerticalContentAlignment="Center" FontSize="15"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="False" HorizontalContentAlignment="Center"
|
||||
<Button HorizontalAlignment="Stretch" IsEnabled="False"
|
||||
HorizontalContentAlignment="Center"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="Tags" Width="36" Height="36" />
|
||||
<Label Content="Etiketten generieren" VerticalContentAlignment="Center" FontSize="15"
|
||||
<Label Content="Etiketten generieren" VerticalContentAlignment="Center"
|
||||
FontSize="15"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
@@ -82,10 +145,73 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Personalverwaltung" IsEnabled="False"></TabItem>
|
||||
<TabItem Header="Finanzverwaltung" IsEnabled="False"></TabItem>
|
||||
<TabItem Header="Preisverwaltung" IsEnabled="False"></TabItem>
|
||||
<TabItem Header="Einstellungen" IsEnabled="False"></TabItem>
|
||||
<TabItem IsEnabled="False">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="Users" Width="32" Height="32" Size="32" />
|
||||
<Label FontSize="20" Content="Personalverwaltung" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem IsEnabled="False">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="BadgeEuro" Width="32" Height="32" Size="32" />
|
||||
<Label FontSize="20" Content="Finanzverwaltung" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem IsEnabled="False">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="ReceiptEuro" Width="32" Height="32" Size="32" />
|
||||
<Label FontSize="20" Content="Preisverwaltung" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem IsEnabled="True">
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="Settings" Width="32" Height="32" Size="32" />
|
||||
<Label FontSize="20" Content="Einstellungen" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<TabControl>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="FileCog" Width="16" Height="16" Size="16" />
|
||||
<Label FontSize="16" Content="Global" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<StackPanel Orientation="Vertical">
|
||||
<Grid ColumnDefinitions="400,*">
|
||||
<Label Grid.Column="0">config-Datei</Label>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||
<TextBox x:Name="TbConfigPath" HorizontalAlignment="Stretch"
|
||||
Watermark="/home/username/.config/logofclient/config.json" />
|
||||
<Button>
|
||||
<Button.Content>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="File" Width="16" Height="16" Size="16" />
|
||||
<Label Content="Öffnen..." VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</Button.Content>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="Contact" Width="16" Height="16" Size="16" />
|
||||
<Label FontSize="16" Content="Kunden" VerticalContentAlignment="Center" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user