Esempio n. 1
0
        private void ProcessNumberPad(Int32 col, Int32 row, InputPadStateEnum value)
        {
            switch (value)
            {
            case InputPadStateEnum.HintRaised:                      // User clicked Hint button
                ProcessHint(col, row);                              // Show the hint for the specified cell
                break;

            case InputPadStateEnum.ClearRaised:                     // User clicked Clear button
                ProcessClearCell(col, row);                         // Clear the specified cell
                break;

            case InputPadStateEnum.Number1:                         // User clicked the "1" button
                ProcessNumberPad(col, row, 1);                      // Process the number
                break;

            case InputPadStateEnum.Number2:                         // User clicked the "2" button
                ProcessNumberPad(col, row, 2);                      // Process the number
                break;

            case InputPadStateEnum.Number3:                         // User clicked the "3" button
                ProcessNumberPad(col, row, 3);                      // Process the number
                break;

            case InputPadStateEnum.Number4:                         // User clicked the "4" button
                ProcessNumberPad(col, row, 4);                      // Process the number
                break;

            case InputPadStateEnum.Number5:                         // User clicked the "5" button
                ProcessNumberPad(col, row, 5);                      // Process the number
                break;

            case InputPadStateEnum.Number6:                         // User clicked the "6" button
                ProcessNumberPad(col, row, 6);                      // Process the number
                break;

            case InputPadStateEnum.Number7:                         // User clicked the "7" button
                ProcessNumberPad(col, row, 7);                      // Process the number
                break;

            case InputPadStateEnum.Number8:                         // User clicked the "8" button
                ProcessNumberPad(col, row, 8);                      // Process the number
                break;

            case InputPadStateEnum.Number9:                         // User clicked the "9" button
                ProcessNumberPad(col, row, 9);                      // Process the number
                break;
            }
        }
 private void SaveState(InputPadStateEnum state)
 {
     InputPadState = state;                              // Save the state to the property.
     this.Close();                                       // Close the window.
 }