SMSMP90108_PACS연계위젯.xfdl 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SMSMP90108_PACS연계위젯" classname="SMSMP90108_PACS연계위젯" inheritanceid="" position="absolute 0 0 1024 768" titletext="New Form" onload="form_onload">
  5. <Layouts>
  6. <Layout>
  7. <Button id="btn_pop1" taborder="2" text="팝업1" onclick="btn_pop1_onclick" position="absolute 12 152 112 172"/>
  8. <Button id="btn_pop2" taborder="3" text="팝업2" onclick="btn_pop2_onclick" position="absolute 120 152 220 172"/>
  9. <Static id="Static00" text="PACS 연계위젯샘플" position="absolute 8 8 169 31"/>
  10. <Edit id="ipt_wparam" taborder="4" position="absolute 86 40 220 61"/>
  11. <Static id="Static01" text="wparam : " position="absolute 17 38 111 63"/>
  12. <Static id="Static02" text="lparam : " position="absolute 17 64 82 89"/>
  13. </Layout>
  14. </Layouts>
  15. <Script type="xscript4.0"><![CDATA[//=======================================================================================
  16. // Lib Include
  17. //---------------------------------------------------------------------------------------
  18. include "com_commonxp::comm_main.xjs"
  19. /****************************************************************************************
  20. * Argument :
  21. * Description : 시스템 헬퍼 관련 ocx 를 리턴한다.
  22. ****************************************************************************************/
  23. var axHelper = null;
  24. function getHelperObject(){
  25. // 객체가 널이면 생성하여 리턴한다.
  26. if (axHelper == null) {
  27. // 시스템 헬퍼관련 객체를 동적생성
  28. axHelper = new ActiveX("objHelper", 0,0,0,0);
  29. axHelper.progid = "{7ed5c30d-664e-4b8c-8629-5b787446b987}";
  30. this.addChild("objHelper", axHelper);
  31. axHelper.show();
  32. }
  33. return axHelper;
  34. }
  35. /****************************************************************************************
  36. * Argument :
  37. * Description : 폼 onload 이벤트에 대한 핸들러
  38. * 윈도우 핸들값을 가져와서 특정 레지스트리키에 세팅한다.
  39. * 외부프로그램에서 이 핸들값을 참조하여 윈도우 메세지를 보낸다.
  40. ****************************************************************************************/
  41. function form_onload(obj:Form, e:LoadEventInfo)
  42. {
  43. var helper = getHelperObject();
  44. // NSS 연계 초기화
  45. var sHWND = helper.getHWND();
  46. var nResult = helper.SetValueOfRegistry("HKEY_LOCAL_MACHINE", "SOFTWARE\\HIMED\\NSSMART", "Handle", "REG_DWORD", sHWND);
  47. if (nResult != 0)
  48. {
  49. messageBox("연계모듈이 구성되지","E007");
  50. }
  51. // 윈도우 메세지 핸들러 등록
  52. helper.setHandler("OnMessage", helper_onMessage);
  53. }
  54. /****************************************************************************************
  55. * Components : objActiveX
  56. * Components ID : helper
  57. * Event : onMessage
  58. * Argument : 01.objActiveX : ActiveX
  59. * : 02.axEventInfo
  60. * Description : 시스템헬퍼의 OnMessage 이벤트에 대한 핸들러 (윈도우메세지수신)
  61. ****************************************************************************************/
  62. function helper_onMessage(objActiveX, axEventInfo){
  63. var wparam = axEventInfo.wparam;
  64. var lparam = axEventInfo.lparam;
  65. trace("wparam: "+ axEventInfo.wparam +", lparam: "+axEventInfo.lparam);
  66. var helper = getHelperObject();
  67. var sDate = helper.GetValueOfRegistry("HKEY_LOCAL_MACHINE", "SOFTWARE\\HIMED\\PACS", "date");
  68. var sParam = helper.GetValueOfRegistry("HKEY_LOCAL_MACHINE", "SOFTWARE\\HIMED\\PACS", "param");
  69. alert("wparam: "+ wparam +", lparam: "+lparam+", date: "+ sDate+", param : "+ sParam);
  70. }
  71. function btn_pop1_onclick(obj:Button, e:ClickEventInfo)
  72. {
  73. frmf_open("SMZSA20300", "SMZSA20300", null, null, null, null, null, null, null, null, null, null, "M");
  74. }
  75. function btn_pop2_onclick(obj:Button, e:ClickEventInfo)
  76. {
  77. frmf_open("SMZSA20500", "SMZSA20500", null, null, null, null, null, null, null, null, null, null, "M");
  78. }
  79. ]]></Script>
  80. </Form>
  81. </FDL>