w_aifmb_class_map.srw 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. $PBExportHeader$w_aifmb_class_map.srw
  2. forward
  3. global type w_aifmb_class_map from window
  4. end type
  5. type cb_mtrltype from uo_imflatbutton within w_aifmb_class_map
  6. end type
  7. type cb_cancel from uo_imflatbutton within w_aifmb_class_map
  8. end type
  9. type cb_edit from uo_imflatbutton within w_aifmb_class_map
  10. end type
  11. type cb_sync from uo_imflatbutton within w_aifmb_class_map
  12. end type
  13. type tv_1 from uo_tv_aifmb_class within w_aifmb_class_map
  14. end type
  15. type dw_1 from u_dw_rbtnfilter within w_aifmb_class_map
  16. end type
  17. type cb_exit from uo_imflatbutton within w_aifmb_class_map
  18. end type
  19. type cb_reflash from uo_imflatbutton within w_aifmb_class_map
  20. end type
  21. type ln_bar from line within w_aifmb_class_map
  22. end type
  23. type ln_bar2 from line within w_aifmb_class_map
  24. end type
  25. type r_bar from rectangle within w_aifmb_class_map
  26. end type
  27. type ln_1 from line within w_aifmb_class_map
  28. end type
  29. type ln_2 from line within w_aifmb_class_map
  30. end type
  31. type ln_3 from line within w_aifmb_class_map
  32. end type
  33. type ln_4 from line within w_aifmb_class_map
  34. end type
  35. end forward
  36. global type w_aifmb_class_map from window
  37. integer width = 3790
  38. integer height = 2208
  39. windowtype windowtype = child!
  40. long backcolor = 67108864
  41. string icon = "AppIcon!"
  42. boolean center = true
  43. event ue_sync_node ( )
  44. event ue_retrieve ( )
  45. event ue_set_mtrltype ( )
  46. cb_mtrltype cb_mtrltype
  47. cb_cancel cb_cancel
  48. cb_edit cb_edit
  49. cb_sync cb_sync
  50. tv_1 tv_1
  51. dw_1 dw_1
  52. cb_exit cb_exit
  53. cb_reflash cb_reflash
  54. ln_bar ln_bar
  55. ln_bar2 ln_bar2
  56. r_bar r_bar
  57. ln_1 ln_1
  58. ln_2 ln_2
  59. ln_3 ln_3
  60. ln_4 ln_4
  61. end type
  62. global w_aifmb_class_map w_aifmb_class_map
  63. type variables
  64. boolean dw_edit_mode = false
  65. long ins_nodeid_arr[]
  66. end variables
  67. forward prototypes
  68. public subroutine wf_face ()
  69. end prototypes
  70. event ue_sync_node();uo_aifmb = Create uo_aifmb
  71. Int rslt = 1
  72. String arg_msg
  73. IF uo_aifmb.uf_sync_node(arg_msg) <> 1 THEN
  74. rslt = 0
  75. GOTO ext
  76. END IF
  77. ext:
  78. Destroy uo_aifmb
  79. IF rslt = 1 THEN
  80. MessageBox('提示', '同步成功')
  81. cb_reflash.TriggerEvent(Clicked!)
  82. ELSE
  83. MessageBox('ERROR', arg_msg)
  84. END IF
  85. end event
  86. event ue_retrieve();dw_1.Retrieve(ins_nodeid_arr)
  87. end event
  88. event ue_set_mtrltype();if dw_edit_mode then return
  89. open(w_mtrltype_def)
  90. end event
  91. public subroutine wf_face ();cb_reflash.Enabled = Not dw_edit_mode
  92. cb_sync.Enabled = Not dw_edit_mode
  93. cb_edit.Enabled = True
  94. cb_cancel.Enabled = dw_edit_mode
  95. cb_mtrltype.Enabled = Not dw_edit_mode
  96. Long i
  97. IF dw_edit_mode THEN
  98. // FOR i = 1 To 1
  99. // dw_1.SetTabOrder(i, i * 10)
  100. // NEXT
  101. cb_edit.Text = '保存'
  102. cb_edit.normalpicname = 'Save.bmp'
  103. ELSE
  104. // FOR i = 1 To 1
  105. // dw_1.SetTabOrder(i, 0)
  106. // NEXT
  107. cb_edit.Text = '修改'
  108. cb_edit.normalpicname = 'OPEN.BMP'
  109. END IF
  110. cb_edit.of_init_draw()
  111. cb_edit.of_paint()
  112. cb_edit.TriggerEvent('ue_textchange')
  113. end subroutine
  114. on w_aifmb_class_map.create
  115. this.cb_mtrltype=create cb_mtrltype
  116. this.cb_cancel=create cb_cancel
  117. this.cb_edit=create cb_edit
  118. this.cb_sync=create cb_sync
  119. this.tv_1=create tv_1
  120. this.dw_1=create dw_1
  121. this.cb_exit=create cb_exit
  122. this.cb_reflash=create cb_reflash
  123. this.ln_bar=create ln_bar
  124. this.ln_bar2=create ln_bar2
  125. this.r_bar=create r_bar
  126. this.ln_1=create ln_1
  127. this.ln_2=create ln_2
  128. this.ln_3=create ln_3
  129. this.ln_4=create ln_4
  130. this.Control[]={this.cb_mtrltype,&
  131. this.cb_cancel,&
  132. this.cb_edit,&
  133. this.cb_sync,&
  134. this.tv_1,&
  135. this.dw_1,&
  136. this.cb_exit,&
  137. this.cb_reflash,&
  138. this.ln_bar,&
  139. this.ln_bar2,&
  140. this.r_bar,&
  141. this.ln_1,&
  142. this.ln_2,&
  143. this.ln_3,&
  144. this.ln_4}
  145. end on
  146. on w_aifmb_class_map.destroy
  147. destroy(this.cb_mtrltype)
  148. destroy(this.cb_cancel)
  149. destroy(this.cb_edit)
  150. destroy(this.cb_sync)
  151. destroy(this.tv_1)
  152. destroy(this.dw_1)
  153. destroy(this.cb_exit)
  154. destroy(this.cb_reflash)
  155. destroy(this.ln_bar)
  156. destroy(this.ln_bar2)
  157. destroy(this.r_bar)
  158. destroy(this.ln_1)
  159. destroy(this.ln_2)
  160. destroy(this.ln_3)
  161. destroy(this.ln_4)
  162. end on
  163. event resize;ln_bar.EndX = THIS.Width
  164. ln_bar2.EndX = THIS.Width
  165. ln_1.EndX = THIS.Width
  166. ln_2.EndX = THIS.Width
  167. ln_3.EndX = THIS.Width
  168. ln_4.EndX = THIS.Width
  169. r_bar.Width = THIS.Width
  170. tv_1.Height = this.WorkSpaceHeight() - tv_1.Y
  171. dw_1.Height = this.WorkSpaceHeight() - dw_1.Y
  172. dw_1.Width = this.WOrkSpaceWidth() - dw_1.X
  173. end event
  174. event open;wf_face()
  175. dw_1.SetTransObject(sqlca)
  176. tv_1.InsertItemLast(0, '未定义', 1)
  177. cb_reflash.triggerevent(clicked!)
  178. end event
  179. type cb_mtrltype from uo_imflatbutton within w_aifmb_class_map
  180. integer x = 425
  181. integer width = 151
  182. integer height = 164
  183. integer taborder = 80
  184. string text = "类别"
  185. string normalpicname = "update2.bmp"
  186. integer picsize = 16
  187. toolbaralignment pic_align = alignattop!
  188. boolean border = false
  189. end type
  190. event clicked;call super::clicked;parent.triggerevent('ue_set_mtrltype')
  191. end event
  192. type cb_cancel from uo_imflatbutton within w_aifmb_class_map
  193. integer x = 727
  194. integer width = 151
  195. integer height = 164
  196. integer taborder = 90
  197. string text = "放弃"
  198. string normalpicname = "UNDO.BMP"
  199. integer picsize = 16
  200. toolbaralignment pic_align = alignattop!
  201. boolean border = false
  202. end type
  203. event clicked;call super::clicked;dw_edit_mode = not dw_edit_mode
  204. parent.triggerevent('ue_retrieve')
  205. wf_face()
  206. end event
  207. type cb_edit from uo_imflatbutton within w_aifmb_class_map
  208. integer x = 576
  209. integer width = 151
  210. integer height = 164
  211. integer taborder = 80
  212. string text = "修改"
  213. string normalpicname = "OPEN.BMP"
  214. integer picsize = 16
  215. toolbaralignment pic_align = alignattop!
  216. boolean border = false
  217. end type
  218. event clicked;call super::clicked;IF dw_edit_mode THEN
  219. IF dw_1.Update() <> 1 THEN
  220. ROLLBACK;
  221. MessageBox('ERROR', '保存失败')
  222. END IF
  223. COMMIT;
  224. END IF
  225. dw_edit_mode = Not dw_edit_mode
  226. wf_face()
  227. end event
  228. type cb_sync from uo_imflatbutton within w_aifmb_class_map
  229. integer x = 151
  230. integer width = 274
  231. integer height = 164
  232. integer taborder = 80
  233. string text = "同步基类"
  234. string normalpicname = "refresh.BMP"
  235. integer picsize = 16
  236. toolbaralignment pic_align = alignattop!
  237. boolean border = false
  238. end type
  239. event clicked;call super::clicked;parent.triggerevent('ue_sync_node')
  240. end event
  241. type tv_1 from uo_tv_aifmb_class within w_aifmb_class_map
  242. integer y = 184
  243. integer width = 841
  244. integer taborder = 90
  245. end type
  246. event selectionchanged;call super::selectionchanged;Long arr_nodeid[]
  247. pf_getnodeid(newhandle, arr_nodeid)
  248. IF UpperBound(arr_nodeid) = 0 THEN
  249. arr_nodeid[1] = -1
  250. END IF
  251. ins_nodeid_arr = arr_nodeid
  252. parent.triggerevent('ue_retrieve')
  253. end event
  254. event selectionchanging;call super::selectionchanging;if dw_edit_mode then return 1
  255. end event
  256. type dw_1 from u_dw_rbtnfilter within w_aifmb_class_map
  257. integer x = 841
  258. integer y = 184
  259. integer width = 2057
  260. integer height = 984
  261. integer taborder = 80
  262. string dataobject = "dw_aifmb_mtrltype"
  263. boolean hscrollbar = true
  264. boolean vscrollbar = true
  265. boolean hsplitscroll = true
  266. boolean rbutton_filter_use = true
  267. boolean rbutton_setposition_use = true
  268. boolean titleclick_sort_use = true
  269. end type
  270. event clicked;call super::clicked;This.SelectRow(0, False)
  271. IF row > 0 THEN
  272. This.SelectRow(row, True)
  273. END IF
  274. end event
  275. event doubleclicked;call super::doubleclicked;Long i, ll_nodeid
  276. IF Not dw_edit_mode THEN RETURN
  277. IF dwo.Name = 'nodeid_t' And dw_1.RowCount() > 0 THEN
  278. ll_nodeid = dw_1.Object.NodeID[1]
  279. FOR i = 2 To dw_1.RowCount()
  280. dw_1.Object.NodeID[i] = ll_nodeid
  281. NEXT
  282. END IF
  283. IF dwo.Name = 'nodeid' And row > 0 And dw_edit_mode THEN
  284. Open(w_aifmb_class_map_ch)
  285. ll_nodeid = Message.DoubleParm
  286. IF ll_nodeid > 0 THEN
  287. dw_1.Object.NodeID[row] = ll_nodeid
  288. END IF
  289. END IF
  290. end event
  291. type cb_exit from uo_imflatbutton within w_aifmb_class_map
  292. integer x = 878
  293. integer width = 151
  294. integer height = 164
  295. integer taborder = 70
  296. string text = "退出"
  297. boolean cancel = true
  298. string normalpicname = "exit.bmp"
  299. integer picsize = 16
  300. toolbaralignment pic_align = alignattop!
  301. boolean border = false
  302. end type
  303. event clicked;call super::clicked;Close(PARENT)
  304. end event
  305. type cb_reflash from uo_imflatbutton within w_aifmb_class_map
  306. integer width = 151
  307. integer height = 164
  308. integer taborder = 10
  309. string text = "刷新"
  310. string normalpicname = "refresh.BMP"
  311. integer picsize = 16
  312. toolbaralignment pic_align = alignattop!
  313. boolean border = false
  314. end type
  315. event clicked;call super::clicked;tv_1.uf_build_tree()
  316. end event
  317. type ln_bar from line within w_aifmb_class_map
  318. long linecolor = 268435456
  319. integer linethickness = 4
  320. integer beginy = 172
  321. integer endx = 2007
  322. integer endy = 172
  323. end type
  324. type ln_bar2 from line within w_aifmb_class_map
  325. long linecolor = 16777215
  326. integer linethickness = 4
  327. integer beginy = 176
  328. integer endx = 2039
  329. integer endy = 176
  330. end type
  331. type r_bar from rectangle within w_aifmb_class_map
  332. long linecolor = 16777215
  333. integer linethickness = 4
  334. long fillcolor = 1073741824
  335. integer x = 2139
  336. integer width = 146
  337. integer height = 68
  338. end type
  339. event constructor;this.fillcolor = 14215660
  340. this.linecolor = 14215660
  341. this.x = -1
  342. this.y = -1
  343. this.height = ln_bar.beginy - 5
  344. end event
  345. type ln_1 from line within w_aifmb_class_map
  346. boolean visible = false
  347. long linecolor = 268435456
  348. integer linethickness = 4
  349. integer beginy = 292
  350. integer endx = 2016
  351. integer endy = 292
  352. end type
  353. type ln_2 from line within w_aifmb_class_map
  354. boolean visible = false
  355. long linecolor = 16777215
  356. integer linethickness = 4
  357. integer beginy = 296
  358. integer endx = 2048
  359. integer endy = 296
  360. end type
  361. type ln_3 from line within w_aifmb_class_map
  362. boolean visible = false
  363. long linecolor = 268435456
  364. integer linethickness = 4
  365. integer beginy = 412
  366. integer endx = 2016
  367. integer endy = 412
  368. end type
  369. type ln_4 from line within w_aifmb_class_map
  370. boolean visible = false
  371. long linecolor = 16777215
  372. integer linethickness = 4
  373. integer beginy = 416
  374. integer endx = 2048
  375. integer endy = 416
  376. end type