[chore:] basic logging
This commit is contained in:
+103
-47
@@ -24,6 +24,9 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
|
Logger.Log("Welcome to logofclient");
|
||||||
|
Logger.Log($"Session on {DateTime.Now:G}");
|
||||||
|
Logger.Log("Initializing...");
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
//Hide();
|
//Hide();
|
||||||
|
|
||||||
@@ -32,6 +35,7 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
_instance = this;
|
_instance = this;
|
||||||
WindowState = WindowState.Maximized;
|
WindowState = WindowState.Maximized;
|
||||||
|
Logger.Log("Loading settings...");
|
||||||
Global.Load();
|
Global.Load();
|
||||||
Settings.Load();
|
Settings.Load();
|
||||||
LoadPdfExportOptions();
|
LoadPdfExportOptions();
|
||||||
@@ -40,6 +44,7 @@ public partial class MainWindow : Window
|
|||||||
RefreshCountryView();
|
RefreshCountryView();
|
||||||
|
|
||||||
// Initialize wiki integration
|
// Initialize wiki integration
|
||||||
|
Logger.Log("Buliding wiki...");
|
||||||
_wikiService = new WikiService();
|
_wikiService = new WikiService();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -54,8 +59,9 @@ public partial class MainWindow : Window
|
|||||||
if (!string.IsNullOrWhiteSpace(Global._instance.wiki_storage_path))
|
if (!string.IsNullOrWhiteSpace(Global._instance.wiki_storage_path))
|
||||||
TbWikiPath.Text = Global._instance.wiki_storage_path;
|
TbWikiPath.Text = Global._instance.wiki_storage_path;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while setting paths: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -64,12 +70,14 @@ public partial class MainWindow : Window
|
|||||||
BtnFontPath.Click += BtnFontPath_Click;
|
BtnFontPath.Click += BtnFontPath_Click;
|
||||||
BtnConfigPath.Click += BtnConfigPath_Click;
|
BtnConfigPath.Click += BtnConfigPath_Click;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while adding click functions?: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while doing wiki stuff: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Thread.Sleep(3000);
|
//Thread.Sleep(3000);
|
||||||
@@ -121,23 +129,6 @@ public partial class MainWindow : Window
|
|||||||
//await MessageBox.Show(_instance, $"{result.Count} Einträge fehlerhaft.", "Fertig");
|
//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)
|
private void MnuExit_OnClick(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -156,7 +147,7 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Fehler beim Öffnen des Links: {ex.Message}");
|
Logger.Log($"Error while starting process: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +163,7 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Fehler beim Öffnen des Links: {ex.Message}");
|
Logger.Log($"Error while starting process: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,7 +179,7 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Fehler beim Öffnen des Links: {ex.Message}");
|
Logger.Log($"Error while starting process: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,9 +223,9 @@ public partial class MainWindow : Window
|
|||||||
var rendered = MarkdownRenderer.Render(text ?? string.Empty);
|
var rendered = MarkdownRenderer.Render(text ?? string.Empty);
|
||||||
PreviewPanel.Children.Add(rendered);
|
PreviewPanel.Children.Add(rendered);
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
// fallback: plain text
|
Logger.Log($"Error while rendering markdown: {ex.Message}", Logger.LogType.Error);
|
||||||
PreviewPanel.Children.Clear();
|
PreviewPanel.Children.Clear();
|
||||||
PreviewPanel.Children.Add(new TextBlock { Text = text ?? string.Empty });
|
PreviewPanel.Children.Add(new TextBlock { Text = text ?? string.Empty });
|
||||||
}
|
}
|
||||||
@@ -249,6 +240,8 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void PopulateNavTree(string? expandToPath = null, string? selectPath = null)
|
public void PopulateNavTree(string? expandToPath = null, string? selectPath = null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var roots = _wikiService.GetRootItems();
|
var roots = _wikiService.GetRootItems();
|
||||||
var nodes = new List<TreeViewItem>();
|
var nodes = new List<TreeViewItem>();
|
||||||
@@ -262,6 +255,10 @@ public partial class MainWindow : Window
|
|||||||
ExpandAndFindNode(nodes, selectPath, out var selectedNode) &&
|
ExpandAndFindNode(nodes, selectPath, out var selectedNode) &&
|
||||||
selectedNode != null)
|
selectedNode != null)
|
||||||
NavTree.SelectedItem = selectedNode;
|
NavTree.SelectedItem = selectedNode;
|
||||||
|
}catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Error while populating nav tree: {ex.Message}", Logger.LogType.Error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private TreeViewItem BuildNode(WikiItem item)
|
private TreeViewItem BuildNode(WikiItem item)
|
||||||
@@ -275,6 +272,8 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
|
|
||||||
private string GetSelectedWikiTargetDirectory()
|
private string GetSelectedWikiTargetDirectory()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var wikiRoot = Global._instance.wiki_storage_path;
|
var wikiRoot = Global._instance.wiki_storage_path;
|
||||||
if (NavTree.SelectedItem is TreeViewItem treeItem && treeItem.Tag is WikiItem selectedItem)
|
if (NavTree.SelectedItem is TreeViewItem treeItem && treeItem.Tag is WikiItem selectedItem)
|
||||||
@@ -284,8 +283,13 @@ public partial class MainWindow : Window
|
|||||||
var parentDir = Path.GetDirectoryName(selectedItem.Path);
|
var parentDir = Path.GetDirectoryName(selectedItem.Path);
|
||||||
if (!string.IsNullOrWhiteSpace(parentDir)) return parentDir;
|
if (!string.IsNullOrWhiteSpace(parentDir)) return parentDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
return wikiRoot;
|
return wikiRoot;
|
||||||
|
}catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Error while getting selected wiki target directory: {ex.Message}", Logger.LogType.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool PathsEqual(string left, string right)
|
private static bool PathsEqual(string left, string right)
|
||||||
@@ -344,8 +348,9 @@ public partial class MainWindow : Window
|
|||||||
UseShellExecute = true
|
UseShellExecute = true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while starting process: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -443,8 +448,9 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
LstSettingsCustomers.SelectedIndex = LstSettingsCustomers.Items.Count - 1;
|
LstSettingsCustomers.SelectedIndex = LstSettingsCustomers.Items.Count - 1;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while setting selected item: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -515,17 +521,25 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
LstSettingsCustomers.SelectedIndex = index;
|
LstSettingsCustomers.SelectedIndex = index;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while setting selected index: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TbSettingsCustomerDescription_OnTextChanged(object? sender, TextChangedEventArgs e)
|
private void TbSettingsCustomerDescription_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (LstSettingsCustomers.SelectedIndex == null || LstSettingsCustomers.SelectedIndex == -1) return;
|
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.ID)
|
if (customer.ID == Settings._instance.customers.current.ID)
|
||||||
customer.description = TbSettingsCustomerDescription.Text;
|
customer.description = TbSettingsCustomerDescription.Text;
|
||||||
|
} catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Error while changing customer description: {ex.Message}", Logger.LogType.Error);
|
||||||
|
}
|
||||||
|
|
||||||
//Settings.Save();
|
//Settings.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,6 +558,8 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async void BtnCustomerAddressSetImport_OnClick(object? sender, RoutedEventArgs e)
|
private async void BtnCustomerAddressSetImport_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
MakeCalcManVisible();
|
MakeCalcManVisible();
|
||||||
var opts = new FilePickerOpenOptions();
|
var opts = new FilePickerOpenOptions();
|
||||||
@@ -602,6 +618,13 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
|
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Error while importing: {ex.Message}", Logger.LogType.Error);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RefreshAddressSetListItems(int customer_id)
|
public void RefreshAddressSetListItems(int customer_id)
|
||||||
@@ -646,6 +669,8 @@ public partial class MainWindow : Window
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async void BtnSettingsImportCustomerAddressPatch_OnClick(object? sender, RoutedEventArgs e)
|
private async void BtnSettingsImportCustomerAddressPatch_OnClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
if (LstSettingsCustomers.SelectedIndex == null || LstSettingsCustomers.SelectedIndex == -1) return;
|
if (LstSettingsCustomers.SelectedIndex == null || LstSettingsCustomers.SelectedIndex == -1) return;
|
||||||
|
|
||||||
@@ -672,6 +697,11 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
|
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
|
} catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Error while importing customer address patch: {ex.Message}", Logger.LogType.Error);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TbSettingsCustomerCsvSeparator_OnTextChanged(object? sender, TextChangedEventArgs e)
|
private void TbSettingsCustomerCsvSeparator_OnTextChanged(object? sender, TextChangedEventArgs e)
|
||||||
@@ -689,11 +719,14 @@ public partial class MainWindow : Window
|
|||||||
catch (FormatException ex)
|
catch (FormatException ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Error while converting: " + ex.Message, "Could not parse");
|
MessageBox.Show(this, "Error while converting: " + ex.Message, "Could not parse");
|
||||||
|
Logger.Log($"Error while converting: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Unknown Error: " + ex.Message, "Error");
|
MessageBox.Show(this, "Unknown Error: " + ex.Message, "Error");
|
||||||
|
Logger.Log($"Error while converting: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void BtnCombineDifference_OnClick(object? sender, RoutedEventArgs e)
|
private void BtnCombineDifference_OnClick(object? sender, RoutedEventArgs e)
|
||||||
@@ -704,10 +737,9 @@ public partial class MainWindow : Window
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem), "difference", GetCombiningTyp());
|
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem), "difference", GetCombiningTyp());
|
||||||
}
|
}catch (Exception ex)
|
||||||
catch
|
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while combining (difference): {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -720,9 +752,9 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
StartCombine(list, Convert.ToInt32((LstCustomers.SelectedItem as Customer).ID), "union", GetCombiningTyp());
|
StartCombine(list, Convert.ToInt32((LstCustomers.SelectedItem as Customer).ID), "union", GetCombiningTyp());
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while combining (union): {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -736,9 +768,9 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "intersection", GetCombiningTyp());
|
StartCombine(list, Convert.ToInt32(LstCustomers.SelectedItem.ToString().Split(" - ")[0]), "intersection", GetCombiningTyp());
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while combining (intersection): {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -815,20 +847,30 @@ public partial class MainWindow : Window
|
|||||||
Console.WriteLine("PDF OK");
|
Console.WriteLine("PDF OK");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine(ex);
|
Logger.Log($"Error while generating labels: {ex.Message}", Logger.LogType.Error);
|
||||||
File.WriteAllText("crash.txt", ex.ToString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HookPdfExportOptionEvents()
|
private void HookPdfExportOptionEvents()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var controls = GetPdfExportControls();
|
var controls = GetPdfExportControls();
|
||||||
foreach (var control in controls) control.ValueChanged += PdfExportOption_OnValueChanged;
|
foreach (var control in controls) control.ValueChanged += PdfExportOption_OnValueChanged;
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Error while hooking pdf export margins: {ex.Message}", Logger.LogType.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void LoadPdfExportOptions()
|
private void LoadPdfExportOptions()
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
var options = Settings._instance.pdfExport ?? new PdfExportSettings();
|
var options = Settings._instance.pdfExport ?? new PdfExportSettings();
|
||||||
|
|
||||||
@@ -847,6 +889,12 @@ public partial class MainWindow : Window
|
|||||||
NudExpMargFontSize.Value = (decimal)options.fontSize;
|
NudExpMargFontSize.Value = (decimal)options.fontSize;
|
||||||
NudExpMargSmallFontSize.Value = (decimal)options.smallFontSize;
|
NudExpMargSmallFontSize.Value = (decimal)options.smallFontSize;
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Log($"Error while loading PDF Export Options: {ex.Message}", Logger.LogType.Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private void SavePdfExportOptions()
|
private void SavePdfExportOptions()
|
||||||
{
|
{
|
||||||
@@ -926,6 +974,7 @@ public partial class MainWindow : Window
|
|||||||
|
|
||||||
public void RefreshCountryView()
|
public void RefreshCountryView()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (_suppressCountryRefresh) return;
|
if (_suppressCountryRefresh) return;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -940,8 +989,9 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
CountryList.Items.Clear();
|
CountryList.Items.Clear();
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while clearing country list: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var c in Global._instance.countries) CountryList.Items.Add(c.name);
|
foreach (var c in Global._instance.countries) CountryList.Items.Add(c.name);
|
||||||
@@ -949,17 +999,19 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
CountryList.SelectedIndex = country_index;
|
CountryList.SelectedIndex = country_index;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while setting selected item: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_selectedCountry = Country.GetByName(CountryList.SelectedItems[0].ToString());
|
_selectedCountry = Country.GetByName(CountryList.SelectedItems[0].ToString());
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
_selectedCountry = null;
|
_selectedCountry = null;
|
||||||
|
Logger.Log($"Error while getting country: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_selectedCountry == null) return;
|
if (_selectedCountry == null) return;
|
||||||
@@ -973,8 +1025,9 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
LbSettingsAlternatives.SelectedIndex = alt_index;
|
LbSettingsAlternatives.SelectedIndex = alt_index;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Logger.Log($"Error while setting selected item: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
@@ -990,9 +1043,9 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
_selectedCountry.alternatives.Remove(selected.ToString());
|
_selectedCountry.alternatives.Remove(selected.ToString());
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Error while removing country alternative");
|
Logger.Log($"Error while removing alternatives: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefreshCountryView();
|
RefreshCountryView();
|
||||||
@@ -1067,6 +1120,7 @@ public partial class MainWindow : Window
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
||||||
|
Logger.Log($"Error while adding wiki file: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1090,6 +1144,7 @@ public partial class MainWindow : Window
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
||||||
|
Logger.Log($"Error while adding wiki folder: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1116,12 +1171,12 @@ public partial class MainWindow : Window
|
|||||||
curr_set.Name = result;
|
curr_set.Name = result;
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
RefreshAddressSetListItems(cus_id);
|
RefreshAddressSetListItems(cus_id);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
MessageBox.Show(this, ex.StackTrace, "Fehler");
|
||||||
|
Logger.Log($"Error while renaming address set: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1135,6 +1190,7 @@ public partial class MainWindow : Window
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(this, "Unknown Error: " + ex.Message, "Error");
|
MessageBox.Show(this, "Unknown Error: " + ex.Message, "Error");
|
||||||
|
Logger.Log($"Error while deleting customer: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
RefreshCustomerItems();
|
RefreshCustomerItems();
|
||||||
}
|
}
|
||||||
@@ -1161,9 +1217,9 @@ public partial class MainWindow : Window
|
|||||||
TbSettingsCustomerCsvSeparator.Text = div;
|
TbSettingsCustomerCsvSeparator.Text = div;
|
||||||
Settings.Save();
|
Settings.Save();
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Error while parsing");
|
Logger.Log($"Error while changing CSV divider: {ex.Message}", Logger.LogType.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user