using B3DealerClient.Utils;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace B3DealerClient.Control
|
|
{
|
|
public class WeightConfig
|
|
{
|
|
public string WeightSet { get; set; }
|
|
|
|
public string ComSet { get; set; }
|
|
|
|
public int? RateSet { get; set; }
|
|
|
|
public int? BitSet { get; set; }
|
|
|
|
public string Format { get; set; }
|
|
|
|
public decimal? Discont { get; set; }
|
|
|
|
public static WeightConfig Init(string flag)
|
|
{
|
|
var path = Path.Combine("Config", flag + "WeightConfig.xml");
|
|
return XmlUtil.DeserializeFromFile<WeightConfig>(path);
|
|
}
|
|
|
|
public void Save(string flag)
|
|
{
|
|
var path = Path.Combine("Config", flag + "WeightConfig.xml");
|
|
XmlUtil.SerializerObjToFile(this, path);
|
|
}
|
|
}
|
|
}
|