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