Exemple #1
0
 //
 // Process query
 //
 private void OnQuery()
 {
     if (userTable != null)
     {
         var hint = creator.GetHint(puzzle);
         if (hint != null)
         {
             SelectCell(hint.Position.Cell);
             showingPicker = false;
             uiProvider.DisplayDialog(new InfoDialogLogic("Hint", hint.Explanation));
         }
     }
 }
Exemple #2
0
        private void GenerateNewPuzzle(bool exitOnCancel)
        {
            // Get difficulty
            var  newGameDialogLogic = new NewGameDialogLogic();
            bool result             = uiProvider.DisplayDialog(newGameDialogLogic);

            if (result)
            {
                // Show new puzzle
                BoardLogic.OnGeneratePuzzle(newGameDialogLogic.Difficulty);
            }
            else if (exitOnCancel)
            {
                uiProvider.Exit();
            }
        }