| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- using GalaSoft.MvvmLight.Messaging;
- using Muchinfo.MTPClient.Data.Enums;
- using Muchinfo.MTPClient.Data.Model;
- using Muchinfo.MTPClient.Data.Model.Message;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using Muchinfo.MTPClient.Data.Quote;
- namespace Muchinfo.MTPClient.Data.Helper
- {
- /// <summary>
- /// 定义消息接收与发送
- /// </summary>
- public static class AppMessengerHelper
- {
- /// <summary>
- /// 操作变更通知
- /// </summary>
- public static class OperateChangeNotifyMessage
- {
- public static void Send(object senderName)
- {
- Messenger.Default.Send(senderName, MessengerTokens.OperateChange);
- }
- public static void Register(object recipientName, Action<string> action)
- {
- Messenger.Default.Register(recipientName, MessengerTokens.OperateChange, action);
- }
- }
- /// <summary>
- /// 开休市计划通知
- /// </summary>
- public static class MarketStatusChangeNotifyMessage
- {
- public static void Send(List<MarketTypeStatus> senderName)
- {
- Messenger.Default.Send(senderName, MessengerTokens.MarketStatusChange);
- }
- public static void Register(object recipientName, Action<List<MarketTypeStatus>> action)
- {
- Messenger.Default.Register(recipientName, MessengerTokens.MarketStatusChange, action);
- }
- }
- /// <summary>
- /// 弹出公告通知
- /// </summary>
- public static class PopupNoticeMessage
- {
- public static void Send(bool senderName)
- {
- Messenger.Default.Send(senderName, MessengerTokens.AnnouncementMessage);
- }
- public static void Register(object recipientName, Action<bool> action)
- {
- Messenger.Default.Register(recipientName, MessengerTokens.AnnouncementMessage, action);
- }
- }
- }
- }
|