/// <summary> /// Создание "судьбы". /// </summary> /// <param name="cell">Шашка, которая поедет на своё место.</param> /// <param name="startPosition">Старое состояние шашки.</param> public TransitionInfo( CellPlate cell, Rectangle startPosition) { Cell = cell; StartPosition = startPosition; StartTime = DateTime.Now; TransitionArea = PaintUtils.Union(startPosition, cell.CellRectangle); }
protected override void OnMouseMove(MouseEventArgs e) { if (m_movingCell != null) { Rectangle oldRect = m_movingCell.CellRectangle; Rectangle rect = oldRect; rect.Offset(e.X - mousePos.X, e.Y - mousePos.Y); m_movingCell.SetCellRectangle(rect); mousePos = new Point(e.X, e.Y); Invalidate(PaintUtils.Union(oldRect, rect)); } base.OnMouseMove(e); }