コード例 #1
0
ファイル: MoveViewer.cs プロジェクト: sirfreedom/ChessNet
 //*********************************************************     
 //
 /// <summary>
 /// Reset the control so it represents the specified chessboard
 /// </summary>
 /// <param name="chessBoard">   Chess board. Starting one if null</param>
 //  
 //*********************************************************     
 public void Reset(ChessBoard chessBoard) {
     int     iCurPos;
     int     iCount;
     
     listViewMoveList.Items.Clear();
     m_chessBoard    = chessBoard;
     iCurPos         = chessBoard.MovePosStack.PositionInList;
     iCount          = chessBoard.MovePosStack.Count;
     chessBoard.UndoAllMoves();
     for (int iIndex = 0; iIndex < iCount; iIndex++) {
         chessBoard.RedoMove();
         AddCurrentMove();
     }
     SelectCurrentMove();
 }