$PBExportHeader$w_aifmb_class_map.srw forward global type w_aifmb_class_map from window end type type cb_mtrltype from uo_imflatbutton within w_aifmb_class_map end type type cb_cancel from uo_imflatbutton within w_aifmb_class_map end type type cb_edit from uo_imflatbutton within w_aifmb_class_map end type type cb_sync from uo_imflatbutton within w_aifmb_class_map end type type tv_1 from uo_tv_aifmb_class within w_aifmb_class_map end type type dw_1 from u_dw_rbtnfilter within w_aifmb_class_map end type type cb_exit from uo_imflatbutton within w_aifmb_class_map end type type cb_reflash from uo_imflatbutton within w_aifmb_class_map end type type ln_bar from line within w_aifmb_class_map end type type ln_bar2 from line within w_aifmb_class_map end type type r_bar from rectangle within w_aifmb_class_map end type type ln_1 from line within w_aifmb_class_map end type type ln_2 from line within w_aifmb_class_map end type type ln_3 from line within w_aifmb_class_map end type type ln_4 from line within w_aifmb_class_map end type end forward global type w_aifmb_class_map from window integer width = 3790 integer height = 2208 windowtype windowtype = child! long backcolor = 67108864 string icon = "AppIcon!" boolean center = true event ue_sync_node ( ) event ue_retrieve ( ) event ue_set_mtrltype ( ) cb_mtrltype cb_mtrltype cb_cancel cb_cancel cb_edit cb_edit cb_sync cb_sync tv_1 tv_1 dw_1 dw_1 cb_exit cb_exit cb_reflash cb_reflash ln_bar ln_bar ln_bar2 ln_bar2 r_bar r_bar ln_1 ln_1 ln_2 ln_2 ln_3 ln_3 ln_4 ln_4 end type global w_aifmb_class_map w_aifmb_class_map type variables boolean dw_edit_mode = false long ins_nodeid_arr[] end variables forward prototypes public subroutine wf_face () end prototypes event ue_sync_node();uo_aifmb = Create uo_aifmb Int rslt = 1 String arg_msg IF uo_aifmb.uf_sync_node(arg_msg) <> 1 THEN rslt = 0 GOTO ext END IF ext: Destroy uo_aifmb IF rslt = 1 THEN MessageBox('提示', '同步成功') cb_reflash.TriggerEvent(Clicked!) ELSE MessageBox('ERROR', arg_msg) END IF end event event ue_retrieve();dw_1.Retrieve(ins_nodeid_arr) end event event ue_set_mtrltype();if dw_edit_mode then return open(w_mtrltype_def) end event public subroutine wf_face ();cb_reflash.Enabled = Not dw_edit_mode cb_sync.Enabled = Not dw_edit_mode cb_edit.Enabled = True cb_cancel.Enabled = dw_edit_mode cb_mtrltype.Enabled = Not dw_edit_mode Long i IF dw_edit_mode THEN // FOR i = 1 To 1 // dw_1.SetTabOrder(i, i * 10) // NEXT cb_edit.Text = '保存' cb_edit.normalpicname = 'Save.bmp' ELSE // FOR i = 1 To 1 // dw_1.SetTabOrder(i, 0) // NEXT cb_edit.Text = '修改' cb_edit.normalpicname = 'OPEN.BMP' END IF cb_edit.of_init_draw() cb_edit.of_paint() cb_edit.TriggerEvent('ue_textchange') end subroutine on w_aifmb_class_map.create this.cb_mtrltype=create cb_mtrltype this.cb_cancel=create cb_cancel this.cb_edit=create cb_edit this.cb_sync=create cb_sync this.tv_1=create tv_1 this.dw_1=create dw_1 this.cb_exit=create cb_exit this.cb_reflash=create cb_reflash this.ln_bar=create ln_bar this.ln_bar2=create ln_bar2 this.r_bar=create r_bar this.ln_1=create ln_1 this.ln_2=create ln_2 this.ln_3=create ln_3 this.ln_4=create ln_4 this.Control[]={this.cb_mtrltype,& this.cb_cancel,& this.cb_edit,& this.cb_sync,& this.tv_1,& this.dw_1,& this.cb_exit,& this.cb_reflash,& this.ln_bar,& this.ln_bar2,& this.r_bar,& this.ln_1,& this.ln_2,& this.ln_3,& this.ln_4} end on on w_aifmb_class_map.destroy destroy(this.cb_mtrltype) destroy(this.cb_cancel) destroy(this.cb_edit) destroy(this.cb_sync) destroy(this.tv_1) destroy(this.dw_1) destroy(this.cb_exit) destroy(this.cb_reflash) destroy(this.ln_bar) destroy(this.ln_bar2) destroy(this.r_bar) destroy(this.ln_1) destroy(this.ln_2) destroy(this.ln_3) destroy(this.ln_4) end on event resize;ln_bar.EndX = THIS.Width ln_bar2.EndX = THIS.Width ln_1.EndX = THIS.Width ln_2.EndX = THIS.Width ln_3.EndX = THIS.Width ln_4.EndX = THIS.Width r_bar.Width = THIS.Width tv_1.Height = this.WorkSpaceHeight() - tv_1.Y dw_1.Height = this.WorkSpaceHeight() - dw_1.Y dw_1.Width = this.WOrkSpaceWidth() - dw_1.X end event event open;wf_face() dw_1.SetTransObject(sqlca) tv_1.InsertItemLast(0, '未定义', 1) cb_reflash.triggerevent(clicked!) end event type cb_mtrltype from uo_imflatbutton within w_aifmb_class_map integer x = 425 integer width = 151 integer height = 164 integer taborder = 80 string text = "类别" string normalpicname = "update2.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;parent.triggerevent('ue_set_mtrltype') end event type cb_cancel from uo_imflatbutton within w_aifmb_class_map integer x = 727 integer width = 151 integer height = 164 integer taborder = 90 string text = "放弃" string normalpicname = "UNDO.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;dw_edit_mode = not dw_edit_mode parent.triggerevent('ue_retrieve') wf_face() end event type cb_edit from uo_imflatbutton within w_aifmb_class_map integer x = 576 integer width = 151 integer height = 164 integer taborder = 80 string text = "修改" string normalpicname = "OPEN.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;IF dw_edit_mode THEN IF dw_1.Update() <> 1 THEN ROLLBACK; MessageBox('ERROR', '保存失败') END IF COMMIT; END IF dw_edit_mode = Not dw_edit_mode wf_face() end event type cb_sync from uo_imflatbutton within w_aifmb_class_map integer x = 151 integer width = 274 integer height = 164 integer taborder = 80 string text = "同步基类" string normalpicname = "refresh.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;parent.triggerevent('ue_sync_node') end event type tv_1 from uo_tv_aifmb_class within w_aifmb_class_map integer y = 184 integer width = 841 integer taborder = 90 end type event selectionchanged;call super::selectionchanged;Long arr_nodeid[] pf_getnodeid(newhandle, arr_nodeid) IF UpperBound(arr_nodeid) = 0 THEN arr_nodeid[1] = -1 END IF ins_nodeid_arr = arr_nodeid parent.triggerevent('ue_retrieve') end event event selectionchanging;call super::selectionchanging;if dw_edit_mode then return 1 end event type dw_1 from u_dw_rbtnfilter within w_aifmb_class_map integer x = 841 integer y = 184 integer width = 2057 integer height = 984 integer taborder = 80 string dataobject = "dw_aifmb_mtrltype" boolean hscrollbar = true boolean vscrollbar = true boolean hsplitscroll = true boolean rbutton_filter_use = true boolean rbutton_setposition_use = true boolean titleclick_sort_use = true end type event clicked;call super::clicked;This.SelectRow(0, False) IF row > 0 THEN This.SelectRow(row, True) END IF end event event doubleclicked;call super::doubleclicked;Long i, ll_nodeid IF Not dw_edit_mode THEN RETURN IF dwo.Name = 'nodeid_t' And dw_1.RowCount() > 0 THEN ll_nodeid = dw_1.Object.NodeID[1] FOR i = 2 To dw_1.RowCount() dw_1.Object.NodeID[i] = ll_nodeid NEXT END IF IF dwo.Name = 'nodeid' And row > 0 And dw_edit_mode THEN Open(w_aifmb_class_map_ch) ll_nodeid = Message.DoubleParm IF ll_nodeid > 0 THEN dw_1.Object.NodeID[row] = ll_nodeid END IF END IF end event type cb_exit from uo_imflatbutton within w_aifmb_class_map integer x = 878 integer width = 151 integer height = 164 integer taborder = 70 string text = "退出" boolean cancel = true string normalpicname = "exit.bmp" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;Close(PARENT) end event type cb_reflash from uo_imflatbutton within w_aifmb_class_map integer width = 151 integer height = 164 integer taborder = 10 string text = "刷新" string normalpicname = "refresh.BMP" integer picsize = 16 toolbaralignment pic_align = alignattop! boolean border = false end type event clicked;call super::clicked;tv_1.uf_build_tree() end event type ln_bar from line within w_aifmb_class_map long linecolor = 268435456 integer linethickness = 4 integer beginy = 172 integer endx = 2007 integer endy = 172 end type type ln_bar2 from line within w_aifmb_class_map long linecolor = 16777215 integer linethickness = 4 integer beginy = 176 integer endx = 2039 integer endy = 176 end type type r_bar from rectangle within w_aifmb_class_map long linecolor = 16777215 integer linethickness = 4 long fillcolor = 1073741824 integer x = 2139 integer width = 146 integer height = 68 end type event constructor;this.fillcolor = 14215660 this.linecolor = 14215660 this.x = -1 this.y = -1 this.height = ln_bar.beginy - 5 end event type ln_1 from line within w_aifmb_class_map boolean visible = false long linecolor = 268435456 integer linethickness = 4 integer beginy = 292 integer endx = 2016 integer endy = 292 end type type ln_2 from line within w_aifmb_class_map boolean visible = false long linecolor = 16777215 integer linethickness = 4 integer beginy = 296 integer endx = 2048 integer endy = 296 end type type ln_3 from line within w_aifmb_class_map boolean visible = false long linecolor = 268435456 integer linethickness = 4 integer beginy = 412 integer endx = 2016 integer endy = 412 end type type ln_4 from line within w_aifmb_class_map boolean visible = false long linecolor = 16777215 integer linethickness = 4 integer beginy = 416 integer endx = 2048 integer endy = 416 end type