From 2c8da378c82e5181f0566a564de529ab7ef96f4f Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 23 Aug 2018 09:45:01 +0300 Subject: Improvements to machine studio view models and navigation system. Improvements to tech board selection and edit modes handling. --- .../Threading/DefaultDispatcherProvider.cs | 46 ++++++++++++++++++++++ .../Threading/DefaultDispetcherProvider.cs | 46 ---------------------- 2 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispatcherProvider.cs delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispetcherProvider.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Threading') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispatcherProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispatcherProvider.cs new file mode 100644 index 000000000..940c13052 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispatcherProvider.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Threading; +using Tango.PPC.Common.Threading; + +namespace Tango.PPC.UI.Threading +{ + /// + /// Represents the default PPC which will invoke action on the current application dispatcher. + /// + /// + public class DefaultDispatcherProvider : IDispatcherProvider + { + private Dispatcher _dispatcher; + + /// + /// Initializes a new instance of the class. + /// + /// The dispatcher. + public DefaultDispatcherProvider(Dispatcher dispatcher) + { + _dispatcher = dispatcher; + } + + /// + /// Invokes the specified action asynchronously. + /// + /// The action. + public void Invoke(Action action) + { + _dispatcher.BeginInvoke(action); + } + + /// + /// Invokes the specified action synchronously. + /// + /// The action. + public void InvokeSync(Action action) + { + _dispatcher.Invoke(action); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispetcherProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispetcherProvider.cs deleted file mode 100644 index 0051ca329..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Threading/DefaultDispetcherProvider.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Threading; -using Tango.PPC.Common.Threading; - -namespace Tango.PPC.UI.Threading -{ - /// - /// Represents the default PPC which will invoke action on the current application dispatcher. - /// - /// - public class DefaultDispetcherProvider : IDispatcherProvider - { - private Dispatcher _dispatcher; - - /// - /// Initializes a new instance of the class. - /// - /// The dispatcher. - public DefaultDispetcherProvider(Dispatcher dispatcher) - { - _dispatcher = dispatcher; - } - - /// - /// Invokes the specified action asynchronously. - /// - /// The action. - public void Invoke(Action action) - { - _dispatcher.BeginInvoke(action); - } - - /// - /// Invokes the specified action synchronously. - /// - /// The action. - public void InvokeSync(Action action) - { - _dispatcher.Invoke(action); - } - } -} -- cgit v1.3.1