Exemple #1
0
        void Game_SelectCurrentMoveChildren(object sender, App.Model.Game.SelectCurrentMoveChildrenEventArgs e)
        {
            frmInsertNewVariation frm = new frmInsertNewVariation(this.Game);

            frm.IsVariation = false;

            frm.ParentMove = e.Move;

            if (frm.ShowDialog() == DialogResult.OK)
            {
                e.Move = frm.SelectedMove;
            }
        }
        void Game_AddNewVariation(object sender, FormClosingEventArgs e)
        {
            frmInsertNewVariation frm = new frmInsertNewVariation(this.Game);

            frm.ParentMove = this.Game.CurrentMove;

            if (frm.ShowDialog(this) == DialogResult.OK)
            {
                this.Game.VariationType = frm.VariationType;
            }
            else
            {
                e.Cancel = true;
            }
        }
Exemple #3
0
        private void MoveToNext()
        {
            Moves children = this.Game.Moves.GetChildren(this.Game.CurrentMove);

            Move m = null;

            if (children.Count > 1)
            {
                frmInsertNewVariation frm = new frmInsertNewVariation(this.Game);
                frm.IsVariation = false;

                frm.ParentMove = this.Game.CurrentMove;

                if (frm.ShowDialog() == DialogResult.OK)
                {
                    m = frm.SelectedMove;
                }
            }
            else
            {
                m = children[0];
            }
        }