[feat:] csv-divider-buttons
This commit is contained in:
+10
-2
@@ -485,12 +485,20 @@
|
|||||||
TextChanged="TbSettingsCustomerSenderAddress_OnTextChanged"
|
TextChanged="TbSettingsCustomerSenderAddress_OnTextChanged"
|
||||||
x:Name="TbSettingsCustomerSenderAddress" />
|
x:Name="TbSettingsCustomerSenderAddress" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid ColumnDefinitions="150,*">
|
<Grid ColumnDefinitions="150,*,Auto">
|
||||||
<Label Content="CSV-Trennzeichen" />
|
<Label Content="CSV-Trennzeichen" />
|
||||||
<TextBox Grid.Column="1" Watermark=","
|
<TextBox Grid.Column="1" Watermark=","
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch" Margin="0,0,5,0"
|
||||||
TextChanged="TbSettingsCustomerCsvSeparator_OnTextChanged"
|
TextChanged="TbSettingsCustomerCsvSeparator_OnTextChanged"
|
||||||
x:Name="TbSettingsCustomerCsvSeparator" />
|
x:Name="TbSettingsCustomerCsvSeparator" />
|
||||||
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="5">
|
||||||
|
<Button Click="ChangeCSVDivider" Content=","></Button>
|
||||||
|
<Button Click="ChangeCSVDivider" Content=";"></Button>
|
||||||
|
<Button Click="ChangeCSVDivider" Content="TAB"></Button>
|
||||||
|
<Button Click="ChangeCSVDivider" Content="|"></Button>
|
||||||
|
<Button Click="ChangeCSVDivider" Content="SPACE"></Button>
|
||||||
|
<Button Click="ChangeCSVDivider" Content=":"></Button>
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid ColumnDefinitions="150,*">
|
<Grid ColumnDefinitions="150,*">
|
||||||
<Label Content="Address-Patch-Info" />
|
<Label Content="Address-Patch-Info" />
|
||||||
|
|||||||
@@ -1120,4 +1120,21 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
StartAddressShortener((KasAddressList)LstCustomerAdressSets.SelectedItem);
|
StartAddressShortener((KasAddressList)LstCustomerAdressSets.SelectedItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ChangeCSVDivider(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string div = (sender as Button).Content as string;
|
||||||
|
if (div == "TAB") div = "\t";
|
||||||
|
if (div == "SPACE") div = " ";
|
||||||
|
TbSettingsCustomerCsvSeparator.Text = div;
|
||||||
|
Settings.Save();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Console.WriteLine("Error while parsing");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user