| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 | using OTSIncAReportApp.OTSSampleReportInfo;namespace OTSIncAReportApp.OTSDelegateEvent{    /// <summary>    /// 属性Grid与TreeView进行交互,托管类    /// </summary>    public class DelegateEventFun    {        #region 变量定义        /// <summary>        /// ReportApp全局变量        /// </summary>        private frmReportApp m_ReportApp = null;        /// <summary>        /// MeasureApp 和OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)        /// </summary>        /// <param name="SampleInfo"></param>        public delegate void DAddRep_ResultWindowReqReportApp_EventHandler(OTSSampleMeaInfo SampleInfo);               /// <summary>        /// MeasureApp 和 OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)        /// </summary>        /// <param name="SampleId"></param>        /// <param name="ValType"></param>        /// <param name="index"></param>        /// <param name="ObjVal"></param>        /// <param name="bCheckBoxFlag"></param>        public delegate void WorkingSampleInfo_MeasureAppWithPropWindow_EventHandler(OTS_RETORT_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, int index, object ObjVal, bool bCheckBoxFlag = false);        /// <summary>        /// OTSPropertyWindow 给 MeasureApp 窗口改动的工作样品Grid的样品属性信息请求          /// </summary>        public event WorkingSampleInfo_MeasureAppWithPropWindow_EventHandler WorkingSampleChanged;                  #endregion        #region 构造函数        /// <summary>        /// 构造函数        /// </summary>        /// <param name="MeasureAppForm"></param>        public DelegateEventFun(frmReportApp MeasureAppForm)        {            m_ReportApp = MeasureAppForm;        }        #endregion        #region 托管函数        /// <summary>        /// OTSPropertyWindow 给 ReportApp 窗口发送改动的Grid的当前工作样品属性信息请求        /// </summary>        /// <param name="SampleId"></param>        /// <param name="ValType"></param>        /// <param name="index"></param>        /// <param name="ObjVal"></param>        /// <param name="bCheckBoxFlag"></param>        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    }}
 |