-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Difegue/dev
1.6.0
- Loading branch information
Showing
44 changed files
with
477 additions
and
388 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Microsoft.Toolkit.Uwp; | ||
using System; | ||
using System.Threading.Tasks; | ||
using Windows.System; | ||
|
||
namespace FluentMPC.Services | ||
{ | ||
public static class DispatcherService | ||
{ | ||
private static DispatcherQueue _queue; | ||
public static DispatcherQueue DispatcherQueue | ||
{ | ||
get | ||
{ | ||
if (_queue == null) | ||
{ | ||
throw new Exception("The DispatcherQueue hasn't been cached yet!"); | ||
} | ||
|
||
return _queue; | ||
} | ||
|
||
set | ||
{ | ||
_queue = value; | ||
} | ||
} | ||
|
||
public static void Initialize() | ||
{ | ||
// Get a DispatcherQueue instance for later use. This has to be called on the UI thread, | ||
// but it can then be cached for later use and accessed from a background thread as well. | ||
DispatcherQueue = DispatcherQueue.GetForCurrentThread(); | ||
} | ||
|
||
public static Task ExecuteOnUIThreadAsync(Action function, DispatcherQueuePriority priority = DispatcherQueuePriority.Normal) => DispatcherQueue.EnqueueAsync(function, priority); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.