Consts.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. 
  2. using System.Drawing;
  3. namespace Dongke.IBOSS.Basics.FlowSetting
  4. {
  5. internal static class Consts
  6. {
  7. #region 画布
  8. /// <summary>
  9. /// Canvas余白(Pixel)
  10. /// </summary>
  11. public const int CANVAS_MARGIN = 4;
  12. /// <summary>
  13. /// 画布默认尺寸
  14. /// </summary>
  15. public static readonly Size CANVAS_SIZE_DEFAULT = new Size(800, 600);
  16. /// <summary>
  17. /// 画布最小尺寸
  18. /// </summary>
  19. public static readonly Size CANVAS_SIZE_MIN = new Size(100, 100);
  20. /// <summary>
  21. /// 默认字体
  22. /// </summary>
  23. public static readonly Font FONT_DEFAULT = new Font("宋体", 10);
  24. /// <summary>
  25. /// 默认字体颜色
  26. /// </summary>
  27. public static readonly Color FONT_COLOR_DEFAULT = Color.Black;
  28. #endregion 画布
  29. #region 节点
  30. /// <summary>
  31. /// 节点默认位置和尺寸
  32. /// </summary>
  33. public static readonly Rectangle NODE_BOUNDS_DEFAULT = new Rectangle(10, 10, 50, 50);
  34. /// <summary>
  35. /// 节点最小尺寸
  36. /// </summary>
  37. public static readonly Size NODE_SIZE_MIN = new Size(10, 10);
  38. /// <summary>
  39. /// 节点默认填充颜色
  40. /// </summary>
  41. public static readonly Color? NODE_FILLCOLOR_DEFAULT = null;//Color.Transparent;
  42. /// <summary>
  43. /// 节点默认边框颜色
  44. /// </summary>
  45. public static readonly Color NODE_BORDERCOLOR_DEFAULT = Color.Black;
  46. /// <summary>
  47. /// 节点默认边框宽度
  48. /// </summary>
  49. public const int NODE_BORDERWIDTH_DEFAULT = 0;
  50. /// <summary>
  51. /// 文字同节点的间隔
  52. /// </summary>
  53. public const int NODE_STRING_MARGIN = 3;
  54. #endregion 节点
  55. #region 线段
  56. /// <summary>
  57. /// 线的默认颜色
  58. /// </summary>
  59. public static readonly Color LINE_COLOR_DEFAULT = Color.Black;
  60. /// <summary>
  61. /// 线的默认宽度
  62. /// </summary>
  63. public const int LINE_WIDTH_DEFAULT = 1;
  64. /// <summary>
  65. /// 线段默认位置1
  66. /// </summary>
  67. public static readonly Point LINE_POINT_Begin_DEFAULT = new Point(10, 10);
  68. /// <summary>
  69. /// 线段默认位置2
  70. /// </summary>
  71. public static readonly Point LINE_POINT_END_DEFAULT = new Point(50, 50);
  72. #endregion 线段
  73. #region 选择状态
  74. /// <summary>
  75. /// double误差精度
  76. /// </summary>
  77. public const double DOUBLE_PRECISION = 0.00001;
  78. /// <summary>
  79. /// 点选线段的范围(Pixel)
  80. /// </summary>
  81. public const double P2L_PRECISION = 3;
  82. /// <summary>
  83. /// 选择状态,鼠标操作点的宽度
  84. /// </summary>
  85. public const int SELECTEDSTYLE_WIDTH = 6;
  86. /// <summary>
  87. /// 选择状态,鼠标操作点的宽度的一半
  88. /// </summary>
  89. public const int SELECTEDSTYLE_WIDTH_HALF = 3;
  90. /// <summary>
  91. /// 绘制选择状态边框的笔
  92. /// </summary>
  93. public static readonly Pen SELECT_POINT_PEN = Pens.Black;
  94. /// <summary>
  95. /// 绘制选择状态内部的笔刷
  96. /// </summary>
  97. public static readonly Brush SELECT_POINT_BRUSH = Brushes.White;
  98. /// <summary>
  99. /// 绘制选择状态线段连接到节点的笔刷
  100. /// </summary>
  101. public static readonly Brush SELECT_POINT_BRUSH_LINE_TO_NODE = Brushes.Red;
  102. /// <summary>
  103. /// 线段连接到节点的提示锚点范围(Pixel)
  104. /// </summary>
  105. public const int L2N_PRECISION_EDGE = 4;
  106. /// <summary>
  107. /// 线段端点自动停靠到锚点的范围(Pixel)
  108. /// </summary>
  109. public const int P2NR_PRECISION = 4;
  110. #endregion 选择状态
  111. }
  112. }