Пример #1
0
        /// <summary>method:btnReload_Click
        /// eventhandler for reloading the privious game saved
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnReload_Click(object sender, EventArgs e)
        {
            // clean data existing in the previrse game
            AutoReplay.isAutoReplaying = false;
            isReload = true;

            // start game(include creating  static undo object)
            startGame(this, isReload);

            // initiate the undo form
            undoForm            = new UndoForm(this, RecordMove.cms);
            lblCurrentStep.Text = RecordMove.cms.moves.Count.ToString();
            isReload            = false;
        }
Пример #2
0
        ///<summary>method:MainForm_Load
        ///mainform load
        ///About the reference: customedTimer1 is a customed component, it is created in the other project.
        ///In here, it makes use of customedTimer1 by importing .dll file.
        /// </summary>
        private void MainForm_Load(object sender, EventArgs e)
        {
            // clean data existing in the previrse game
            AutoReplay.isAutoReplaying = false;

            // start game(include creating  static undo object)
            startGame(this, isReload);

            // initiate the undo form
            undoForm = new UndoForm(this, RecordMove.cms);

            // time start
            customedTimer1.Interval = 1000;
            customedTimer1.Start();
        }