diff options
Diffstat (limited to 'product/desktop.ui/presenters/UIThread.cs')
| -rw-r--r-- | product/desktop.ui/presenters/UIThread.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/product/desktop.ui/presenters/UIThread.cs b/product/desktop.ui/presenters/UIThread.cs new file mode 100644 index 0000000..0216df4 --- /dev/null +++ b/product/desktop.ui/presenters/UIThread.cs @@ -0,0 +1,16 @@ +using System;
+using System.Windows;
+
+namespace solidware.financials.windows.ui.presenters
+{
+ static public class UIThread
+ {
+ static public void Run(Action action)
+ {
+ if (Application.Current != null)
+ Application.Current.Dispatcher.BeginInvoke(action);
+ else
+ action();
+ }
+ }
+}
\ No newline at end of file |
