|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Basic
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 动态调用辅助类
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class InvokeHelper
|
|
|
|
|
{
|
|
|
|
|
#region 定义变量
|
|
|
|
|
|
|
|
|
|
public static object Sender = null;
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 定义公共委托
|
|
|
|
|
|
|
|
|
|
public delegate void DoWork();
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 定义公共事件
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 刷新计划事件定义
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static event EventHandler OnRefreshPlan;
|
|
|
|
|
public static event EventHandler OnAlarmRefresh;
|
|
|
|
|
public static event EventHandler OnAlarmRefreshExtend;
|
|
|
|
|
public static event EventHandler OnRefreshRecipe;
|
|
|
|
|
public static event EventHandler OnRefreshStation;
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 定义公共方法
|
|
|
|
|
|
|
|
|
|
#region 触发刷新计划事件的方法
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 触发刷新计划事件的方法
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void TriggerRefreshPlanEvent()
|
|
|
|
|
{
|
|
|
|
|
if (OnRefreshPlan != null)
|
|
|
|
|
{
|
|
|
|
|
OnRefreshPlan(Sender, System.EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 触发刷新SCADA画面中报警列表的方法(主监控)
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 触发刷新SCADA画面中报警列表的方法(主监控)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void TriggerAlarmRefreshEvent()
|
|
|
|
|
{
|
|
|
|
|
if (OnAlarmRefresh != null)
|
|
|
|
|
{
|
|
|
|
|
OnAlarmRefresh(Sender, System.EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 触发刷新SCADA画面中报警列表的方法(扩展屏)
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 触发刷新SCADA画面中报警列表的方法(扩展屏)
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void TriggerAlarmRefreshExtendEvent()
|
|
|
|
|
{
|
|
|
|
|
if (OnAlarmRefreshExtend != null)
|
|
|
|
|
{
|
|
|
|
|
OnAlarmRefreshExtend(Sender, System.EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 触发刷新配方事件的方法
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 触发刷新计划事件的方法
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static void TriggerRefreshRecipeEvent()
|
|
|
|
|
{
|
|
|
|
|
if (OnRefreshPlan != null)
|
|
|
|
|
{
|
|
|
|
|
OnRefreshRecipe(Sender, System.EventArgs.Empty);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|