46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
|
using Common.DbExtends.Extends;
|
|||
|
using Common.Models.Enums;
|
|||
|
using Server.Events;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace Server
|
|||
|
{
|
|||
|
internal class EventManager
|
|||
|
{
|
|||
|
private Client client;
|
|||
|
internal EventManager(Client client) { this.client = client; }
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 关闭程序
|
|||
|
/// </summary>
|
|||
|
public event EventHandler<EventArgs> ExitWinform;
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 订单发生改变
|
|||
|
/// </summary>
|
|||
|
public event EventHandler<OrderChangeEventArgs> OrderChange;
|
|||
|
|
|||
|
public void OnExitWinform(object sender)
|
|||
|
{
|
|||
|
ExitWinform?.Invoke(sender, null);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 订单改变
|
|||
|
/// </summary>
|
|||
|
/// <param name="sender">调用的类</param>
|
|||
|
/// <param name="e">订单相关信息</param>
|
|||
|
public void OnOrderChange(object sender, OrderChangeEventArgs e)
|
|||
|
{
|
|||
|
OrderChange?.BeginInvoke(sender, e, null, null);
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|