CN104133684A - Graphical user interface state control method based on state machine - Google Patents
Graphical user interface state control method based on state machine Download PDFInfo
- Publication number
- CN104133684A CN104133684A CN201410378534.8A CN201410378534A CN104133684A CN 104133684 A CN104133684 A CN 104133684A CN 201410378534 A CN201410378534 A CN 201410378534A CN 104133684 A CN104133684 A CN 104133684A
- Authority
- CN
- China
- Prior art keywords
- state
- interface
- control
- interface control
- state machine
- 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.)
- Pending
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a graphical user interface state control method based on a state machine. The graphical user interface state control method comprises the following steps that (1) a user interface state machine is set; (2) an interface control and the state machine are made to relate; (3) interface state control based on the state machine is triggered in a procedure. Through the application of the graphical user interface state control method based on the state machine to the form development process, control over the user interface state can be normalized, the development efficiency and the maintenance efficiency of control over the interface state are improved, and the error rate is reduced.
Description
Technical field
The present invention relates to a kind of Computer Applied Technology field, the presentation layer graphical interface of user field that a kind of software is realized, specifically a kind of graphical interface of user condition control method based on state machine.
Background technology
In a graphical interface of user of realizing based on .NET Winforms technology, interface be nested by one group of interface control, combine.For example, normally by Form(forms) as basic container, wherein comprise toolbar, various input control (text, date etc.) and data form control etc., its basic composition structure is as shown in Figure 1.User interface state is made up of the state of the control that forms interface.The state of control comprises two state values: available, unavailable.
When user is in the time operating a graphical interfaces, there is many factors to cause user interface state difference.For example user interface is opened rear acquiescence in non-editing mode, and at this moment the input control at interface etc., in down state, is clicked the operations such as the Edit button as user, can make the input control at interface enter into upstate.Other, for example when not having the power of amendment of current data, user prescribes a time limit, and all controls at whole interface are in down state.
In the time doing Development of Graphical Interfaces, the control of interfacial state is set according to different factors, be more loaded down with trivial details work, and often consider entirely not cause program error because of state control in the time safeguarding.
If can design a kind of general interfacial state control method, improve the exploitation of interfacial state control, the efficiency of maintenance, reduce the probability of makeing mistakes, be a very valuable improvement.
Summary of the invention
The object of this invention is to provide a kind of graphical interface of user condition control method based on state machine.
The object of the invention is to realize in the following manner, comprise the steps content: 1) user interface state machine is set; 2) interface control is carried out associated with state machine; 3) in program, trigger the interfacial state control based on state machine; Wherein:
Based on step 1), family interfacial state machine is made up of " state transition " between multiple " state nodes " and the state at description interface,
Described, " state node " comprises following information: status indicator, Status Name, state description;
Described, " state transition " comprises following information: migration mark, migration title, migration source state, migration dbjective state, wherein, migration source state and migration dbjective state associated " state node " respectively;
Described, between two " state node ", allow multiple " state transition " to carry out association, for expressing different state transition application scenarioss;
Based on step 2), it is associated that interface control and state machine carry out, and mainly completes following sub-step:
(1) corresponding relation of " state node " of interface control and state machine is set, this corresponding relation is a many-to-many relationship, and an interface control covers in multiple " state nodes ", and one " state node " comprises multiple interface controls;
(2) state of the interface control that setting " state node " comprises;
Based on step 2) design, the corresponding relation of " state node " and interface control, it is an independently entity, false code type called after: UIStateControl, this entity comprises following information: state node mark, interface control mark, interface control state, and wherein interface control state comprises two enumerated values: available, unavailable;
Based on step 3), in program, trigger the interfacial state control based on state machine, mainly comprise following sub-step:
(1), in concrete interface operation process, in the time will carrying out the change of interfacial state, need to call the state machine state migration DLL (dynamic link library) of state machine, and obtain the state set of the interface control returning;
Further, the sub-step (1) based on step 3, state machine state migration DLL (dynamic link library), its false code is as follows:
List<?UIStateControl>?TrasitState(string?curStateID,?string?transitionID,?out?string?targetStateID);
Wherein curStateID is state machine " state node " mark that represents current interface status; TransitionID is the mark of " state transition " that will carry out; TargetStateID is an output parameter, is used for identifying carrying out by method the mark of " state node " moving to; Rreturn value is the set of one " state node " and interface control associated entity UIStateControl, is illustrated in after manner of execution interface control state set;
(2), according to the rreturn value of the sub-step of step 3) (1), interface control state is read in circulation, by program, the state machine of respective interface control is arranged, and completes the control of interfacial state.
Excellent effect of the present invention: by adopting said method in Development of Graphical Interfaces process, the control operation of normalizable user interface state, improves the exploitation of interfacial state control, the efficiency of maintenance, reduces the probability of makeing mistakes.
Brief description of the drawings
Fig. 1 is Widget of graphical user interface composition structural representation;
Fig. 2 is the state machine basic block diagram of controlling interfacial state;
Fig. 3 is the relation structure diagram between interface control and state node;
Fig. 4 is the purchase order interface schematic diagram of describing in embodiment;
Fig. 5 is the purchase order interfacial state machine schematic diagram of describing in embodiment.
Embodiment
Be described in detail below of the present invention with reference to Figure of description.
Below will be by the detailed description to the preferred embodiments of the present invention, make above-mentioned target of the present invention, feature and advantage more clear, understandable.
Taking the purchase order of certain system as example, purchase order interface, comprises a toolbar, one group of input control and a data grid control.Its interface prototype as shown in Figure 4.Toolbar has three buttons: newly-built, editor, preserve, interface rule definition is as follows:
1. after open at interface, acquiescence is in original state, and newly-built, Edit button is in upstate, and save button is in down state.Interface input control and data form control are in down state.
2. in the time that user clicks newly-built button, interface is in newly-built state, and wherein all imported controls and data form control be all in upstate, and Edit button is in down state, and save button is in upstate.
3. in the time that user clicks Edit button, interface is in editing mode; Wherein O/No. is in down state, and other imported controls and data form control be in upstate, and newly-built button is in down state, and save button is in upstate.
4. when user clicks save button, after system is preserved successfully, interface turns back to original state.
First, set up three interfacial states: initial, newly-built, can edit, and the transition relationship of three states is set, as shown in Figure 5.Then, under three kinds of states of definition, the status information of interface control is as follows:
When interface is under original state, while clicking newly-built button, the TrasitState method of routine call state machine, " initially " state node and " newly-built " status indicator are imported into, get control status list corresponding to " newly-built " state node by interface, then interface control is carried out the setting of state, thereby enter into newly-built state.
Except the technical characterictic described in instructions, be the known technology of those skilled in the art.
Claims (1)
1. the graphical interface of user condition control method based on state machine, is characterized in that comprising the steps content: 1) user interface state machine is set; 2) interface control is carried out associated with state machine; 3) in program, trigger the interfacial state control based on state machine; Wherein:
Based on step 1), family interfacial state machine is made up of " state transition " between multiple " state nodes " and the state at description interface,
Described, " state node " comprises following information: status indicator, Status Name, state description;
Described, " state transition " comprises following information: migration mark, migration title, migration source state, migration dbjective state, wherein, migration source state and migration dbjective state associated " state node " respectively;
Described, between two " state node ", allow multiple " state transition " to carry out association, for expressing different state transition application scenarioss;
Based on step 2), it is associated that interface control and state machine carry out, and mainly completes following sub-step:
(1) corresponding relation of " state node " of interface control and state machine is set, this corresponding relation is a many-to-many relationship, and an interface control covers in multiple " state nodes ", and one " state node " comprises multiple interface controls;
(2) state of the interface control that setting " state node " comprises;
Based on step 2) design, the corresponding relation of " state node " and interface control, it is an independently entity, false code type called after: UIStateControl, this entity comprises following information: state node mark, interface control mark, interface control state, and wherein interface control state comprises two enumerated values: available, unavailable;
Based on step 3), in program, trigger the interfacial state control based on state machine, mainly comprise following sub-step:
(1), in concrete interface operation process, in the time will carrying out the change of interfacial state, need to call the state machine state migration DLL (dynamic link library) of state machine, and obtain the state set of the interface control returning;
Further, the sub-step (1) based on step 3, state machine state migration DLL (dynamic link library), its false code is as follows:
List<?UIStateControl>?TrasitState(string?curStateID,?string?transitionID,?out?string?targetStateID);
Wherein curStateID is state machine " state node " mark that represents current interface status; TransitionID is the mark of " state transition " that will carry out; TargetStateID is an output parameter, is used for identifying carrying out by method the mark of " state node " moving to; Rreturn value is the set of one " state node " and interface control associated entity UIStateControl, is illustrated in after manner of execution interface control state set;
(2), according to the rreturn value of the sub-step of step 3) (1), interface control state is read in circulation, by program, the state machine of respective interface control is arranged, and completes the control of interfacial state.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410378534.8A CN104133684A (en) | 2014-08-04 | 2014-08-04 | Graphical user interface state control method based on state machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410378534.8A CN104133684A (en) | 2014-08-04 | 2014-08-04 | Graphical user interface state control method based on state machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104133684A true CN104133684A (en) | 2014-11-05 |
Family
ID=51806370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410378534.8A Pending CN104133684A (en) | 2014-08-04 | 2014-08-04 | Graphical user interface state control method based on state machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104133684A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106547525A (en) * | 2015-09-21 | 2017-03-29 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus of the web app for performing complete state pattern |
CN110362305A (en) * | 2018-04-08 | 2019-10-22 | 阿里巴巴集团控股有限公司 | A kind of form component state switching method and device |
CN111273969A (en) * | 2020-01-20 | 2020-06-12 | 腾讯科技(深圳)有限公司 | State switching method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1619443A (en) * | 2003-09-05 | 2005-05-25 | 费舍-柔斯芒特系统股份有限公司 | State machine function block with a user modifiable output configuration database |
CN101046745A (en) * | 2007-03-23 | 2007-10-03 | 北京中星微电子有限公司 | Method, device for controlling relation between control piece on interface and control piece display system |
CN101727326A (en) * | 2009-12-11 | 2010-06-09 | 四川长虹电器股份有限公司 | Implementation method for graphic user interface |
CN101809609A (en) * | 2007-09-24 | 2010-08-18 | 微软公司 | The unified message state machine |
CN103324573A (en) * | 2013-07-02 | 2013-09-25 | 北京邮电大学 | PEACH platform extension method for GUI-based protocol state machine modeling |
-
2014
- 2014-08-04 CN CN201410378534.8A patent/CN104133684A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1619443A (en) * | 2003-09-05 | 2005-05-25 | 费舍-柔斯芒特系统股份有限公司 | State machine function block with a user modifiable output configuration database |
CN101046745A (en) * | 2007-03-23 | 2007-10-03 | 北京中星微电子有限公司 | Method, device for controlling relation between control piece on interface and control piece display system |
CN101809609A (en) * | 2007-09-24 | 2010-08-18 | 微软公司 | The unified message state machine |
CN101727326A (en) * | 2009-12-11 | 2010-06-09 | 四川长虹电器股份有限公司 | Implementation method for graphic user interface |
CN103324573A (en) * | 2013-07-02 | 2013-09-25 | 北京邮电大学 | PEACH platform extension method for GUI-based protocol state machine modeling |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106547525A (en) * | 2015-09-21 | 2017-03-29 | 阿里巴巴集团控股有限公司 | A kind of method and apparatus of the web app for performing complete state pattern |
CN110362305A (en) * | 2018-04-08 | 2019-10-22 | 阿里巴巴集团控股有限公司 | A kind of form component state switching method and device |
CN110362305B (en) * | 2018-04-08 | 2024-03-01 | 阿里巴巴集团控股有限公司 | Form component state switching method and device |
CN111273969A (en) * | 2020-01-20 | 2020-06-12 | 腾讯科技(深圳)有限公司 | State switching method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10817263B2 (en) | Workflow development system with ease-of-use features | |
CN108292208B (en) | Parallel front-end application and workflow development | |
US10114349B2 (en) | Multiple applications utilized in an industrial automation system displayed as a single application | |
US9383911B2 (en) | Modal-less interface enhancements | |
CN103902520B (en) | Subject editing method and mobile terminal | |
US11093242B2 (en) | Automatically mapping data while designing process flows | |
US20100146425A1 (en) | Drag and drop target indication in a graphical user interface | |
CN106610774B (en) | Webpage table editing method and device | |
US10073604B2 (en) | UI-driven model extensibility in multi-tier applications | |
US20170010673A1 (en) | Gesture based sharing of user interface portion | |
WO2011137079A2 (en) | Spin control user interface for selecting options | |
US20160173541A1 (en) | Presentation of content from within spreadsheet application | |
US11150919B2 (en) | Logging of scripts executed in an information technology workflow orchestration system | |
CN103309667A (en) | Method for positioning UI (user interface) control and picture modifying position in Android system | |
CN103150456B (en) | Under a kind of MATLAB environment, gui system makes method and system | |
US20240080354A1 (en) | Providing bulk server-side custom actions for multiple rows of a client-side spread sheet | |
US20190005228A1 (en) | Trusted and untrusted code execution in a workflow | |
US20060075352A1 (en) | Property independent in-place editing | |
CN104133684A (en) | Graphical user interface state control method based on state machine | |
CN112528608B (en) | Page editing method, page editing device, electronic equipment and storage medium | |
US10338891B2 (en) | Migration between model elements of different types in a modeling environment | |
US20160232139A1 (en) | Debugging document formatting system | |
CN103678383A (en) | Data processing method and electronic device | |
CN105930262B (en) | Application program user interface automated testing method and electronic equipment | |
TWI738216B (en) | Developing method and developing device for event processing file |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20141105 |
|
WD01 | Invention patent application deemed withdrawn after publication |