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
{
///
/// 定义消息接收与发送
///
public static class AppMessengerHelper
{
///
/// 操作变更通知
///
public static class OperateChangeNotifyMessage
{
public static void Send(object senderName)
{
Messenger.Default.Send(senderName, MessengerTokens.OperateChange);
}
public static void Register(object recipientName, Action action)
{
Messenger.Default.Register(recipientName, MessengerTokens.OperateChange, action);
}
}
///
/// 开休市计划通知
///
public static class MarketStatusChangeNotifyMessage
{
public static void Send(List senderName)
{
Messenger.Default.Send(senderName, MessengerTokens.MarketStatusChange);
}
public static void Register(object recipientName, Action> action)
{
Messenger.Default.Register(recipientName, MessengerTokens.MarketStatusChange, action);
}
}
///
/// 弹出公告通知
///
public static class PopupNoticeMessage
{
public static void Send(bool senderName)
{
Messenger.Default.Send(senderName, MessengerTokens.AnnouncementMessage);
}
public static void Register(object recipientName, Action action)
{
Messenger.Default.Register(recipientName, MessengerTokens.AnnouncementMessage, action);
}
}
}
}