Example #1
0
        private void btnCheck_Click(object sender, RoutedEventArgs e)
        {
            if (Puzzle == null)
            {
                return;
            }

            var solved = true;

            foreach (PuzzleLetter item in Puzzle.TheGrid.Children)
            {
                solved = item.CheckLetter() && solved;
            }

            if (solved)
            {
                var pop = new Winner();
                pop.ShowDialog();
            }
            else
            {
                Puzzle.TheGrid.Background = new SolidColorBrush(Colors.Red);
            }
        }