$PBExportHeader$m_popup_shortcut_del.srm forward global type m_popup_shortcut_del from menu end type type m_main from menu within m_popup_shortcut_del end type type m_添加快捷方式 from menu within m_main end type type m_- from menu within m_main end type type m_item4 from menu within m_main end type type m_main from menu within m_popup_shortcut_del m_添加快捷方式 m_添加快捷方式 m_- m_- m_item4 m_item4 end type global type m_popup_shortcut_del from menu m_main m_main end type end forward global type m_popup_shortcut_del from menu m_main m_main end type global m_popup_shortcut_del m_popup_shortcut_del 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_shortcut_del.create m_popup_shortcut_del=this call super::create this.text = "m_popup_shortcut_del" this.m_main=create m_main this.Item[UpperBound(this.Item)+1]=this.m_main end on on m_popup_shortcut_del.destroy call super::destroy destroy(this.m_main) end on type m_main from menu within m_popup_shortcut_del m_添加快捷方式 m_添加快捷方式 m_- m_- m_item4 m_item4 end type on m_main.create call super::create this.text = "main" this.m_添加快捷方式=create m_添加快捷方式 this.m_-=create m_- this.m_item4=create m_item4 this.Item[UpperBound(this.Item)+1]=this.m_添加快捷方式 this.Item[UpperBound(this.Item)+1]=this.m_- this.Item[UpperBound(this.Item)+1]=this.m_item4 end on on m_main.destroy call super::destroy destroy(this.m_添加快捷方式) destroy(this.m_-) destroy(this.m_item4) end on type m_添加快捷方式 from menu within m_main end type event clicked;if sys_version_type = 0 then w_main_scware.lv_shortcut.triggerevent("ue_add_shortcut") //else // w_main_scware_biz.lv_shortcut.triggerevent("ue_add_shortcut") end if end event on m_添加快捷方式.create call super::create this.text = "添加快捷方式" end on on m_添加快捷方式.destroy call super::destroy end on type m_- from menu within m_main end type on m_-.create call super::create this.text = "-" end on on m_-.destroy call super::destroy end on type m_item4 from menu within m_main end type on m_item4.create call super::create this.text = "删除快捷方式" end on on m_item4.destroy call super::destroy end on event clicked;IF sys_version_type = 0 THEN w_main_scware.lv_shortcut.TriggerEvent("ue_del_shortcut") //ELSE // w_main_scware_biz.lv_shortcut.TriggerEvent("ue_del_shortcut") END IF end event