Exemple #1
0
            public override bool Equals(object obj)
            {
                if (!(obj is PenKey))
                {
                    return(false);
                }
                PenKey key = (PenKey)obj;

                return(key._gdiColor.Equals(_gdiColor) && key._gdiStyle.Equals(_gdiStyle) && key._width.Equals(_width));
            }
Exemple #2
0
        public GdiPen(Color color, int width, DashStyle style)
        {
            _color    = color;
            _gdiColor = Win32.ColorToGdiColor(color);

            _width = width;

            _style = style;

            _gdiStyle = DashStyleToPenStyle(style);
            _key      = new PenKey(this);
        }
Exemple #3
0
 /// <summary>
 /// 执行流程
 /// </summary>
 internal FlowItem Run(PenKey penKey)
 {
     this.PenKey = penKey;
     return(RunAction?.Invoke(this));
 }
Exemple #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="maxCapacity">A positive number that specify the capacity of the cache.</param>
 public PensCache(int maxCapacity)
 {
     mList = new Pen[maxCapacity];
     mKeys = new PenKey[maxCapacity];
 }
 public AnswerEventArgs(PenKey key)
 {
     this.PenKey = key;
 }