Beispiel #1
0
        public override bool Equals(object obj)
        {
            if ((obj == null) || !GetType().Equals(obj.GetType()))
            {
                return(false);
            }
            CellPoint p = (CellPoint)obj;

            return((X == p.X) && (Y == p.Y));
        }
Beispiel #2
0
        private void DrawCell(Graphics gr, CellPoint cell)
        {
            int x, y;

            x = xMin + cell.X * cellWidth;
            y = yMin + cell.Y * cellHeight;
            var        rect  = new Rectangle(x, y, cellWidth, cellHeight);
            SolidBrush brush = new SolidBrush(cell.Color);

            gr.DrawRectangle(new Pen(brush), rect);
            gr.FillRectangle(brush, rect);
        }