[chore:] big code-cleanup session
This commit is contained in:
@@ -208,7 +208,6 @@ public class KasPerson
|
||||
|
||||
public static int GenerateNewID(int base_id)
|
||||
{
|
||||
//var newid = 100000 + base_id;
|
||||
int highest = 0;
|
||||
foreach (var set in Settings._instance.addressSets.addresses)
|
||||
{
|
||||
@@ -217,8 +216,6 @@ public class KasPerson
|
||||
if(add.id >= highest) highest = add.id+1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return highest + base_id + 1;
|
||||
}
|
||||
|
||||
@@ -228,10 +225,8 @@ public class KasPerson
|
||||
{
|
||||
return refsid + " - " + name;
|
||||
}
|
||||
else
|
||||
{
|
||||
return id + " - " + name;
|
||||
}
|
||||
|
||||
return id + " - " + name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,12 +234,10 @@ public class KasPersonError
|
||||
{
|
||||
public KasPersonError((List<AddressCheck.ErrorTypes>, List<AddressCheck.WarningTypes>) single_result)
|
||||
{
|
||||
//refsid = single_result.Item1;
|
||||
errors = single_result.Item1;
|
||||
warnings = single_result.Item2;
|
||||
}
|
||||
|
||||
//public int refsid { get; set; }
|
||||
public List<AddressCheck.ErrorTypes> errors { get; set; } = new();
|
||||
public List<AddressCheck.WarningTypes> warnings { get; set; } = new();
|
||||
|
||||
|
||||
@@ -19,9 +19,6 @@ public class Settings
|
||||
public Customers customers = new();
|
||||
public PdfExportSettings pdfExport { get; set; } = new();
|
||||
|
||||
// public string settingsPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||
// "logofclient", "config.json");
|
||||
|
||||
public Settings()
|
||||
{
|
||||
_instance = this;
|
||||
@@ -32,7 +29,6 @@ public class Settings
|
||||
{
|
||||
if (!Directory.Exists(Global._instance.config_path) && !File.Exists((Global._instance.config_path)))
|
||||
Directory.CreateDirectory(Global._instance.config_path);
|
||||
// if (!string.IsNullOrEmpty(Global._instance.config_path)) _instance.settingsPath = Global._instance.config_path;
|
||||
|
||||
// Always save with current schema version
|
||||
_instance.schemaVersion = SchemaMigration.CURRENT_SCHEMA_VERSION;
|
||||
@@ -42,8 +38,6 @@ public class Settings
|
||||
|
||||
public static void Load()
|
||||
{
|
||||
//if (!string.IsNullOrEmpty(Global._instance.config_path)) _instance.settingsPath = Global._instance.config_path;
|
||||
|
||||
try
|
||||
{
|
||||
var contents = File.ReadAllText(Path.Combine(Global._instance.config_path, "config.json"));
|
||||
@@ -158,12 +152,6 @@ public class Global
|
||||
|
||||
public static void Load()
|
||||
{
|
||||
// if (!File.Exists(Path.Combine(
|
||||
// Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "logofclient",
|
||||
// "global.config")))
|
||||
// File.Create(Path.Combine(
|
||||
// Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "logofclient",
|
||||
// "global.config"));
|
||||
try
|
||||
{
|
||||
var contents = File.ReadAllText(Path.Combine(
|
||||
@@ -247,13 +235,6 @@ public class Customer
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// public static int GetIDByCustomerListItem(string item_content)
|
||||
// {
|
||||
// var id = item_content.Split(" - ")[0];
|
||||
// return int.Parse(id);
|
||||
// }
|
||||
}
|
||||
|
||||
public class AddressSets
|
||||
|
||||
Reference in New Issue
Block a user