$PBExportHeader$m_popup.srm forward global type m_popup from menu end type type m_main from menu within m_popup end type type m_item1 from menu within m_main end type type m_item2 from menu within m_main end type type m_item3 from menu within m_main end type type m_item4 from menu within m_main end type type m_item5 from menu within m_main end type type m_1 from menu within m_main end type type m_设置下级版本 from menu within m_main end type type m_设置报表下级菜单 from menu within m_main end type type m_设置单据下级菜单 from menu within m_main end type type m_main from menu within m_popup m_item1 m_item1 m_item2 m_item2 m_item3 m_item3 m_item4 m_item4 m_item5 m_item5 m_1 m_1 m_设置下级版本 m_设置下级版本 m_设置报表下级菜单 m_设置报表下级菜单 m_设置单据下级菜单 m_设置单据下级菜单 end type global type m_popup from menu m_main m_main end type end forward global type m_popup from menu m_main m_main end type global m_popup m_popup type variables Powerobject Anyobject end variables forward prototypes public subroutine popupmenu (integer x, integer y) public subroutine setmenuitem (string itemstring) public subroutine setitemdisabled (integer itemorder) public subroutine setiteminvisible (integer itemorder) end prototypes public subroutine popupmenu (integer x, integer y);this.m_main.popmenu(x,y) end subroutine public subroutine setmenuitem (string itemstring);int itempos,itemorder=1,i string currentitem if len(itemstring)=0 then return itempos=pos(itemstring,"|") DO WHILE itempos<>0 // itempos为间隔符"|"的位置 currentitem=left(itemstring,itempos - 1) //取出子串 itemstring=mid(itemstring, itempos+1) this.m_main.item[itemorder].text=currentitem itempos=pos(itemstring,"|") itemorder++ LOOP this.m_main.item[itemorder].text=itemstring for i=1 to itemorder this.m_main.item[i].visible=true this.m_main.item[i].enabled=true next for i=itemorder+1 to 15 this.m_main.item[i].visible=false next end subroutine public subroutine setitemdisabled (integer itemorder);if itemorder<1 or itemorder>15 then return this.m_main.item[itemorder].enabled=false end subroutine public subroutine setiteminvisible (integer itemorder);if itemorder<1 or itemorder>15 then return this.m_main.item[itemorder].visible=false end subroutine on m_popup.create m_popup=this call super::create this.text = "m_popup" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true this.m_main=create m_main this.Item[UpperBound(this.Item)+1]=this.m_main end on on m_popup.destroy call super::destroy destroy(this.m_main) end on type m_main from menu within m_popup m_item1 m_item1 m_item2 m_item2 m_item3 m_item3 m_item4 m_item4 m_item5 m_item5 m_1 m_1 m_设置下级版本 m_设置下级版本 m_设置报表下级菜单 m_设置报表下级菜单 m_设置单据下级菜单 m_设置单据下级菜单 end type on m_main.create call super::create this.text = "main" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true this.m_item1=create m_item1 this.m_item2=create m_item2 this.m_item3=create m_item3 this.m_item4=create m_item4 this.m_item5=create m_item5 this.m_1=create m_1 this.m_设置下级版本=create m_设置下级版本 this.m_设置报表下级菜单=create m_设置报表下级菜单 this.m_设置单据下级菜单=create m_设置单据下级菜单 this.Item[UpperBound(this.Item)+1]=this.m_item1 this.Item[UpperBound(this.Item)+1]=this.m_item2 this.Item[UpperBound(this.Item)+1]=this.m_item3 this.Item[UpperBound(this.Item)+1]=this.m_item4 this.Item[UpperBound(this.Item)+1]=this.m_item5 this.Item[UpperBound(this.Item)+1]=this.m_1 this.Item[UpperBound(this.Item)+1]=this.m_设置下级版本 this.Item[UpperBound(this.Item)+1]=this.m_设置报表下级菜单 this.Item[UpperBound(this.Item)+1]=this.m_设置单据下级菜单 end on on m_main.destroy call super::destroy destroy(this.m_item1) destroy(this.m_item2) destroy(this.m_item3) destroy(this.m_item4) destroy(this.m_item5) destroy(this.m_1) destroy(this.m_设置下级版本) destroy(this.m_设置报表下级菜单) destroy(this.m_设置单据下级菜单) end on type m_item1 from menu within m_main end type on m_item1.create call super::create this.text = "新建兄弟" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_item1.destroy call super::destroy end on event clicked;Anyobject.triggerevent("ue_tree_add_bro") end event type m_item2 from menu within m_main end type on m_item2.create call super::create this.text = "新建孩子" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_item2.destroy call super::destroy end on event clicked;Anyobject.triggerevent("ue_tree_add_son") end event type m_item3 from menu within m_main end type on m_item3.create call super::create this.text = "-" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_item3.destroy call super::destroy end on event clicked;Anyobject.triggerevent("ue_item3") end event type m_item4 from menu within m_main end type on m_item4.create call super::create this.text = "编辑" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_item4.destroy call super::destroy end on event clicked;Anyobject.triggerevent("ue_tree_edit") end event type m_item5 from menu within m_main end type on m_item5.create call super::create this.text = "删除" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_item5.destroy call super::destroy end on event clicked;Anyobject.triggerevent("ue_tree_del") end event type m_1 from menu within m_main end type event clicked;Anyobject.triggerevent("ue_item3") end event on m_1.create call super::create this.text = "-" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_1.destroy call super::destroy end on type m_设置下级版本 from menu within m_main end type event clicked;Anyobject.triggerevent("ue_tree_set_son") end event on m_设置下级版本.create call super::create this.text = "设置下级版本" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_设置下级版本.destroy call super::destroy end on type m_设置报表下级菜单 from menu within m_main end type event clicked;Anyobject.triggerevent("ue_tree_add_reportson") end event on m_设置报表下级菜单.create call super::create this.text = "设置报表下级菜单" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_设置报表下级菜单.destroy call super::destroy end on type m_设置单据下级菜单 from menu within m_main end type event clicked;Anyobject.triggerevent("ue_tree_add_billfunc") end event on m_设置单据下级菜单.create call super::create this.text = "设置单据下级菜单" this.menutextcolor = 134217735 this.menubackcolor = 134217732 this.menuhighlightcolor = 134217741 this.textsize = 8 this.weight = 400 this.facename = "Tahoma" this.titlebackcolor = 134217730 this.bitmapbackcolor = 12632256 this.menubitmaps = true this.titlegradient = true this.toolbartextcolor = 134217746 this.toolbarbackcolor = 67108864 this.toolbarhighlightcolor = 134217741 this.toolbargradient = true this.bitmapgradient = true end on on m_设置单据下级菜单.destroy call super::destroy end on