[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN101539860B - Method for configuring running interface of executable program and device - Google Patents

Method for configuring running interface of executable program and device Download PDF

Info

Publication number
CN101539860B
CN101539860B CN2009100827738A CN200910082773A CN101539860B CN 101539860 B CN101539860 B CN 101539860B CN 2009100827738 A CN2009100827738 A CN 2009100827738A CN 200910082773 A CN200910082773 A CN 200910082773A CN 101539860 B CN101539860 B CN 101539860B
Authority
CN
China
Prior art keywords
argument
style
configuration data
reusable configuration
reusable
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.)
Active
Application number
CN2009100827738A
Other languages
Chinese (zh)
Other versions
CN101539860A (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.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co 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 Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN2009100827738A priority Critical patent/CN101539860B/en
Publication of CN101539860A publication Critical patent/CN101539860A/en
Application granted granted Critical
Publication of CN101539860B publication Critical patent/CN101539860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a method for configuring a running interface of an executable program, comprising the following steps: presetting a reusable configuration data module which comprises a module identify and a reusable configuration data which is corresponding to the module identify, wherein, the reusable configuration data comprises at least one argument style unit which comprises an argument style identify and an argument style default; judging whether an interface control apparatus comprises a reusable configuration data module identify, if the interface control apparatus comprises the reusable configuration data module identify, judging whether the interface control apparatus comprises the argument style identify and the argument style default which are belongs to the reusable configuration data module; if the interface control apparatus comprises the argument style identify and the argument style default, adding the reusable configuration data which is corresponding to the reusable configuration data module identify into the interface control apparatus, finding the corresponding argument style in the reusable configuration data according to the argument style identify, and replacing the argument style default with the current value of the argument style. The invention also discloses a device for configuring a running interface of an executable program.

Description

A kind of method and apparatus of configuring running interface of executable program
Technical field
The present invention relates to field of computer technology, particularly a kind of collocation method of running interface of executable program.
Background technology
The text that use has a specific syntax is configured the runnable interface of executable program, can make developer or final user under the situation of not revising executable program, change the outward appearance and the function of its runnable interface.Said text is called interface configuration file.Interface configuration file is made up of at least one interface control, and each interface control is used for the outward appearance of running interface of executable program or function are carried out configuration in a certain respect.Said executable program is meant the file that can directly move that source code file generates through compiler compiling back.Owing to be difficult to executable program is carried out direct modification under normal conditions; The collocation method of said runnable interface is mainly used in the large-scale software interface exploitation; Realization separates the configuration of interface control with the programmed logic function, the configuration or the alter mode of quick and reliable runnable interface is provided for the developer.
In the runnable interface configuration, often run into the situation that has mutually the same configuration data in a large amount of interface controls.The mutually the same configuration data that will in different interface controls, occur is called the reusable configuration data.Can define reusable configuration data and corresponding sign in advance, when needing to use the reusable configuration data in the interface control,, just can call corresponding reusable configuration data as long as use the sign of this reusable configuration data.
But the reusable configuration data of prior art is immutable, quotes the interface control of reusable configuration data and can not make amendment to the content in the reusable configuration data.If have only a little attribute different in two interface controls, also must write configuration data again.
The up-to-date interface configuration method of Microsoft is called XAML (eXtensible Application Markup Language) technology, based on WPF (the Windows Presentation Foundation) technology of .Net Framework 3.0.Its configuration file uses style (Style) and template (Template) to realize the reusable configuration data.Following text data is selected from a Linq example procedure of Microsoft, a large amount of repeated configuration paintbrush attributes in the interface configuration file of this program, and in fact two color values are arranged in these paintbrush is to need to revise.
Figure GSB00000593210700021
All need define linear gradient paintbrush (LinearGradientBrush) in above background interface control (TabControl Background) control and prospect interface control (TabControl Foreground) control, second gradient terminal colour is different (being the part of underscore) and have only wherein.Can find out that when having a large amount of these generic attributes to dispose in the file, it is very huge that whole configuration file can become.And because the attribute value of these objects and incomplete same, so in XAML, can not adopt the reusable configuration data to simplify configuration file.What let more the exploitation personnel feel inconvenience is, if want to revise the data of existing configuration file, must all write out relevant upper layer data, and this has seriously improved the modification complexity of data.The content of changing if desired is in the node of deep layer very, and writing difficulty so can significantly improve.
Summary of the invention
In view of this, the objective of the invention is to, propose a kind of collocation method and device of running interface of executable program, can improve the reusability of configuration data, reduce the difficulty of data maintenance, strengthen the reliability of configuration.
The method of the configuring running interface of executable program that the embodiment of the invention proposes is divided into variable part and immutable part with the reusable configuration data, and wherein variable part is called the argument style, and immutable part is called the constant style; Reusable configuration data module is set in advance, and said reusable configuration data module comprises module id and the corresponding reusable configuration data of said module id; In said reusable configuration data, comprise at least one argument style unit, said argument style unit comprises the default value of argument style sign and argument style; This method comprises the steps:
A, judge whether comprise reusable configuration data module id in the interface control, if, execution in step B then, otherwise withdraw from the method flow of this configuring running interface of executable program;
B, judge whether said interface control comprises the argument style sign that belongs to said reusable configuration data module and the currency of argument style; If, execution in step C then;
C, the reusable configuration data that said reusable configuration data module id is corresponding add in the interface control; And find argument style corresponding in the reusable configuration data according to argument style sign, the default value of said argument style is replaced with the currency of argument style.
If the judged result among the said step B then further comprises: the reusable configuration data of said reusable configuration data module id correspondence is added in the configuration file for not.
The device of a kind of configuring running interface of executable program that the embodiment of the invention proposes comprises interface control, and said interface control provides reusable configuration data module id, argument style sign and argument style currency;
This device also comprises:
Reusable configuration data module, said reusable configuration data module comprise module id and the corresponding reusable configuration data of said module id that is provided with in advance; In said reusable configuration data, comprise at least one argument style unit, said argument style unit comprises the default value of argument style sign and argument style; Said argument style is the variable part in the reusable configuration data;
First module is used for judging whether interface control comprises reusable configuration data module id, if then enable Unit second;
Unit second is used to judge whether said interface control comprises the argument style sign that belongs to said reusable configuration data module and the currency of argument style; If then enable Unit the 3rd;
Unit the 3rd; Be used for the reusable configuration data that said reusable configuration data module id is corresponding and add interface control to; And find argument style corresponding in the reusable configuration data according to argument style sign, the default value of said argument style is replaced with the currency of argument style.
Can find out from above technical scheme; Call the reusable configuration data that is provided with in advance according to reusable configuration data module id; And identify according to the argument style and to give currency the argument style in the reusable configuration data; Can multiplexing to greatest extent configuration data, reduce the difficulty of data maintenance, strengthen the reliability of configuration.
Description of drawings
The device block diagram that is used for configuring running interface of executable program that Fig. 1 proposes for the embodiment of the invention;
Fig. 2 is the method flow diagram of the configuring running interface of executable program of embodiment of the invention proposition.
Embodiment
Among the present invention program, reusable configuration data is divided into variable part and immutable part, wherein variable part is called the argument style, and immutable part is called the constant style.
The device that is used for configuring running interface of executable program that proposes for the embodiment of the invention shown in Figure 1, this device comprises following logic module: reusable configuration data module 101, interface control 102 and quote module 103.
Wherein, be provided with the reusable configuration data in advance in the reusable configuration data module 101, reusable configuration data module 101 comprises module id and the corresponding reusable configuration data of said module id.In said reusable configuration data, comprise at least one argument style unit, said argument style unit comprises the default value of argument style sign and argument style.
When interface control 102 is quoted reusable configuration data module 101, provide module id in the interface control.The reusable configuration data of then quoting in the module 103 reusable configuration data module that said module id is corresponding adds in the interface control 102.
When interface control 102 was quoted reusable configuration data module, interface control 102 can also provide the currency of argument style sign and argument style when providing module id.The reusable configuration data of then quoting in the module 103 reusable configuration data module 101 that said module id is corresponding adds in the interface control; And find argument style corresponding in the reusable data according to argument style sign, and the default value of said argument style is replaced with currency.
Fig. 2 shows the method flow of the configuring running interface of executable program of embodiment of the invention proposition, comprises the steps:
Step 201: judge whether comprise reusable configuration data module id in the interface control,, otherwise withdraw from this flow process, carry out the flow process of existing configuring running interface of executable program if then execution in step 202;
Step 202: judge whether said interface control comprises the argument style sign that belongs to said reusable configuration data module and the currency of argument style; If then execution in step 203; Otherwise execution in step 204;
Step 203: the reusable configuration data that said reusable configuration data module id is corresponding adds in the interface control; And find argument style corresponding in the reusable data according to argument style sign, the default value of said argument style is replaced with the currency of argument style.
Step 204: the reusable configuration data that said reusable configuration data module id is corresponding adds in the configuration file.Wherein, the default value of argument style remains unchanged.
Provide an instantiation using the present invention program below.Reusable configuration data module id is " brush ", and defines two argument styles " color1 " and " color2 ".
Figure GSB00000593210700051
In interface control, quote this reusable configuration data module:
Figure GSB00000593210700052
Also can be abbreviated as:
Figure GSB00000593210700061
Lift the embodiment of another one layout setting below again, the function that realize has three parts:
1 creates the panel of three different colours, is respectively red, green, basket.
Respectively place a button identical on 2 panels with the panel color.
3 are provided with different texts to button, are respectively " Red Text ", " " Green Text " " and " Blue Text ".
Adopt the present invention program, its code of quoting this reusable configuration data module can be expressed as:
<panel-frm_test?frm_color=″FFFF0000″frm_offset=″20,20″frm_text=″Red?Text″/>
<panel-frm_test?frm_color=″FF00FF00″frm_offset=″20,80″frm_text=″Green?Text″/>
<panel-frm_test?frm_color=″FF0000FF″frm_offset=″20,140″frm_text=″Blue?Text″/>
And if adopt existing XAML technology, its code of quoting the reusable data is following:
Can find out that for the configuration of multilayer control, XAML can not carry out data multiplex well.It needs the user successively to write out the configuration of these controls, just can accomplish " deep layer control property " made amendment.When control reaches three layers or more the time, the configuration data that need write again will be very many.And the method for the configuring running interface of executable program that the present invention proposes is through definition argument style; Can directly import the parameter of argument style in the place of quoting configuration; The argument style can directly be used by the attribute of deep layer control, thereby has greatly simplified configuration data.
Description through above embodiment; Those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential hardware platform; Can certainly all implement, but the former is better embodiment under a lot of situation through hardware.Based on such understanding; All or part of can the coming out that technical scheme of the present invention contributes to background technology with the embodied of software product; This computer software product can be stored in the storage medium, like ROM/RAM, magnetic disc, CD etc., comprises that some instructions are with so that a computer equipment (can be a personal computer; Server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (3)

1. the method for a configuring running interface of executable program is characterized in that, the reusable configuration data is divided into variable part and immutable part, and wherein variable part is called the argument style, and immutable part is called the constant style; Reusable configuration data module is set in advance, and said reusable configuration data module comprises module id and the corresponding reusable configuration data of said module id; In said reusable configuration data, comprise at least one argument style unit, said argument style unit comprises the default value of argument style sign and argument style; This method comprises the steps:
A, judge whether comprise reusable configuration data module id in the interface control, if, execution in step B then, otherwise withdraw from the method flow of this configuring running interface of executable program;
B, judge whether said interface control comprises the argument style sign that belongs to said reusable configuration data module and the currency of argument style; If, execution in step C then;
C, the reusable configuration data that said reusable configuration data module id is corresponding add in the interface control; And find argument style corresponding in the reusable configuration data according to argument style sign, the default value of said argument style is replaced with the currency of argument style.
2. method according to claim 1 is characterized in that, if the judged result among the said step B then further comprises: the reusable configuration data of said reusable configuration data module id correspondence is added in the configuration file for not.
3. the device of a configuring running interface of executable program comprises interface control, and said interface control provides reusable configuration data module id, argument style sign and argument style currency;
It is characterized in that this device also comprises:
Reusable configuration data module; Said reusable configuration data module comprises module id and the corresponding reusable configuration data of said module id that is provided with in advance; In said reusable configuration data, comprise at least one argument style unit, said argument style unit comprises the default value of argument style sign and argument style; Said argument style is the variable part in the reusable configuration data;
First module is used for judging whether interface control comprises reusable configuration data module id, if then enable Unit second;
Unit second is used to judge whether said interface control comprises the argument style sign that belongs to said reusable configuration data module and the currency of argument style; If then enable Unit the 3rd;
Unit the 3rd; Be used for the reusable configuration data that said reusable configuration data module id is corresponding and add interface control to; And find argument style corresponding in the reusable configuration data according to argument style sign, the default value of said argument style is replaced with the currency of argument style.
CN2009100827738A 2009-04-29 2009-04-29 Method for configuring running interface of executable program and device Active CN101539860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100827738A CN101539860B (en) 2009-04-29 2009-04-29 Method for configuring running interface of executable program and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100827738A CN101539860B (en) 2009-04-29 2009-04-29 Method for configuring running interface of executable program and device

Publications (2)

Publication Number Publication Date
CN101539860A CN101539860A (en) 2009-09-23
CN101539860B true CN101539860B (en) 2012-05-23

Family

ID=41123062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100827738A Active CN101539860B (en) 2009-04-29 2009-04-29 Method for configuring running interface of executable program and device

Country Status (1)

Country Link
CN (1) CN101539860B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102385595A (en) * 2010-08-30 2012-03-21 腾讯科技(深圳)有限公司 User list multiplex method and device for micro blogs

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1619495A (en) * 2003-11-20 2005-05-25 英业达股份有限公司 Cross platform user interface development method
CN101021790A (en) * 2007-03-09 2007-08-22 华为技术有限公司 User interface changing method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1619495A (en) * 2003-11-20 2005-05-25 英业达股份有限公司 Cross platform user interface development method
CN101021790A (en) * 2007-03-09 2007-08-22 华为技术有限公司 User interface changing method and system

Also Published As

Publication number Publication date
CN101539860A (en) 2009-09-23

Similar Documents

Publication Publication Date Title
CN106528129B (en) A kind of Web application interface generation system and method
US9087296B2 (en) Navigable semantic network that processes a specification to and uses a set of declaritive statements to produce a semantic network model
US11561772B2 (en) Low-code development platform
US8806429B2 (en) Dynamic generation of formatted user interfaces in software environments
CN116225429A (en) Pulling type component frame-based ipage webpage type low-code development platform
US20050091584A1 (en) Methods for applying styles to visual aspects of user interface elements
CN105487864A (en) Method and device for automatically generating code
Pescador et al. Pattern-based development of domain-specific modelling languages
CN106873972A (en) Electric Power Network Planning emulation platform computing module cut-in method and system based on plug-in unit
AU2006200283B2 (en) Simple styling
US20050114361A1 (en) Method and apparatus for integrating data repositories and frameworks
CN104571026A (en) Platform and method for establishing whole-process metallurgical manufacturing execution system
Stanojević et al. Guidelines for framework development process
US8327274B2 (en) Method and apparatus for customizing a model entity presentation based on a presentation policy
Lumertz et al. User interfaces metamodel based on graphs
Meyers et al. Composing textual modelling languages in practice
KR20180135654A (en) Intuitive method of making a program
CN104793927A (en) Interface editing method and device
CN104063231A (en) Test resource rapid access method based on HIT-TENA
CN101539860B (en) Method for configuring running interface of executable program and device
US20080189311A1 (en) Visual controls for stored procedure and object relational class development
Jelinek et al. GUI generation from annotated source code
Gómez et al. Co-creation of models and metamodels for enterprise architecture projects
CN105760147A (en) Software page display construction method and system
CN115562652B (en) Component style processing method and system for low-code development platform

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