| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 | 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 Action11012PointCounting : ActionAnalysis    {        public Action11012PointCounting()        {            //使用网格            GrainSizePointCountingMethodModel microstructureBandModel = XmlSerializeHelper.DESerializer<GrainSizePointCountingMethodModel>(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + "Default" + "\\GrainSizePointCountingMethodModel.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("selectedGrid", PdnResources.GetString("Menu.Usegrid.text"), booleanObjects);            one.initialValue = 0;            one.value = 0;            lists.Add(one);        }    }}
 |