IfConditionModel.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using PropertyGridLib.Attributes;
  2. using PropertyGridLib.Controls;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Drawing.Design;
  7. using TeamAAS.FlowEngine.FormulaData;
  8. using Plugins.Standard.Core;
  9. namespace Plugins.Standard.Models
  10. {
  11. /// <summary>
  12. /// 条件判断配置模型
  13. /// </summary>
  14. [System.Serializable]
  15. public class IfConditionModel : TeamAAS.FlowEditor.Plugins.BasePluginModel
  16. {
  17. [DisplayName("1、数据集合"), Category("属性"), Description("分支模块数据集")]
  18. [FormulaEditor(typeof(PluginDataProvider))]
  19. public List<IFModel> IFModels { get; set; } = new List<IFModel>();
  20. public IfConditionModel()
  21. {
  22. }
  23. }
  24. [Serializable]
  25. public class IFModel
  26. {
  27. [DisplayName("1.条件"), Category("属性"), Description("满足该条件时执行模块")]
  28. [FormulaEditor(typeof(PluginDataProvider))]
  29. public FormulaBound<bool> DisplayIndex
  30. {
  31. get; set;
  32. }=new FormulaBound<bool>();
  33. [DisplayName("2.条件取反"), Category("属性"), Description("最终结果取反")]
  34. public bool IsNegate
  35. {
  36. get; set;
  37. } = false;
  38. [DisplayName("3.执行模块"), Category("属性"), Description("执行模块")]
  39. [TypeConverter(typeof(NextToolConverter))]
  40. public string ToolName { get; set; }
  41. public override string ToString()
  42. {
  43. return "Run:";
  44. }
  45. }
  46. }