using System.Drawing; namespace Dongke.IBOSS.Basics.FlowSetting { internal static class Consts { #region 画布 /// /// Canvas余白(Pixel) /// public const int CANVAS_MARGIN = 4; /// /// 画布默认尺寸 /// public static readonly Size CANVAS_SIZE_DEFAULT = new Size(800, 600); /// /// 画布最小尺寸 /// public static readonly Size CANVAS_SIZE_MIN = new Size(100, 100); /// /// 默认字体 /// public static readonly Font FONT_DEFAULT = new Font("宋体", 10); /// /// 默认字体颜色 /// public static readonly Color FONT_COLOR_DEFAULT = Color.Black; #endregion 画布 #region 节点 /// /// 节点默认位置和尺寸 /// public static readonly Rectangle NODE_BOUNDS_DEFAULT = new Rectangle(10, 10, 50, 50); /// /// 节点最小尺寸 /// public static readonly Size NODE_SIZE_MIN = new Size(10, 10); /// /// 节点默认填充颜色 /// public static readonly Color? NODE_FILLCOLOR_DEFAULT = null;//Color.Transparent; /// /// 节点默认边框颜色 /// public static readonly Color NODE_BORDERCOLOR_DEFAULT = Color.Black; /// /// 节点默认边框宽度 /// public const int NODE_BORDERWIDTH_DEFAULT = 0; /// /// 文字同节点的间隔 /// public const int NODE_STRING_MARGIN = 3; #endregion 节点 #region 线段 /// /// 线的默认颜色 /// public static readonly Color LINE_COLOR_DEFAULT = Color.Black; /// /// 线的默认宽度 /// public const int LINE_WIDTH_DEFAULT = 1; /// /// 线段默认位置1 /// public static readonly Point LINE_POINT_Begin_DEFAULT = new Point(10, 10); /// /// 线段默认位置2 /// public static readonly Point LINE_POINT_END_DEFAULT = new Point(50, 50); #endregion 线段 #region 选择状态 /// /// double误差精度 /// public const double DOUBLE_PRECISION = 0.00001; /// /// 点选线段的范围(Pixel) /// public const double P2L_PRECISION = 3; /// /// 选择状态,鼠标操作点的宽度 /// public const int SELECTEDSTYLE_WIDTH = 6; /// /// 选择状态,鼠标操作点的宽度的一半 /// public const int SELECTEDSTYLE_WIDTH_HALF = 3; /// /// 绘制选择状态边框的笔 /// public static readonly Pen SELECT_POINT_PEN = Pens.Black; /// /// 绘制选择状态内部的笔刷 /// public static readonly Brush SELECT_POINT_BRUSH = Brushes.White; /// /// 绘制选择状态线段连接到节点的笔刷 /// public static readonly Brush SELECT_POINT_BRUSH_LINE_TO_NODE = Brushes.Red; /// /// 线段连接到节点的提示锚点范围(Pixel) /// public const int L2N_PRECISION_EDGE = 4; /// /// 线段端点自动停靠到锚点的范围(Pixel) /// public const int P2NR_PRECISION = 4; #endregion 选择状态 } }