CN102073617B - WPF technology is utilized to complete the system of calculating - Google Patents

WPF technology is utilized to complete the system of calculating Download PDF

Info

Publication number
CN102073617B
CN102073617B CN201110027371.5A CN201110027371A CN102073617B CN 102073617 B CN102073617 B CN 102073617B CN 201110027371 A CN201110027371 A CN 201110027371A CN 102073617 B CN102073617 B CN 102073617B
Authority
CN
China
Prior art keywords
expression formula
button
numerical value
page unit
key label
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.)
Expired - Fee Related
Application number
CN201110027371.5A
Other languages
Chinese (zh)
Other versions
CN102073617A (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.)
SHANGHAI JINSHAN DISTRICT YOUTH ACTIVITY CENTER
Original Assignee
SHANGHAI JINSHAN DISTRICT YOUTH ACTIVITY CENTER
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 SHANGHAI JINSHAN DISTRICT YOUTH ACTIVITY CENTER filed Critical SHANGHAI JINSHAN DISTRICT YOUTH ACTIVITY CENTER
Priority to CN201110027371.5A priority Critical patent/CN102073617B/en
Publication of CN102073617A publication Critical patent/CN102073617A/en
Application granted granted Critical
Publication of CN102073617B publication Critical patent/CN102073617B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The invention provides the system utilizing WPF technology to complete calculating, comprise display device, input media and calculation control device, wherein, described input media comprises button concealing device, and it is for hiding the button be of little use.This counter employs the user interface that Shipping Options Page is nested, button switching achieves convenient practicality, pull by double-clicking, problem that the mode such as hot key solves data huge profit, and have employed the run time error caused to avoid data from overflow from field of definition restriction input data.According to the core concept of counter provided by the invention round hommization, high interactive, practicality and ease for use four aspects, make every effort to the work efficiency improving people, reduce and repeat and loaded down with trivial details work, really reach the requirement of hommization.

Description

WPF technology is utilized to complete the system of calculating
Technical field
The present invention relates to counter, especially to the human oriented design of counter input, display, fault tolerance, particularly, relate to the system utilizing WPF technology to complete calculating.
Background technology
Along with development in science and technology, counter more and more incorporates the life of people.People encounter problem, can seek the help of counter, and this strong instrument of counter also should obtain reasonably utilizing to increase work efficiency.For counter, the simplest function no more than calculating, people may run into some as: calculate housing loan, multiple profit, or some relate to the problem of statistics, and counter can be utilized to solve, address this problem only needs one and facilitate easy-to-use counter.But current counter some can not meet the demand of people, though or be no lack of and have powerful, operate loaded down with trivial details inconvenience, human-computer interaction aspect is also friendly not.Therefore people still do not favor in using counter to solve problem.Have to thus cause thinking, the powerful function of counter performs practically no function, and people still do repetition poor efficiency work more or less.So, inventor determines the knowledge utilizing oneself to learn, many deficiencies of the calculator application software of summing up before adding, from hommization, high interactive, practicality and ease for use angle, design a distinguished counter, the problem that may run into during people are lived more successfully solves, and gives full play to the advantage of counter.So design of the present invention has practical significance, people can be changed to the understanding of counter and increase work efficiency.
Summary of the invention
For defect of the prior art, the object of this invention is to provide the system that a kind of WPF of utilization technology completes calculating.
According to an aspect of the present invention, provide the system utilizing WPF technology to complete calculating, comprise display device, input media and calculation control device, wherein, described input media comprises button concealing device, and it is for hiding the button be of little use.
Preferably, described input media comprises expression formula calculation element, its for calculate user input the operation result of expression formula, and using described operation result as input numerical value.
Preferably, described calculation control device comprises device: numerical check device, and it is for checking whether described input numerical value belongs to the numerical value in field of definition; First suggestion device, it is not for when described input numerical value belongs to the numerical value in field of definition, controls described display device display miscue information.
Preferably, described counter also comprises as lower device: overtime judgment means, its for judge described calculation control device perform user input computations time-consuming whether exceed first threshold; Overtime control device, it, for when the judged result of described overtime judgment means is affirmative, stops the current calculating of described calculation control device.
Preferably, described counter also comprises as lower device: timeout threshold determining device, and it is for determining described first threshold according to computations that user inputs.
Preferably, described button concealing device comprises at least two key label page unit, and described key label page unit is distributed with button, and wherein, described input media only shows a described key label page unit simultaneously.
Preferably, described counter also comprises built-in variable memory storage, and it stores for the variable transmitted between difference described key label page unit needs temporarily.
Preferably, described input media comprises as lower device: character string filtration unit, and it is for removing the character in external data except expression formula and numerical value; Batch duplicating device, its for will after filtering the expression formula that stay and numerical value as expression formula that user inputs or numerical value.
Preferably, described input media comprises as lower device: expression parsing device, its for remove user input redundancy space in expression formula, wherein, described expression parsing device comprises as lower device: the first determining device, its for determine successively user the character inputted in expression formula be identifier or numeral; First treating apparatus, it is for when described first determining device determines that described character is identifier, retains a space, except all clear before operational symbol by after identifier; Second treating apparatus, it is for determining described character for numeral during when described first determining device, the space after numeral is all clear, except the unique space between two numerals.
Preferably, described calculation control device comprises as any one in lower device or appoints multiple device: cumulative calculation device; Variable storage device; Elementary function arithmetic unit; Permutation and combination arithmetic unit; Geometry calculation element; Iterative computation device; Computations device.
According to the invention provides counter core concept round hommization, high interactive, practicality and ease for use four aspects, make every effort to the work efficiency improving people, reduce and repeat and loaded down with trivial details work, and continue to optimize in working method, really reach the requirement of hommization.Value of the present invention is also with a kind of like this deficiency of new mode reform traditional counter.Current most of calculator software, mainly to design program interface based on WinForm.The visualized graphs design of WinForm relies on completely under the support of Integrated Development Environment and directly generates corresponding higher level lanquage drawing code, employ GDI+ and carry out graphic plotting, then utilize VB, VC/C++, VC# high level language program, they are based on .Net Framework technology.Also the counter using Delphi, Java to write is had in addition.These counters achieve conventionally calculation, matrix, integration, also have the specific aim of all kinds of problem to calculate.
And the present invention is a in conjunction with WPF technical design has friendly user's interface and can to carry out the multifunctional calculator of expression formula calculating.The user interface of creative use .Net Framework WPF fabrication techniques counter also carries out Vitrification management, supports that front end suspends, allows calculate and combine together with handled problem.Further, in people's life, work, often can run into all kinds of computational problems of economy or engineering aspect, as utilize triangle relation find range from, calculated product is graded.This counter employs that Shipping Options Page is nested, button switches the user interface achieving convenient practicality, pulls, problem that the mode such as hot key solves data huge profit by double-clicking.Wherein not only devise global variable, and be provided with some state variables, therefrom can learn the duty of counter, thus correctly coordinate global variable.Also encounter many problems in debug process, comprise data from overflow and cause miscount, inventor have employed the run time error caused to avoid data from overflow from field of definition restriction input data, and its flow process as shown in Figure 4.In the part of expression parsing, inventor adds expression formula format function, and this makes user can input the expression formula of some not too specifications, as omitted the multiplication sign between the bracket of sin symbol and letter and constant coefficient, also can filter the space of redundancy, expression formula be inputted more naturally succinct.Test result shows, these designs can allow people increase work efficiency and experience.
Accompanying drawing explanation
By reading the detailed description done non-limiting example with reference to the following drawings, other features, objects and advantages of the present invention will become more obvious:
Fig. 1 illustrates according to the first embodiment of the present invention, utilizes WPF technology to complete the structural representation of the system of calculating;
Fig. 2 illustrates according to a second embodiment of the present invention, utilizes WPF technology to complete the structural representation of input media in the system of calculating;
Fig. 3 illustrates according to a specific embodiment of the present invention, utilizes WPF technology to complete the functional tree figure of the system of calculating;
Fig. 4 illustrates according to another embodiment of the present invention, utilizes WPF technology to complete the digital filtering schematic diagram of the system of calculating; And
Fig. 5 illustrates according to another embodiment of the present invention, utilizes WPF technology to complete the principle schematic of multiple key label page unit in the system of calculating.
Embodiment
Fig. 1 illustrates according to the first embodiment of the present invention, utilizes WPF technology to complete the structural representation of the system of calculating.Particularly, in the present embodiment, described counter 4 comprises display device 1, input media 3 and calculation control device 2, and wherein, described input media 3 comprises button concealing device 31, and wherein, described button concealing device 31 is for hiding the button be of little use.Those skilled in the art understand, along with increasing of computer function, the quantity of its button (virtual key such as matched with touch-screen) is very many, to seem very mixed and disorderly if shown in the same page, and due to the display limited area of display device, the area of each button can only design corresponding little, this to user to the quick position of button and press and bring very large difficulty.Therefore in the present embodiment, the button be of little use is stashed by described button concealing device 31 by described counter 4, just can reduce area occupied, in turn ensure that practicality, visually just give a kind of succinct impression of people, the thinking of people is more concentrated in handled problem.Wherein, user certainly can be about to button and is set to conventional or is of little use; More specifically implementation will be described in the embodiment illustrated in figure 2.In a preference, described calculation control device 2 can comprise multiple computing function, as shown in Figure 3.
Preferably, described input media 3 also comprises expression formula calculation element 32, numerical check device 331 and the first suggestion device 332, wherein, described expression formula calculation element 32 for calculate user input the operation result of expression formula, and using described operation result as input numerical value, described numerical check device 331 is for checking whether described input numerical value belongs to the numerical value in field of definition, described first suggestion device 332, for when described input numerical value does not belong to the numerical value in field of definition, controls described display device display miscue information.Wherein, when user input reaches formula, described expression formula calculation element 32 can complete the computing function of expression formula automatically, and help the input accelerating expression formula, such as, user can input pi/2 to replace in the past 1.5707963.Particularly, described expression formula calculation element 32 identifies and the expression formula that user inputs then calculates to this expression formula, preferably can also be fed back the result of calculation of this expression formula by described display device 1.
Described calculation control device 2 preferably includes timeout threshold determining device 21, overtime judgment means 221 and overtime control device 222, wherein, described timeout threshold determining device 21 is for determining described first threshold according to computations that user inputs, described overtime judgment means 221 for judge described calculation control device perform user input computations time-consuming whether exceed first threshold, described overtime control device 222, for when the judged result of described overtime judgment means is affirmative, stops the current calculating of described calculation control device 2.Particularly, first determined the complexity of this instruction according to described computations by described timeout threshold determining device 21, and then determine described first threshold according to this complexity, such as, simple function is calculated and described first threshold can be set as one second, and described first threshold can be set as 10 seconds for comparatively complicated expression formula.Like this, the present invention just can be limited, be overcome the miscount that data from overflow in computation process causes input data field of definition.Afterwards a series of random test is carried out to counter, prevented the operation not meeting normal logic to cause any run time error.In expression parsing, the time of resolving is controlled, prevent the expression formula not meeting logic from causing analysis to be absorbed in endless loop.According to inventor's test, the analysis of a correct complex expression also can not consume a few second.So preferably, the expression parsing process more than ten seconds just can be judged to be what the logic error of expression formula caused, produces time-out prompting.
Further preferably, described calculation control device 2 also comprises cumulative calculation device 23.In the preference of the present embodiment, described calculation control device 2 can also comprise variable storage device, elementary function arithmetic unit, permutation and combination arithmetic unit, geometry calculation element, iterative computation device and computations device.Preferably, described elementary function arithmetic unit comprises once, secondary, inverse proportion function graft characteristic and general function list evaluation in certain is interval, described geometry calculation element is used for solving a triangle problem in mapping, iterative computation device is used for summation, quadratures and ask iteration, and described computations device is for performing the One-Way Encryption of MD5 or SHA1 and adopting the symmetric cryptography of the cryptographic algorithm such as Base64.Preferably, the cyclic process wider for interval or higher other calculating of complexity may consume the plenty of time, and therefore described counter adopts asynchronous design pattern, opens up background thread and carries out computing, and the response of not influencing front stage interactive interface.
Fig. 2 illustrates according to a second embodiment of the present invention, utilizes WPF technology to complete the structural representation of input media in the system of calculating.Embodiment shown in Fig. 2 can be interpreted as an embodiment embodiment illustrated in fig. 1 by those skilled in the art.Particularly, in the present embodiment, described input media 3 comprises button concealing device 31, character string filtration unit 341, batch duplicating device 342 and expression parsing device 35.Wherein, described button concealing device 31 is for hiding the button be of little use, described character string filtration unit 341 is for removing the character in external data except expression formula and numerical value, described batch duplicating device 342 for will after filtering the expression formula that stay and numerical value as expression formula that user inputs or numerical value, described expression parsing device 35 for remove user input redundancy space in expression formula.
Wherein, the expression formula in operating system clipbook can be realized to input to described input media easily by described character string filtration unit 341 and batch duplicating device 342, such as, external data is said that its major part is that mode by copying inputs described input media always, when copying, described counter can carry out preanalysis to character string, expression formula or numerical value is filtered out by described character string filtration unit 341, then by described batch duplicating device 342 using this expression formula as expression formula that user inputs, or calculate this expression formula as numerical value that user inputs, such as " lg2+lg5 " is pasted described counter, to directly obtain result 1, again such as to the character string that " area: 200 square meters " is such, described character string filtration unit 341 will filter out 200 these numerals.
Preferably, described button concealing device 31 comprises built-in variable memory storage 311, key label page unit 312 and key label page unit 313, wherein, described built-in variable memory storage 311 stores for the variable transmitted between difference described key label page unit needs temporarily, described key label page unit 312 and key label page unit 313 are distributed with button, wherein, described input media 3 only shows a described key label page unit simultaneously.Described input media receives user's choosing described key label page unit, if user have chosen described key label page unit 313, then described button concealing device 31 controls described display device and shows described key label page unit 313, is hidden by described key label page unit 312 simultaneously.And in the change case of the present embodiment, described button concealing device 31 can comprise the described key label page unit of greater number, embodiment such as shown in Fig. 5, described counter comprises ten key label page unit, the key label page unit shown in Fig. 5 is " calculating " unit, " calculating " unit should distributed multiple button.More specifically, owing to have employed the form of described key label page unit, save a large amount of area being used for display button, according to function, whole button is classified simultaneously, make user search corresponding button by the described key label page unit searching negligible amounts like this.Further, by described built-in variable memory storage 311, the data between described key label page unit can be utilized in other positions again by pulling or double-click, therefore need not worry therefore to bring other inconvenience.Wherein, described counter can utilize the left and right Shift of keyboard to switch the function of button shown by described display device, as long as do reasonably to arrange to switched button, just the button be of little use can be stashed.
Further preferably, described expression parsing device 35 comprises the first determining device 351, first treating apparatus 352 and the second treating apparatus 353, wherein, described first determining device 351 for determine successively user the character inputted in expression formula be identifier or numeral, first treating apparatus 352 is for when described first determining device determines that described character is identifier, a space is retained by after identifier, except all clear before operational symbol, second treating apparatus 353 is for determining described character for numeral during when described first determining device, space after numeral is all clear, except the unique space between two numerals.
In a preferred embodiment of the present embodiment, first user chooses corresponding button by choosing key label page unit described in, then by the information reproduction in operating system clipbook in described counter, character in external data except expression formula and numerical value is removed by described character string filtration unit 341, then by described batch duplicating device 342 calculation expression, if there is redundancy space in this expression formula, then following by described expression parsing device 35 remove user input redundancy space in expression formula.
In the preference of above-described embodiment, the input media of described counter and the man-machine interface of display device can adopt the form of suspended window, particularly, described counter provides the adjustment of front end suspension and transparency, user is not only made not need by taskbar button switch application program, and visual effect is not almost affected, still can intactly browse whole data page.
Above specific embodiments of the invention are described.It is to be appreciated that the present invention is not limited to above-mentioned particular implementation, those skilled in the art can make various distortion or amendment within the scope of the claims, and this does not affect flesh and blood of the present invention.

Claims (1)

1. utilize WPF technology to complete a system for calculating, comprise display device, input media and calculation control device, it is characterized in that, described input media comprises as lower device:
Button concealing device, it is for hiding the button be of little use;
Described input media comprises as lower device:
Expression formula calculation element, its for calculate user input the operation result of expression formula, and using described operation result as input numerical value;
Described calculation control device comprises as lower device:
Numerical check device, it is for checking whether described input numerical value belongs to the numerical value in field of definition;
First suggestion device, it is not for when described input numerical value belongs to the numerical value in field of definition, controls described display device display miscue information;
Described button concealing device comprises built-in variable memory storage, the first key label page unit and the second key label page unit, wherein, described built-in variable memory storage is used for needing the variable transmitted between different key Shipping Options Page unit to store temporarily, described first key label page unit and the second key label page unit are distributed with button, wherein, described input media only shows a key label page unit simultaneously; Described input media receives user's choosing described key label page unit, if user have chosen described first key label page unit, then described button concealing device controls the described first key label page unit of described display device display, is hidden by described second key label page unit simultaneously;
Described system, also comprises as lower device:
Time-out judgment means, its for judge described calculation control device perform user input computations time-consuming whether exceed first threshold;
Overtime control device, when it is for being affirmative when the judged result of described overtime judgment means, stops the current calculating of described calculation control device;
Described system, also comprises as lower device:
Timeout threshold determining device, it is for determining described first threshold according to computations that user inputs;
Described input media comprises as lower device:
Character string filtration unit, it is for removing the character in external data except expression formula and numerical value;
Batch duplicating device, its for will after filtering the expression formula that stay and numerical value as expression formula that user inputs or numerical value;
Described input media comprises as lower device:
Expression parsing device, its for remove user input redundancy space in expression formula, wherein, described expression parsing device comprises as lower device:
First determining device, its for determine successively user the character inputted in expression formula be identifier or numeral;
First treating apparatus, it is for when described first determining device determines that described character is identifier, retains a space by after identifier, except the space full scale clearance before mark;
Second treating apparatus, it is for determining described character for numeral during when described first determining device, by the space full scale clearance after numeral, except the unique space between two numerals;
Described calculation control device comprises as any one in lower device or appoints multiple device:
-cumulative calculation device;
-variable storage device;
-elementary function arithmetic unit;
-permutation and combination arithmetic unit;
-geometry calculation element;
-iterative computation device;
-computations device.
CN201110027371.5A 2011-01-25 2011-01-25 WPF technology is utilized to complete the system of calculating Expired - Fee Related CN102073617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110027371.5A CN102073617B (en) 2011-01-25 2011-01-25 WPF technology is utilized to complete the system of calculating

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110027371.5A CN102073617B (en) 2011-01-25 2011-01-25 WPF technology is utilized to complete the system of calculating

Publications (2)

Publication Number Publication Date
CN102073617A CN102073617A (en) 2011-05-25
CN102073617B true CN102073617B (en) 2015-08-05

Family

ID=44032162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110027371.5A Expired - Fee Related CN102073617B (en) 2011-01-25 2011-01-25 WPF technology is utilized to complete the system of calculating

Country Status (1)

Country Link
CN (1) CN102073617B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893316A (en) * 2016-03-25 2016-08-24 乐视控股(北京)有限公司 Calculator realization method and device based on mobile terminal
CN105955651A (en) * 2016-04-29 2016-09-21 乐视控股(北京)有限公司 Display management method and device for calculator

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5704050A (en) * 1995-06-29 1997-12-30 International Business Machine Corp. Snap control for relocating elements of a graphical user interface
CN1129856C (en) * 1999-06-14 2003-12-03 金宝电子工业股份有限公司 Calculator capable of displaying previous data
CN101082899B (en) * 2007-06-08 2012-03-07 余丽萍 Electronic calculator
CN101105750A (en) * 2007-08-16 2008-01-16 金蝶软件(中国)有限公司 Numerical value input device and method for numerical value input using the device
CN101309481A (en) * 2008-06-26 2008-11-19 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile terminal for searching contact and locating information
CN101741943A (en) * 2008-11-12 2010-06-16 王峰 Keyboard of mobile terminal

Also Published As

Publication number Publication date
CN102073617A (en) 2011-05-25

Similar Documents

Publication Publication Date Title
Ben-Hur et al. SIMPLER MAGIC: Synthesis and mapping of in-memory logic executed in a single row to improve throughput
CN105283858B (en) The processor of executable approximate calculation instruction
Dasgupta Design theory and computer science
CN106062711B (en) Method, system, and computer storage medium for compound controls
CN103988171B (en) In a data processing system for the method and apparatus performing floating-point operation arithmetic
Skakkebæk et al. Formal verification of out-of-order execution using incremental flushing
CN107436762A (en) A kind of register Code document generating method, device and electronic equipment
WO2017065991A1 (en) Generation of application behaviors
WO2014089741A1 (en) Techniques and apparatus for managing touch interface
CN109471626A (en) Page logic structure, page generation method, page data processing method and device
EP3292467A2 (en) Efficient waveform generation for emulation
CN102073617B (en) WPF technology is utilized to complete the system of calculating
Xi et al. Modeling SystemC design in UML and automatic code generation
CN102866985B (en) For data formatter and the method for on-line analysing processing system
US8392151B1 (en) Preview of an object in graphical modeling environments
US9449128B2 (en) Automatic computation of fundamental frequencies and maximum harmonic orders for radio frequency systems
CN102970321A (en) Methods and systems for a state-based web framework architecture
Xiong et al. Dfdvis: A visual analytics system for understanding the semantics of data flow diagram
CN107908429B (en) Human-computer interaction and programming system applied to robot software engineer
CN101446898A (en) Method for supporting large scale parallel distributed computation through functional programming model
CN116304218B (en) Implementation method and system for integrating multi-domain platform based on graph database
Nielsen A concise and practical introduction to programming algorithms in Java
Skansholm C++ from the Beginning
JP2013519137A (en) Efficient processor and associated method
Hongbiao et al. The research of scientific workflow engine

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
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: 20150805