CN104216722B - Automatic transplanting processing method of Spread control upgrading from ActiveX to .NET - Google Patents

Automatic transplanting processing method of Spread control upgrading from ActiveX to .NET Download PDF

Info

Publication number
CN104216722B
CN104216722B CN201310211137.7A CN201310211137A CN104216722B CN 104216722 B CN104216722 B CN 104216722B CN 201310211137 A CN201310211137 A CN 201310211137A CN 104216722 B CN104216722 B CN 104216722B
Authority
CN
China
Prior art keywords
spread
net
migration process
transplanting
rule
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
CN201310211137.7A
Other languages
Chinese (zh)
Other versions
CN104216722A (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.)
Step Top Information Technology (shanghai) Co Ltd
Original Assignee
Step Top Information Technology (shanghai) 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 Step Top Information Technology (shanghai) Co Ltd filed Critical Step Top Information Technology (shanghai) Co Ltd
Priority to CN201310211137.7A priority Critical patent/CN104216722B/en
Publication of CN104216722A publication Critical patent/CN104216722A/en
Application granted granted Critical
Publication of CN104216722B publication Critical patent/CN104216722B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to an automatic transplanting processing method of Spread control upgrading from ActiveX to .NET. The method comprises the steps that (1) Spread transplanting processing rule files are read; (2) .NET codes before Spread transplanting are read, and whether a Spread control exists in the codes is judged; (3) when the Spread control does not exist in the codes and files which are not processed exist in the .NET codes, the code files which are not processed are read; (4) transplanting processing rule defining information is read, and according to transplanting processing rules and the read .NET codes, whether the Spread transplanting processing rules need to be carried out is judged; and (5) according to the specific processing rules in the Spread transplanting rule defining information, the specific processing rules are called to carry out code transplanting processing and the like. Compared with the prior art, the method has the advantages of being high in transplanting efficiency, high in accuracy and the like.

Description

Automatization's transplanting processing method that Spread controls are upgraded from ActiveX to .NET
Technical field
The present invention relates to a kind of method of upgrading transplanting, more particularly, to a kind of Spread controls from ActiveX to .NET Automatization's transplanting processing method of upgrading.
Background technology
With the appearance of .NET technologies, the increasing VisualBasic6.0 programs with the exploitation of ActiteX controls are needed Carry out upgrading transplanting.In upgrading migration process, if the control in program is just with the standard control of Microsoft Corporation When part is developed, carrying upgrading tool using Visual Studio2008 easily can expeditiously carry out upgrading transplanting. Due to the low cost of the applied software development that third party control is carried out, function is than standard control that Microsoft Corporation is provided The factor such as function is powerful, widely uses third party control exploitation in old business software.Opened with third party control as this There is transplanting inefficiency in the program sent out, operation processes the phenomenons such as inconvenience when .NET upgradings are transplanted.
For the Form Handle control Spread of GrapeCity companies exploitation, from the Spread7.0 controls of ActiveX versions When upgrading to the Spread of .NET versions, due to there is no automatic updating transplanting tool, the .NET of Spread Form Handle controls Upgrading transplanting efficiency and accuracy are always the problem of software development industry.
The content of the invention
The purpose of the present invention be exactly the defect in order to overcome above-mentioned prior art to exist and provide a kind of Spread controls from Processing method is transplanted by ActiveX to the automatization that .NET upgrades.
The purpose of the present invention can be achieved through the following technical solutions:
Automatization's transplanting processing method that a kind of Spread controls are upgraded from ActiveX to .NET, it is characterised in that include Following steps:
(1) the migration process rule file of Spread, the concrete processing information defined in initialization files are read;
(2) the .NET codes before Spread transplanting are read, judges whether there are Spread controls in code, if there is Spread Control, otherwise execution step (4), execution step (3);
(3) when there is untreated file in there is no Spread controls, and .NET codes in code, read untreated Code file, is then back to step (2), otherwise terminates;
(4) a migration process rule definition information is read in, according to migration process rule and the .NET codes for being read in Come the migration process rule for judging whether to need to perform the Spread;If necessary to perform transplanting rule, execution step (5); Otherwise circulation performs this step, reads next migration process rule definition information, until all of transplanting rule treatments are finished Afterwards, execution step (6);
(5) the concrete process rule in regular definition information is transplanted according to Spread, calls the concrete process rule to carry out The migration process of code, and update .NET codes;After the transplanting rule that is disposed, return to step (4);
(6) the Spread permanent state data Jing after migration process in .NET codes are read, using the reflex mechanism of .NET Spread permanent state data are mapped to into the analysable file stream of .NET controls, then execution step (7);
(7) start the designer of the .NET controls of the Spread by VisualStudio2008 editing machines, be automatically imported The analysable file stream preserved in step (6);Then interim analysable file stream, execution step (8) are deleted;
(8) the Spread permanent state data in .NET codes are deleted;Judge whether also have others in .NET codes Spread controls, if any return to step (3);If not existing, execution step (9);
(9) code that Spread upgrading transplanting is finished is written out in new .NET engineerings, if there is transplanting in code Process in rule and fail corresponding transplanting content, then Log files are write information into, in case in follow-up upgrading processing, passing through Transplanting rule is added, transplanting upgrading processing is carried out again.
The transplanting rule definition file of described Spread is an XML file, defines the ActiveX control of Spread With the conversion portability information and concrete processing information of .NET controls.
Described transplanting rule includes statement rule, attribution rule and method rule.
The method as Visual Studio2008 developing instruments plug-in unit, or as single Spread upgrading transplant Instrument.
Compared with prior art, the invention has the advantages that:
(1) efficiency high is transplanted, accuracy rate is high;
(2) using oneself definition upgrading transplanting mode of rule, in that context it may be convenient to difference between correspondence Spread control versions, Easily transplanting rule can be modified with the different system program requirement of correspondence, with good autgmentability.
Description of the drawings
Fig. 1 is the process chart of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawings the present invention is described in detail with specific embodiment.
Embodiment
The transplanting rule definition file of Spread is an XML file, and the ActiveX control and .NET for defining Spread is controlled The conversion portability information and concrete processing information of part.For different implant systems, can be by changing this transplanting definition text Part and transform expansion migration process, reach the transplanting requirement that client specifies.
Below to Fig. 1 in each step be described in detail:
In a step 101, the migration process rule file of Spread is read, Primary graft processes several defined in rule file Individual concrete processing information;
In a step 102, the .NET codes before Spread transplanting are read, judges whether there are Spread controls in code, if There is Spread controls, then execution 201, otherwise execution step 103;
In step 103, when there is untreated file in there is no Spread controls, and .NET engineerings in code, Untreated code file is read, then execution step 102;
In step 201, migration process rule definition information is read in, according to migration process rule and is read in .NET codes judging whether to need to perform the migration process rule of the Spread, if necessary to perform transplanting rule, hold Row step 202;Otherwise circulation performs this step, until after all of transplanting rule confirms to finish, execution step 301;
In step 202., specifically process according to defined in Spread transplants " Actor " in rule definition file, call This processes the migration process into line code, and updates .NET codes, is disposed after the transplanting rule, circulates execution step 201;
In step 301, read the ActiveX in the resource file (* .resX) of .NET window FORM with regard to Spread to control The permanent state data of part, are written to temporary file, then using the reflex mechanism of .NET by the window control information of Spread Execution step 302;
In step 302, the designer of the .NET controls of the Spread is started by VisualStudio2008 editing machines, It is automatically imported the temporary file preserved in 301 steps;Then temporary file, execution step 303 are deleted;
In step 303, the ActiveX control for deleting the Spread in the resource file (* .resX) of window FORM is held Long state binary data;Judge in code whether to also have others Spread controls to define, if any continuing executing with step 201; If not existing, execution step 401;
In step 401, the code that Spread upgrading transplanting is finished is written out in new .NET engineerings, if in code Exist in rule and fail corresponding transplanting content, then Log files are write information into, in case in follow-up upgrading processing, passing through Transplanting rule is added, transplanting upgrading processing is carried out again.
The transplanting upgrading processing instrument of the Spread controls run based on .Net Framework3.5 versions, can be used as list Only execution instrument, it is also possible to as the exploitation plug-in unit of Visual Studio2008.Upgrade in the Spread controls of actual items In transplanting implementation process, the function of about 90% Spread, attribute, at event can be correctly automatically performed by this instrument The upgrading transplanting of reason, control definition etc., substantially increases the liter stage efficiency and accuracy of old system.

Claims (4)

1. a kind of Spread controls are upgraded from automatization from ActiveX to .NET transplanting processing method, it is characterised in that include as Lower step:
(1) the migration process rule file of Spread, the concrete processing information defined in initialization files are read;
(2) the .NET codes before Spread transplanting are read, judges whether there are Spread controls in code, if there is Spread controls Part, otherwise execution step (4), execution step (3);
(3) when there is untreated file in there is no Spread controls, and .NET codes in code, untreated code is read File, is then back to step (2), otherwise terminates;
(4) a migration process rule definition information is read in, is sentenced according to migration process rule and the .NET codes for being read in The disconnected migration process rule for whether needing to perform Spread;If necessary to perform migration process rule, execution step (5);Otherwise Circulation performs this step, next migration process rule definition information is read, until all of migration process rule treatments are finished Afterwards, execution step (6);
(5) the concrete process rule in Spread migration process rule definition information, calls the concrete process rule to carry out The migration process of code, and update .NET codes;After the migration process that is disposed rule, return to step (4);
(6) the Spread permanent state data Jing after migration process in .NET codes are read, will using the reflex mechanism of .NET Spread permanent state data are mapped to the analysable file stream of .NET controls, then execution step (7);
(7) start the designer of the .NET controls of the Spread by VisualStudio2008 editing machines, be automatically imported step (6) the analysable file stream preserved in;Then interim analysable file stream, execution step (8) are deleted;
(8) the Spread permanent state data in .NET codes are deleted;Judge whether also have others Spread in .NET codes Control, if any return to step (4);If not existing, execution step (9);
(9) code that Spread upgrading transplanting is finished is written out in new .NET engineerings, if there is migration process in code Fail corresponding transplanting content in rule, then write information into Log files, in case in follow-up upgrading processing, by adding Migration process rule, carries out again transplanting upgrading processing.
2. the migration process side of automatization that a kind of Spread controls according to claim 1 are upgraded from ActiveX to .NET Method, it is characterised in that the migration process rule file of described Spread is an XML file, defines the ActiveX of Spread The conversion portability information and concrete processing information of control and .NET controls.
3. the migration process side of automatization that a kind of Spread controls according to claim 1 are upgraded from ActiveX to .NET Method, it is characterised in that described migration process rule includes statement rule, attribution rule and method rule.
4. the migration process side of automatization that a kind of Spread controls according to claim 3 are upgraded from ActiveX to .NET Method, it is characterised in that the method as the developing instruments of Visual Studio 2008 plug-in unit, or as single Spread liters Level transplanting tool.
CN201310211137.7A 2013-05-30 2013-05-30 Automatic transplanting processing method of Spread control upgrading from ActiveX to .NET Expired - Fee Related CN104216722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310211137.7A CN104216722B (en) 2013-05-30 2013-05-30 Automatic transplanting processing method of Spread control upgrading from ActiveX to .NET

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310211137.7A CN104216722B (en) 2013-05-30 2013-05-30 Automatic transplanting processing method of Spread control upgrading from ActiveX to .NET

Publications (2)

Publication Number Publication Date
CN104216722A CN104216722A (en) 2014-12-17
CN104216722B true CN104216722B (en) 2017-05-17

Family

ID=52098258

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310211137.7A Expired - Fee Related CN104216722B (en) 2013-05-30 2013-05-30 Automatic transplanting processing method of Spread control upgrading from ActiveX to .NET

Country Status (1)

Country Link
CN (1) CN104216722B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089811A (en) * 2006-06-13 2007-12-19 上海新纳广告传媒有限公司 Flash and Net layered structure based on External Interface

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060031479A1 (en) * 2003-12-11 2006-02-09 Rode Christian S Methods and apparatus for configuration, state preservation and testing of web page-embedded programs

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101089811A (en) * 2006-06-13 2007-12-19 上海新纳广告传媒有限公司 Flash and Net layered structure based on External Interface

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ActiveX控件与服务器端对象级交互的探讨和应用;孙锐 等;《计算机应用》;20070701(第7期);1729-1731 *
一种基于ASP.NET与ActiveX的安全的WebGIS实现方案;韩双旺 等;《自动化与仪器仪表》;20091125(第6期);121-126 *

Also Published As

Publication number Publication date
CN104216722A (en) 2014-12-17

Similar Documents

Publication Publication Date Title
EP2562641B1 (en) Software application porting system
US8656349B2 (en) Systems and methods for template reverse engineering
US10248409B1 (en) Limiting the effects of source code patches on corresponding native-code patches
US8418122B2 (en) Incorporating functionality from an object file into an existing binary file
CN110442371A (en) A kind of method, apparatus of release code, medium and computer equipment
CN111801731B (en) Voice control method, voice control device, and computer-executable nonvolatile storage medium
US8230406B2 (en) Compiler option consistency checking during incremental hardware design language compilation
CN110109671B (en) Webpack label size and style conversion method and device
JP5587685B2 (en) System, method and computer program for automating record declaration of electronic document
CN104657164A (en) Method and device for updating and processing software
CN111290961A (en) Interface test management method and device and terminal equipment
CN114489950A (en) Component adapting method and device, electronic equipment and storage medium
CN104216722B (en) Automatic transplanting processing method of Spread control upgrading from ActiveX to .NET
CN116775613A (en) Data migration method, device, electronic equipment and computer readable medium
EP3346642A1 (en) Method and device for managing network element model
US20150033213A1 (en) Compiling method, storage medium and compiling apparatus
CN113535206B (en) Multi-version code upgrading method and system
CN111142848A (en) Software program compiling method, software program executing method and software program compiling device
Conrad et al. Model-based design for safety critical automotive applications
CN113032004B (en) Method, apparatus and program product for managing development jobs in a development environment
CN109828752B (en) Project code automatic generation method, device, computer equipment and storage medium
US8990267B2 (en) Synchronization of artifacts across different domains
CN111273956B (en) Program module loading method, device, equipment and storage medium
CN102902532B (en) Tool chain conversion and extension method in integrated development environment
CN111159198B (en) Parameter transaction processing method and device, computer equipment and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170517

Termination date: 20190530

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