Beispiel #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();
            }
        }
Beispiel #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);
        }