CN101697137B - Multi-form system - Google Patents

Multi-form system Download PDF

Info

Publication number
CN101697137B
CN101697137B CN 200910110657 CN200910110657A CN101697137B CN 101697137 B CN101697137 B CN 101697137B CN 200910110657 CN200910110657 CN 200910110657 CN 200910110657 A CN200910110657 A CN 200910110657A CN 101697137 B CN101697137 B CN 101697137B
Authority
CN
China
Prior art keywords
child
child form
main
engineering
functionality controls
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
CN 200910110657
Other languages
Chinese (zh)
Other versions
CN101697137A (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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN 200910110657 priority Critical patent/CN101697137B/en
Publication of CN101697137A publication Critical patent/CN101697137A/en
Application granted granted Critical
Publication of CN101697137B publication Critical patent/CN101697137B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention is suitable for the field of computers and provides a multi-form system, which comprises a main form project and at least one sub-form function control. The main form project comprises a main form, and the main form project also comprises a receiving unit used for receiving a sub-form opening triggering command which comprises control type information, and a control loading unit used for loading the corresponding sub-form function control to a sub-form added by the main form project according to the sub-form opening triggering command received by the receiving unit. In the embodiment of the invention, the corresponding sub-form function control is loaded to the sub-form added by the main form project according to the received sub-form opening triggering command, so the multi-form system is realized, which can dynamically load the sub-form and has low maintenance cost.

Description

A kind of multi-form system
Technical field
The invention belongs to computer realm, relate in particular to a kind of multi-form system.
Background technology
Software has overall functional entrance, i.e. a Main form usually; Through Main form, can get into concrete function interface, i.e. child form.Use for the ease of the user, existing software can support to open simultaneously Main form and a plurality of child form, makes the user can be used on and does not close under the situation of current form, can switch to other forms.Have now and can realize that the multi-form system of opening Main form and a plurality of child forms simultaneously mainly contains following two kinds:
Multi-form system 1. adopts standard EXE Project Realization
Under VB6 or VC6 development environment; A newly-built standard EXE engineering; (Multi-Document Interface Form MDIForm) as Main form, increases a plurality of Form forms as child form to increase multiple document interface forms; And make the attribute MDIchid=True of child form, than being easier to realize opening simultaneously a basic Main form and a plurality of child form.But this scheme requirement Main form and a plurality of child form must be in same engineerings.
Multi-form system 2. adopts standard EXE engineering and a plurality of OCX control
On the basis of above-mentioned multi-form system 1, improve, comprise Main form engineering and at least one child form functionality controls, the Main form engineering comprises the child form of a Main form and a public blank.Adopt the child form functionality controls to realize the concrete function of a child form.When need increasing child form, the child form functionality controls of correspondence is loaded in the Main form engineering, can realizes the components apart of Main form and child form like this.But, the child form functionality controls of respectively realizing concrete function for the Main form engineering can be quoted, child form of every increase all needs manual modification Main form engineering, causes frequent modification.
In sum, existing multi-form system all needs manual modification Main form engineering when child form of every loading, can not the dynamic load child form, maintenance cost is high.
Summary of the invention
The purpose of the embodiment of the invention is to solve the problem that prior art exists, and a kind of multi-form system is provided, and can dynamically load child form, maintenance cost is low.
The embodiment of the invention is achieved in that a kind of multi-form system, comprises Main form engineering and at least one child form functionality controls, comprises Main form in the said Main form engineering, also comprises in the said Main form engineering:
Receiving element is used to receive child form and opens trigger command, and said child form is opened trigger command and comprised the control type information; And
The control loading unit, the child form that is used for receiving according to said receiving element is opened trigger command, and the child form functionality controls of correspondence is loaded in the child form that the Main form engineering adds, and wherein, said control loading unit comprises:
Child form adds module, is used for adding in the Main form engineering child form of a blank;
The permission word string is added module; Be used for opening the control type information that trigger command comprises according to the child form that receives; Add the child form that refers to said blank of the permission word string of corresponding child form functionality controls; Said permission word string is the special identifier of child form functionality controls, is used for each child form functionality controls of unique identification;
Control object is added module; Be used for opening quoting of permission word string that the child form of control type information that trigger command comprises and said blank comprises, dynamically add the child form of the object of corresponding child form functionality controls to said blank according to the child form that receives.
In embodiments of the present invention, open trigger command, the child form functionality controls of correspondence is loaded in the child form that the Main form engineering adds, realized a kind of multi-form system, can dynamically load child form, maintenance cost is low according to the child form that receives.
Description of drawings
Fig. 1 is the structural representation of a kind of multi-form system of providing of the embodiment of the invention;
Fig. 2 is the interface synoptic diagram of the multi-form system of a kind of management information of providing of the embodiment of the invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In embodiments of the present invention, open trigger command, the child form functionality controls of correspondence is loaded in the child form that the Main form engineering adds according to the child form that receives.
Fig. 1 shows the structure of a kind of multi-form system that the embodiment of the invention provides, and only shows the part relevant with the embodiment of the invention for the ease of explanation.This multi-form system comprises Main form engineering 101 and at least one child form functionality controls 102, comprises Main form 1011 in the Main form engineering 101, also comprises in the Main form engineering 101:
Receiving element 1012 receives child form and opens trigger command, and this child form is opened trigger command and comprised the control type information;
Control loading unit 1013, the child form that receives according to receiving element 1012 is opened trigger command, and the child form functionality controls of correspondence is loaded in the child form that Main form engineering 101 adds.
Wherein, Main form engineering 101 is identical with the Main form engineering that existing multi-form system comprises; In Main form engineering 101, realize Main form 1011, Main form engineering 101 is in charge of Main form 1011 and is loaded into the child form of Main form engineering 101 thereafter, and realizes public steering logic; Child form functionality controls 102 is also identical with the child form functionality controls that existing multi-form system comprises, adopts child form functionality controls 102 to fill child form, realizes the concrete business function of child form; It can be that the user imports through the button at Main form 1011 interfaces as required that child form is opened trigger command, also can be that Main form engineering 101 is according to generations such as operation needs; The control type information that child form unlatching trigger command comprises can be the information of each control types of unique identification such as control class type name, control type ID.
Further, control loading unit 1013 also comprises:
Child form adds module 10131, in Main form engineering 101, adds the child form of a blank;
The permission word string is added module 10132; Open the control type information that comprises in the trigger command according to the child form that receives; Add the child form that refers to blank of the permission word string of corresponding child form functionality controls 102; The permission word string is the special identifier of child form functionality controls 102, is used for each child form functionality controls 102 of unique identification;
Control object is added module 10133, opens quoting of permission word string that the control type information that comprises in the trigger command and blank child form comprise according to the child form that receives, and the object that dynamically adds corresponding child form functionality controls 102 is to blank child form.
In realization; Can under VB6 or VC6 development environment, realize; A newly-built standard EXE engineering increases a MDIForm as Main form as Main form engineering 101, realizes that the child form functionality controls 102 of the concrete business function of each child form can be object linking and embedding user control (Object Linking and Embedding (OLE) Control Extension; OCX); Promptly adopt the OCX control to realize the concrete function of child form, the engineering attribute of child form functionality controls 102 is ACTIVEX OCX, and different child form functionality controls 102 can be realized in same engineering or different engineering.The control type name of child form functionality controls 102 can identify the type under the child form functionality controls 102, can the dissimilar child form functionality controls 102 of unique identification through the engineering name and the control type name of child form functionality controls 102.
Below through the be elaborated realization of above-mentioned multi-form system of an object lesson; Suppose that company ABC need develop the multi-form system of a cover management information; Its interface synoptic diagram is as shown in Figure 2; The multi-form system of this management information comprises " bordereaux " " business paper " " service inquiry " etc. tens to hundreds of item business processing, requires the user can open a plurality of forms operations simultaneously.
◆ the definition of Main form engineering 101 is following:
1) engineering attribute: standard EXE, engineering name: ERPMain
2) Main form: MDIMain, form types are MDIForm
3) add menu and be used to call child form
Menu comprises that mnuBill document, mnuReport form, mnuExit withdraw from
4) increase tool bar ToolbarMain
Preset drop-down list of buttons realizes menu, tool bar etc.
5) show child form method Showchild
When showing child form, find the child form of having opened of the same name earlier, as then not showing new forms.
◆ the definition of child form functionality controls 102 that is used for realizing " bordereaux " is following:
Engineering attribute: ACTIVE OCX, engineering name: CTLBill, control type name: Report
The definition of other child form functionality controls 102 is identical therewith, no longer provides its specific definition here.
Receiving element 1012 is after receiving child form unlatching trigger command; Child form adds module 10131 and in Main form engineering 101, adds a blank child form frmSub; The MDIChild attribute of blank child form frmSub is Ture, and the control type information that this child form unlatching trigger command comprises is the engineering name and the control type name of child form functionality controls 102.
Then; The permission word string is added module 10132 and is opened engineering name and the control type name that comprises in the trigger command according to the child form that receives; Search corresponding child form functionality controls 102; Obtain the permission word string sLicense of the child form functionality controls 102 that finds, with the blank child form that adds to of the permission word string sLicense that gets access to.
In development environment, the method for obtaining the permission word string of child form functionality controls 102 is:
SLicense=Licenses.Add " the engineering name. control name "
Wherein, Licenses is one of base attribute of engineering, comprises all control information that it is quoted; Add is for adding the method for control; Rreturn value sLicense is the permission word string of child form functionality controls 102, has only the permission word string that has obtained control, just can call this control.
The concrete grammar that the permission word string that gets access to is added to blank child form is:
Licenses.Add " the engineering name. control name ", sLicense
Because the permission word string sLicense of child form functionality controls 102 obtains at development environment, so after running environment is added License Info, just can load this child form functionality controls 102 to main interface.
Wherein, the information of permission word string sLicense can write in the code.But, in order to reduce the compiling of code revision and assembly, also can the information of permission word string sLicense be kept in a configuration file or the database etc., when operation, according to " the engineering name. control name " search.
Then, control object is added the module 10133 dynamic objects that add child form functionality controls 102 to blank child form, and concrete grammar is:
Set obj=Controls.Add (" the engineering name. control name ", " ctl ")
Wherein, Controls comprises all controls that forms have loaded; Add is for adding the method for a new control to forms; Ctl is the title of the dynamic child form functionality controls 102 that adds, and this title can be named arbitrarily; Obj is the object name of child form functionality controls 102, is used for the subsequent operation of control, as, the attribute of control etc. is set.
After the object of the child form functionality controls 102 of completion child form added, Main form engineering 101 can be called child form display packing ShowControl and show child form, is specially: ShowControlWith obj
.Height=ScaleHeight ' with height such as forms grade
.Width=ScaleWidth ' wide with forms
.Visible=True ' it is visible control to be set
End?With
For the ease of the switching between child form, as a preferred embodiment of the present invention, this Main form engineering 101 can also comprise:
Page or leaf is signed administrative unit 1014, after whenever opening a child form, dynamically increases a page or leaf and signs, and switch child form according to the child form switching command that receives.
In concrete the realization, can in the tool bar ToolbarMain of Main form engineering 101, realize.
Further; In order to make Main form, child form and/or 102 of child form functionality controls can transmit incident; Guarantee information synchronously; As another preferred embodiment of the present invention, Main form, child form and/or the child form functionality controls 102 that transmit incident are quoted the object of same interface engineering, and the object of Main form 1011, child form and/or child form functionality controls 102 this same interface engineering is by reference realized incident transmission between forms.
Wherein, Can in the interface engineering, define basic incident, the method for a cover; Main form 1011 in this multi-form system, child form and/or child form functionality controls 102 are quoted the object of same interface engineering; Definition incident and method in this interface engineering will be transmitted Main form 1011, child form or the child form functionality controls 102 of the incident method trigger event through this object, through the event response incident of this object; To realize the incident transmission of 102 of Main form 1011, child form and/or child form functionality controls, make the function of Main form 1011 and child form seamless integrated.Incident comprises Main form response child form incident, Main form notice child form functionality controls incident and Main form response child form functionality controls incident.The concrete definition of interface engineering is following:
1) engineering attribute: ACTIVE DLL, engineering name: CTLPublic, class name: Cparent
2) event definition
Figure GSB00000813198600071
is worth change incident Public Event PropertyChanged (sPropName As String, sValue As String)
Wherein, PropertyChanged is the title of value change incident; SPropName is a Property Name; SValue is a property value.
Figure GSB00000813198600072
message informing incident Public Event WorkHappen (sName As String; SMsg As String, bSuccess As Boolean)
Wherein, the title of WorkHappen message informing incident; SName is the task names of incident, through the difference of task names, can distinguish incident not of the same race; SMsg is a message values, bSuccess: whether sign is successful, is used for return message.
3) method definition
Figure GSB00000813198600073
AddKey: increase property value and trigger value and change incident
Figure GSB00000813198600074
Key: getattr value
Figure GSB00000813198600075
RaiseWork: trigger messages notification event
This interface only comprises two incidents and three methods; Can realize any multiattribute through AddKey and Key method; Parameter s Name through the WorkHappen incident can realize any multi-method, can avoid owing to the expansion of business demand increase incident and attribute to cause the frequent modification of docking port engineering definition.
Concrete the realization is the object that can in Main form engineering 101, state an interface engineering, and then this object is passed to child form, and child form passes to child form functionality controls 102 with this object again.In child form functionality controls 102, quote the interface engineering, and the object of interface statement engineering, claim that below the object of this interface engineering is the interface engineering object, be specially:
This interface engineering object of Private WithEvents oParent As CTLPublic.CParent ' interface engineering object initialization is specially:
Public?Function?iniParent(opt?As?CTLPublic.CParent)
Set?oParent=opt
Below, continue to specify the realization that realizes incident transmission between Main form 1011, child form and the child form functionality controls 102 through the object of interface engineering with the several examples in the multi-form system of above-mentioned management information:
1) incident of Main form response child form:
Below, when closing child form, the incident of Main form response child form describes.
In child form, increase the method for closing child form:
Increase the method that activates child form at child form:
Figure GSB00000813198600082
In Main form engineering 101, increase the method for obtaining child form message and response that receives:
Figure GSB00000813198600083
Because the interface engineering object in Main form 1011 and the child form is the object of same interface engineering, so the incident of child form can be received by Main form.
2) incident of Main form notice child form functionality controls;
Below, when withdrawing from Main form, can inquiry child form functionality controls 102 child forms close to example and describe.
In Main form, increase the method for notice child form functionality controls 102:
Figure GSB00000813198600091
Also in the above-mentioned Showchild method of Main form, increase:
Set?obj.oParent=oParent
In child form functionality controls 102, increase the event notice that receives Main form, the method that can the inquiry child form close before closing:
3) incident of Main form response child form functionality controls: can be used for calling another child form at child form functionality controls 102
In the corresponding child form functionality controls 102 of a certain child form, increase the method for calling another child form:
oParent.RaiseWork″ShowChild″,″mnuBill″,True
The ShowChild incident of trigger interface engineering object in the child form functionality controls, Main form receives this incident.In the oParent of Main form engineering 101 WorkHappen incident, the increase method:
If sName=" ShowChild " And sMsg=" mnuBill " Then mnuBill_Click ' is if incident is ShowChild, and message is called mnuBill, calls the operation that shows the document child form
Further, yet can be used on increases the method that realizes interface attributes in the child form functionality controls 102 of child form, for example:
Call being exemplified as of title attribute:
oParent.addKey″FormCaption″,TxtTitle.Text
Wherein, FormCaption is a Property Name, is used to be provided with the title of forms; TxtTitle.Text is a property value, takes from the content of current text frame.
Call being exemplified as of status attribute:
OParent.addKey " StautString ", " report generation state: " & IIf (ChkReport.Value=1, " Y ", " N ")
Wherein, StautString is a Property Name, is used to be provided with status bar message; TxtTitle.Text is a property value, takes from current check frame content, as chooses, and then the report generation state is Y, otherwise is N.
Behind the structure of the multi-form system of accomplishing above-mentioned management information, operation menu " file>bordereaux ", dynamic load report controls then, and generate a child form, " financial statement " by name; On the child form of " financial statement ", realize concrete business, for example: the bordereaux tabulation comprises action buttons such as " increasing newly ", " modification ", " deletion "; Input " financial statement " in " report name " text box then triggers attribute change incident to child form, revises the child form title automatically, and the attribute that the while is also triggered Main form changes incident, the synchronous title of revising the page or leaf label; Operation " report generation " check box, the attribute that then triggers Main form changes incident, in the status bar demonstration " report generation state: Y " of Main form; Move " relevant document " title block, then trigger the work event of Main form, call another " business paper " child form; Operation page or leaf label or drop-down menu " financial statement ", " business paper " can switch child form, in the activation incident of child form, trigger the work event of Main form, synchronously switching page label; Operation " file>tiling " menu, then two windows show simultaneously, and are as shown in Figure 2; Close " business paper " forms, then trigger the work event of Main form, the corresponding page or leaf of close synchronously is signed; " file>close " menu of operation Main form, the work event of triggering control, if generating form, then prompting then notifies Main form to allow to close as selecting " being ", withdraws from.
In embodiments of the present invention, open trigger command, the child form functionality controls of correspondence is loaded in the child form that the Main form engineering adds, realized a kind of multi-form system, can dynamically load child form, maintenance cost is low according to the child form that receives.
And, basic incident, the method for definition one cover in the interface engineering, Main form, child form and control transmit through the object realization event of same interface engineering, make the function of Main form and child form seamless integrated.
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 (7)

1. a multi-form system comprises Main form engineering and at least one child form functionality controls, comprises Main form in the said Main form engineering, it is characterized in that, also comprises in the said Main form engineering:
Receiving element is used to receive child form and opens trigger command, and said child form is opened trigger command and comprised the control type information; And
The control loading unit, the child form that is used for receiving according to said receiving element is opened trigger command, and the child form functionality controls of correspondence is loaded in the child form that the Main form engineering adds, and wherein, said control loading unit comprises:
Child form adds module, is used for adding in the Main form engineering child form of a blank;
The permission word string is added module; Be used for opening the control type information that trigger command comprises according to the child form that receives; Add the child form that refers to said blank of the permission word string of corresponding child form functionality controls; Said permission word string is the special identifier of child form functionality controls, is used for each child form functionality controls of unique identification;
Control object is added module; Be used for opening quoting of permission word string that the child form of control type information that trigger command comprises and said blank comprises, dynamically add the child form of the object of corresponding child form functionality controls to said blank according to the child form that receives.
2. the system of claim 1 is characterized in that, said child form functionality controls is the OCX control.
3. the system of claim 1 is characterized in that, Main form, child form and/or the child form functionality controls that transmit incident are quoted the object of same interface engineering.
4. system as claimed in claim 3 is characterized in that, definition incident and method in the said interface engineering.
5. system as claimed in claim 4 is characterized in that, transmit Main form, child form or the child form functionality controls of the incident method trigger event through said object, through the event response incident of said object.
6. like each described system of claim 3 to 5, it is characterized in that said incident comprises Main form response child form incident, Main form notice child form functionality controls incident and Main form response child form functionality controls incident.
7. the system of claim 1 is characterized in that, said Main form engineering also comprises:
Page or leaf is signed administrative unit, is used for after whenever opening a child form, dynamically increases a page or leaf and signs, and switch child form according to the child form switching command that receives.
CN 200910110657 2009-10-16 2009-10-16 Multi-form system Active CN101697137B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910110657 CN101697137B (en) 2009-10-16 2009-10-16 Multi-form system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910110657 CN101697137B (en) 2009-10-16 2009-10-16 Multi-form system

Publications (2)

Publication Number Publication Date
CN101697137A CN101697137A (en) 2010-04-21
CN101697137B true CN101697137B (en) 2012-12-05

Family

ID=42142242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910110657 Active CN101697137B (en) 2009-10-16 2009-10-16 Multi-form system

Country Status (1)

Country Link
CN (1) CN101697137B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102810041B (en) * 2011-06-02 2015-11-18 深圳市金蝶友商电子商务服务有限公司 A kind of conversion method of multiple document interface and relevant apparatus
CN102819377A (en) * 2011-06-10 2012-12-12 深圳市金蝶友商电子商务服务有限公司 Method and device for controlling sub-interface in multi-document interface
CN103902325B (en) * 2012-12-28 2017-04-05 北京新媒传信科技有限公司 The method and apparatus for realizing window synchronization
CN117348965B (en) * 2023-12-06 2024-02-23 北京热源汇盈网络科技有限公司 Multi-window management method and device based on desktop window application program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808381A (en) * 2006-02-15 2006-07-26 无锡永中科技有限公司 User panel manager and method for creating user-defined dynamic subwindow
CN101535937A (en) * 2006-12-11 2009-09-16 思科技术公司 Using images in alternative navigation of graphical user interface and mapping menu control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1808381A (en) * 2006-02-15 2006-07-26 无锡永中科技有限公司 User panel manager and method for creating user-defined dynamic subwindow
CN101535937A (en) * 2006-12-11 2009-09-16 思科技术公司 Using images in alternative navigation of graphical user interface and mapping menu control

Also Published As

Publication number Publication date
CN101697137A (en) 2010-04-21

Similar Documents

Publication Publication Date Title
US11556227B2 (en) Tab visibility
CN101699393B (en) Network-facing intelligent software interface dynamic generation method
US5555365A (en) Method and system for optimizing static and dynamic binding of presentation objects with the object data they represent
CN101558379B (en) System and method for event management
CN1655120B (en) Hosted application as a designer in an integrated development environment
US8769430B2 (en) Multi-column formatted page scrolling
CN101697137B (en) Multi-form system
CN106201501A (en) A kind of configurableization construction method to mobile terminal form interface and system
CN103019684A (en) Dynamic template-based business page configuring method
CN101510151A (en) Synthesis monitoring cross-platform configuration human-machine interface system
US20130117719A1 (en) Context-Based Adaptation for Business Applications
CN103092645B (en) A kind of geospatial information application system based on Microkernel and its implementation
CN103631598A (en) Interface integration method and system thereof
DK2637114T3 (en) Method of coupling a CAD system with a database and scheduling system for exchanging data between the two systems
CN101882321A (en) System and method for rendering animation user interface
CN103593456A (en) Form user-defined design method and device
CN102110142A (en) Method for dynamically expanding personnel transaction in human resource management information system
CN104081384A (en) System and method for providing calculation web services for online documents
CN101223495A (en) Control panel framework
CN102981823A (en) Domain driven development plug-in system
CN109445794B (en) Page construction method and device
CN105761007A (en) Information management software design aiding method and information management software design aiding system
CN102110101B (en) Method and device used for indexing digital content
CN102193907A (en) Method and system for comparing manuscripts based on B/S (Browser/Server) structure
CN101794217A (en) Method and system for implementing interaction between application and extended module of document library system

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