2022-07-25 04:10:26 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace BenchtopParser {
|
|
|
|
|
public class ProgramConfig {
|
|
|
|
|
public String? ProgramNumber { get; set; }
|
2022-07-25 04:51:43 +00:00
|
|
|
|
public Dictionary<String, Dictionary<String, Configuration>> Group { get; set; }
|
2022-07-25 04:10:26 +00:00
|
|
|
|
|
|
|
|
|
public ProgramConfig() {
|
2022-07-25 04:51:43 +00:00
|
|
|
|
this.Group = new Dictionary<String, Dictionary<String, Configuration>>();
|
2022-07-25 04:10:26 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public class Configuration {
|
|
|
|
|
public String? name { get; set; }
|
|
|
|
|
public String? value { get; set; }
|
|
|
|
|
public String? type { get; set; }
|
|
|
|
|
public String? unit { get; set; }
|
|
|
|
|
|
2022-07-26 04:41:48 +00:00
|
|
|
|
public Configuration(List<String> config, string data) {
|
|
|
|
|
var nameValue = data.Split("=");
|
|
|
|
|
name = nameValue[0].Trim();
|
|
|
|
|
value = nameValue[1].Trim();
|
|
|
|
|
|
|
|
|
|
unit = config[1].Trim();
|
|
|
|
|
type = config[2].Trim(); //a, c, f, i
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-25 04:10:26 +00:00
|
|
|
|
}
|
|
|
|
|
}
|