Action110152.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using PaintDotNet.Base.CommTool;
  2. using PaintDotNet.Base.SettingModel;
  3. using PaintDotNet.Data.Param;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. namespace PaintDotNet.Data.Action
  12. {
  13. public class Action110152 : Action11015
  14. {
  15. public Action110152()
  16. {
  17. this.MenuId = ActionType.BandedStructureGBT344742;
  18. //使用网格
  19. BandedTissueDialogModel microstructureBandModel = XmlSerializeHelper.DESerializer<BandedTissueDialogModel>(FileOperationHelper.ReadStringFromFile(Application.StartupPath + "\\Config\\" + "Default" + "\\BandedTissueDialogModel.xml", FileMode.Open));
  20. BooleanObject[] booleanObjects;
  21. if (microstructureBandModel.GridStyleList != null && microstructureBandModel.GridStyleList.Count > 0)
  22. {
  23. booleanObjects = new BooleanObject[microstructureBandModel.GridStyleList.Count];
  24. int i = 0;
  25. foreach (var grid in microstructureBandModel.GridStyleList)
  26. {
  27. booleanObjects.SetValue(new BooleanObject(i.ToString(), grid.gridName, true, null), i);
  28. i++;
  29. }
  30. }
  31. else
  32. {
  33. booleanObjects = new BooleanObject[]
  34. {
  35. new BooleanObject("0", "网格1", true, null)
  36. };
  37. }
  38. ChoiseArray one = new ChoiseArray("parameter1", PdnResources.GetString("Menu.Usegrid.text"), booleanObjects);
  39. one.initialValue = 0;
  40. one.value = 0;
  41. lists.Add(one);
  42. }
  43. }
  44. }