12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- 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 Action110151: Action11015
- {
- public Action110151() {
- this.MenuId = ActionType.BandedStructureASTME1268;
- //使用网格
- MicrostructureBandModel microstructureBandModel = XmlSerializeHelper.DESerializer<MicrostructureBandModel>(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + "Default" + "\\MicrostructureBandModel.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);
- }
- }
- }
|