[chore:] combine split into four possible variants of merging
This commit is contained in:
@@ -3,6 +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"
|
||||
MinWidth="1000" MinHeight="600"
|
||||
x:Class="Logof_Client.MainWindow" WindowState="Maximized" Icon="assets/icon.ico"
|
||||
Title="Logof Client">
|
||||
<Border>
|
||||
@@ -145,9 +146,53 @@
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid Grid.Row="2" Margin="20">
|
||||
<Grid Grid.Row="2" Margin="20" IsVisible="True" x:Name="GrdCalcMan">
|
||||
<Image Source="assets/calc_man.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="2" Margin="20" IsVisible="False" x:Name="GrdCombineTypes">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="10"
|
||||
Margin="5,0,0,0">
|
||||
<Button HorizontalAlignment="Stretch" MinWidth="240"
|
||||
HorizontalContentAlignment="Center" x:Name="BtnCombineUnion"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="SquaresUnite" Width="36" Height="36" />
|
||||
<Label Content="Vereinigung" VerticalContentAlignment="Center" FontSize="15"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch" MinWidth="240"
|
||||
HorizontalContentAlignment="Center" x:Name="BtnCombineIntersect"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="SquaresIntersect" Width="36" Height="36" />
|
||||
<Label Content="Schnittmenge" VerticalContentAlignment="Center"
|
||||
FontSize="15"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch" MinWidth="240"
|
||||
HorizontalContentAlignment="Center" x:Name="BtnCombineDifference"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="SquaresSubtract" Width="36" Height="36" />
|
||||
<Label Content="Differenz" VerticalContentAlignment="Center"
|
||||
FontSize="15"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
<Button HorizontalAlignment="Stretch" MinWidth="240"
|
||||
HorizontalContentAlignment="Center" x:Name="BtnCombineSymmetric"
|
||||
Margin="0,0,0,10">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<LucideIcon Kind="SquaresExclude" Width="36" Height="36" />
|
||||
<Label Content="Symmetrische Differenz" VerticalContentAlignment="Center"
|
||||
FontSize="15"
|
||||
FontWeight="Bold" />
|
||||
</StackPanel>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem IsEnabled="False">
|
||||
|
||||
@@ -108,6 +108,7 @@ public partial class MainWindow : Window
|
||||
|
||||
private void BtnCheck_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
MakeCalcManVisible();
|
||||
if (LstCustomerAdressSets.SelectedIndex == -1)
|
||||
{
|
||||
MessageBox.Show(null, "Bitte zunächst ein Adress-Set auswählen", "Kein Adress-Set ausgewählt");
|
||||
@@ -135,17 +136,19 @@ public partial class MainWindow : Window
|
||||
|
||||
private void BtnCombine_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
if (filePath == null)
|
||||
{
|
||||
MessageBox.Show(null, "Bitte zunächst eine Datei auswählen", "Datei fehlt");
|
||||
return;
|
||||
GrdCalcMan.IsVisible = false;
|
||||
GrdCombineTypes.IsVisible = true;
|
||||
}
|
||||
|
||||
StartCombine(filePath);
|
||||
private void MakeCalcManVisible()
|
||||
{
|
||||
GrdCalcMan.IsVisible = true;
|
||||
GrdCombineTypes.IsVisible = false;
|
||||
}
|
||||
|
||||
private async void StartCombine(Uri path)
|
||||
{
|
||||
MakeCalcManVisible();
|
||||
var addresses = DataImport.ImportKasAddressList(path);
|
||||
var progressWindow = new ProgressWindow();
|
||||
var address_list = new List<KasAddressList> { addresses.Item2 };
|
||||
@@ -294,6 +297,7 @@ public partial class MainWindow : Window
|
||||
|
||||
private void LstCustomers_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
MakeCalcManVisible();
|
||||
if (LstCustomers.SelectedItems == null || LstCustomers.SelectedIndex == -1) return;
|
||||
var customer_id = int.Parse(LstCustomers.SelectedItem.ToString().Split(" - ")[0]);
|
||||
RefreshAddressSetListItems(customer_id);
|
||||
@@ -301,6 +305,7 @@ public partial class MainWindow : Window
|
||||
|
||||
private async void BtnCustomerAddressSetImport_OnClick(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
MakeCalcManVisible();
|
||||
var opts = new FilePickerOpenOptions();
|
||||
opts.Title = "Address-Set importieren...";
|
||||
opts.AllowMultiple = false;
|
||||
@@ -361,7 +366,14 @@ public partial class MainWindow : Window
|
||||
|
||||
public void RefreshAddressSetListItems(int customer_id)
|
||||
{
|
||||
BtnCheck.IsEnabled = false;
|
||||
BtnCombine.IsEnabled = false;
|
||||
BtnGenerateLabels.IsEnabled = false;
|
||||
BtnRepair.IsEnabled = false;
|
||||
BtnShorten.IsEnabled = false;
|
||||
|
||||
if (LstCustomers.SelectedIndex < 0) return;
|
||||
|
||||
LstCustomerAdressSets.SelectedItems = null;
|
||||
LstCustomerAdressSets.Items.Clear();
|
||||
foreach (var k in Settings._instance.addressSets.addresses)
|
||||
@@ -372,11 +384,11 @@ public partial class MainWindow : Window
|
||||
|
||||
private void LstCustomerAdressSets_OnSelectionChanged(object? sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
MakeCalcManVisible();
|
||||
if (LstCustomerAdressSets.SelectedItems == null || LstCustomerAdressSets.SelectedIndex == -1)
|
||||
{
|
||||
BtnCheck.IsEnabled = false;
|
||||
BtnCombine.IsEnabled = false;
|
||||
|
||||
BtnGenerateLabels.IsEnabled = false;
|
||||
BtnRepair.IsEnabled = false;
|
||||
BtnShorten.IsEnabled = false;
|
||||
|
||||
Reference in New Issue
Block a user