OTSDelegateEventFun.cs 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Drawing;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace OTSIncAMeasureApp
  8. {
  9. public class OTSDelegateEventFun
  10. {
  11. OTSIncAMeasureAppForm m_MeasureAppForm = null; //MeasureAPP对象
  12. public OTSDelegateEventFun(OTSIncAMeasureAppForm MeasureAppForm)
  13. {
  14. m_MeasureAppForm = MeasureAppForm;
  15. }
  16. /*****************************************************************
  17. *
  18. * MeasureApp 和 SampleSpaceWindow 样品台数据交互委托事件
  19. *
  20. *****************************************************************/
  21. public delegate void DSStageDataEventHandler(OTSSampleStageData SStageData); // MeasureApp和 SampleSpaceWindow 交互样品台数据委托
  22. public event DSStageDataEventHandler DSMeasureAppDataToSampleWindowEvent; // MeasureApp给SampleSpaceWindow窗口发送样品台数据
  23. //MeasureApp和 SampleSpaceWindow 添加样品事件委托
  24. //string sSampleHoleName: 新添加样品所在的样品孔名称
  25. public delegate void DAddNewSample_MeasureAppWithSampleSpaceWindow_EventHandler(string sSampleHoleName); //MeasureApp 和 SampleSpaceWindow 添加样品事件委托
  26. // public event DAddNewSample_MeasureAppWithSampleSpaceWindow_EventHandler DAddSample_MeasureAppToSampleWindow_Event;
  27. public event DAddNewSample_MeasureAppWithSampleSpaceWindow_EventHandler DAddSample_SampleWindowToMeasureApp_Event; //SampleSpaceWindow 向MeasureApp 请求添加样品
  28. //MeasureApp和 SampleSpaceWindow 删除样品事件委托
  29. //string sSampleHoleName: 删除工作样品
  30. // string sNewWSampleName: 新的工作样品
  31. public delegate void DDeleteWorkSample_MeasureAppWithSampleSpaceWindow_EventHandler(string sDeleteWSampleName, string sNewWSampleName); //MeasureApp 和 SampleSpaceWindow 删除样品事件委托
  32. public event DDeleteWorkSample_MeasureAppWithSampleSpaceWindow_EventHandler DDeleteWorkSample_MeasureAppToSampleWindow_Event;
  33. // public event DDeleteWorkSample_MeasureAppWithSampleSpaceWindow_EventHandler DDeleteWorkSample_SampleWindowToMeasureApp_Event; //SampleSpaceWindow 向MeasureApp 请求删除样品
  34. //MeasureApp和 SampleSpaceWindow 修改工作样品名称事件委托
  35. //string sNewWSampleName: 修改工作样品名称
  36. public delegate void DChangeWorkSampleName_MeasureAppWithSampleSpaceWindow_EventHandler(string sNewWSampleName); //MeasureApp 和 SampleSpaceWindow 修改工作样品名称事件委托
  37. public event DChangeWorkSampleName_MeasureAppWithSampleSpaceWindow_EventHandler DChangeWorkSampleName_MeasureAppToSampleWindow_Event;
  38. //MeasureApp和 SampleSpaceWindow 切换工作样品名称事件委托
  39. //string sNewWSampleName: 切换新工作样品名称
  40. //bool bDrawField : (打开工作样品文件)样品测量时,样品台上的样品需要重新绘制FIELD 图
  41. public delegate void DSwitchWorkSample_MeasureAppWithSampleSpaceWindow_EventHandler(string sNewWSampleName,bool bDrawField=false); //MeasureApp 和 SampleSpaceWindow 切换工作样品名称事件委托
  42. public event DSwitchWorkSample_MeasureAppWithSampleSpaceWindow_EventHandler DSwitchWorkSample_MeasureAppToSampleWindow_Event; //MeasureApp 向 SampleSpaceWindow 发送样品台切换事件
  43. public event DSwitchWorkSample_MeasureAppWithSampleSpaceWindow_EventHandler DSwitchWorkSample_SampleWindowToMeasureApp_Event; //SampleSpaceWindow 向 MeasureApp 发送样品台切换事件
  44. //MeasureApp和 SampleSpaceWindow 添加样品事件委托返回
  45. //SampleMeasurePara SMeasurePara 样品参数
  46. public delegate void DRevAddNewSample_MeasureAppWithSampleSpaceWindow_EventHandler(SampleMeasurePara SMeasurePara); //MeasureApp 和 SampleSpaceWindow 添加样品事件委托返回
  47. public event DRevAddNewSample_MeasureAppWithSampleSpaceWindow_EventHandler DRevAddSample_MeasureAppToSampleWindow_Event; //MeasureApp 向 SampleSpaceWindow 返回添加样品信息
  48. // public event DRevAddNewSample_MeasureAppWithSampleSpaceWindow_EventHandler DRevAddSample_SampleWindowToMeasureApp_Event;
  49. //当SampleSpaceWindow 获取电镜参数时,SampleSpaceWindow给MeasureApp发送事件通知MEASUREP更新SEM电镜工作参数参数
  50. public delegate void DUpdateSEMData_MeasureAppWithSampleSpaceWindow_EventHandler();
  51. public event DUpdateSEMData_MeasureAppWithSampleSpaceWindow_EventHandler DUpdateSEMData_SampleWindowToMeasureApp_Event;
  52. //当修改了GRID 的样品台测量精度、放大倍数和图片像素大小 时,SAMPLEWINDOW重新绘制样品台
  53. public delegate void DDrawSampleStage_EventHandler();
  54. public event DDrawSampleStage_EventHandler DDDrawSampleStage_EventHandler_Event;
  55. public void Send_DrawSampleStage_Event_Fun()
  56. {
  57. if (null != DDDrawSampleStage_EventHandler_Event)
  58. {
  59. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_DDrawSampleStage_Event_Fun) Send_DDrawSampleStage_Event_Fun Success");
  60. DDDrawSampleStage_EventHandler_Event();
  61. }
  62. else
  63. {
  64. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_DDrawSampleStage_Event_Fun) Send_DDrawSampleStage_Event_Fun Failed");
  65. }
  66. }
  67. //MeasureApp和 SampleSpaceWindow 添加打开样品文件事件委托
  68. // OTSSampleStageData SStageData: 样品台信息
  69. //List<SampleMeasurePara> SMeasrueAreaList : 样品信息
  70. //string sWorkSampleName
  71. public delegate void DOpenExistSampleFile_MeasureAppWithSampleSpaceWindow_EventHandler(OTSSampleStageData SStageData, List<SampleMeasurePara> SMeasrueAreaList, string sWorkSampleName); ////MeasureApp和 SampleSpaceWindow 添加打开样品文件事件委托
  72. public event DOpenExistSampleFile_MeasureAppWithSampleSpaceWindow_EventHandler DOpenExistSampleFile_MeasureAppToSampleWindow_Event;
  73. //MeasureApp和 SampleSpaceWindow 添加打开样品文件事件委托
  74. public delegate void DRunThread_MeasureAppToSampleWindow_EventHandler(); // MeasureApp和 SampleSpaceWindow 启动线程委托
  75. public event DRunThread_MeasureAppToSampleWindow_EventHandler DRunThread_MeasureAppToSampleWindow_Event;
  76. //MeasureApp和 SampleSpaceWindow 添加打开样品文件事件委托
  77. public delegate void DStopThread_MeasureAppToSampleWindow_EventHandler(); // MeasureApp和 SampleSpaceWindow 停止线程委托
  78. public event DStopThread_MeasureAppToSampleWindow_EventHandler DStopThread_MeasureAppToSampleWindow_Event;
  79. //MeasureApp和 SampleSpaceWindow 添加打开样品文件事件委托
  80. public delegate void DCheckSampleParam_MeasureAppToSampleWindow_EventHandler(); // MeasureApp和 SampleSpaceWindow 检测委托
  81. public event DCheckSampleParam_MeasureAppToSampleWindow_EventHandler DCheckSampleParam_MeasureAppToSampleWindow_Event;
  82. //MeasureApp和 SampleSpaceWindow 将测量区域复位
  83. public delegate void DResetMeasure_MeasureAppToSampleWindow_EventHandler(); // MeasureApp和 SampleSpaceWindow 测量区域复位
  84. public event DResetMeasure_MeasureAppToSampleWindow_EventHandler DResetMeasure_MeasureAppToSampleWindow_Event;
  85. //MeasureApp和 SampleSpaceWindow 绘制圆形测量区域
  86. public delegate void DDrawCirCleMeasure_MeasureAppToSampleWindow_EventHandler(); // MeasureApp和 SampleSpaceWindow 测量区域复位
  87. public event DDrawCirCleMeasure_MeasureAppToSampleWindow_EventHandler DDrawCirCleMeasure_MeasureAppToSampleWindow_Event;
  88. //MeasureApp和 SampleSpaceWindow 绘制矩形测量区域
  89. public delegate void DDrawRectangleMeasure_MeasureAppToSampleWindow_EventHandler(); // MeasureApp和 SampleSpaceWindow 测量区域复位
  90. public event DDrawRectangleMeasure_MeasureAppToSampleWindow_EventHandler DDrawRectangleMeasure_MeasureAppToSampleWindow_Event;
  91. //MeasureApp和 SampleSpaceWindow 添加打开样品文件事件委托
  92. // OTSSampleStageData SStageData: 样品台信息
  93. //List<SampleMeasurePara> SMeasrueAreaList : 样品信息
  94. //string sWorkSampleName
  95. public void Send_OpenExistSampleFile_MeasureAppToSampleWindow_Event_Fun(OTSSampleStageData SStageData, List<SampleMeasurePara> SMeasrueAreaList, string sWorkSampleName)
  96. {
  97. if (null != DOpenExistSampleFile_MeasureAppToSampleWindow_Event)
  98. {
  99. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_OpenExistSampleFile_MeasureAppToSampleWindow_Event_Fun) Send_OpenExistSampleFile_MeasureAppToSampleWindow_Event_Fun Success");
  100. DOpenExistSampleFile_MeasureAppToSampleWindow_Event(SStageData, SMeasrueAreaList, sWorkSampleName);
  101. }
  102. else
  103. {
  104. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_OpenExistSampleFile_MeasureAppToSampleWindow_Event_Fun) Send_OpenExistSampleFile_MeasureAppToSampleWindow_Event_Fun Failed");
  105. }
  106. }
  107. //当SampleSpaceWindow 获取电镜参数时,SampleSpaceWindow给MeasureApp发送事件通知MEASUREP更新电镜工作参数参数
  108. public void Send_DUpdateSEMData_SampleWindowToMeasureApp_Event_Fun() //Send_DUpdateSEMData_SampleWindowToMeasureApp_Event_Fun
  109. {
  110. if (null != DUpdateSEMData_SampleWindowToMeasureApp_Event)
  111. {
  112. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_DUpdateSEMData_SampleWindowToMeasureApp_Event_Fun) Send_DUpdateSEMData_SampleWindowToMeasureApp_Event_Fun Success");
  113. DUpdateSEMData_SampleWindowToMeasureApp_Event();
  114. }
  115. else
  116. {
  117. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_DUpdateSEMData_SampleWindowToMeasureApp_Event_Fun) Send_DUpdateSEMData_SampleWindowToMeasureApp_Event_Fun Failed");
  118. }
  119. }
  120. //MeasureApp 给SampleWindow窗口发送样品台数据
  121. // OTSSampleStageData StageData: 样品台数据
  122. public void SendMeasureAppStageDateToSampleWindow(OTSSampleStageData StageData)
  123. {
  124. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  125. if (null != DSMeasureAppDataToSampleWindowEvent)
  126. {
  127. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendMeasureAppDateToSampleWindow) SendMeasureAppDateToSampleWindow Success");
  128. DSMeasureAppDataToSampleWindowEvent(StageData);
  129. }
  130. else
  131. {
  132. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendMeasureAppDateToSampleWindow) SendMeasureAppDateToSampleWindow Failed");
  133. }
  134. }
  135. ///MeasureApp和 SampleSpaceWindow 切换工作样品名称事件委托
  136. ///string sNewWSampleName: 切换新工作样品名称
  137. public void Send_SwitchWorkSample_MeasureAppToSampleWindow_Event_Fun(string sNewWSampleName, bool bDrawField = false)
  138. {
  139. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  140. if (null != DSwitchWorkSample_MeasureAppToSampleWindow_Event)
  141. {
  142. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwitchWorkSample_MeasureAppToSampleWindow_Event_Fun) Send_SwitchWorkSample_MeasureAppToSampleWindow_Event_Fun Success");
  143. DSwitchWorkSample_MeasureAppToSampleWindow_Event(sNewWSampleName,bDrawField);
  144. }
  145. else
  146. {
  147. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwitchWorkSample_MeasureAppToSampleWindow_Event_Fun) Send_SwitchWorkSample_MeasureAppToSampleWindow_Event_Fun Failed");
  148. }
  149. }
  150. //MeasureApp和 SampleSpaceWindow 切换工作样品名称事件委托
  151. //string sNewWSampleName: 切换新工作样品名称
  152. public void Send_SwitchWorkSample_SampleWindowToMeasureApp_Event_Fun(string sNewWSampleName, bool bDrawField = false)
  153. {
  154. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  155. if (null != DSwitchWorkSample_SampleWindowToMeasureApp_Event)
  156. {
  157. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwitchWorkSample_SampleWindowToMeasureApp_Event_Fun) Send_SwitchWorkSample_SampleWindowToMeasureApp_Event_Fun Success");
  158. DSwitchWorkSample_SampleWindowToMeasureApp_Event(sNewWSampleName, bDrawField);
  159. }
  160. else
  161. {
  162. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwitchWorkSample_SampleWindowToMeasureApp_Event_Fun) Send_SwitchWorkSample_SampleWindowToMeasureApp_Event_Fun Failed");
  163. }
  164. }
  165. //MeasureApp 给SampleWindow窗口发送添加样品的样品孔名,测量区域信息
  166. // SampleMeasurePara SMeasurePara : 新添加样品的测量区域
  167. public void Send_AddSample_MeasureAppToSampleWindow_Event_Fun(SampleMeasurePara SMeasurePara)
  168. {
  169. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  170. if (null != DRevAddSample_MeasureAppToSampleWindow_Event)
  171. {
  172. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_MeasureAppToSampleWindow_Event_Fun) Send_AddSample_MeasureAppToSampleWindow_Event_Fun Success");
  173. DRevAddSample_MeasureAppToSampleWindow_Event(SMeasurePara);
  174. }
  175. else
  176. {
  177. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_MeasureAppToSampleWindow_Event_Fun) Send_AddSample_MeasureAppToSampleWindow_Event_Fun Failed");
  178. }
  179. }
  180. //MeasureApp和 SampleSpaceWindow 修改工作样品名称事件委托
  181. //string sSampleHoleName: 修改工作样品名称
  182. public void Send_ChangeWorkSampleName_MeasureAppToSampleWindow_Event_Fun(string sNewWSampleName)
  183. {
  184. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  185. if (null != DChangeWorkSampleName_MeasureAppToSampleWindow_Event)
  186. {
  187. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_ChangeWorkSampleName_MeasureAppToSampleWindow_Event_Fun) Send_ChangeWorkSampleName_MeasureAppToSampleWindow_Event_Fun Success");
  188. DChangeWorkSampleName_MeasureAppToSampleWindow_Event(sNewWSampleName);
  189. }
  190. else
  191. {
  192. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_ChangeWorkSampleName_MeasureAppToSampleWindow_Event_Fun) Send_ChangeWorkSampleName_MeasureAppToSampleWindow_Event_Fun Failed");
  193. }
  194. }
  195. //SampleWindow 给MeasureApp 窗口发送添加样品的样品孔数据
  196. //string sSampleHoleName: 新添加样品所在的样品孔名称
  197. public void Send_AddSample_SampleWindowToMeasureAPP_Event_Fun(string sSampleHoleName)
  198. {
  199. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  200. if (null != DAddSample_SampleWindowToMeasureApp_Event)
  201. {
  202. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_SampleWindowToMeasureAPP_Event_Fun) Send_AddSample_SampleWindowToMeasureAPP_Event_Fun Success");
  203. DAddSample_SampleWindowToMeasureApp_Event(sSampleHoleName);
  204. }
  205. else
  206. {
  207. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_SampleWindowToMeasureAPP_Event_Fun) Send_AddSample_SampleWindowToMeasureAPP_Event_Fun Failed");
  208. }
  209. }
  210. //MeasureApp和 SampleSpaceWindow 删除样品事件委托
  211. //string sSampleHoleName: 删除工作样品名
  212. // string sNewWSampleName: 新的工作样品名
  213. public void Send_DeleteWorkSample_MeasureAppToSampleWindow_Event_Fun(string sDeleteWSampleName, string sNewWSampleName)
  214. {
  215. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  216. if (null != DDeleteWorkSample_MeasureAppToSampleWindow_Event)
  217. {
  218. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_SampleWindowToMeasureAPP_Event_Fun) Send_AddSample_SampleWindowToMeasureAPP_Event_Fun Success");
  219. DDeleteWorkSample_MeasureAppToSampleWindow_Event(sDeleteWSampleName, sNewWSampleName);
  220. }
  221. else
  222. {
  223. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_SampleWindowToMeasureAPP_Event_Fun) Send_AddSample_SampleWindowToMeasureAPP_Event_Fun Failed");
  224. }
  225. }
  226. //MeasureApp和 SampleSpaceWindow 运行线程事件委托
  227. public void Send_RunThread_MeasureAppToSampleWindow_Event_Fun()
  228. {
  229. if (null != DRunThread_MeasureAppToSampleWindow_Event)
  230. {
  231. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_RunThread_MeasureAppToSampleWindow_Event) Send_RunThread_MeasureAppToSampleWindow_Event_Fun Success");
  232. DRunThread_MeasureAppToSampleWindow_Event();
  233. }
  234. else
  235. {
  236. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_RunThread_MeasureAppToSampleWindow_Event_Fun) Send_RunThread_MeasureAppToSampleWindow_Event_Fun Failed");
  237. }
  238. }
  239. //MeasureApp和 SampleSpaceWindow 停止线程事件委托
  240. public void Send_StopThread_MeasureAppToSampleWindow_Event_Fun()
  241. {
  242. if (null != DStopThread_MeasureAppToSampleWindow_Event)
  243. {
  244. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DStopThread_MeasureAppToSampleWindow_Event) Send_StopThread_MeasureAppToSampleWindow_Event_Fun Success");
  245. DStopThread_MeasureAppToSampleWindow_Event();
  246. }
  247. else
  248. {
  249. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_StopThread_MeasureAppToSampleWindow_Event_Fun) Send_StopThread_MeasureAppToSampleWindow_Event_Fun Failed");
  250. }
  251. }
  252. //MeasureApp和 SampleSpaceWindow 检查样品测量参数
  253. public void Send_CheckSampleParam_MeasureAppToSampleWindow_Event_Fun()
  254. {
  255. if (null != DCheckSampleParam_MeasureAppToSampleWindow_Event)
  256. {
  257. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DCheckSampleParam_MeasureAppToSampleWindow_Event) Send_CheckSampleParam_MeasureAppToSampleWindow_Event_Fun Success");
  258. DCheckSampleParam_MeasureAppToSampleWindow_Event();
  259. }
  260. else
  261. {
  262. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_CheckSampleParam_MeasureAppToSampleWindow_Event_Fun) Send_CheckSampleParam_MeasureAppToSampleWindow_Event_Fun Failed");
  263. }
  264. }
  265. //MeasureApp和 SampleSpaceWindow 运行线程事件委托
  266. public void Send_ResetMeasure_MeasureAppToSampleWindow_Event_Fun()
  267. {
  268. if (null != DResetMeasure_MeasureAppToSampleWindow_Event)
  269. {
  270. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_ResetMeasure_MeasureAppToSampleWindow_Event) Send_ResetMeasure_MeasureAppToSampleWindow_Event_Fun Success");
  271. DResetMeasure_MeasureAppToSampleWindow_Event();
  272. }
  273. else
  274. {
  275. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.Send_ResetMeasure_MeasureAppToSampleWindow_Event_Fun) Send_ResetMeasure_MeasureAppToSampleWindow_Event_Fun Failed");
  276. }
  277. }
  278. /* //MeasureApp和 SampleSpaceWindow 删除样品事件委托
  279. //string sSampleHoleName: 删除工作样品名
  280. public void Send_DeleteWorkSample_SampleWindowToMeasureAPP_Event_Fun(string sWSampleName)
  281. {
  282. // //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.SendStageDateToSampleSpaceWindow) SendEventStageDateToOTSSamplespaceWindow!");
  283. if (null != DDeleteWorkSample_SampleWindowToMeasureApp_Event)
  284. {
  285. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_DeleteWorkSample_SampleWindowToMeasureAPP_Event_Fun) Send_DeleteWorkSample_SampleWindowToMeasureAPP_Event_Fun Success");
  286. DDeleteWorkSample_SampleWindowToMeasureApp_Event(sWSampleName);
  287. }
  288. else
  289. {
  290. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_DeleteWorkSample_SampleWindowToMeasureAPP_Event_Fun) Send_DeleteWorkSample_SampleWindowToMeasureAPP_Event_Fun Failed");
  291. }
  292. }
  293. */
  294. /*
  295. * OTSSamplespaceWindow 在指定样品孔上请求增加样品的流程:
  296. * 1. OTSSamplespaceWindow 发送增加样品请求信息事件给 OTSSolutionWindow
  297. * 2. OTSSolutionWindow发送将增加样品请求信息事件 转发给MasureAPP, MeasureAPP再将增加样品请求信息交给DataMgr
  298. * 3. DataMgr同意增加或者拒绝增加信息给MeasureApp,MeasureApp将DataMgr回复的信息通过事件给OTSSolutionWindow
  299. * 4. OTSSolutionWindow在将回复的信息通过事件给OTSSamplespaceWindow, OTSSamplespaceWindow 在样品孔上增加样品
  300. *
  301. */
  302. /**********************************************************************
  303. *
  304. * MeasureApp 和 SampleSpaceWindow 测量过程中交互测量数据委托事件
  305. *
  306. ***********************************************************************/
  307. public delegate void DSampleMeasureData_MeasureAppToSampleSpaceWindow_EventHandler(SMSR_RET_DATA SMsrData); //
  308. public event DSampleMeasureData_MeasureAppToSampleSpaceWindow_EventHandler DSampleMeasureData_MeasureAppToSampleWindow_Event;
  309. public void Send_DSampleMeasureData_MeasureAppToSampleWindow_Event_Fun(SMSR_RET_DATA SMsrData)
  310. {
  311. if (null != DSampleMeasureData_MeasureAppToSampleWindow_Event)
  312. {
  313. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DSampleMeasureData_MeasureAppToSampleWindow_Event) Send_DSampleMeasureData_MeasureAppToSampleWindow_Event_Fun Success");
  314. DSampleMeasureData_MeasureAppToSampleWindow_Event(SMsrData);
  315. }
  316. else
  317. {
  318. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DSampleMeasureData_MeasureAppToSampleWindow_Event) Send_DSampleMeasureData_MeasureAppToSampleWindow_Event_Fun Failed");
  319. }
  320. }
  321. /**********************************************************************
  322. *
  323. * MeasureApp 和 OTSSolutionWindow 样品数据交互委托事件
  324. *
  325. **********************************************************************/
  326. // MeasureApp 和 OTSSolutionWindow 交互样品信息
  327. //SampleInfoList: MeasureApp获得样品列表后发送给OTSSolutionWindow;
  328. //sWorkSampleName : 工作样品名
  329. public delegate void DSSampleName_MeasureAppWithSoluWindow_EventHandler(List<OTSSampleMeaInfo> SampleInfoList,string sWorkSampleName); // MeasureApp 给 OTSSolutionWindow 发送样品信息
  330. public event DSSampleName_MeasureAppWithSoluWindow_EventHandler DSInfoName_MeasureAppToSoluWindow_Event; // MeasureApp 给 OTSSolutionWindow 发送样品信息
  331. // MeasureApp 和 OTSSolutionWindow 交互样品信息
  332. //List<CTreeSampleParam> TSampleParamList : //MeasureApp 给 SoluWindow 发送打开已存在的样品LIST (之前可能保存了多个样品)
  333. //CTreeSampleParam WorkSampleParam : 工作样品参数 (保存了多个样品,其中的一个是工作样品)
  334. public delegate void DOpenExistSampleFile_MeasureAppWithSoluWindow_EventHandler(List<CTreeSampleParam> TSampleParamList, CTreeSampleParam WorkSampleParam); // MeasureApp 给 OTSSolutionWindow 发送打开已保存的工作文件
  335. public event DOpenExistSampleFile_MeasureAppWithSoluWindow_EventHandler DOpenExistSampleFile_MeasureAppToSoluWindow_Event; // MeasureApp 给 OTSSolutionWindow 发送打开已保存的工作文件 事件
  336. // MeasureApp 和 OTSSolutionWindow 交互样品信息
  337. //CWorkSampleParam WSampleParam : //MeasureApp 给 SoluWindow 发送添加样品的样品信息
  338. public delegate void DAddSample_MeasureAppWithSoluWindow_EventHandler(CTreeSampleParam TSampleParam); // MeasureApp 给 OTSSolutionWindow 发送工作样品信息
  339. public event DAddSample_MeasureAppWithSoluWindow_EventHandler DSAddSample_MeasureAppToSoluWindow_Event; // MeasureApp 给 OTSSolutionWindow 发送工作样品信息
  340. //请求添加样品
  341. public delegate void DAddSample_SoluWindowReqMeasureApp_EventHandler(); // OTSSolutionWindow窗口给MeasureApp窗口添加样品请求
  342. public event DAddSample_SoluWindowReqMeasureApp_EventHandler DAddSample_SoluWindowReqMeasureApp_Event; //OTSSolutionWindow窗口给MeasureApp窗口添加样品请求
  343. //请求删除样品
  344. public delegate void DDeletSample_SoluWindowReqMeasureApp_EventHandler(string sDeletSName=""); // OTSSolutionWindow窗口给MeasureApp窗口删除样品请求
  345. public event DDeletSample_SoluWindowReqMeasureApp_EventHandler DDeletSample_SoluWindowReqMeasureApp_Event; //OTSSolutionWindow窗口给MeasureApp窗口删除样品请求
  346. public event DDeletSample_SoluWindowReqMeasureApp_EventHandler DDeletSample_SoluWindowRevMeasureApp_Event; //MeasureApp窗口给 OTSSolutionWindow 发送窗口删除样品回复
  347. //请求修改样品名称
  348. // string sSampleOldName : 样品名原名
  349. //string sSampleNewName : 样品名新名
  350. public delegate void DEditSample_SoluWindowReqMeasureApp_EventHandler(string sSampleOldName, string sSampleNewName); // OTSSolutionWindow窗口给MeasureApp窗口编辑样品名请求
  351. public event DEditSample_SoluWindowReqMeasureApp_EventHandler DEditEditSample_SoluWindowReqMeasureApp_Event; // OTSSolutionWindow 窗口给MeasureApp窗口编辑样品名请求
  352. public event DEditSample_SoluWindowReqMeasureApp_EventHandler DEditEditSample_SoluWindowRevMeasureApp_Event; // MeasureApp 窗口给 OTSSolutionWindow 窗口编辑样品名回复
  353. //切换当前工作样品
  354. //string sNewWorkSample : 新的工作样品名
  355. public delegate void DSwitchWSample_SoluWindowReqMeasureApp_EventHandler(string sNewWorkSample); // OTSSolutionWindow窗口给MeasureApp窗口发送改变工作样品请求
  356. public event DSwitchWSample_SoluWindowReqMeasureApp_EventHandler DSwitchWSample_SoluWindowReqMeasureApp_Event; // OTSSolutionWindow窗口给MeasureApp窗口发送改变工作样品请求
  357. public event DSwitchWSample_SoluWindowReqMeasureApp_EventHandler DSwitchWSample_SoluWindowRevMeasureApp_Event; // MeasureApp 窗口给 OTSSolutionWindow 窗口发送改变工作样品回复
  358. // 当Propwindw的switch状态发生变化后,对应的treeview的checkbox状态也发生变化
  359. //string sSampleName : 样品名; bool bCheckBoxStatu: 样品名对应的CheckBox发生变化的值(选中/不选中)
  360. public delegate void DChangeCheckBoxStatu_SoluWindowWithMeasureApp(string sSampleName, bool bCheckBoxStatu); // OTSSolutionWindow 窗口和 MeasureApp 窗口交互CheckBox 状态
  361. public event DChangeCheckBoxStatu_SoluWindowWithMeasureApp DCheckBoxStatu_MeasureAPPToSoluWindow_Event; //MeasureApp 给 OTSSolutionWindow 发送样品checkbox发生变化事件
  362. public event DChangeCheckBoxStatu_SoluWindowWithMeasureApp DCheckBoxStatu_SoluWindowToMeasureAPP_Event; //OTSSolutionWindow 给 MeasureApp 发送样品checkbox发生变化事件
  363. // 当TREEVIEW 样品数的样品顺序发生变化后,执行TREEVIEW树上的样品排序
  364. public delegate void DSSampleSortOrder_SoluWindowWithMeasureApp(); //
  365. public event DSSampleSortOrder_SoluWindowWithMeasureApp DSampleSortOrder_SoluWindowToMeasureAPP_Event; //
  366. // 当TREEVIEW 样品数的样品顺序发生变化后,执行TREEVIEW树上的样品排序
  367. public void Send_SampleSortOrder_SoluWindow_Event_Fun()
  368. {
  369. if (null != DSampleSortOrder_SoluWindowToMeasureAPP_Event)
  370. {
  371. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleSortOrder_SoluWindow_Event_Fun) Send_SampleSortOrder_SoluWindow_Event_Fun Success");
  372. DSampleSortOrder_SoluWindowToMeasureAPP_Event();
  373. }
  374. else
  375. {
  376. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleSortOrder_SoluWindow_Event_Fun) Send_SampleSortOrder_SoluWindow_Event_Fun Failed");
  377. }
  378. }
  379. // MeasureApp 和 OTSSolutionWindow 交互样品信息
  380. //List<CTreeSampleParam> TSampleParamList : //MeasureApp 给 SoluWindow 发送打开已存在的样品LIST (之前可能保存了多个样品)
  381. //CTreeSampleParam WorkSampleParam : 工作样品参数 (保存了多个样品,其中的一个是工作样品)
  382. public void Send_OpenExistSampleFile_MeasureAppToSoluWindow_Event_Fun(List<CTreeSampleParam> TSampleParamList, CTreeSampleParam WorkSampleParam)
  383. {
  384. if (null != DOpenExistSampleFile_MeasureAppToSoluWindow_Event)
  385. {
  386. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_MeasureAppToSoluWindow_Event_Fun) Send_AddSample_MeasureAppToSoluWindow_Event_Fun Success");
  387. DOpenExistSampleFile_MeasureAppToSoluWindow_Event(TSampleParamList,WorkSampleParam);
  388. }
  389. else
  390. {
  391. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_MeasureAppToSoluWindow_Event_Fun) Send_AddSample_MeasureAppToSoluWindow_Event_Fun Failed");
  392. }
  393. }
  394. // MeasureApp 和 OTSSolutionWindow 交互样品信息
  395. //CWorkSampleParam WSampleParam : //MeasureApp 给 SoluWindow 发送添加样品的样品信息
  396. public void Send_AddSample_MeasureAppToSoluWindow_Event_Fun(CTreeSampleParam TSampleParam)
  397. {
  398. if (null != DSAddSample_MeasureAppToSoluWindow_Event)
  399. {
  400. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_MeasureAppToSoluWindow_Event_Fun) Send_AddSample_MeasureAppToSoluWindow_Event_Fun Success");
  401. DSAddSample_MeasureAppToSoluWindow_Event(TSampleParam);
  402. }
  403. else
  404. {
  405. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_MeasureAppToSoluWindow_Event_Fun) Send_AddSample_MeasureAppToSoluWindow_Event_Fun Failed");
  406. }
  407. }
  408. /* // 当TREEVIEW 样品数的样品顺序发生变化后,Solution 需要将新的样品顺序发送给MeasureApp
  409. //SampleInfoList: 样品新的排列顺序;
  410. public void Send_SampleNewPosition_SoluWindowToMeasureAPP_Event_Fun(List<OTSSampleMeaInfo> SampleInfoList)
  411. {
  412. if (null != DSNewPostion_SoluWindowToMeasureAPP_Event)
  413. {
  414. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleNewPosition_SoluWindowToMeasureAPP_Event_Fun) Send_SampleNewPosition_SoluWindowToMeasureAPP_Event_Fun Success");
  415. DSNewPostion_SoluWindowToMeasureAPP_Event(SampleInfoList);
  416. }
  417. else
  418. {
  419. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleNewPosition_SoluWindowToMeasureAPP_Event_Fun) Send_SampleNewPosition_SoluWindowToMeasureAPP_Event_Fun Failed");
  420. }
  421. }*/
  422. //MeasureApp 给 OTSSolutionWindow 发送样品checkbox发生变化事件
  423. //string sSampleName : 样品名; bool bCheckBoxStatu: 样品名对应的CheckBox发生变化的值(选中/不选中)
  424. public void Send_CheckBoxStatu_MeasureAPPToSoluWindow_Event_Fun(string sSampleName, bool bCheckBoxStatu)
  425. {
  426. if (null != DCheckBoxStatu_MeasureAPPToSoluWindow_Event)
  427. {
  428. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_CheckBoxStatu_MeasureAPPToSoluWindow_Event_Fun) Send_CheckBoxStatu_MeasureAPPToSoluWindow_Event_Fun Success");
  429. DCheckBoxStatu_MeasureAPPToSoluWindow_Event(sSampleName, bCheckBoxStatu);
  430. }
  431. else
  432. {
  433. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_CheckBoxStatu_MeasureAPPToSoluWindow_Event_Fun) Send_CheckBoxStatu_MeasureAPPToSoluWindow_Event_Fun Failed");
  434. }
  435. }
  436. //OTSSolutionWindow 给 MeasureApp 发送样品checkbox发生变化事件
  437. //string sSampleName : 样品名; bool bCheckBoxStatu: 样品名对应的CheckBox发生变化的值(选中/不选中)
  438. public void Send_CheckBoxStatu_SoluWindowToMeasureAPP_Event_Fun(string sSampleName, bool bCheckBoxStatu)
  439. {
  440. if (null != DCheckBoxStatu_SoluWindowToMeasureAPP_Event)
  441. {
  442. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_CheckBoxStatu_SoluWindowToMeasureAPP_Event_Fun) Send_CheckBoxStatu_SoluWindowToMeasureAPP_Event_Fun Success");
  443. DCheckBoxStatu_SoluWindowToMeasureAPP_Event(sSampleName, bCheckBoxStatu);
  444. }
  445. else
  446. {
  447. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_CheckBoxStatu_SoluWindowToMeasureAPP_Event_Fun) Send_CheckBoxStatu_SoluWindowToMeasureAPP_Event_Fun Failed");
  448. }
  449. }
  450. // OTSSolutionWindow窗口给MeasureApp窗口发送切换工作样品请求
  451. // sNewWorkSample: 新工作样品名
  452. public void Send_SwithcWSample_SoluWindowReqMeasureApp_Event_Fun(string sNewWorkSample)
  453. {
  454. if (null != DSwitchWSample_SoluWindowReqMeasureApp_Event)
  455. {
  456. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwithcWSample_SoluWindowReqMeasureApp_Event_Fun) Send_SwithcWSample_SoluWindowReqMeasureApp_Event_Fun Success");
  457. DSwitchWSample_SoluWindowReqMeasureApp_Event(sNewWorkSample);
  458. }
  459. else
  460. {
  461. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwithcWSample_SoluWindowReqMeasureApp_Event_Fun) Send_SwithcWSample_SoluWindowReqMeasureApp_Event_Fun Failed");
  462. }
  463. }
  464. // MeasureApp 窗口给 OTSSolutionWindow 窗口发送切换工作样品回复
  465. // sNewWorkSample: 新工作样品名
  466. public void Send_SwitchWSample_SoluWindowRevMeasureApp_Event_Fun(string sNewWorkSample)
  467. {
  468. if (null != DSwitchWSample_SoluWindowRevMeasureApp_Event)
  469. {
  470. ////m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwitchWSample_SoluWindowRevMeasureApp_Event_Fun) Send_SwitchWSample_SoluWindowRevMeasureApp_Event_Fun Success");
  471. DSwitchWSample_SoluWindowRevMeasureApp_Event(sNewWorkSample);
  472. }
  473. else
  474. {
  475. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SwitchWSample_SoluWindowRevMeasureApp_Event_Fun) Send_SwitchWSample_SoluWindowRevMeasureApp_Event_Fun Failed");
  476. }
  477. }
  478. // MeasureApp 窗口给 OTSSolutionWindow 窗口编辑样品名回复
  479. //sSampleNewName="" ,说明不允许修改样品名
  480. public void Send_EditSample_SoluWindowRevMeasureApp_Event_Fun(string sSampleOldName, string sSampleNewName="")
  481. {
  482. if (null != DEditEditSample_SoluWindowRevMeasureApp_Event)
  483. {
  484. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_EditSample_SoluWindowRevMeasureApp_Event_Fun) Send_EditSample_SoluWindowRevMeasureApp_Event_Fun Success");
  485. DEditEditSample_SoluWindowRevMeasureApp_Event(sSampleOldName, sSampleNewName);
  486. }
  487. else
  488. {
  489. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_EditSample_SoluWindowRevMeasureApp_Event_Fun) Send_EditSample_SoluWindowRevMeasureApp_Event_Fun Failed");
  490. }
  491. }
  492. // OTSSolutionWindow窗口给MeasureApp窗口编辑样品名请求
  493. public void Send_EditSample_SoluWindowReqMeasureApp_Event_Fun(string sSampleOldName, string sSampleNewName)
  494. {
  495. if (null != DEditEditSample_SoluWindowReqMeasureApp_Event)
  496. {
  497. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_EditSample_SoluWindowReqMeasureApp_Event_Fun) Send_EditSample_SoluWindowReqMeasureApp_Event_Fun Success");
  498. DEditEditSample_SoluWindowReqMeasureApp_Event(sSampleOldName, sSampleNewName);
  499. }
  500. else
  501. {
  502. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_EditSample_SoluWindowReqMeasureApp_Event_Fun) Send_EditSample_SoluWindowReqMeasureApp_Event_Fun Failed");
  503. }
  504. }
  505. //MeasureApp 给 OTSSolutionWindow 发送样品信息
  506. //SampleInfoList: MeasureApp获得样品列表后发送给OTSSolutionWindow;
  507. //sWorkSampleName : 工作样品名
  508. public void Send_SampleName_MeasureAppToSoluWindow_Event_Fun(List<OTSSampleMeaInfo> SampleInfoList, string sWorkSampleName)
  509. {
  510. if (null != DSInfoName_MeasureAppToSoluWindow_Event)
  511. {
  512. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleName_MeasureAppToSoluWindow_Event_Fun) Send_SampleName_MeasureAppToSoluWindow_Event_Fun Success");
  513. DSInfoName_MeasureAppToSoluWindow_Event(SampleInfoList,sWorkSampleName);
  514. }
  515. else
  516. {
  517. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleName_MeasureAppToSoluWindow_Event_Fun) Send_SampleName_MeasureAppToSoluWindow_Event_Fun Failed");
  518. }
  519. }
  520. //OTSSolutionWindow窗口给MeasureApp窗口添加样品请求
  521. public void Send_AddSample_SoluWindowReqMeasureApp_Event_Fun()
  522. {
  523. if (null != DAddSample_SoluWindowReqMeasureApp_Event)
  524. {
  525. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_SoluWindowReqMeasureApp_Event_Fun) Send_AddSample_SoluWindowReqMeasureApp_Event_Fun Success");
  526. DAddSample_SoluWindowReqMeasureApp_Event();
  527. }
  528. else
  529. {
  530. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_AddSample_SoluWindowReqMeasureApp_Event_Fun) Send_AddSample_SoluWindowReqMeasureApp_Event_Fun Failed");
  531. }
  532. }
  533. //OTSSolutionWindow窗口给MeasureApp窗口删除样品请求
  534. public void Send_DeletSample_SoluWindowReqMeasureApp_Event_Fun(string sDeletSName)
  535. {
  536. if (null != DDeletSample_SoluWindowReqMeasureApp_Event)
  537. {
  538. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_DeletSample_SoluWindowReqMeasureApp_Event_Fun) Send_DeletSample_SoluWindowReqMeasureApp_Event_Fun Success");
  539. DDeletSample_SoluWindowReqMeasureApp_Event(sDeletSName);
  540. }
  541. else
  542. {
  543. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_DeletSample_SoluWindowReqMeasureApp_Event_Fun) Send_DeletSample_SoluWindowReqMeasureApp_Event_Fun Failed");
  544. }
  545. }
  546. //MeasureApp窗口给 OTSSolutionWindow 发送窗口删除样品回复
  547. public void Send_DeletSample_SoluWindowRevMeasureApp_Event_Fun(string sDeletSName = "")
  548. {
  549. if (null != DDeletSample_SoluWindowRevMeasureApp_Event)
  550. {
  551. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_DeletSample_SoluWindowRevMeasureApp_Event_Fun) Send_DeletSample_SoluWindowRevMeasureApp_Event_Fun Success");
  552. DDeletSample_SoluWindowRevMeasureApp_Event(sDeletSName);
  553. }
  554. else
  555. {
  556. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_DeletSample_SoluWindowRevMeasureApp_Event_Fun) Send_DeletSample_SoluWindowRevMeasureApp_Event_Fun Failed");
  557. }
  558. }
  559. /**********************************************************************
  560. *
  561. * MeasureApp 和 OTSPropertyWindow 样品属性数据交互委托事件
  562. *
  563. **********************************************************************/
  564. //OTS_SAMPLE_PROP_GRID_ITEMS SampleId: 被修改的当前工作样品属性值的ID。
  565. //object ObjVal:被修改的当前工作样品属性值
  566. public delegate void DSampleInfo_MeasureAppWithPropWindow_EventHandler(OTSSampleMeaInfo SampleInfo); // MeasureApp 和OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
  567. public delegate void DWSampleInfo_MeasureAppWithPropWindow_EventHandler(OTS_SAMPLE_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, object ObjVal, bool bCheckBoxFlag = false); // MeasureApp 和 OTSPropertyWindow 交互样品属性数据(Grid 显示样品属性数据)
  568. public event DSampleInfo_MeasureAppWithPropWindow_EventHandler DSInfo_MeasureAppToPropWindow_Event; // MeasureApp 窗口给 OTSPropertyWindow窗口 Grid显示的样品属性信息
  569. public event DWSampleInfo_MeasureAppWithPropWindow_EventHandler DWSInfo__PropWindowReqMeasureApp_Event; // OTSPropertyWindow 给 MeasureApp 窗口改动的工作样品Grid的样品属性信息请求
  570. public event DWSampleInfo_MeasureAppWithPropWindow_EventHandler DWSInfo__PropWindowRevMeasureApp_Event; // MeasureApp 给 OTSPropertyWindow 窗口改动的工作样品Grid的样品属性信息回复
  571. // MeasureApp 窗口给 OTSPropertyWindow窗口 Grid显示的样品属性信息
  572. public void Send_SampleInfo_MeasureAppToPropWindow_Event_Fun(OTSSampleMeaInfo SampleInfo)
  573. {
  574. if (null != DSInfo_MeasureAppToPropWindow_Event)
  575. {
  576. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleInfo_MeasureAppToPropWindow_Event_Fun) Send_SampleInfo_MeasureAppToPropWindow_Event_Fun Success");
  577. DSInfo_MeasureAppToPropWindow_Event(SampleInfo);
  578. }
  579. else
  580. {
  581. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_SampleInfo_MeasureAppToPropWindow_Event_Fun) Send_SampleInfo_MeasureAppToPropWindow_Event_Fun Failed");
  582. }
  583. }
  584. // OTSPropertyWindow 给 MeasureApp 窗口发送改动的Grid的当前工作样品属性信息请求
  585. public void Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun(OTS_SAMPLE_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, object ObjVal, bool bCheckBoxFlag = false)
  586. {
  587. if (null != DWSInfo__PropWindowReqMeasureApp_Event)
  588. {
  589. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun) Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun Success");
  590. DWSInfo__PropWindowReqMeasureApp_Event(SampleId, ValType, ObjVal, bCheckBoxFlag);
  591. }
  592. else
  593. {
  594. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun) Send_WSampleInfo_PropWindowReqMeasureApp_Event_Fun Failed");
  595. }
  596. }
  597. // MeasureApp 给 OTSPropertyWindow 窗口改动的工作样品Grid的样品属性信息回复
  598. public void Send_WSampleInfo_PropWindowRevMeasureApp_Event_Fun(OTS_SAMPLE_PROP_GRID_ITEMS SampleId, OTS_ITEM_TYPES ValType, object ObjVal, bool bCheckBoxFlag = false)
  599. {
  600. if (null != DWSInfo__PropWindowRevMeasureApp_Event)
  601. {
  602. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_WSampleInfo_PropWindowRevMeasureApp_Event_Fun) Send_WSampleInfo_PropWindowRevMeasureApp_Event_Fun Success");
  603. DWSInfo__PropWindowRevMeasureApp_Event(SampleId, ValType, ObjVal, bCheckBoxFlag);
  604. }
  605. else
  606. {
  607. //m_MeasureAppForm.m_LogFunExport.TraceLog(" (OTSDelegateEventFun.Send_WSampleInfo_PropWindowRevMeasureApp_Event_Fun) Send_WSampleInfo_PropWindowRevMeasureApp_Event_Fun Failed");
  608. }
  609. }
  610. //手动绘制圆形测量区域
  611. public void Send_DrawCircleMeasure_MeasureAppToSampleWindow_Event_Fun()
  612. {
  613. if (null != DDrawCirCleMeasure_MeasureAppToSampleWindow_Event)
  614. {
  615. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DDrawCirCleMeasure_MeasureAppToSampleWindow_Event) DDrawCirCleMeasure_MeasureAppToSampleWindow_Event Success");
  616. DDrawCirCleMeasure_MeasureAppToSampleWindow_Event();
  617. }
  618. else
  619. {
  620. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DDrawCirCleMeasure_MeasureAppToSampleWindow_Event) DDrawCirCleMeasure_MeasureAppToSampleWindow_Event Failed");
  621. }
  622. }
  623. //手动绘制矩形测量区域
  624. public void Send_DrawRectangleMeasure_MeasureAppToSampleWindow_Event_Fun()
  625. {
  626. if (null != DDrawRectangleMeasure_MeasureAppToSampleWindow_Event)
  627. {
  628. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DDrawRectangleMeasure_MeasureAppToSampleWindow_Event) DDrawRectangleMeasure_MeasureAppToSampleWindow_Event Success");
  629. DDrawRectangleMeasure_MeasureAppToSampleWindow_Event();
  630. }
  631. else
  632. {
  633. //m_MeasureAppForm.m_LogFunExport.TraceLog("(OTSDelegateEventFun.DDrawRectangleMeasure_MeasureAppToSampleWindow_Event) DDrawRectangleMeasure_MeasureAppToSampleWindow_Event Failed");
  634. }
  635. }
  636. }
  637. }