using PaintDotNet.Base.CommTool;
using PaintDotNet.Base.SettingModel;
using PaintDotNet.Data.Param;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PaintDotNet.Data.Action
{
///
/// 定量分析
///
public class Action11011: ActionAnalysis
{
public Action11011() {
//使用网格
QuantitativeAnalysisModel microstructureBandModel = XmlSerializeHelper.DESerializer(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + "Default" + "\\QuantitativeAnalysisModel.xml", FileMode.Open));
BooleanObject[] booleanObjects;
if (microstructureBandModel.GridStyleList != null && microstructureBandModel.GridStyleList.Count > 0)
{
booleanObjects = new BooleanObject[microstructureBandModel.GridStyleList.Count];
int i = 0;
foreach (var grid in microstructureBandModel.GridStyleList)
{
booleanObjects.SetValue(new BooleanObject(i.ToString(), grid.gridName, true, null), i);
i++;
}
}
else
{
booleanObjects = new BooleanObject[]
{
new BooleanObject("0", "网格1", true, null)
};
}
ChoiseArray one = new ChoiseArray("parameter1", PdnResources.GetString("Menu.Usegrid.text"), booleanObjects);
one.initialValue = 0;
one.value = 0;
lists.Add(one);
//网格可移动
BooleanObject two = new BooleanObject();
two.key = "parameter2";
two.name = PdnResources.GetString("Menu.Meshmobility.text");
two.initialValue = false;
two.Value = false;
lists.Add(two);
}
}
}