Commit 94085f03 authored by 潘栩锋's avatar 潘栩锋 🚴

1.修改 ParamDictionary.cs 的配置文件保存在 layout文件夹中,方便复制,备份

2.修改 AD曲线默认使用4K
parent 1c0363ca
......@@ -177,7 +177,7 @@ namespace Misc
private string path;
public event UiParamDictionaryValueChangedHandler ValueChanged;
public ParamDictionary(string path = "paramDict.json")
public ParamDictionary(string path = @"layout\paramDict.json")
{
this.path = path;
Load();
......@@ -214,6 +214,17 @@ namespace Misc
try
{
string json = Newtonsoft.Json.JsonConvert.SerializeObject(cells, Newtonsoft.Json.Formatting.Indented);
//创建文件夹
string dirpath = Path.GetDirectoryName(path);
if (!string.IsNullOrEmpty(dirpath))
{
if (!Directory.Exists(dirpath))
{
Directory.CreateDirectory(dirpath);
}
}
File.WriteAllText(path, json);
}
catch (Exception e)
......
......@@ -70,17 +70,37 @@ namespace FLY.Thick.Base.Server
{
CorrectWay = CurveCorrectWay.OnePointIsScale;
Flag = CurveType.E;
//Curves = new CurveCell[] {
// new CurveCell() { AD = 57564, Value = 0 },
// new CurveCell() { AD = 30850, Value = 88 },
// new CurveCell() { AD = 19000, Value = 176 },
// new CurveCell() { AD = 12528, Value = 264 },
// new CurveCell() { AD = 8409, Value = 352 },
// new CurveCell() { AD = 5650, Value = 440 },
// new CurveCell() { AD = 3779, Value = 528 },
// new CurveCell() { AD = 2513, Value = 616 },
// new CurveCell() { AD = 1660, Value = 704 }
//};
Curves = new CurveCell[] {
new CurveCell() { AD = 57564, Value = 0 },
new CurveCell() { AD = 30850, Value = 88 },
new CurveCell() { AD = 19000, Value = 176 },
new CurveCell() { AD = 12528, Value = 264 },
new CurveCell() { AD = 8409, Value = 352 },
new CurveCell() { AD = 5650, Value = 440 },
new CurveCell() { AD = 3779, Value = 528 },
new CurveCell() { AD = 2513, Value = 616 },
new CurveCell() { AD = 1660, Value = 704 }
new CurveCell() { Value = 0, AD = 50300 },
new CurveCell() { Value = 19, AD = 46505 },
new CurveCell() { Value = 38, AD = 42999 },
new CurveCell() { Value = 58, AD = 39698 },
new CurveCell() { Value = 78, AD = 36646 },
new CurveCell() { Value = 98, AD = 33894 },
new CurveCell() { Value = 118, AD = 31229 },
new CurveCell() { Value = 137, AD = 28934 },
new CurveCell() { Value = 156, AD = 26818 },
new CurveCell() { Value = 175, AD = 24908 },
new CurveCell() { Value = 194, AD = 23220 },
new CurveCell() { Value = 213, AD = 21558 },
new CurveCell() { Value = 232, AD = 20057 },
new CurveCell() { Value = 251, AD = 18606 },
new CurveCell() { Value = 271, AD = 17283 },
new CurveCell() { Value = 290, AD = 16035 }
};
}
public void Apply(CurveCorrectWay correctWay, CurveType flag, CurveCell2[] curves)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment