Navi.Soft20.WinCE User Manual

Source: Internet
Author: User

1. Overview 1.1 Application Scenarios

With the popularity of the internet of things, more and more manufacturers of goods from raw materials, processing, production, sales and other aspects of the requirements and control of the high-level. In this case, the traditional ERP software has been unable to meet the existing process.

The application of mobile devices, to a large extent, to compensate for the shortcomings of the traditional ERP software, in the Internet of things, also plays a very important role.

Mobile devices currently include the Microsoft WinCE system, Google's Android system and Apple's iOS system. Android and iOS systems are now widely used in personal consumption, but not in the field of application software at present. WinCE system debut earlier, also belong to the noble. There are many applications developed in this system

In this context, a set of frameworks based on the Microsoft WinCE system is developed for program developers to use

1.2 Object-oriented

NET program Developers

1.3 Development environment

This framework consists of 2 parts

Program Name

Development environment

Describe

Winceap P

vs2008+standard_sdk.msi+

Must be a VS2008 and WinCE project development package. Note: The development package must be installed or the WinCE project cannot be created

Winceservice

VS2010 or above

The creation of the project type is WebService. Create the WebService project type must be Net3.5, and then upgrade to 4.0 once the creation is successful

1.4 Framework Features

Short, easy to understand, simple to get started

Use WebService bridging client and database, common interface, can be used for both NET and Java

Operation data using ORM to reduce the chance of error

Unified error Trapping mechanism

2 Solution 2.1WinCEService Project 2.1.1 Overview

The server is dominated by webservice and used to interact with wince. WinCE software, according to the business logic code, splicing good data to be uploaded to the database, through the service side of the WebService program, saved to the database. Implement wince system and database interaction

The server-side program currently supports 2 types of data sources, SQL and Oracle. The data is transferred with the client through a dataset or a DataTable.

2.1.2 Source Structure

-1 shown

Figure-1

Wincewebservice

This project is a WebService type project. Provides various actions to interact with the database

Provider folder: Provides operations on each database. Where the Oracle operation is using the Oracle.DataAccess.dll file. Not Microsoft

The Wincewebservice1.asmx file is used to implement the WebService operation. The method contains the following:

Method name

Describe

Testconnectwebservice

Test whether the connection WebService service was successful

Testconnectdatabase

Test the success of the database in the connection WebService. Note: Database connection strings are modified in the Web. config file

Getdatatable

Get the dataset based on the SQL statement

Execsqlscalar

Gets the single-row single-row value based on the SQL statement. Number of data in a table

Execsqlstring

Execute SQL statements, such as insert,update,delete statements

Execsqlstringbytrans

Bulk execution of SQL statements, such as Insert,update,delete statement lists

Submituploaddataset

Submit data uploaded from the wince client. This method is a reserved method and can be used without

Web. config

This file is a configuration file that is used to configure the database type and connection string. Configuration-2

Figure-2

Wincewebservicetest

This project is dedicated to testing Wincewebservice programs. The test page has only one

This project requires the introduction of the WebService Project, which, in the reference process, is best chosen to refer to WebService from this solution, and the benefit is that it can be debugged directly.-3 shows

Figure-3

Pagetestwebservice.aspx

On the test page, create several buttons. Call the method in WebService, respectively. -4 and Figure 5

Figure-4

Figure-5

If the test is successful, the prompt-6 page

Figure-6

2.2WINCEAPP Project 2.2.1 Overview

The client is a wince-type project, an application running on a wince device that communicates with the database through WebService interactions generated by the Winceservice side, and currently supports SQL Server and Oracle databases.

In the client application, using ORM to manipulate the data, discard the ADO data structure of the DataTable, so as to reduce errors in the process of data operation, such as conversion between data types, attribute assignment values, etc.

2.2.2 Source Structure

Figure-7

QH. Core Project

Figure-8

Core class library, store a variety of common methods, common interface and so on. Is the foundation of all projects

Base folder, which stores basic class files. such as entity base class, help base class, etc.

Component folder, the storage component base class. Currently only includes database components

root folder, which stores various helper classes. such as DataTable Object helper class, String Object helper class, etc.

QH.Component.DataBase

Figure-9

Database components, which currently support operations on SQLite databases while translating entity classes into SQL statements for SQL Server and Oracle databases, to save business entities to a database, via WebService

QH. Control.wince

Figure-10

Stores operations on wince common controls. such as the ComboBox drop-down menu data source load, check the value and assignment of the item. The grid list control's data source is loaded, and so on. The code is simple and no longer described

QH. Utility.wince

Figure-11

Encapsulation of the various functions of the device, as well as the encapsulation of the webservice. WinCE equipment is mainly used for a variety of scanning, including RFID tag scanning and barcode description, and each device, because the model, the manufacturers are not the same, they are implemented in different ways. Here, set a common interface and factory and, To complete the scanning function

Current features include barcode scanning and RFID tag scanning. Note: Project File Description Please refer to: ReadMe file

QH. Example.wince

Figure-12

This project includes login and Main page, which can be used directly. The App.Config.xml file is a description of the application's various configuration options, such as the WebService address. Device Encoding, etc.

Base Folder

Formbase for all page base classes, the main function is to enable the scanning of barcodes and RFID tags, directly encapsulated in the base class page

Formexception for application exception Capture page, call this page to display error message when the system encounters an exception

Business folders

The AppManager class is an application helper class for storing common SQL statements, verifying login information, etc.

Entities folder

Stores the entity classes used by the application. such as Pm_user represents the user table entity class

Form Folder

Storage Application Business Page

Images folder

Pictures used by the store application

App.Config.xml

Application Configuration Items

Figure-13

    • Devcode: Indicates device encoding
    • Devtype: Indicates the device type. Includes real device models and virtual devices (virtual keywords). The VR device represents the simulated real-world device function, and the application can run without the real device
    • DebugMode: Debug mode. The value is true or flase. If true, indicates that debug mode is turned on
    • Wsurl:webservice Address
    • Sqlitefilename:sqlite Database file name

Formframe and Formlogon class

System main Page and login page

Figure-14

Figure-15

Other pages

Figure-16

Figure-17

3. Source code parsing and parsing 1

Figure-18

Parsing 2

Figure-19

Parsing 3

Figure-20

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.