Change scale interface
This commit is contained in:
@ -27,7 +27,7 @@ namespace Elwig {
|
||||
public static string? BranchPhoneNr { get; private set; }
|
||||
public static string? BranchFaxNr { get; private set; }
|
||||
public static string? BranchMobileNr { get; private set; }
|
||||
public static IEnumerable<IScale> Scales { get; private set; }
|
||||
public static IList<IScale> Scales { get; private set; }
|
||||
public static ClientParameters Client { get; private set; }
|
||||
|
||||
public static bool IsPrintingReady => Documents.Html.IsReady && Documents.Pdf.IsReady;
|
||||
@ -69,10 +69,10 @@ namespace Elwig {
|
||||
|
||||
Client = new();
|
||||
|
||||
var list = new LinkedList<IScale>();
|
||||
var list = new List<IScale>();
|
||||
foreach (var s in Config.Scales) {
|
||||
try {
|
||||
var scaleNr = int.Parse(s[0]);
|
||||
var id = s[0];
|
||||
var type = s[1].ToLower();
|
||||
var model = s[2];
|
||||
var cnx = s[3];
|
||||
@ -80,7 +80,7 @@ namespace Elwig {
|
||||
var filling = s[5];
|
||||
int? limit = s[6] == null ? null : int.Parse(s[6]);
|
||||
if (type == "systec") {
|
||||
list.AddLast(new SystecScale(scaleNr, model, cnx, empty, filling, limit));
|
||||
list.Add(new SystecScale(id, model, cnx, empty, filling, limit));
|
||||
} else {
|
||||
throw new ArgumentException($"Invalid scale type: \"{type}\"");
|
||||
}
|
||||
|
Reference in New Issue
Block a user