aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-06-14 17:32:09 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-06-14 17:32:09 +0300
commit61a68af94273563e1179b49062ac96b8a627a72a (patch)
treeb435c82b2046ece012b3555afa77c660f0a2b0ca /Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
parent580cb401e8b31501cb3fbee1b9f59a67ad636633 (diff)
downloadTango-61a68af94273563e1179b49062ac96b8a627a72a.tar.gz
Tango-61a68af94273563e1179b49062ac96b8a627a72a.zip
Working on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
index dc7976884..fcce155ab 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs
@@ -109,6 +109,26 @@ namespace Tango.PPC.Common
{
Visible = false;
}
+
+ /// <summary>
+ /// Raises the specified message using the default <see cref="TangoMessenger"/>.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="message">The message.</param>
+ protected void RaiseMessage<T>(T message) where T : class
+ {
+ TangoMessenger.Default.Send<T>(message);
+ }
+
+ /// <summary>
+ /// Registers a message handle for the specified message type T.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="handler">The handler.</param>
+ protected void RegisterForMessage<T>(Action<T> handler)
+ {
+ TangoMessenger.Default.Register<T>(handler);
+ }
}
/// <summary>