Compare commits
2 Commits
4ee852b37c
...
3cf1fb3012
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cf1fb3012 | ||
|
|
316c9511d3 |
@@ -248,6 +248,13 @@
|
|||||||
TextChanged="TbSettingsCustomerDescription_OnTextChanged"
|
TextChanged="TbSettingsCustomerDescription_OnTextChanged"
|
||||||
x:Name="TbSettingsCustomerDescription" />
|
x:Name="TbSettingsCustomerDescription" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Grid ColumnDefinitions="150,*">
|
||||||
|
<Label Content="CSV-Trennzeichen" />
|
||||||
|
<TextBox Grid.Column="1" Watermark=","
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
TextChanged="TbSettingsCustomerCsvSeparator_OnTextChanged"
|
||||||
|
x:Name="TbSettingsCustomerCsvSeparator" />
|
||||||
|
</Grid>
|
||||||
<Grid ColumnDefinitions="150,*">
|
<Grid ColumnDefinitions="150,*">
|
||||||
<Label Content="Address-Patch-Info" />
|
<Label Content="Address-Patch-Info" />
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Grid.Column="1"
|
||||||
|
|||||||
@@ -230,6 +230,7 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
private void TbSettingsCustomerName_OnTextChanged(object? sender, TextChangedEventArgs e)
|
private void TbSettingsCustomerName_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (LstSettingsCustomers.SelectedIndex == null || LstSettingsCustomers.SelectedIndex == -1) return;
|
||||||
foreach (var customer in Settings._instance.customers.customers)
|
foreach (var customer in Settings._instance.customers.customers)
|
||||||
if (customer.ID == Settings._instance.customers.current)
|
if (customer.ID == Settings._instance.customers.current)
|
||||||
customer.name = TbSettingsCustomerName.Text;
|
customer.name = TbSettingsCustomerName.Text;
|
||||||
@@ -247,6 +248,7 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
TbSettingsCustomerDescription.Text = customer.description;
|
TbSettingsCustomerDescription.Text = customer.description;
|
||||||
TbSettingsCustomerName.Text = customer.name;
|
TbSettingsCustomerName.Text = customer.name;
|
||||||
|
TbSettingsCustomerCsvSeparator.Text = customer.separator.ToString();
|
||||||
if (customer.patch != null)
|
if (customer.patch != null)
|
||||||
TbSettingsCustomerPatchInfo.Text = customer.patch.ToString();
|
TbSettingsCustomerPatchInfo.Text = customer.patch.ToString();
|
||||||
else
|
else
|
||||||
@@ -277,6 +279,7 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
private void TbSettingsCustomerDescription_OnTextChanged(object? sender, TextChangedEventArgs e)
|
private void TbSettingsCustomerDescription_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (LstSettingsCustomers.SelectedIndex == null || LstSettingsCustomers.SelectedIndex == -1) return;
|
||||||
foreach (var customer in Settings._instance.customers.customers)
|
foreach (var customer in Settings._instance.customers.customers)
|
||||||
if (customer.ID == Settings._instance.customers.current)
|
if (customer.ID == Settings._instance.customers.current)
|
||||||
customer.description = TbSettingsCustomerDescription.Text;
|
customer.description = TbSettingsCustomerDescription.Text;
|
||||||
@@ -417,4 +420,26 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TbSettingsCustomerCsvSeparator_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LstSettingsCustomers.SelectedIndex == null || LstSettingsCustomers.SelectedIndex == -1) return;
|
||||||
|
var sep = !string.IsNullOrEmpty(TbSettingsCustomerCsvSeparator.Text)
|
||||||
|
? TbSettingsCustomerCsvSeparator.Text
|
||||||
|
: ",";
|
||||||
|
foreach (var customer in Settings._instance.customers.customers)
|
||||||
|
if (customer.ID == Settings._instance.customers.current)
|
||||||
|
try
|
||||||
|
{
|
||||||
|
customer.separator = Convert.ToChar(sep);
|
||||||
|
}
|
||||||
|
catch (FormatException ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "Error while converting: " + ex.Message, "Could not parse");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "Unknown Error: " + ex.Message, "Error");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -74,6 +74,7 @@ public class Global
|
|||||||
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "logofclient",
|
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "logofclient",
|
||||||
"global.config"), json);
|
"global.config"), json);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Load()
|
public static void Load()
|
||||||
{
|
{
|
||||||
// if (!File.Exists(Path.Combine(
|
// if (!File.Exists(Path.Combine(
|
||||||
@@ -121,6 +122,7 @@ public class Customer
|
|||||||
public string name { get; set; } = "";
|
public string name { get; set; } = "";
|
||||||
public string description { get; set; } = "";
|
public string description { get; set; } = "";
|
||||||
public AddressPatch patch { get; set; }
|
public AddressPatch patch { 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)
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ public class AddressRepair(ProgressWindow progressWindow)
|
|||||||
public KasAddressList Perform(KasAddressList all_addresses,
|
public KasAddressList Perform(KasAddressList all_addresses,
|
||||||
List<(int, List<AddressCheck.ErrorTypes>)> failed_addresses)
|
List<(int, List<AddressCheck.ErrorTypes>)> failed_addresses)
|
||||||
{
|
{
|
||||||
foreach (var k in all_addresses.KasPersons)
|
// foreach (var k in all_addresses.KasPersons)
|
||||||
foreach (var p in failed_addresses)
|
// foreach (var p in failed_addresses)
|
||||||
{
|
// {
|
||||||
if (k.refsid != p.Item1) continue;
|
// if (k.refsid != p.Item1) continue;
|
||||||
|
//
|
||||||
if (p.Item2.Contains(AddressCheck.ErrorTypes.DoubledRefsid))
|
// if (p.Item1.Contains(AddressCheck.WarningTypes.DoubledRefsid))
|
||||||
{
|
// {
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user