A hybrid development table editor development method, device, medium and product
By using a hybrid development approach, the open-source GridControl project is encapsulated as an OCX control, integrated into a Winform application, and a table editor is implemented using WebView2 and ECharts. This solves the problems of performance and development efficiency, visualization functionality, and cross-technology integration in existing technologies, and provides high-performance and rich data display capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2026-03-20
AI Technical Summary
Existing table editors are inadequate in terms of performance and development efficiency, visualization capabilities, cross-technology integration, and support for professional data formats, making it difficult to meet the needs of complex data processing and high-performance computing.
A hybrid development approach was adopted, encapsulating the open-source GridControl project into an OCX control, integrating it into a Winform application, and loading ECharts chart functionality through the WebView2 control. Data processing and interaction were performed using C#, achieving high performance and visualization in the table editor.
It achieves low-cost, high-performance table editing and visualization functions, meeting the complex needs of professional fields such as engineering simulation and data analysis, and has significant technical advantages and broad application prospects.
Smart Images

Figure CN120631339B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of software, in particular to a mixed development table editor development method, device, medium and product. BACKGROUND
[0002] With the rapid development of computer technology, data table editors have become an indispensable tool in fields such as engineering simulation and data analysis. In particular, in professional fields such as Modelica simulation, a large amount of structured data needs to be processed, and higher requirements are placed on the performance and functions of table editors. Traditional table processing tools such as Excel or Notepad can complete basic data editing tasks, but they have obvious shortcomings in handling complex data structures, implementing high-performance computing, and supporting professional data formats.
[0003] In the prior art, table editors are mainly implemented in three ways: high-performance table controls developed in pure C++, WinForms table controls based on the.NET framework, and table components based on Web technology. These technical solutions each have the following limitations: 1. Table controls developed in pure C++ have excellent performance, but low development efficiency and poor interface interaction experience; 2. Table controls under the.NET framework have high development efficiency but relatively low performance, making it difficult to handle large-scale data; 3. Table components implemented using Web technology have rich visualization capabilities, but data interaction efficiency is low and it is difficult to integrate deeply with desktop applications. SUMMARY
[0004] The purpose of the present application is to provide a mixed development table editor development method, device, medium and product, which can realize low-cost, high-performance table editing and visualization functions.
[0005] To achieve the above purpose, the present application provides the following solutions:
[0006] In a first aspect, the present application provides a mixed development table editor development method, comprising:
[0007] Adding a custom column type to an open source GridControl project to obtain a customized project; the open source GridControl project is developed using C++;
[0008] Integrating the customized project into a Winform application and calling interface functions provided by the customized project through C# to obtain a called control;
[0009] Loading an HTML page using a WebView2 control and integrating ECharts chart functions to obtain a chart function control;
[0010] Integrate the called control and the chart function control by using a Winform application program.
[0011] Process and interact data between the called control and the chart function control through C#, and obtain a table editor.
[0012] Optionally, add a custom column type to the open-source GridControl project, and obtain a customized project, which specifically comprises:
[0013] Add a custom column type to the open-source GridControl project, and obtain an added project.
[0014] Optimize the data loading speed of the added project, and obtain an optimized project.
[0015] Encapsulate the optimized project into an OCX control format, and obtain a customized project.
[0016] Optionally, integrate the customized project in a Winform application program, and call an interface function provided by the customized project through C#, and obtain a called control, which specifically comprises:
[0017] Create a Winform application program project.
[0018] Add the customized project to a toolbox of Visual Studio of the Winform application program project by registering a command, and set attributes and event handlers, and obtain a set project.
[0019] Call an interface function provided by the set project through C#, and obtain a called control; the interface function is used to realize functions of creating, assigning, style setting, and row and column operation of a table.
[0020] Optionally, load an HTML page by using a WebView2 control and integrate ECharts chart function, and obtain a chart function control, which specifically comprises:
[0021] Obtain a WebView2 control, and load dependencies of the WebView2 control by using NuGet.
[0022] Write an Html static page, and load an ECharts library in the Html static page, and obtain a page loading project.
[0023] Load the page loading project by using the WebView2 control, and configure chart types and interactive functions by using a JavaScript API of ECharts, and obtain a chart function control.
[0024] Optionally, the Winform application is used to integrate the called control and the chart function control, and specifically includes:
[0025] The called control and the chart function control are placed on the Winform main window.
[0026] The called control and the chart function control are coordinated and set.
[0027] The called control and the chart function control are communicated and interacted through the front-end and back-end interaction interface of the WebView2 control.
[0028] Optionally, the data processing and interaction between the called control and the chart function control are performed through C#, and a table editor is obtained, and specifically includes:
[0029] The table data in the called control is listened to by using the C# program.
[0030] When the table data changes, the table data is converted into a json format to obtain format conversion data.
[0031] The format conversion data is transmitted to the corresponding function code of the front end through the WebView2, and the format conversion data is converted into the format of the ECharts interface to present the ECharts chart view.
[0032] Optionally, after the data processing and interaction between the called control and the chart function control are performed through C# to obtain the table editor, the method further includes:
[0033] The table editor is functionally tested.
[0034] An operation manual and a help file of the table editor are generated.
[0035] In a second aspect, the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the mixed development table editor development method in any one of the above.
[0036] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the mixed development table editor development method in any one of the above.
[0037] In a fourth aspect, the present application provides a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the mixed development table editor development method in any one of the above.
[0038] According to the specific embodiments provided in the present application, the following technical effects are disclosed:
[0039] The present application provides a mixed development table editor development method, device, medium and product, the method comprising: adding a custom column type to an open source GridControl project to obtain a customized project; the open source GridControl project is developed using C++; integrating the customized project in a Winform application and calling the interface functions provided by the customized project through C# to obtain a called control; loading an HTML page using a WebView2 control and integrating ECharts chart function to obtain a chart function control; integrating the called control and the chart function control using the Winform application; performing data processing and interaction between the called control and the chart function control through C# to obtain a table editor. The present application combines C++, C# and Web technology for mixed development through reasonable step setting, fully utilizes the high performance of C++ (used for OCX control development), the development efficiency of C# and the rich visualization capability of Web technology (through WebView2 and ECharts), realizes low-cost and high-performance table editing and visualization function, meets the complex needs of professional fields such as engineering simulation and data analysis, and has significant technical advantages and wide application prospect. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0041] Figure 1 A flowchart of a mixed development table editor development method provided by an embodiment of the present application.
[0042] Figure 2 A structural schematic diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0044] The current table editor technology mainly has the following technical problems:
[0045] 1. The contradiction between performance and development efficiency: the development cycle of high-performance C++ table control is long and costly, while the development efficiency of.NET control is difficult to meet the demand of large-scale data processing.
[0046] 2. Weak visualization function: traditional desktop table editor lacks flexible data visualization ability and is difficult to realize complex data chart display requirements.
[0047] 3. Difficulty in integrating different technologies: existing solutions are difficult to combine the advantages of different technology stacks, such as the high performance of C++, the development efficiency of C#, and the rich visualization capabilities of Web technology.
[0048] 4. Lack of support for professional data formats: For Modelica and other professional simulation data formats, general-purpose table editors lack targeted optimization and support, resulting in low data processing efficiency.
[0049] The present application aims to take advantage of each platform, and to hand over the table rendering part that is most likely to affect performance to C++, the business logic to C#, and the two-dimensional / three-dimensional view part to the best presentation effect Web(html+JavaScript). By adding a browser plug-in(WebView2) to load static pages through a main client(C# Winform), encapsulating the C++ OCX as a control of the Winform client, and adding it to the client window, the corresponding business development work can be carried out.
[0050] To make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0051] In an exemplary embodiment, as shown in Figure 1 , a hybrid development table editor development method is provided, which includes the following steps S1 to S5 in the embodiment of the present application. Among them:
[0052] S1, add custom column type to open source GridControl project to get customized project; the open source GridControl project is developed by C++.
[0053] In this embodiment, the open source GridControl project is developed and encapsulated as an OCX control.
[0054] GridControl is an open-source table control project that provides basic table display and operation functions. OCX control is a Microsoft ActiveX control technology, which is a reusable software component that can be embedded in different applications.
[0055] The computer system first obtains the open-source code of the GridControl project, analyzes its core functions and data structures. The system uses development tools to extend and optimize the functions of GridControl, including adding custom column types (adding the names / remark information of each coordinate axis through the table property window), optimizing data loading speed, etc. Then the system uses the tools provided by.NETFramework to encapsulate the customized GridControl into OCX control format, ensuring that the control can be correctly registered and used in the target environment. Create a test program, write unit tests, and verify whether the functions of the OCX control are normal, such as whether it can create an n*m table, whether it can add rows and columns to the table, whether it can assign colors to table cells, etc.
[0056] Specifically, in this embodiment, the specific steps of secondary development and encapsulation of the open-source GridControl project into OCX control (customized project) include:
[0057] Step 1. Select the development environment specified by the preset standard and import the source code of the open-source GridControl project. The development environment refers to the integrated development environment (IDE) used for software development, including code editor, compiler, debugger, etc. The preset standard refers to the technical specifications and requirements determined in advance according to project requirements.
[0058] The computer first selects a development environment that meets the preset standard, such as Visual Studio IDE. Then the computer downloads the source code of the open-source GridControl project from the code repository and imports it into the selected development environment. The computer verifies whether the configuration of the development environment meets the requirements of project compilation and running, ensuring that the environment is correctly built.
[0059] Step 2. Analyze the core functions and data structures of the open-source GridControl project. Core functions refer to the most critical and basic function modules in a software system. Data structure refers to the organization, management and storage format of data in a computer.
[0060] The computer performs static analysis and dynamic debugging on the imported GridControl source code, identifies the core code modules that implement table editing functions. The computer parses the data structure definition in the project and understands the logical relationship of data storage and processing. The computer generates a function module call relationship diagram and a data flow diagram to provide a basis for subsequent function extension.
[0061] Step 3. Extend or optimize the functionality of the open-source GridControl project. Functionality extension refers to adding new features based on the original functionality. Functionality optimization refers to improving the performance or user experience of existing features.
[0062] The computer modifies the GridControl source code based on the requirement document, adding new features such as custom column types and data validation. The computer refactors the data processing algorithms to optimize the table rendering performance under large data volumes. The computer adjusts the user interaction logic to enhance the response speed of sorting, filtering, and other operations.
[0063] Step 4. Design and encapsulate the interface functions of the OCX control. Interface functions refer to the public methods provided for external program calls. Encapsulation refers to packaging functional modules into independent components.
[0064] The computer defines the public interfaces that the OCX control needs to expose, including table operations and data acquisition methods. The computer writes interface implementation code to ensure that each interface function can correctly call internal functions. The computer adds necessary parameter validation and error handling mechanisms to the interfaces.
[0065] Step 5. Use the tool specified by the preset standard to encapsulate the customized GridControl as the OCX control. The encapsulation tool refers to the Software Development Kit (SDK) used to create OCX controls.
[0066] Step-by-step process detailed explanation: The computer uses the ActiveX template or ATL tool provided by.NET Framework to create an OCX project framework. The computer integrates the modified GridControl code into the OCX project and configures the necessary compilation options. The computer performs the compilation process to generate binary files that comply with OCX specifications.
[0067] Step 6. Test the registration and calling functions of the OCX control in the target environment. The target environment refers to the computer system environment where the OCX control will run. Registration refers to writing control information into the system registry.
[0068] The computer uses the regsvr32 command to register the OCX control in the system registry. The computer creates a test application to verify whether the control can be loaded and initialized correctly. The computer calls various interface functions to check the correctness and performance indicators of the function implementation.
[0069] Through the systematic implementation of the above steps, the computer can efficiently convert the open-source GridControl project into a fully functional OCX control. This process ensures the preservation and expansion of core table functions while providing standardized interface specifications. The resulting OCX control has high-performance data processing capabilities and can be seamlessly integrated into various Windows applications, laying a solid foundation for subsequent table editor development.
[0070] S2, integrate the customized project into a Winform application and call the interface functions provided by the customized project through C# to obtain the called control.
[0071] In this embodiment, the OCX control (customized project) is integrated into the Winform application to realize the table editing function.
[0072] Winform is the abbreviation of Microsoft Windows Forms, which is a graphical user interface framework provided by.NET Framework for creating Windows desktop applications.
[0073] The computer system creates a Winform application project and adds the OCX control generated in step S1 to the toolbox of Visual Studio through a registration command. The system drags and drops the OCX control onto the form in the Winform form designer and sets the properties and event handlers of the OCX control (the function of the development interface in VS is to open the property window by right-clicking and setting various properties). The system calls the interface functions provided by the OCX control through C# to realize the creation, assignment, style setting, row and column operation of the table, and complete the integration of the core functions of the table editor.
[0074] In this embodiment, the specific steps of integrating the customized project into the Winform application to realize the table editing function include:
[0075] These steps describe the complete process of integrating the customized project (OCX control) into the Winform application to realize the table editing function. First, the application needs to be created and the control needs to be registered, then the control needs to be added to the application, and then the creation, assignment, style setting, and row and column operation of the table are gradually realized through the interface functions of the control. These steps are arranged in the order from the foundation environment construction to the specific function implementation, with clear and dependent relationships.
[0076] Step 1: Create the Winform application and register the OCX control
[0077] A Winform application is a Windows Forms application based on.NET Framework, which provides a development framework for graphical user interfaces (GUIs). An OCX control is an ActiveX control, a reusable software component that can be embedded into applications to provide specific functionality.
[0078] The system first creates a new Winform project using the Visual Studio development environment, setting the project name and storage location. Then the system registers the OCX control in the Windows operating system through the regsvr32 command or programming, so that the Winform application can recognize and use the control. The registration process includes writing the information of the OCX control into the system registry, and ensuring that all necessary dependencies have been correctly installed and configured.
[0079] Step 2: Add the OCX control to the Winform application through the toolbox specified by the preset standard.
[0080] The toolbox specified by the preset standard refers to the Toolbox panel in the Visual Studio development environment, which organizes various available controls according to standard categories. The OCX control will automatically appear in the "COM Components" or "ActiveX Controls" category of the toolbox after registration.
[0081] The system opens the design view of the Winform application in Visual Studio, finds the registered OCX control from the toolbox. The system drags and drops the control onto the Winform form, automatically generates a control instance and adds it to the form control collection. The system sets the position and size properties of the control on the form, ensuring that its layout meets the design requirements. The system also checks the license information of the control to ensure legal use.
[0082] Step 3: Call the interface functions of the OCX control to create and assign values to the table.
[0083] Interface functions are a set of public methods exposed by the OCX control to external applications, used to control and operate the functions of the control. Table creation and assignment refers to the process of initializing the table data structure and filling it with initial data.
[0084] The system accesses the object model of the OCX control through C#, calls the initialization method to create a blank table. The system sets the number of rows and columns, title, and other basic properties of the table, then calls the data filling method to load the contents of the external data source into the table. The system handles data type conversion, ensuring that numerical, textual, and date data of different types are displayed correctly. The system also implements data validation logic to prevent invalid data input.
[0085] Step 4: Set the style of the table through the interface functions of the OCX control.
[0086] Table style refers to the visual presentation of a table, including font, color, border, alignment, and other appearance properties. Interface functions usually contain a set of methods specifically for style setting.
[0087] The system calls the style setting methods provided by the OCX control to configure the overall appearance of the table. The system sets the header style, including font size, color, and background. The system defines cell styles, including text alignment, border style, and background color. The system implements conditional formatting, dynamically changing the display style based on cell values. The system also saves style templates, supporting user customization and reuse of common style configurations.
[0088] Step 5: Add and delete table rows and columns through the interface functions of the OCX control.
[0089] Table row and column operations refer to the editing functions that dynamically adjust the structure of the table, including inserting, deleting, moving rows or columns, and other operations. Interface functions provide corresponding methods to perform these structural changes.
[0090] The system calls the row operation methods of the OCX control to insert new rows or delete existing rows at specified positions. The system calls the column operation methods to add new columns or remove unnecessary columns. The system handles events triggered by row and column operations, such as data re-indexing and interface refreshing. The system implements the undo / redo function, recording the history of row and column changes. The system also optimizes the performance of row and column operations under large data volumes, reducing interface flickering and delays.
[0091] Through the implementation of the above steps, the system realizes the efficient integration of the OCX table control in the Winform application, providing complete table editing functions. This integration method fully utilizes the high-performance data processing capabilities of the OCX control and the flexible interface design of Winform, achieving fast response to large data volume table operations. At the same time, standardized interface calls ensure the stability and maintainability of function implementation, providing professional-level table editing experience for end users.
[0092] S3, load HTML page and integrate ECharts chart function through WebView2 control to get chart function control.
[0093] This embodiment loads an HTML page through a WebView2 control and integrates ECharts chart function.
[0094] WebView2 is a Chromium-based embedded browser control provided by Microsoft, and ECharts is an open-source JavaScript visualization chart library.
[0095] The computer system adds a WebView2 control component in a Winform project, configures the version and dependencies thereof. An HTML page code containing an ECharts library reference is written, and the layout and style of chart display are designed. A local WebView2 is downloaded from the official website and stored in the program root directory. The local version of the WebView2 is read by the software, and the related dependencies of the WebViewe2 are loaded through NuGet. The WebView2 browser is successfully added to the software. Then, an Html static page chat.html is written, and the ECharts library is loaded in the chat.html. The system loads these chat.html pages through the WebView2 control, and configures various chart types and interactive functions by using the JavaScript API of ECharts. The system realizes the transmission mechanism of data from the back end to the front end chart, and ensures that the chart can be dynamically updated.
[0096] S4, integrating the called back control and the chart function control by using a Winform application.
[0097] In this embodiment, the called back control and the chart function control are integrated into the Winform application.
[0098] Integration refers to the coordinated combination of multiple functional components to form a complete application program.
[0099] The computer system designs the user interface layout in the Winform main window, and reasonably places the called back control and the chart function control on the window. The system sets the properties and position relationship of the two controls. Some types of tables only display single table editing, and some tables need double table editing. Through control display and size control, it is ensured that they are displayed coordinately in the interface. The system realizes the communication mechanism between the controls, combines the back-end data into json data through the front-end and back-end interactive interface provided by the WebView2 control, transmits it to the front-end chat.html for receiving and parsing, and combines the parsed content into the json format required by the ECharts interface, so that the table data changes can be reflected in the chart in time. The system also adds necessary interface elements such as menus, toolbars and status bars, and provides complete user operation experience.
[0100] S5, data processing and interaction between the called back control and the chart function control through C# to obtain a table editor.
[0101] In this embodiment, the data processing and interaction between the called back control and the chart function control are realized through C#.
[0102] C# is an object-oriented programming language developed by Microsoft, commonly used for.NET platform application development.
[0103] The computer system writes C# to listen to the table data change event in the OCX control. When the data changes, the system converts the table data into a json format. Then the processed string containing json data is transmitted into the WebView2 through the ExecuteScriptAsync method provided by WebView2. WebView2 will automatically transmit the corresponding function code to the front-end JavaScript according to the content of the string, and through the analysis of the json data again, it will be converted into the format of ECharts interface, completing the presentation of ECharts chart view. The system also realizes the reverse data flow, which transmits the user's interactive operation on the chart to C# through JavaScript callback, and then updates the table data in the OCX control.
[0104] In this embodiment, the steps of loading the HTML page and integrating the ECharts chart function through the WebView2 control include:
[0105] Step 1: Configure the WebView2 control in the Winform application. This is the first step to realize the integration of WebView2 and ECharts, and establishes the basic environment for subsequent operations.
[0106] Winform application refers to a desktop application developed based on Windows Forms technology, providing a graphical user interface framework. WebView2 control is a Chromium-based embedded browser component provided by Microsoft, supporting modern web technologies.
[0107] The system creates or opens the target Winform project in the Visual Studio development environment. The system adds the Microsoft.Web.WebView2 dependency through the NuGet package manager, and automatically downloads the required runtime components. The system drags and drops the WebView2 control to the specified position in the form designer, sets the CoreWebView2Ready event handler. The system configures the initial properties of WebView2, including default URL, zoom mode, permission settings and other parameters.
[0108] Step 2: Write the HTML page and import the preset standard specification file of ECharts. After completing the control configuration, the front-end environment for carrying the chart needs to be built.
[0109] HTML page is a document file containing HyperText Markup Language, which is used to define the structure and content of a web page. ECharts is a JavaScript visualization library developed by Baidu, and the preset standard specifies that the file refers to its core JS library and CSS style file.
[0110] The system creates a new HTML file and sets the basic document structure. The system adds CDN references or local resource paths for ECharts in the section, including the echarts.min.js core file and required extension components. The system defines a DOM container div element with explicit dimensions in the section. The system writes the initialization script, creates an echarts.init() instance, and binds it to the target DOM element.
[0111] Step 3: Configure the chart parameters of the ECharts. After importing the library file, the specific presentation method of the chart needs to be defined.
[0112] Chart parameters refer to the ECharts configuration object (option), which includes series, xAxis, yAxis, and other attributes to define chart types and data mapping rules.
[0113] The system constructs the option configuration object that conforms to the ECharts specification. The system sets the basic chart type (such as line chart, column chart, etc.) and coordinate system parameters. The system defines the dataZoom component to implement scaling functions and configures the tooltip prompt box interaction behavior. The system adds the visualMap visual mapping component to handle data-to-color conversion rules. The system saves the complete option configuration to a JavaScript variable for subsequent calls.
[0114] Step 4: Pass data to the HTML page through the interface of the WebView2 control. Establish a communication channel between the desktop and web content to achieve data interaction.
[0115] The WebView2 interface refers to methods such as PostWebMessageAsString or ExecuteScriptAsync provided by the CoreWebView2 class, which are used for cross-environment communication.
[0116] The system constructs a JSON string containing chart data in C#. The system calls the ExecuteScriptAsync method of the WebView2 control to execute JavaScript functions. The system establishes a two-way communication channel through the WebMessageReceived event handler. The system uses the InvokeScript method to inject serialized data into the front-end window object. The system receives and parses the transmitted data on the front end through addEventListener.
[0117] Step 5: Call the preset standard method of ECharts to update the chart. Finally, the processed data is visualized.
[0118] The preset standard method refers to the setOption, resize, and other core methods provided by the ECharts official API, which are used to dynamically update the chart.
[0119] The system defines a chart update function updateChart(data) in the front-end JavaScript. The system converts the received data into a format supported by ECharts and merges it into the option object. The system applies the new configuration through the myChart.setOption() method, triggering the chart to redraw. The system calls myChart.resize() to maintain a responsive layout when the window size changes. The system implements the dispose method to properly release chart resources when the control is unloaded.
[0120] Overall technical effects:
[0121] This solution integrates Winform desktop applications with web technologies through the WebView2 control, utilizes the powerful visualization capabilities of ECharts, and builds a high-performance data display solution. The system uses a layered architecture design to clearly separate the responsibilities of data preparation, transmission protocol, and rendering display, and communicates between modules through standardized interfaces. This design retains the performance advantages of native applications, while also offering the flexibility and rich visualization effects of web technologies. Additionally, through automated data pipelines and responsive update mechanisms, the system significantly improves rendering efficiency and interactive experience in large data scenarios.
[0122] In this embodiment, after obtaining the table editor, functional testing and optimization are performed.
[0123] Functional testing is the process of verifying whether the software works normally according to the requirements specification, and optimization is the improvement process to enhance software performance and user experience.
[0124] The computer system executes automated test scripts and manual test cases to verify whether each function of table editing and chart display works normally. The system tests the performance under large data, optimizes data loading and rendering algorithms, collects test results, fixes discovered defects, adjusts interface layout and interaction processes, and performs memory usage analysis and performance profiling to eliminate potential resource leaks and performance bottlenecks.
[0125] Finally, user documentation is generated to support user operations of the table editor.
[0126] User documentation is a set of instructions and materials that help users understand and use a software product, including operation manuals, help files, etc.
[0127] The computer system automatically generates a document framework and basic content based on the functions and operation flow of the application. The system extracts the annotation and interface element description information in the code and integrates it into the document. The system generates operation step screenshots and sample data to create a picture and text guide. The system outputs the document in multiple formats (such as PDF, HTML) for user reference. The system also establishes an index and search function for the document to improve user information search efficiency.
[0128] The above steps collectively constitute a hybrid development method for developing a high-performance table editor. This method combines the high-performance OCX control of C++ with the modern web technology of WebView2 to achieve efficient table editing and rich chart display functions under the Winform framework. The system takes full advantage of the strengths of each technology stack: C++ provides high-performance data processing, web technology provides flexible visualization capabilities, and C serves as an intermediate layer to coordinate the interaction between the two. This method has better performance, lower development cost, and richer functional performance compared to single technology solutions, and can meet complex data editing and visualization needs.
[0129] Based on the same inventive concept, the embodiments of the present application also provide a hybrid development method for developing a table editor, and the specific steps are as follows:
[0130] Secondary development and encapsulation of the open source GridControl project as an OCX control.
[0131] Integration of the OCX control in the Winform application to realize table editing function.
[0132] Loading HTML pages through the WebView2 control and integrating ECharts chart functions.
[0133] Integrating the OCX control and the WebView2 control into the Winform application.
[0134] Implementing data processing and interaction between the OCX control and the WebView2 control through C# code.
[0135] Function testing and optimization of the Winform application.
[0136] Generating user documentation to support user operation of the table editor.
[0137] The step of secondary development and encapsulation of the open source GridControl project as an OCX control includes:
[0138] Select the development environment specified by the preset standard and import the source code of the open source GridControl project.
[0139] Analyze the core functions and data structures of the open source GridControl project.
[0140] Expand or optimize the functions of the open source GridControl project.
[0141] Design and encapsulate the interface functions of the OCX control.
[0142] Use the tools specified by the preset standard to encapsulate the customized GridControl as the OCX control.
[0143] Test the registration and calling functions of the OCX control in the target environment.
[0144] The step of integrating the OCX control in the Winform application to realize the table editing function includes:
[0145] Create the Winform application and register the OCX control.
[0146] Add the OCX control to the Winform application through the toolbox specified by the preset standard.
[0147] Call the interface functions of the OCX control to realize the creation and assignment of the table.
[0148] Set the style of the table through the interface functions of the OCX control.
[0149] Add and delete rows and columns of the table through the interface functions of the OCX control.
[0150] The step of loading the HTML page through the WebView2 control and integrating the ECharts chart function includes:
[0151] Configure the WebView2 control in the Winform application.
[0152] Write the HTML page and import the preset standard files of ECharts.
[0153] Configure the chart parameters of ECharts.
[0154] Pass data to the HTML page through the interface of the WebView2 control.
[0155] Call the preset standard method of ECharts to update the chart.
[0156] The step of integrating the OCX control and the WebView2 control into the Winform application includes:
[0157] Designing a user interface of the Winform application.
[0158] Embedding the OCX control and the WebView2 control into the user interface.
[0159] Configuring display attributes of the OCX control and the WebView2 control.
[0160] Adjusting a layout of the user interface to optimize an operation experience.
[0161] The step of realizing data processing and interaction between the OCX control and the WebView2 control through C# code includes:
[0162] Reading and processing table data through the C# code.
[0163] Operating the table data through an interface function of the OCX control.
[0164] Transferring the table data to the HTML page through an interface function of the WebView2 control.
[0165] Updating the ECharts chart through a JavaScript function in the HTML page.
[0166] The step of performing function testing and optimization on the Winform application includes:
[0167] Testing a table operation function of the OCX control.
[0168] Testing a chart display function of the WebView2 control.
[0169] Testing a data interaction function between the OCX control and the WebView2 control.
[0170] Optimizing a performance of the Winform application according to a test result.
[0171] To realize the above method, the embodiment further provides a hybrid development high-performance table editor development device, which comprises:
[0172] An OCX control encapsulation module is configured to perform secondary development on an open source GridControl project and encapsulate the open source GridControl project as an OCX control.
[0173] a table function implementation module for integrating the OCX control in the Winform application to implement table editing functions.
[0174] a chart function implementation module for loading an HTML page through a WebView2 control and integrating ECharts chart functions.
[0175] a integration module for integrating the OCX control and the WebView2 control into the Winform application.
[0176] a data processing module for realizing data processing and interaction between the OCX control and the WebView2 control through C# code.
[0177] a test optimization module for performing function testing and optimization on the Winform application.
[0178] a document generation module for generating user documents to support user operation of the table editor.
[0179] The present application focuses on the field of software technology and proposes an innovative technical solution for developing a high-performance table editor through hybrid development in view of a series of problems existing in existing table editors, covering development methods, devices, computer equipment, and computer readable storage media.
[0180] In terms of development methods, the open-source GridControl project is developed again. The source code is imported in a development environment specified by a preset standard, the core functions and data structures are analyzed in depth, the functions are extended or optimized according to actual needs, such as adding custom column types and optimizing data loading speed. The interface functions of the OCX control are designed and encapsulated according to the specification, the customized GridControl is encapsulated into an OCX control using a tool that meets the preset standard, and the registration and calling functions of the OCX control are strictly tested in the target environment.
[0181] The OCX control is integrated into the Winform application to implement table editing functions. When creating a Winform application, the OCX control is registered according to the standard and added to the application through a toolbox specified by a preset standard. The interface functions of the OCX control are called using C# code to realize the creation, assignment, style setting, and addition and deletion of rows and columns of the table. During the operation process, attention is paid to data type conversion and verification to ensure the accuracy and stability of the data; the style setting supports multiple formats to meet the visual needs of different users; and the row and column operations have efficient algorithms to reduce operation delays under large data volumes.
[0182] Load HTML pages and integrate ECharts chart functions through the WebView2 control. Configure the WebView2 control in the Winform application, write HTML pages and import the preset standard specification file of ECharts. Configure the chart parameters of ECharts according to the data visualization requirements, pass the data to the HTML page through the interface of the WebView2 control, and update the chart by calling the preset standard specification method of ECharts using the JavaScript function in the HTML page, to realize the display and interaction of multiple chart types.
[0183] Integrate OCX control and WebView2 control into Winform application. Carefully design the user interface of Winform application, reasonably plan the layout of components such as table area, chart area, toolbar and menu bar. Embed two controls into the user interface and configure their display properties, including size, position, visibility, etc. Adjust the layout and set related properties, such as using layout panel to organize control position, setting anchor properties to realize adaptive display, and optimize user operation experience.
[0184] Use C# code to realize data processing and interaction between OCX control and WebView2 control. Read and process table data through C# code, call interface functions of OCX control to operate table data, then pass data to HTML page through interface functions of WebView2 control, finally update ECharts chart by JavaScript function in HTML page, to ensure real-time synchronization and visual display of data between two controls.
[0185] Perform comprehensive function testing and optimization on Winform application. Test table operation function of OCX control, chart display function of WebView2 control and data interaction function between them, use automatic test script and manual test case combination to ensure accuracy and stability of functions. According to test results, optimize performance of application, such as optimizing data loading and rendering algorithm, adjusting interface layout and interaction process, and improving overall system performance.
[0186] Generate detailed user documentation to support user operation of table editor. According to the functions and operation process of the application, automatically generate document framework and basic content, extract comments and interface element description information from code, and integrate them into the document. Add operation step screenshots and sample data to make a picture-text guide, output in multiple formats, and establish index and search function for the document, to facilitate user reference.
[0187] The mixed development high-performance table editor development device related to the application is composed of multiple functional modules. The OCX control encapsulation module is responsible for secondary development of the open source GridControl project and OCX control encapsulation. The table function implementation module is used for integrating the OCX control in the Winform application and realizing the table editing function. The chart function implementation module is responsible for the integration and function implementation of the WebView2 control and ECharts chart. The integration module integrates the OCX control and the WebView2 control into the Winform application. The data processing module realizes the data processing and interaction between the two controls through C# code. The test optimization module comprehensively tests and optimizes the application. The document generation module is responsible for generating user documents. The modules cooperate with each other to ensure the efficiency of the development process and the quality of the software.
[0188] In summary, the application effectively solves the problems of performance, visualization, cross-technology integration and professional data format support existing in the existing table editor. Through mixed development, the high performance of C++ (used for OCX control development), the development efficiency of C# and the rich visualization ability of Web technology (through WebView2 and ECharts) are fully utilized, the low-cost and high-performance table editing and visualization function is realized, the complex needs of professional fields such as engineering simulation and data analysis are met, and the application prospect is wide.
[0189] In an exemplary embodiment, a computer device, which can be a server or a terminal, has an internal structure as shown in Figure 2 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to realize a mixed development table editor development method.
[0190] Those skilled in the art can understand that, Figure 2The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0191] In an exemplary embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps in the above method embodiments when executing the computer program.
[0192] In an exemplary embodiment, a computer readable storage medium is provided, storing a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.
[0193] In an exemplary embodiment, a computer program product is provided, including a computer program, and the computer program implements the steps in the above method embodiments when executed by a processor.
[0194] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0195] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0196] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0197] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0198] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A hybrid development method for a table editor, characterized in that, include: Add a custom column type to the open-source GridControl project to get a customized project; The open-source GridControl project is developed using C++. First, obtain the open-source code of the GridControl project and analyze its core functions and data structure; Use development tools to extend and optimize the functionality of GridControl, including adding custom column types and optimizing data loading speed; Adding custom column types includes: adding names / remarks for each axis through the table properties window; then the system uses tools provided by the .NET Framework to encapsulate the customized GridControl into an OCX control format, ensuring that the control can be correctly registered and used in the target environment; creating test programs, writing unit tests, and verifying whether the various functions of the OCX control are normal; The customized project is integrated into a Winform application, and the interface functions provided by the customized project are called via C# to obtain the control after the call; Load an HTML page using the WebView2 control and integrate ECharts charting functionality to obtain a charting control. Integrate the call-after control and the chart function control using a Winform application; A table editor is obtained by performing data processing and interaction between the called control and the chart function control using C#. By using the WebView2 control to load an HTML page and integrating ECharts charting functionality, a charting control is obtained, specifically including: Obtain the WebView2 control and load its dependencies using NuGet; Write an HTML static page and load the ECharts library into the HTML static page to obtain the page loading item; The WebView2 control is used to load the page loading item, and the chart type and interactive functions are configured using the ECharts JavaScript API to obtain the chart function control; The table editor is obtained by performing data processing and interaction between the called control and the chart function control using C#, specifically including: Use a C# program to monitor changes in the table data in the control after the call; When the table data changes, the table data is converted into JSON format to obtain format-converted data; The format conversion data is transmitted to the corresponding function code on the front end via WebView2, and then converted into the format of the ECharts interface for presentation in the ECharts chart view. At the same time, reverse data flow is implemented, and the user's interactive operations on the chart are passed to C# via JavaScript callback, thereby updating the table data in the OCX control.
2. The hybrid development method for a table editor according to claim 1, characterized in that, The process of adding custom column types to the open-source GridControl project to obtain a customized project specifically includes: Add a custom column type to the open-source GridControl project to get the project after adding it; Optimize the data loading speed of the added project to obtain the optimized project; The optimized project is then encapsulated into an OCX control format to obtain the customized project.
3. The hybrid development method for a table editor according to claim 1, characterized in that, The customized project is integrated into a Winform application, and the interface functions provided by the customized project are called via C# to obtain the control after the call, specifically including: Create a Winform application project; The customized project is added to the Visual Studio toolbox of the Winform application project by registering the command, and its properties and event handlers are set to obtain the customized project. After the settings are configured, the interface function provided by the project is called via C# to obtain the control after the call; the interface function is used to implement the table creation, assignment, style setting and row and column operation functions.
4. The hybrid development method for a table editor according to claim 1, characterized in that, Integrating the call-after control and the chart function control using a Winform application specifically includes: Place the called control and the chart function control on the Winform main form; Coordinate the settings of the post-call control and the chart function control; The communication and interaction between the called control and the chart function control are carried out through the front-end and back-end interaction interface of the WebView2 control.
5. The hybrid development method for a table editor according to claim 1, characterized in that, After the data processing and interaction between the call control and the chart function control are performed via C# to obtain the table editor, the following is also included: Perform functional testing on the table editor; Generate the user manual and help file for the table editor.
6. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the hybrid development method for a table editor according to any one of claims 1-5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the hybrid development method for a table editor as described in any one of claims 1-5.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the hybrid development method for a table editor as described in any one of claims 1-5.