SSMRF04600.xfdl 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.5">
  3. <TypeDefinition url="..\..\..\default_typedef.xml"/>
  4. <Form id="SSMRF04600" position="absolute 0 0 205 155" titletext="이미지 편집팔레트" onload="SSMRF04600_onload">
  5. <Layouts>
  6. <Layout>
  7. <!--
  8. <Div position="absolute 0 0 400 175" id="grp_imgedit">
  9. <Layouts>
  10. <Layout>
  11. -->
  12. <Button position="absolute 154 2 177 25" id="btn_point" class="icon_point" text="" tooltiptext="표시" onclick="btn_point_onclick"/>
  13. <Button position="absolute 4 2 27 25" id="btn_select" class="icon_select" text="" tooltiptext="선택" onclick="btn_select_onclick"/>
  14. <Button position="absolute 104 2 127 25" id="btn_rect" class="icon_rect" text="" tooltiptext="사각형" onclick="btn_rect_onclick"/>
  15. <Button position="absolute 54 2 77 25" id="btn_line" class="icon_line" text="" tooltiptext="선" onclick="btn_line_onclick"/>
  16. <Button position="absolute 79 27 102 50" id="btn_fontcolor" class="icon_font_color" text="" tooltiptext="글색" onclick="Button_onclick"/>
  17. <Button position="absolute 179 2 202 25" id="btn_del" class="icon_eraser" text="" onclick="btn_eraser_onclick" tooltiptext="지우개"/>
  18. <Button position="absolute 79 2 102 25" id="btn_freeline" class="icon_freeline" text="" tooltiptext="자유 곡선" onclick="btn_freeline_onclick"/>
  19. <Button position="absolute 104 27 127 50" id="btn_bgcolor" class="icon_fill_color" text="" tooltiptext="배경색" onclick="Button_onclick"/>
  20. <Div position="absolute 44 53 200 153" id="colorpicker" visible="false" mode="">
  21. <Layouts>
  22. <Layout>
  23. <Static text="" onclick="Static_onclick" position="absolute 27 64 42 79" style="background:#ffcc99;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C34"/>
  24. <Static text="" onclick="Static_onclick" position="absolute 122 32 137 47" style="background:#800080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C23"/>
  25. <Static text="" onclick="Static_onclick" position="absolute 65 16 80 31" style="background:#008000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C12"/>
  26. <Static text="" onclick="Static_onclick" position="absolute 27 0 42 15" style="background:#993300;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C2"/>
  27. <Static text="" onclick="Static_onclick" position="absolute 46 64 61 79" style="background:#ffff99;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C35"/>
  28. <Static text="" onclick="Static_onclick" position="absolute 141 32 156 47" style="background:#999999;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C24"/>
  29. <Static text="" onclick="Static_onclick" position="absolute 84 16 99 31" style="background:#008080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C13"/>
  30. <Static text="" onclick="Static_onclick" position="absolute 46 0 61 15" style="background:#333300;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C3"/>
  31. <Static text="" onclick="Static_onclick" position="absolute 65 64 80 79" style="background:#ccffcc;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C36"/>
  32. <Static text="" onclick="Static_onclick" position="absolute 8 48 23 63" style="background:#ff00ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C25"/>
  33. <Static text="" onclick="Static_onclick" position="absolute 103 16 118 31" style="background:#0000ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C14"/>
  34. <Static text="" onclick="Static_onclick" position="absolute 65 0 80 15" style="background:#003300;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C4"/>
  35. <Static text="" onclick="Static_onclick" position="absolute 84 64 99 79" style="background:#ccffff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C37"/>
  36. <Static text="" onclick="Static_onclick" position="absolute 27 48 42 63" style="background:#ffcc00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C26"/>
  37. <Static text="" onclick="Static_onclick" position="absolute 122 16 137 31" style="background:#666699;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C15"/>
  38. <Static text="" onclick="Static_onclick" position="absolute 84 0 99 15" style="background:#003366;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C5"/>
  39. <Static text="" onclick="Static_onclick" position="absolute 103 64 118 79" style="background:#99ccff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C38"/>
  40. <Static text="" onclick="Static_onclick" position="absolute 46 48 61 63" style="background:#ffff00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C27"/>
  41. <Static text="" onclick="Static_onclick" position="absolute 141 16 156 31" style="background:#808080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C16"/>
  42. <Static text="" onclick="Static_onclick" position="absolute 103 0 118 15" style="background:#000080;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C6"/>
  43. <Static text="" onclick="Static_onclick" position="absolute 122 64 137 79" style="background:#cc99ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C39"/>
  44. <Static text="" onclick="Static_onclick" position="absolute 65 48 80 63" style="background:#00ff00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C28"/>
  45. <Static text="" onclick="Static_onclick" position="absolute 8 32 23 47" style="background:#ff0000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C17"/>
  46. <Static text="" onclick="Static_onclick" position="absolute 122 0 137 15" style="background:#333399;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C7"/>
  47. <Static text="" onclick="Static_onclick" position="absolute 84 48 99 63" style="background:#00ffff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C29"/>
  48. <Static text="" onclick="Static_onclick" position="absolute 27 32 42 47" style="background:#ff9900;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C18"/>
  49. <Static text="" onclick="Static_onclick" position="absolute 141 0 156 15" style="background:#333333;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C8"/>
  50. <Static text="" onclick="Static_onclick" position="absolute 46 32 61 47" style="background:#99cc00;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C19"/>
  51. <Static text="" onclick="Static_onclick" position="absolute 8 16 23 31" style="background:#800000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C9"/>
  52. <Static text="" onclick="Static_onclick" position="absolute 141 64 156 79" style="background:#ffffff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C40"/>
  53. <Static text="" onclick="Static_onclick" position="absolute 103 48 118 63" style="background:#00ccff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C30"/>
  54. <Static text="" onclick="Static_onclick" position="absolute 122 48 137 63" style="background:#993366;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C31"/>
  55. <Static text="" onclick="Static_onclick" position="absolute 65 32 80 47" style="background:#339966;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C20"/>
  56. <Static text="" onclick="Static_onclick" position="absolute 141 48 156 63" style="background:#c0c0c0;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C32"/>
  57. <Static text="" onclick="Static_onclick" position="absolute 84 32 99 47" style="background:#33cccc;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C21"/>
  58. <Static text="" onclick="Static_onclick" position="absolute 27 16 42 31" style="background:#ff6600;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C10"/>
  59. <Static text="" onclick="Static_onclick" position="absolute 8 64 23 79" style="background:#ff99cc;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C33"/>
  60. <Static text="" onclick="Static_onclick" position="absolute 103 32 118 47" style="background:#3366ff;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C22"/>
  61. <Static text="" onclick="Static_onclick" position="absolute 46 16 61 31" style="background:#808000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C11"/>
  62. <Static text="" onclick="Static_onclick" position="absolute 8 0 23 15" style="background:#000000;border:1 solid #808080ff ;align:center middle;" anchor="default" id="C1"/>
  63. <Static text="No Fill" onclick="Static_onclick" position="absolute 8 80 156 100" style="border:1 solid #808080ff ;align:center middle;" anchor="default" id="C41"/>
  64. </Layout>
  65. </Layouts>
  66. </Div>
  67. <Button position="absolute 129 27 152 50" id="btn_linecolor" class="icon_line_color" text="" onclick="Button_onclick" tooltiptext="선색"/>
  68. <Button position="absolute 29 2 52 25" id="btn_text" class="icon_text" text="" tooltiptext="글" onclick="btn_text_onclick"/>
  69. <Button position="absolute 29 27 52 50" id="btn_undo" class="icon_levelup" text="" tooltiptext="되돌리기" onclick="btn_undo_onclick"/>
  70. <Button position="absolute 54 27 77 50" id="btn_redo" class="icon_leveldown" text="" tooltiptext="되살리기" onclick="btn_redo_onclick"/>
  71. <Button position="absolute 4 27 27 50" id="btn_drawcancel" class="icon_x" text="" tooltiptext="처음상태로" onclick="btn_drawcancel_onclick"/>
  72. <Button position="absolute 129 2 152 25" id="btn_round" class="icon_round" text="" tooltiptext="원" onclick="btn_round_onclick"/>
  73. <Button position="absolute 154 27 177 50" id="btn_fileopen" text="" style="background:transparent URL('IMG::emr\MR\open_folder.png');border:0 solid #038cb5ff ;" tooltiptext="폴더열기" onclick="btn_fileopen_onclick"/>
  74. <!--
  75. </Layout>
  76. </Layouts>
  77. </Div>
  78. -->
  79. </Layout>
  80. </Layouts>
  81. <Objects>
  82. <Dataset id="ds_data_imgeInfo" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  83. <ColumnInfo>
  84. <Column id="degnitemcd" type="STRING" size="256"/>
  85. <Column id="degnitemno" type="STRING" size="256"/>
  86. <Column id="degnitemlevlcd" type="STRING" size="256"/>
  87. <Column id="degnitemnm" type="STRING" size="256"/>
  88. </ColumnInfo>
  89. </Dataset>
  90. <Dataset id="ds_data_selectnode" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  91. <ColumnInfo>
  92. <Column id="fontfamily" type="STRING" size="256"/>
  93. <Column id="fontstyle" type="STRING" size="256"/>
  94. <Column id="fontsize" type="STRING" size="256"/>
  95. <Column id="borderstyle" type="STRING" size="256"/>
  96. <Column id="borderwidth" type="STRING" size="256"/>
  97. <Column id="fontcolor" type="STRING" size="256"/>
  98. <Column id="backcolor" type="STRING" size="256"/>
  99. <Column id="linecolor" type="STRING" size="256"/>
  100. <Column id="imgenm" type="STRING" size="256"/>
  101. <Column id="imgeno" type="STRING" size="256"/>
  102. <Column id="viewmode" type="STRING" size="256"/>
  103. <Column id="colorbt" type="STRING" size="256"/>
  104. <Column id="fillstyle" type="STRING" size="256"/>
  105. <Column id="opacity" type="STRING" size="256"/>
  106. <Column id="lineweight" type="STRING" size="256"/>
  107. </ColumnInfo>
  108. </Dataset>
  109. <Dataset id="ds_data_localimage" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  110. <ColumnInfo>
  111. <Column id="objid" type="STRING" size="256"/>
  112. <Column id="degnitemlevlcd" type="STRING" size="256"/>
  113. <Column id="LocalYN" type="STRING" size="256"/>
  114. <Column id="LocalFileName" type="STRING" size="256"/>
  115. <Column id="srcimge" type="BLOB" size="256"/>
  116. </ColumnInfo>
  117. </Dataset>
  118. </Objects>
  119. <Script type="xscript4.0"><![CDATA[/***************************************************************************************
  120. * System Name :
  121. * Job Name :
  122. * Creator :
  123. * Make Date : 2014-09-17
  124. * Description :
  125. *---------------------------------------------------------------------------------------
  126. * Modify Date Modifier Modify Description
  127. *---------------------------------------------------------------------------------------
  128. * 2014-09-17 Live Converter TF->XP
  129. *
  130. *---------------------------------------------------------------------------------------
  131. ****************************************************************************************/
  132. //=======================================================================================
  133. // Lib Include
  134. //---------------------------------------------------------------------------------------
  135. include "com_commonxp::comm_main.xjs";
  136. include "emr_commonxp::EMRCommon.xjs";
  137. //=======================================================================================
  138. // Global Form Variable
  139. //---------------------------------------------------------------------------------------
  140. // 이미지 컴포넌트.
  141. var obj_imge;
  142. // 파일 업로드 사이즈
  143. var gDefaultFileSize = 2048000;
  144. var gLastBackgroundColor;
  145. var gLastFontColor;
  146. var gLastLineColor;
  147. //=======================================================================================
  148. // Function
  149. //---------------------------------------------------------------------------------------
  150. /****************************************************************************************
  151. * Argument : N/A
  152. * Description : 부모창의 ActiveX Component ID를 가져온다.
  153. ****************************************************************************************/
  154. function lf_getObjectImg()
  155. {
  156. var objParent = this.parent;
  157. var objComponent = objParent.components;
  158. var nCompCnt = objComponent.length;
  159. var palName = this.name;
  160. var palNo = palName.replace("ivw_imgedit_", "");
  161. var objNm = ""; // 이미지 ActiveX 명
  162. var objNo = ""; // 이미지 ActiveX 디자인 번호
  163. for(var i=0; i < nCompCnt; i++)
  164. {
  165. if(objComponent[i] instanceof ActiveX)
  166. {
  167. objNm = objComponent[i].name;
  168. objNo = objNm.replace("IMG_", "");
  169. if(palNo == objNo)
  170. return objComponent[i];
  171. }
  172. }
  173. }
  174. /****************************************************************************************
  175. * Argument : nMaxBytes - file size, bMulti - file Multi open boolen
  176. * Description : 이미지 로드용 대화상자 열기.
  177. ****************************************************************************************/
  178. function lf_openImageFileDialogEx(nMaxBytes, bMulti)
  179. {
  180. var nFileLoadType = 2;
  181. if(utlf_isNull(bMulti)||!bMulti){
  182. nFileLoadType = 0;
  183. }
  184. var vFiledlg = new FileDialog;
  185. vFiledlg.filter = "All Files (*.*)|*.*|JPEG Files(*.jpg)|*.jpg|GIF Files(*.gif)|*.gif|BMP Files(*.bmp)|*.bmp";
  186. var vFileInfo;
  187. if(nFileLoadType==0){
  188. vFileInfo = new Array();
  189. vFileInfo[0] = vFiledlg.open("FileOpen", nFileLoadType);
  190. }else{
  191. vFileInfo = vFiledlg.open("FileOpen", nFileLoadType);
  192. }
  193. if(!utlf_isNull(vFileInfo)){
  194. var nFileCnt = vFileInfo.length;
  195. for(var i=0; i<nFileCnt; i++){
  196. var vFile = vFileInfo[i];
  197. if(!utlf_isNull(nMaxBytes)){
  198. // 파일 크기 확인
  199. var nFileSize = vFile.getFileSize();
  200. if (nFileSize>nMaxBytes) {
  201. sysf_messageBox("파일 크기가 최대 크기인 2M를", "E003");
  202. return;
  203. }
  204. }
  205. }
  206. }
  207. return vFileInfo;
  208. }
  209. /****************************************************************************************
  210. * Argument : N/A
  211. * Description : 라이브이미지 ActiveX 컨트롤에 이미지 파일을 불러들인다.
  212. ****************************************************************************************/
  213. function lf_AddImgeByFile()
  214. {
  215. // BLOB 사이즈가 2M로 설정됨에 따라 업로드 파일사이즈를 제한함.
  216. // gDefaultFileSize - 2048000
  217. var vFileInfo = lf_openImageFileDialogEx(gDefaultFileSize, false);
  218. if(utlf_isNull(vFileInfo)){
  219. return;
  220. }
  221. var nRow = ds_data_imgeInfo.rowposition;
  222. var degnitemlevlcd = ds_data_imgeInfo.getColumn(nRow, "degnitemlevlcd");
  223. var degnitemcd = ds_data_imgeInfo.getColumn(nRow, "degnitemcd").substr(0, 7);
  224. var degnitemno = ds_data_imgeInfo.getColumn(nRow, "degnitemno");
  225. var degnitemnm = ds_data_imgeInfo.getColumn(nRow, "degnitemnm");
  226. // 서식내에 이미지 개수를 확인
  227. var objRecItemDS = this.parent.objects["ds_data_recitem"];
  228. var sFilePath = vFileInfo[0].fullpath;
  229. var sFileName = vFileInfo[0].filename;
  230. var recitemNode = objRecItemDS.findRowExpr("degnitemkind=='IMG'&&degnitemlevlcd=='"+degnitemlevlcd+"'&&degnitemno=='"+degnitemno+"'");
  231. var nRowCnt = objRecItemDS.getRowCount();
  232. for(var i=0; i<nRowCnt; i++){
  233. var tmpDegnitemno = objRecItemDS.getColumn(i, "degnitemno");
  234. var tmpDegnitemcd = objRecItemDS.getColumn(i, "degnitemlevlcd");
  235. if(degnitemlevlcd==tmpDegnitemcd&&degnitemno==tmpDegnitemno){
  236. utlf_addLog("degnitemlevlcd : " + degnitemlevlcd + " || tmpDegnitemcd : " + tmpDegnitemcd)
  237. var nRow = ds_data_localimage.rowposition;
  238. if(nRow<0){
  239. ds_data_localimage.clearData();
  240. nRow = ds_data_localimage.addRow();
  241. }
  242. ds_data_localimage.setColumn(nRow, "objid" , "IMG_"+tmpDegnitemno);
  243. ds_data_localimage.setColumn(nRow, "LocalYN" , "Y");
  244. ds_data_localimage.setColumn(nRow, "LocalFileName" , sFileName);
  245. ds_data_localimage.setColumn(nRow, "degnitemlevlcd", degnitemlevlcd);
  246. obj_imge.Clear();
  247. // 뷰모드를 가로/세로 비율로 변경
  248. obj_imge.SetViewMode(4);
  249. obj_imge.LoadImage(sFilePath);
  250. // BMP 형식대로 리턴.
  251. var strBase64 = obj_imge.SaveImageBase64();
  252. if(recitemNode>-1){
  253. ds_data_localimage.setColumn(nRow, "srcimge", strBase64);
  254. }
  255. var nEnvSrcimge = lf_mmbfGetUserEnvQuestValue("074");
  256. if( nEnvSrcimge == "001" ){
  257. dsf_writeFileToDs(vFileInfo[0], objRecItemDS, recitemNode, "srcimge")
  258. }
  259. lf_reSizeImg(obj_imge);
  260. }
  261. }
  262. }
  263. /****************************************************************************************
  264. * Argument : N/A
  265. * Description : 색상을 입히기 위해 팔레트를 클릭했을때 발생하는 함수.
  266. ****************************************************************************************/
  267. function lf_ColorClicked(obj, bDetail)
  268. {
  269. var objItem = obj;
  270. if(utlf_isNull(bDetail)){
  271. bDetail = false;
  272. }
  273. var sColor;
  274. if(bDetail){
  275. sColor = obj_imge.GetRGBColorDlg();
  276. if(utlf_isNull(sColor)){
  277. return;
  278. }
  279. }else{
  280. sColor = new String(objItem.style.background.color);
  281. if(sColor.length>7){
  282. sColor = sColor.substr(0, sColor.length-2);
  283. }
  284. }
  285. if(sColor=="transparent"){
  286. sColor = "";
  287. }
  288. var clickbtn = colorpicker.mode;
  289. if(clickbtn == "btn_bgcolor"){
  290. // 배경색
  291. obj_imge.SetShapeStyle("background-color", sColor);
  292. obj_imge.SetShapeStyle("fill-color", sColor);
  293. // 마지막으로 선택한 배경색을 인스턴스에 저장해둠.
  294. gLastBackgroundColor = sColor;
  295. }else if(clickbtn == "btn_fontcolor"){
  296. // 텍스트
  297. obj_imge.SetShapeStyle("color", sColor);
  298. gLastFontColor = sColor;
  299. }else if(clickbtn == "btn_linecolor"){
  300. // 선색
  301. obj_imge.SetShapeStyle("border-color", sColor);
  302. gLastLineColor = sColor;
  303. }
  304. colorpicker.visible = false;
  305. }
  306. //=======================================================================================
  307. // Transaction Callback
  308. //---------------------------------------------------------------------------------------
  309. /****************************************************************************************
  310. * Argument : 01.sSvcId : 서비스 ID
  311. * : 02.nErrorCode : 에러코드
  312. * : 03.sErrorMsg : 에러메시지
  313. * Description : cf_의 콜백함수
  314. ****************************************************************************************/
  315. function cf_(sSvcId, nErrorCode, sErrorMsg){
  316. }
  317. //=======================================================================================
  318. // Event
  319. //---------------------------------------------------------------------------------------
  320. /****************************************************************************************
  321. * Components : Form
  322. * Components ID : SSMRF04600
  323. * Event : onload
  324. * Argument : 01.obj : Object Event has occurred
  325. * : 02.e : Event Object
  326. * Description : 화면 초기화
  327. ****************************************************************************************/
  328. function SSMRF04600_onload(obj:Form, e:LoadEventInfo)
  329. {
  330. frmf_initForm(obj);
  331. ds_data_selectnode.clearData();
  332. var nAddRow = ds_data_selectnode.addRow();
  333. ds_data_selectnode.setColumn(nAddRow, "fontfamily" , "굴림");
  334. ds_data_selectnode.setColumn(nAddRow, "fontstyle" , 0);
  335. ds_data_selectnode.setColumn(nAddRow, "fontsize" , 10);
  336. ds_data_selectnode.setColumn(nAddRow, "borderstyle", "solid");
  337. ds_data_selectnode.setColumn(nAddRow, "borderwidth", 2);
  338. ds_data_selectnode.setColumn(nAddRow, "viewmode" , 4);
  339. ds_data_selectnode.setColumn(nAddRow, "fillstyle" , "transparent");
  340. obj_imge = lf_getObjectImg();
  341. ds_data_imgeInfo.clearData();
  342. ds_data_imgeInfo.addRow();
  343. }
  344. /****************************************************************************************
  345. * Components : Button
  346. * Components ID : btn_select
  347. * Event : onclick
  348. * Argument : 01.obj : Object Event has occurred
  349. * : 02.e : Event Object
  350. * Description : 선택.
  351. ****************************************************************************************/
  352. function btn_select_onclick(obj:Button, e:ClickEventInfo)
  353. {
  354. obj_imge.SelectDrawType(0, false);
  355. }
  356. /****************************************************************************************
  357. * Components : Button
  358. * Components ID : btn_text
  359. * Event : onclick
  360. * Argument : 01.obj : Object Event has occurred
  361. * : 02.e : Event Object
  362. * Description : 글.
  363. ****************************************************************************************/
  364. function btn_text_onclick(obj:Button, e:ClickEventInfo)
  365. {
  366. obj_imge.DeselectAllShape();
  367. obj_imge.SelectDrawType(4, false);
  368. }
  369. /****************************************************************************************
  370. * Components : Button
  371. * Components ID : btn_line
  372. * Event : onclick
  373. * Argument : 01.obj : Object Event has occurred
  374. * : 02.e : Event Object
  375. * Description : 선.
  376. ****************************************************************************************/
  377. function btn_line_onclick(obj:Button, e:ClickEventInfo)
  378. {
  379. obj_imge.DeselectAllShape();
  380. obj_imge.SelectDrawType(1, true);
  381. obj_imge.SetShapeStyle("border-color", "black");
  382. obj_imge.SetShapeStyle("border-width", "2");
  383. }
  384. /****************************************************************************************
  385. * Components : Button
  386. * Components ID : btn_freeline
  387. * Event : onclick
  388. * Argument : 01.obj : Object Event has occurred
  389. * : 02.e : Event Object
  390. * Description : 자유 곡선.
  391. ****************************************************************************************/
  392. function btn_freeline_onclick(obj:Button, e:ClickEventInfo)
  393. {
  394. obj_imge.DeselectAllShape();
  395. obj_imge.SelectDrawType(5, true);
  396. obj_imge.SetShapeStyle("border-color", "black");
  397. obj_imge.SetShapeStyle("border-width", "2");
  398. }
  399. /****************************************************************************************
  400. * Components : Button
  401. * Components ID : btn_rect
  402. * Event : onclick
  403. * Argument : 01.obj : Object Event has occurred
  404. * : 02.e : Event Object
  405. * Description : 사각형.
  406. ****************************************************************************************/
  407. function btn_rect_onclick(obj:Button, e:ClickEventInfo)
  408. {
  409. obj_imge.DeselectAllShape();
  410. obj_imge.SelectDrawType(2, true);
  411. obj_imge.SetShapeStyle("border-color", "black");
  412. obj_imge.SetShapeStyle("border-width", "2");
  413. }
  414. /****************************************************************************************
  415. * Components : Button
  416. * Components ID : btn_round
  417. * Event : onclick
  418. * Argument : 01.obj : Object Event has occurred
  419. * : 02.e : Event Object
  420. * Description : 원.
  421. ****************************************************************************************/
  422. function btn_round_onclick(obj:Button, e:ClickEventInfo)
  423. {
  424. obj_imge.DeselectAllShape();
  425. obj_imge.SelectDrawType(3, true);
  426. obj_imge.SetShapeStyle("border-color", "black");
  427. obj_imge.SetShapeStyle("border-width", "2");
  428. }
  429. /****************************************************************************************
  430. * Components : Button
  431. * Components ID : btn_point
  432. * Event : onclick
  433. * Argument : 01.obj : Object Event has occurred
  434. * : 02.e : Event Object
  435. * Description : 표시.
  436. ****************************************************************************************/
  437. function btn_point_onclick(obj:Button, e:ClickEventInfo)
  438. {
  439. obj_imge.DeselectAllShape();
  440. obj_imge.SetBaseSize(10, 10);
  441. obj_imge.SetShapeStyle("border-color", "red");
  442. obj_imge.SetShapeStyle("border-width", "2");
  443. obj_imge.SelectDrawType(3, true);
  444. }
  445. /****************************************************************************************
  446. * Components : Button
  447. * Components ID : btn_eraser
  448. * Event : onclick
  449. * Argument : 01.obj : Object Event has occurred
  450. * : 02.e : Event Object
  451. * Description : 지우개.
  452. ****************************************************************************************/
  453. function btn_eraser_onclick(obj:Button, e:ClickEventInfo)
  454. {
  455. // obj_imge.SelectDrawType(101, true);
  456. // obj_imge.SetShapeStyle("eraser-size", "20");
  457. obj_imge.DeleteShape();
  458. }
  459. /****************************************************************************************
  460. * Components : Button
  461. * Components ID : btn_drawcancel
  462. * Event : onclick
  463. * Argument : 01.obj : Object Event has occurred
  464. * : 02.e : Event Object
  465. * Description : 초기화.
  466. ****************************************************************************************/
  467. function btn_drawcancel_onclick(obj:Button, e:ClickEventInfo)
  468. {
  469. obj_imge.DeleteAllShape();
  470. }
  471. /****************************************************************************************
  472. * Components : Button
  473. * Components ID : btn_undo
  474. * Event : onclick
  475. * Argument : 01.obj : Object Event has occurred
  476. * : 02.e : Event Object
  477. * Description : 이전상태.
  478. ****************************************************************************************/
  479. function btn_undo_onclick(obj:Button, e:ClickEventInfo)
  480. {
  481. obj_imge.Undo();
  482. }
  483. /****************************************************************************************
  484. * Components : Button
  485. * Components ID : btn_redo
  486. * Event : onclick
  487. * Argument : 01.obj : Object Event has occurred
  488. * : 02.e : Event Object
  489. * Description : 다음상태.
  490. ****************************************************************************************/
  491. function btn_redo_onclick(obj:Button, e:ClickEventInfo)
  492. {
  493. obj_imge.Redo();
  494. }
  495. /****************************************************************************************
  496. * Components : Button
  497. * Components ID : btn_fontcolor
  498. * Event : onclick
  499. * Argument : 01.obj : Object Event has occurred
  500. * : 02.e : Event Object
  501. * Description : 글색, 배경색, Line 색
  502. ****************************************************************************************/
  503. function Button_onclick(obj:Button, e:ClickEventInfo)
  504. {
  505. var sMode = colorpicker.mode;
  506. var bVisible = colorpicker.visible;
  507. if(utlf_isNull(sMode)||sMode!=obj.name){
  508. colorpicker.mode = obj.name;
  509. colorpicker.visible = true;
  510. }else{
  511. colorpicker.mode = "";
  512. colorpicker.visible = false;
  513. }
  514. }
  515. /****************************************************************************************
  516. * Components : Button
  517. * Components ID : btn_fileopen
  518. * Event : onclick
  519. * Argument : 01.obj : Object Event has occurred
  520. * : 02.e : Event Object
  521. * Description : 이미지 파일을 가져온다.
  522. ****************************************************************************************/
  523. function btn_fileopen_onclick(obj:Button, e:ClickEventInfo)
  524. {
  525. lf_AddImgeByFile();
  526. }
  527. /****************************************************************************************
  528. * Components : Static
  529. * Components ID : Static
  530. * Event : onclick
  531. * Argument : 01.obj : Object Event has occurred
  532. * : 02.e : Event Object
  533. * Description : 색상을 입히기 위해 팔레트를 클릭했을때 발생하는 함수.
  534. ****************************************************************************************/
  535. function Static_onclick(obj:Static, e:ClickEventInfo)
  536. {
  537. lf_ColorClicked(obj);
  538. }
  539. function lf_reSizeImg(obj_imge){
  540. if( !obj_imge instanceof ActiveX && utlf_isNull(obj_imge.orgHeight) && utlf_isNull(obj_imge.orgWidth) ){
  541. return;
  542. }
  543. var sz = obj_imge.GetImageSizeEx(false);
  544. var arrSz = sz.split("|");
  545. if(obj_imge.orgWidth <= arrSz[0]){
  546. obj_imge.position.width = obj_imge.orgWidth;
  547. }else{
  548. obj_imge.position.width = arrSz[0];
  549. }
  550. if(obj_imge.orgHeight <= arrSz[1]){
  551. obj_imge.position.height = obj_imge.orgHeight;
  552. }else{
  553. obj_imge.position.height = arrSz[1];
  554. }
  555. }]]></Script>
  556. </Form>
  557. </FDL>