using OTSIncAReportApp.OTSSampleReportInfo;
namespace OTSIncAReportApp.OTSDelegateEvent
{
///
/// 属性Grid与TreeView进行交互,托管类
///
public class DelegateEventFun
{
#region 变量定义
///
/// ReportApp全局变量
///
private frmReportApp m_ReportApp = null;
///
/// MeasureApp 和OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
///
///
public delegate void DAddRep_ResultWindowReqReportApp_EventHandler(OTSSampleMeaInfo SampleInfo);
///
/// MeasureApp 和 OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
///
///
///
///
///
///
public delegate void WorkingSampleInfo_MeasureAppWithPropWindow_EventHandler(OTS_RETORT_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, int index, object ObjVal, bool bCheckBoxFlag = false);
///
/// OTSPropertyWindow 给 MeasureApp 窗口改动的工作样品Grid的样品属性信息请求
///
public event WorkingSampleInfo_MeasureAppWithPropWindow_EventHandler WorkingSampleChanged;
#endregion
#region 构造函数
///
/// 构造函数
///
///
public DelegateEventFun(frmReportApp MeasureAppForm)
{
m_ReportApp = MeasureAppForm;
}
#endregion
#region 托管函数
///
/// OTSPropertyWindow 给 ReportApp 窗口发送改动的Grid的当前工作样品属性信息请求
///
///
///
///
///
///
public void Send_WorkingSampleChanged(OTS_RETORT_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, int index, object ObjVal, bool bCheckBoxFlag = false)
{
if (null != WorkingSampleChanged)
{
m_ReportApp.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun) Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun Success");
WorkingSampleChanged(SampleId, ValType, index, ObjVal, bCheckBoxFlag);
}
else
{
m_ReportApp.m_LogFunExport.TraceErrorLog(" (OTSDelegateEventFun.Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun) Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun Failed");
}
}
#endregion
#region 排除无用代码 2018-8-2
//public delegate void DWSampleInfo_ReportAppWithPropWindow_EventHandler(OTS_RETORT_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, object ObjVal, bool bCheckBoxFlag = false); // MeasureApp 和 OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
//public delegate void DSampleInfo_MeasureAppWithPropWindow_EventHandler(OTSSampleMeaInfo SampleInfo); // MeasureApp 和OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
//OTS_SAMPLE_PROP_GRID_ITEMS SampleId: 被修改的当前工作样品属性值的ID。
//object ObjVal:被修改的当前工作样品属性值
//PropGrid显示
// public delegate void DSampleInfo_MeasureAppWithPropWindow_EventHandler(OTSSampleMeaInfo SampleInfo); // MeasureApp 和OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
//请求添加测量结果
//public delegate void DAddMea_ResultWindowReportApp_EventHandler(); // OTSMeasureRetMgrWindow窗口给ReportApp窗口添加样品请求
// ReportApp 和 树 交互样品信息
//CWorkSampleParam WSampleParam : //ReportApp 给 树 发送添加样品的样品信息
//public delegate void DAddRep_ResultWindowReportApp_EventHandler(CTreeSampleParam TSampleParam); // MeasureApp 给 OTSSolutionWindow 发送工作样品信息
//public event DAddRep_ResultWindowReportApp_EventHandler DAddRep_ResultWindowReqReportApp_Event; // MeasureApp 给 OTSSolutionWindow 发送工作样品信息
//OTS_SAMPLE_PROP_GRID_ITEMS SampleId: 被修改的当前工作样品属性值的ID。
//object ObjVal:被修改的当前工作样品属性值
// ReportApp 和 树 交互样品信息
//CWorkSampleParam WSampleParam : //ReportApp 给 树 发送添加样品的样品信息
//public void Send_AddMea_ResultWindowReqMeasureApp_Event_Fun(CTreeSampleParam TSampleParam)
//{
// if (null != DAddRep_ResultWindowReqReportApp_Event)
// {
// DAddRep_ResultWindowReqReportApp_Event(TSampleParam);
// }
// else
// {
// }
//}
////DataGrid显示
//public delegate void DataGridInfo_MeasureAppWithPropWindow_EventHandler(OTSSampleMeaInfo SampleInfo); // MeasureApp 和OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
//public delegate void DDataGridInfo_MeasureAppWithPropWindow_EventHandler(OTS_RETORT_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, object ObjVal, bool bCheckBoxFlag = false); // MeasureApp 和 OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
// MeasureApp 窗口给 OTSPropertyWindow窗口 Grid显示的样品属性信息
//public void Send_SampleInfo_MeasureAppToPropWindow_Event_Fun(OTSSampleMeaInfo SampleInfo)
//{
// if (null != DSInfo_ReportAppToPropWindow_Event)
// {
// m_ReportApp.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleInfo_MeasureAppToPropWindow_Event_Fun) Send_SampleInfo_MeasureAppToPropWindow_Event_Fun Success");
// DSInfo_ReportAppToPropWindow_Event(SampleInfo);
// }
// else
// {
// m_ReportApp.m_LogFunExport.TraceErrorLog(" (OTSDelegateEventFun.Send_SampleInfo_MeasureAppToPropWindow_Event_Fun) Send_SampleInfo_MeasureAppToPropWindow_Event_Fun Failed");
// }
//}
//// MeasureApp 窗口给 OTSPropertyWindow窗口 Grid显示的样品属性信息
//public void Send_SampleInfo_ReportAppToPropWindow_Event_Fun(OTSSampleMeaInfo SampleInfo)
//{
// if (null != DSInfo_ReportAppToPropWindow_Event)
// {
// DSInfo_ReportAppToPropWindow_Event(SampleInfo);
// }
// else
// {
// }
//}
//树窗口给ReportApp窗口添加测量结果请求
//public void Send_AddMea_ResultWindowReqMeasureApp_Event_Fun()
//{
// if (null != DAddMea_ResultWindowReqMeasureApp_Event)
// {
// DAddMea_ResultWindowReqMeasureApp_Event();
// }
// else
// {
// }
//}
#endregion
}
}