public ChessApp() { InitializeComponent(); this.MinimumSize = new System.Drawing.Size(700, 600); chessGameView = new ChessGameView(); checkedListBox1.SetItemCheckState(2, CheckState.Checked); }
public void HasKings() { if (!chessGameView.GetChessGame().HasKing()) { if (chessGameView.GetChessGame().KingKilled() == Piece.Colors.WHITE) { chessGameView = new ChessGameView(); winnerLabel.Text = "Black Won"; } else { chessGameView = new ChessGameView(); winnerLabel.Text = "White Won"; } } }
public ChessGameWidget() : base() { gameView = new ChessGameView (); gameView.ShowNthMove += OnShowNthMoveEvent; boardWidget = new ChessGameBoard (); splitPane = new HPaned (); splitPane.Add1 (boardWidget); splitPane.Add2 (GetRightPane ()); PackStart (splitPane, true, true, 2); ShowAll (); }
private void newGameToolStripMenuItem_Click(object sender, EventArgs e) { chessGameView = new ChessGameView(); }
public ChessGameWidget(GameViewerUI viewer) : base() { gameView = new ChessGameView (); gamesListWidget = new SearchableGamesListWidget (viewer); gameView.ShowNthMove += OnShowNthMoveEvent; boardWidget = new ChessGameBoard (); book = new Notebook (); splitPane = new HPaned (); splitPane.Add1 (boardWidget); splitPane.Add2 (GetRightPane ()); PackStart (splitPane, true, true, 2); BoardWidget.Board.highLightMove = App.Session.HighLightMove; int pos = App.Session.ViewerSplitPanePosition; int height = App.Session.ViewerHeight; if (pos > height) pos = height / 2; splitPane.Position = pos; gamesListWidget.View.GameSelectionEvent += OnGameSelectionEvent; viewer.GamesLoadedEvent += OnGamesLoaded; ShowAll (); }