CN101408843A - Method and apparatus for generating program menu - Google Patents

Method and apparatus for generating program menu Download PDF

Info

Publication number
CN101408843A
CN101408843A CNA2008102192087A CN200810219208A CN101408843A CN 101408843 A CN101408843 A CN 101408843A CN A2008102192087 A CNA2008102192087 A CN A2008102192087A CN 200810219208 A CN200810219208 A CN 200810219208A CN 101408843 A CN101408843 A CN 101408843A
Authority
CN
China
Prior art keywords
button
information
forms
menu
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CNA2008102192087A
Other languages
Chinese (zh)
Other versions
CN101408843B (en
Inventor
司徒健聪
周虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vtron Group Co Ltd
Original Assignee
Vtron Technologies Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vtron Technologies Ltd filed Critical Vtron Technologies Ltd
Priority to CN2008102192087A priority Critical patent/CN101408843B/en
Publication of CN101408843A publication Critical patent/CN101408843A/en
Application granted granted Critical
Publication of CN101408843B publication Critical patent/CN101408843B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method for generating program menus and a system thereof. The method includes reading XML files that comprise form elements, push button elements and function elements; analyzing the XML files according to preset rules and generating form controls according to the form elements, push button controls corresponding to the form controls according to the push button elements and the functions corresponding to the push button controls according to the function elements. In the method and the device, the function elements consist of a function name and a function parameter and therefore the separation of interface design from the function parameter coding is realized. A programmer only needs to compile corresponding function parameters according to the function name, with the load relieved. The code reusability is relatively high and the compiling efficiency is high. Moreover, the program menus are generated by the XML files which can be easily modified. The generated menus are displayed on a screen in a floating way, not affecting the display effect of programs on the full screen.

Description

A kind of method of generator program menu and device thereof
Technical field
The present invention relates to computer application field, relate in particular to a kind of method and device thereof of generator program menu.
Background technology
The programmer is when writing great majority and need carry out the program of full screen display, and an inevasible problem is exactly how to handle the demonstration of relevant procedures menu.The purpose of full screen display program is in order to obtain better display effect.Programmer and secondary development personnel and user should show reliable operation interface (programs menu) as far as possible when not hindering program master interface display for convenience.When the program of configuration giant-screen equipment demonstration, the programmer more needs a reliable operation interface (programs menu) to handle.
In the prior art when the full screen display routine, the generator program menu is generally taked the design of Pop-up, promptly shows the programs menu that ejects in the relevant position at program display interface, according to different user's requests, the secondary development personnel need write different programs menus, and it is lower to write efficient.Carrying out program run when design, the programmer also must spend the plenty of time and write code for the appearance style that the INTERFACE DESIGN personnel design except write function code, increased programmer's burden.
Summary of the invention
The invention provides a kind of method and device thereof of generator program menu, it can not influence the display effect of full frame program, and code reusability is higher, has alleviated programmer's workload.
Technical scheme of the present invention is: a kind of method of generator program menu comprises step:
Read the XML file, described XML file comprises forms element, button element and functional element; Described forms element comprises frame size data message and forms name information, and described button element comprises the Background information and the button name information of button, and described functional element comprises function name information and functional parameter information;
Resolve described XML file according to pre-defined rule, generate form control, generate the button control corresponding, generate the function of described button control correspondence according to described functional element with described form control according to described button element according to described forms element; Described pre-defined rule is: described programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function.
A kind of device of generator program menu comprises:
Read module is used to read the XML file, and described XML file comprises forms element, button element and functional element; Described forms element comprises frame size data message and forms name information, and described button element comprises the Background information and the button name information of button, and described functional element comprises function name information and functional parameter information;
Parsing module is used for resolving described XML file according to pre-defined rule; This pre-defined rule is: described programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Generation module is used for generating form control according to described forms element, generates the button control corresponding with described form control according to described button element, generates the function of described button control correspondence according to described functional element.
The method of generator program menu of the present invention and device thereof, functional element is made up of function name and functional parameter, realized separating of INTERFACE DESIGN (function name symbol) and functional parameter coding, when carrying out the program run design, the programmer only needs to write the function corresponding parameter according to function name and gets final product, and has alleviated programmer's burden.According to different user's requests, the secondary development personnel do not need to write diverse programs menu, as long as rewrite the function corresponding name, the code reuse rate of same programs menu is higher, writes the efficient height.And programs menu of the present invention generates by the XML file, and XML file modification ratio is easier to, and the programs menu of generation is presented on the screen by ralocatable mode, can not influence the display effect of full frame program.
Description of drawings
Fig. 1 is the process flow diagram of the method for generator program menu of the present invention;
Fig. 2 is the structured flowchart () of the device of generator program menu of the present invention;
Fig. 3 is the structured flowchart (two) of the device of generator program menu of the present invention;
Fig. 4 is the structured flowchart (three) of the device of generator program menu of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments the present invention is done a detailed elaboration.
The method of generator program menu of the present invention comprises step, as Fig. 1, S101, reads the XML file, and described XML file comprises forms element, button element and functional element; Wherein said forms element comprises frame size data message and forms name information, and described button element comprises the Background information and the button name information of button, and described functional element comprises function name information and functional parameter information.Forms name information is the keyword message of forms, and button name information is the keyword message of button, and function name information is the keyword message of function.In one embodiment, when system initialization, system can read the XML file of describing programs menu, element value is read in each variable of structure according to forms element, button element and functional element, forms the structure aggregate of 3 layers of tree construction.
S102, resolve described XML file according to pre-defined rule, described pre-defined rule is: described programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function.This pre-defined rule is 3 layers of tree structure.
S103, generate form control, generate the button control corresponding, generate the function of described button control correspondence according to described functional element with described form control according to described button element according to described forms element.This step is to finish the generation of programs menu, and programs menu comprises three layers, forms a tree structure, and wherein ground floor is a form control, and the second layer is the button control under the form control, and the 3rd layer is each function of described button control correspondence.
The method of generator program menu of the present invention, functional element is made up of function name and functional parameter, realized separating of INTERFACE DESIGN (function name symbol) and functional parameter coding, when carrying out the program run design, the programmer only needs to write the function corresponding parameter according to function name and gets final product, and has alleviated programmer's burden.According to different user's requests, the secondary development personnel do not need to write diverse programs menu, as long as rewrite the function corresponding name, the code reuse rate of same programs menu is higher, writes the efficient height.And programs menu of the present invention generates by the XML file, and XML file modification ratio is easier to, and the programs menu of generation is presented on the screen by ralocatable mode, can not influence the display effect of full frame program.
In one embodiment, described forms element can also comprise forms figure information, window position information and forms transparence information, and described button element also comprises button position information.These forms figure information is the outward appearance or the Background information of form control, and the form control that window position information promptly generates is positioned at the position coordinates of display screen, and button position information is the position coordinates of button control in display screen.Position and the outward appearance or the Background information of form control and button control can be designed like this according to user or programmer's actual needs, user or programmer's individual demand can be satisfied.
In addition, described XML file can also comprise dll file, the Background information of described forms figure information and described button can be encapsulated in the dll file, can not see large quantities of picture files under programmer's written program catalogue like this, can prevent that picture resource from being revised arbitrarily.When picture resource is revised in secondary development, also be efficiently very convenient in addition, also provide the condition of the outward appearance picture of self defining programm menu as required for the user.
After the function of the button control of generator program menu, can also comprise step, obtain the coordinate range of display screen, calculate the coordinate position of described programs menu after dragging, judge that described coordinate position is whether in the coordinate range of described display screen, if not, described coordinate position is adapted in the coordinate range of described display screen.The user can make programs menu remain in the display screen when dragging programs menu like this, makes things convenient for the user to click, and can not drag to display screen to programs menu with exterior domain.
After the function of the button control of generator program menu, can also comprise step, write down the number of clicks of described button control, the front and back order of the button control that generates according to the number of clicks adjustment of described button control.Can adjust the front and back order of button control like this according to user's use habit, be user-friendly to.
The present invention has also disclosed a kind of device of generator program menu, and it comprises, as Fig. 2, and read module, parsing module and generation module.
Read module is used to read the XML file, and described XML file comprises forms element, button element and functional element; Described forms element comprises frame size data message and forms name information, and described button element comprises the Background information of button, and described functional element comprises function name information and functional parameter information;
Parsing module is used for resolving described XML file according to pre-defined rule; This pre-defined rule is: described programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Generation module is used for generating form control according to described forms element, generates the button control corresponding with described form control according to described button element, generates the function of described button control correspondence according to described functional element.
Wherein, in one embodiment, described forms element can also comprise forms figure information, window position information and forms transparence information, and described button element also comprises button position information.These forms figure information is the outward appearance or the Background information of form control, and the form control that window position information promptly generates is positioned at the position coordinates of display screen, and button position information is the position coordinates of button control in display screen.Position and the outward appearance or the Background information of form control and button control can be designed like this according to user or programmer's actual needs, user or programmer's individual demand can be satisfied.
In one embodiment, the device of generator program menu of the present invention can also comprise package module, and it is connected with described read module, as Fig. 3, it is used for the Background information of described button control and described forms figure information are encapsulated in dll file, and this dll file is included in the described XML file.Can not see large quantities of picture files under programmer's written program catalogue like this, can prevent that picture resource from being revised arbitrarily.When picture resource is revised in secondary development, also be efficiently very convenient in addition, also provide the condition of the outward appearance picture of self defining programm menu as required for the user.
In one embodiment, the device of generator program menu of the present invention can also comprise correcting module, it is connected with described generation module, as Fig. 4, be used to obtain the coordinate range of display screen, calculate the coordinate position of described programs menu after dragging, judge that described coordinate position is whether in the coordinate range of described display screen, if not, described coordinate position is adapted in the coordinate range of described display screen.The user can make programs menu remain in the display screen when dragging programs menu like this, makes things convenient for the user to click, and can not drag to display screen to programs menu with exterior domain.
In one embodiment, the device of generator program menu of the present invention can also comprise the menu control module, is used to provide the forms control interface, receives the operation information of user to described programs menu, carries out corresponding operation according to this operation information.The user can operate the programs menu of generation by this forms control interface.In concrete the application, the information that operation information can be classified into the information relevant with the programs menu interface and have nothing to do with the programs menu interface, for the information relevant with the programs menu interface, the menu control module can receive this category information, operates accordingly according to such information and executing.For with the irrelevant information in programs menu interface, the menu control module can be issued the program Main form with this category information by the forms control interface, which kind of function allows the program Main form judge be and deal with.When certain button control is clicked, the menu control module can receive the system information that button control is clicked, can obtain the ID of clicked button control by the parameter of system information, find the functional parameter information of clicked button control afterwards according to ID, can carry out corresponding operation according to this functional parameter info menu control module, simultaneously operating result be sent to the program Main form by the forms control interface.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within the claim protection domain of the present invention.

Claims (10)

1, a kind of method of generator program menu is characterized in that, comprises step:
Read the XML file, described XML file comprises forms element, button element and functional element; Described forms element comprises frame size data message and forms name information, and described button element comprises the Background information and the button name information of button, and described functional element comprises function name information and functional parameter information;
Resolve described XML file according to pre-defined rule, generate form control, generate the button control corresponding, generate the function of described button control correspondence according to described functional element with described form control according to described button element according to described forms element; Described pre-defined rule is: described programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function.
2, the method for generator program menu according to claim 1, it is characterized in that: described XML file also comprises dll file, described forms element also comprises forms figure information, and the Background information of these forms figure information and described button is encapsulated in the described dll file.
3, the method for generator program menu according to claim 1 is characterized in that: described forms element also comprises forms figure information, window position information and forms transparence information, and described button element also comprises button position information.
4, according to the method for the described generator program menu of the arbitrary claim of claim 1 to 3, it is characterized in that: after generating the function of described button control correspondence according to described functional element, also comprise step: the coordinate range that obtains display screen, calculate the coordinate position of described programs menu after dragging, judge that described coordinate position is whether in the coordinate range of described display screen, if not, described coordinate position is adapted in the coordinate range of described display screen.
5, according to the method for the described generator program menu of the arbitrary claim of claim 1 to 3, it is characterized in that: after generating the function of described button control correspondence according to described functional element, also comprise step: write down the number of clicks of described button control, the front and back order of the button control that generates according to the number of clicks adjustment of described button control.
6, a kind of device of generator program menu is characterized in that, comprising:
Read module is used to read the XML file, and described XML file comprises forms element, button element and functional element; Described forms element comprises frame size data message and forms name information, and described button element comprises the Background information and the button name information of button, and described functional element comprises function name information and functional parameter information;
Parsing module is used for resolving described XML file according to pre-defined rule; This pre-defined rule is: described programs menu comprises several form controls, and each form control comprises several button controls, and each button control comprises several function;
Generation module is used for generating form control according to described forms element, generates the button control corresponding with described form control according to described button element, generates the function of described button control correspondence according to described functional element.
7, the device of generator program menu according to claim 6, it is characterized in that: also comprise package module, also comprise dll file at described XML file, when described forms element information also comprises forms figure information, the Background information of these forms figure information and described button is encapsulated in the described dll file.
8, the device of generator program menu according to claim 6 is characterized in that: described forms element also comprises forms figure information, window position information and forms transparence information, and described button element also comprises button figure information and button position information.
9, according to the device of the described generator program menu of the arbitrary claim of claim 6 to 8, it is characterized in that: also comprise, correcting module, be used to obtain the coordinate range of display screen, calculate the coordinate position of described programs menu after dragging, judge described coordinate position whether in the coordinate range of described display screen, if not, described coordinate position is adapted in the coordinate range of described display screen.
10, according to the device of the described generator program menu of the arbitrary claim of claim 6 to 8, it is characterized in that: also comprise the menu control module, be used to provide the control interface of programs menu, receive the operation information of user, carry out corresponding operation according to this operation information to described programs menu.
CN2008102192087A 2008-11-18 2008-11-18 Method and apparatus for generating program menu Expired - Fee Related CN101408843B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008102192087A CN101408843B (en) 2008-11-18 2008-11-18 Method and apparatus for generating program menu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008102192087A CN101408843B (en) 2008-11-18 2008-11-18 Method and apparatus for generating program menu

Publications (2)

Publication Number Publication Date
CN101408843A true CN101408843A (en) 2009-04-15
CN101408843B CN101408843B (en) 2012-05-09

Family

ID=40571864

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008102192087A Expired - Fee Related CN101408843B (en) 2008-11-18 2008-11-18 Method and apparatus for generating program menu

Country Status (1)

Country Link
CN (1) CN101408843B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101923431A (en) * 2010-06-18 2010-12-22 北京神州泰岳软件股份有限公司 Method and system for dynamically generating context menu of topological graph node
CN102043618A (en) * 2009-10-22 2011-05-04 北大方正集团有限公司 Method and device for controlling display style of window object
CN102385595A (en) * 2010-08-30 2012-03-21 腾讯科技(深圳)有限公司 User list multiplex method and device for micro blogs
CN102841748A (en) * 2012-07-12 2012-12-26 深圳市邦健电子有限公司 Menu management method and processing device for monitoring equipment with display screen
CN112181411A (en) * 2020-09-25 2021-01-05 深圳市元征科技股份有限公司 Menu generation method, menu generation device and diagnosis equipment
TWI783463B (en) * 2021-04-28 2022-11-11 博橡科技股份有限公司 Method for generating a human-machine interface, computer readable storage medium, computing device, and function operating device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101017660A (en) * 2006-02-07 2007-08-15 天惠光科技有限公司 A method for displaying the object on the multiple display devices under the window operation environment
CN1889039A (en) * 2006-06-26 2007-01-03 韩荣华 Method for realizing universal browsing device tool bar based on XML
CN101101545A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Method for managing multiple language using expansible mark language and resource packet
CN101246424A (en) * 2008-02-22 2008-08-20 深圳国人通信有限公司 Menu automatic generation system and method for based on file
CN101241433A (en) * 2008-03-04 2008-08-13 浪潮集团山东通用软件有限公司 Accomplishing method based on relationship -type database application program dynamic tool
CN101303872B (en) * 2008-03-25 2011-01-26 杭州赛利科技有限公司 Method and system for organization management of play menu of multimedia player

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102043618A (en) * 2009-10-22 2011-05-04 北大方正集团有限公司 Method and device for controlling display style of window object
CN102043618B (en) * 2009-10-22 2013-05-22 北大方正集团有限公司 Method and device for controlling display style of window object
CN101923431A (en) * 2010-06-18 2010-12-22 北京神州泰岳软件股份有限公司 Method and system for dynamically generating context menu of topological graph node
CN102385595A (en) * 2010-08-30 2012-03-21 腾讯科技(深圳)有限公司 User list multiplex method and device for micro blogs
CN102841748A (en) * 2012-07-12 2012-12-26 深圳市邦健电子有限公司 Menu management method and processing device for monitoring equipment with display screen
CN112181411A (en) * 2020-09-25 2021-01-05 深圳市元征科技股份有限公司 Menu generation method, menu generation device and diagnosis equipment
TWI783463B (en) * 2021-04-28 2022-11-11 博橡科技股份有限公司 Method for generating a human-machine interface, computer readable storage medium, computing device, and function operating device

Also Published As

Publication number Publication date
CN101408843B (en) 2012-05-09

Similar Documents

Publication Publication Date Title
US9524273B2 (en) Method and system for generating a web page layout using nested drop zone widgets having different software functionalities
JP4812337B2 (en) Method and apparatus for generating a form using a form type
CN109445783B (en) Method and device for constructing dynamic configuration application driven by service
CN101408843B (en) Method and apparatus for generating program menu
CN106062711A (en) Compound controls
Macik et al. Context-sensitive, cross-platform user interface generation
KR20140019627A (en) An authoring tool for web applications and the authoring method thereof
CN103778178A (en) Method and system for reconfiguring snapshot of virtual machine (VM)
US11205036B2 (en) Method and system for implementing contextual widgets
CN104317587A (en) Automatic android mobile device oriented application generation method
CN111625226B (en) Prototype-based man-machine interaction design implementation method and system
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
CN109976803A (en) A kind of generation method and device of file
CN109716294A (en) With the user interface for moving mini label
CN115495069A (en) Model-driven coal industry software flow implementation method, device and equipment
KR101519381B1 (en) Apparatus and method for making web application using html5
CN117762519A (en) Component management method, device, computer equipment and storage medium
US20110131512A1 (en) Updateable running application
CN109800368A (en) H5 navigation bar push button configuration method, device, computer equipment and storage medium
JP2988911B1 (en) Automatic program generator
WO2023143746A1 (en) System and method for managing artifacts related to apps
Li et al. Research on a pattern-based user interface development method
WO2013170525A1 (en) Method and device for presenting or drawing logical flow relationship of computer application program organization in the form of logical flow chart
Paternò et al. User task-based development of multi-device service-oriented applications.
Colombo-Mendoza et al. Alexandria: a visual tool for generating multi-device rich internet applications

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 510670 Guangdong Province, Guangzhou high tech Industrial Development Zone Kezhu Road No. 233

Patentee after: Wei Chong group Limited by Share Ltd

Address before: 510663 Guangzhou province high tech Industrial Development Zone, Guangdong, Cai road, No. 6, No.

Patentee before: Guangdong Weichuangshixun Science and Technology Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120509

Termination date: 20171118