Esempio n. 1
0
        private void PreviousMove()
        {
            var move = engine.UndoOneMove();

            if (move == null)
            {
                return;
            }

            Action uiOperations = () =>
            {
                if (move is SolveNumberMove)
                {
                    var box = boxes[move.Row, move.Column];
                    box.Text = "";
                }

                SetMoveCount();
                DrawAllPossibles();
            };

            if (IsInBackgroundThread())
            {
                Dispatcher.Invoke(uiOperations);
            }
            else
            {
                uiOperations();
            }
        }
Esempio n. 2
0
        private void PreviousMove()
        {
            var move = engine.UndoOneMove();

            if (move == null)
            {
                return;
            }

            Action uiOperations = () =>
            {
                if (move is SolveNumberMove)
                {
                    var box = boxes[move.Row, move.Column];
                    box.Text = "";
                }

                SetMoveCount();
                DrawAllPossibles();
            };

            uiOperations();
            //Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, delegate { uiOperations);
        }