Compare commits
2 Commits
30e42afe35
...
1ad57543d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ad57543d1 | ||
|
|
6cd4ea2df6 |
@@ -329,6 +329,13 @@
|
|||||||
TextChanged="TbSettingsCustomerDescription_OnTextChanged"
|
TextChanged="TbSettingsCustomerDescription_OnTextChanged"
|
||||||
x:Name="TbSettingsCustomerDescription" />
|
x:Name="TbSettingsCustomerDescription" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="150,*">
|
||||||
|
<Label Content="Absenderadresse" />
|
||||||
|
<TextBox Grid.Column="1" Watermark="Absenderadresse"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
TextChanged="TbSettingsCustomerSenderAddress_OnTextChanged"
|
||||||
|
x:Name="TbSettingsCustomerSenderAddress" />
|
||||||
|
</Grid>
|
||||||
<Grid ColumnDefinitions="150,*">
|
<Grid ColumnDefinitions="150,*">
|
||||||
<Label Content="CSV-Trennzeichen" />
|
<Label Content="CSV-Trennzeichen" />
|
||||||
<TextBox Grid.Column="1" Watermark=","
|
<TextBox Grid.Column="1" Watermark=","
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
TbSettingsCustomerDescription.Text = customer.description;
|
TbSettingsCustomerDescription.Text = customer.description;
|
||||||
TbSettingsCustomerName.Text = customer.name;
|
TbSettingsCustomerName.Text = customer.name;
|
||||||
|
TbSettingsCustomerSenderAddress.Text = customer.sender_address;
|
||||||
TbSettingsCustomerCsvSeparator.Text = customer.separator.ToString();
|
TbSettingsCustomerCsvSeparator.Text = customer.separator.ToString();
|
||||||
if (customer.patch != null)
|
if (customer.patch != null)
|
||||||
TbSettingsCustomerPatchInfo.Text = customer.patch.ToString();
|
TbSettingsCustomerPatchInfo.Text = customer.patch.ToString();
|
||||||
@@ -565,4 +566,12 @@ public partial class MainWindow : Window
|
|||||||
"output.pdf"
|
"output.pdf"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TbSettingsCustomerSenderAddress_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LstSettingsCustomers.SelectedIndex == null || LstSettingsCustomers.SelectedIndex == -1) return;
|
||||||
|
foreach (var customer in Settings._instance.customers.customers)
|
||||||
|
if (customer.ID == Settings._instance.customers.current)
|
||||||
|
customer.sender_address = TbSettingsCustomerSenderAddress.Text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -121,10 +121,12 @@ public class Customer
|
|||||||
|
|
||||||
public string name { get; set; } = "";
|
public string name { get; set; } = "";
|
||||||
public string description { get; set; } = "";
|
public string description { get; set; } = "";
|
||||||
|
public string sender_address { get; set; } = "";
|
||||||
public AddressPatch patch { get; set; }
|
public AddressPatch patch { get; set; }
|
||||||
public char separator { get; set; } = ',';
|
public char separator { get; set; } = ',';
|
||||||
public int ID { get; }
|
public int ID { get; }
|
||||||
|
|
||||||
|
|
||||||
public static int GetIDByCustomerListItem(string item_content)
|
public static int GetIDByCustomerListItem(string item_content)
|
||||||
{
|
{
|
||||||
var id = item_content.Split(" - ")[0];
|
var id = item_content.Split(" - ")[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user