Beispiel #1
0
        private void MainMenu_ButtonClicked(object sender, ButtonClickedEventArgs eventargs)
        {
            switch (eventargs.Button)
            {
            case ButtonNames.Play:
                var newGameState = new GameState(StateManager.CurrentState, eventargs.Time);
                newGameState.LoadButtons();
                StateManager.CurrentState = newGameState;
                break;

            case ButtonNames.Solve:
                var newSolveState = new SolveState(StateManager.CurrentState);
                newSolveState.LoadButtons();
                StateManager.CurrentState = newSolveState;
                break;

            case ButtonNames.Help:
                var newHelpState = new HelpState(StateManager.CurrentState);
                newHelpState.LoadButtons();
                StateManager.CurrentState = newHelpState;
                break;

            case ButtonNames.About:
                var newAboutState = new AboutState(StateManager.CurrentState);
                newAboutState.LoadButtons();
                StateManager.CurrentState = newAboutState;
                break;
            }
        }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you really sure you want to close this Daj?") == DialogResult.OK)
     {
         aboutState = AboutState.FadingOut;
     }
 }
Beispiel #3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            switch (aboutState)
            {
            case AboutState.FadingIn:
                this.Opacity += .20;
                if (this.Opacity == 1.0)
                {
                    aboutState      = AboutState.Running;
                    timer1.Interval = 50;
                }
                break;

            case AboutState.Showing:
                aboutState      = AboutState.FadingOut;
                timer1.Interval = 50;
                break;

            case AboutState.FadingOut:
                this.Opacity -= .10;
                if (this.Opacity == 0.0)
                {
                    this.Close();
                }
                break;
            }
        }
 private void button1_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Are you really sure you want to close this Daj?") == DialogResult.OK)
     {
         aboutState = AboutState.FadingOut;
     }
 }
Beispiel #5
0
        public static void Initialize(Scene scene)
        {
            Scene = scene;

            menuState      = new MenuState();
            settingState   = new SettingState();
            aboutState     = new AboutState();
            overwriteState = new OverwriteState();
            gameState      = new PlayState();
            pauseState     = new PauseState();
            restartState   = new RestartState();
            winningState   = new WinningState();
            winAllState    = new WinAllState();
            exitGameState  = new ExitGameState();
            exitAppState   = new ExitAppState();

            InitializeGame();
        }
Beispiel #6
0
 private void About_MouseDown(object sender, MouseEventArgs e)
 {
     aboutState = AboutState.FadingOut;
 }
Beispiel #7
0
 private void About_KeyDown(object sender, KeyEventArgs e)
 {
     aboutState = AboutState.FadingOut;
 }
 private void About_MouseDown(object sender, MouseEventArgs e)
 {
     aboutState = AboutState.FadingOut;
 }
 private void About_KeyDown(object sender, KeyEventArgs e)
 {
     aboutState = AboutState.FadingOut;
 }
 private void aboutText_MouseClick(object sender, MouseEventArgs e)
 {
     aboutState = AboutState.FadingOut;
 }
 private void timer1_Tick(object sender, EventArgs e)
 {
     switch (aboutState)
     {
         case AboutState.FadingIn:
             this.Opacity += .20;
             if (this.Opacity == 1.0)
             {
                 aboutState = AboutState.Running;
                 timer1.Interval = 50;
             }
             break;
         case AboutState.Showing:
             aboutState = AboutState.FadingOut;
             timer1.Interval = 50;
             break;
         case AboutState.FadingOut:
             this.Opacity -= .10;
             if (this.Opacity == 0.0)
             {
                 this.Close();
             }
             break;
     }
 }
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     aboutState = AboutState.FadingOut;
 }