Graduation Project-Chapter 3 development methods and system implementation (1)

Source: Internet
Author: User
Tags export class

Chapter 3 development methods and system implementation

Chapter 3Development methods and system implementationThe whole system uses MapObjects + C # Mode Programming, uses MapObjects to display and maintain geographical information, and uses C # To complete map rendering and map data processing and display, you can use this program to process and compute data with an external program.

3.1 Overview of main design attributes and MethodsBecause the system adopts the object-oriented method, you need to customize some classes to implement the corresponding functions. The main system classes in the system are two types, cmapctrol is used to control image operations in MapObjects [4] space. cdataprocess is mainly used to process data. At the same time, global variables must be used throughout the project. These global variables are defined in the Global class and attributes are customized in the global class to return operation values to the program. Global variables are used to store global variables and calibrate the current operation mode. The cmapcontrol class is used to perform operations on a map control after you perform operations on the map control. It supports image plotting, enlarging, downgrading, and translating on a map, adding vertices, pipeline objects, etc. All operations on the image will be implemented in this class. The cdbprocess class is designed for data operations to store data to Windows form controls such as DataGrid. When used, relevant data is called from the corresponding controls for processing. That is, the DataGrid Control is added to store the data generated by the program during intermediate processing. To ensure the overall integrity of the data. The export class allows you to import data. It is convenient for users to store data for subsequent programs. In this class, we noticed that the exported data is encoded differently and may not be correctly identified. Therefore, we use the code attribute in this class to regulate the exported data format stream. For Chinese, the default encoding format is encoding. getencoding ("gb2312"), so that the exported data can be better recognized by Excel. 3.2 Global classThe system needs to record the operation status of the current user and the operation status of the current user in real time. Therefore, an editmodel is set up to indicate the current mode. Because this mode is defined by the developer and identifies different operation statuses, The enum Enumeration type, which is a new type in C # language, is used. Enumeration is a custom data type. When declaring an enumeration, you must specify a group of acceptable instance values that can be included in the enumeration. If, somewhere in the Code, the compiler reports an error if the graph assigns a value out of the acceptable value range to an instance of enumeration. This concept is new for vbprogram elements, while C ++ supports enumeration, but C # enumeration is much more powerful than C ++ enumeration. Creating enumeration types can save a lot of time and reduce the trouble. During the entire program execution process, the program executes different operations according to different modes. This mode is the core of the entire program and cannot be changed. If it is changed to an invalid type, an error is reported when the program is executed. This class is designed to customize 15 possible cases for users. Besides returning errors during execution, the program will automatically convert to the unknown type editmodel, but the program will automatically stop the request of the corresponding user. The member variables and attributes of the global class are shown in Table 3-1 member attributes of the global class: Member attributes of the Table 3-1 Global class
Name Data Type Description
Editmodel Model Current editing mode (global variable)
Message String Display Information of this class (including error information)
Information Info Program Information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.