Zookeeper
C # is a development language based on. NET Framework. In Windows Embedded Compact 7, C # is developed based on. NET Compact Framework.
. NET Compact Framework (. net cf) is a subset of Microsoft. NET Framework. It is designed to provide application development support for Windows CE platform operating systems on Mobile devices.
Currently, the latest version of. NET Compact Framework is 3.5. It can run in the operating systems of Mobile devices of Windows CE 6.0, Windows Mobile 6.0, Windows Mobile 6.1, Windows Mobile 6.5, and Windows Embedded Compact 7.
14.1 build a c # Application Based on Windows Embedded Compact 7
. NET Compact Framework is a hardware-independent environment used to run programs on computing devices with limited resources. It inherits the complete. NET Framework Structure During the runtime of the public language, supports a subset of. NET Framework class libraries, and contains classes designed specifically for. NET Compact Framework. Supported devices include: Personal Data assistant (PDA) (such as Pocket PC), mobile phone, set-top box, automotive computing device, and Microsoft Windows CE installed. A custom embedded device of the. NET operating system.
NET Compact Framework is an application development platform specially designed to load Windows CE and Windows Mobile operating systems.. NET Framework can run the code in. NET Compact Framework, such as System. net. the WebClient type is in. NET Compact Framework does not exist. Developers must use the HttpWebRequest and HttpWebResponse types to rewrite the functions originally provided by WebClient.
The number of Base Class libraries in. NET Compact Framework is smaller than that in. NET Framework.
. NET Compact Framework 1.0 was created in 2003. NET Framework 1.1 is released together. It supports Windows CE 4.2, Pocket PC 2002-2003 (including SE), and Smartphone 2002-2003 (including SE). The development tool is Visual Studio. NET 2003.
. NET Compact Framework 2.0 was released together with. NET Framework 2005 In 2.0. It supports Windows CE 5.0, Windows Mobile 5.0 (both Pocket PC and Smartphone are supported), and the development tool is Visual Studio 2005.
. NET Compact Framework 3.5 was released together with. NET Framework 2007 by the end of 3.5. It supports Windows CE 6.0 and Windows Mobile 6.0 operating systems, and the development tool is Visual Studio 2008.
Only Visual Studio Professional and later versions are available. the Smart Device project type required for NET Compact Framework application development, which is not available in Visual Studio Standard and Visual Studio Express series development tools.
First, develop the C # application in Windows Embedded Compact 7. NET Compact Framework support. Add the support under 14.1 to Catalog Item View in the OS for building Windows Embedded Compact 7.
<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHAgY2xhc3M9 "p0"> figure 14.1 add NET Compact Framework 3.5 support
Next, let's develop a Windows Embedded Compact 7 Application.
First, create a CsharpCE7Demo project, and select SmartDevice as the template. 14.2.
Figure 14.2 create a CsharpCE7Demo Application
The following prompt box appears during creation. Select Windows CE template, 14.3
Figure 14.3 select a WindowsCE Template
After the creation is successful, the following page is displayed: 14.4
Figure 14.4 created Program Interface
We add two buttons, two textbox as follows, 14.5
Figure 14.5 program interface after adding a control
Insert the following code,
Private void button#click (object sender, EventArgs e)
{
This. textBox1.Text = "";
}
Private void button2_Click (object sender, EventArgs e)
{
This. textBox2.Text + = this. textBox1.Text;
}
Copy the generated program to the shared directory of Windows Embedded Compact 7 and choose to run csharpce7demo.exe. 14.6
Figure 14.6 run the debugging program
And then run it, 14.7
Figure 14.7
Click button1 to view the code running effect.
Figure 14.8 program Effect
Click "button3" in a row to see the running effect. 14.9
Figure 14.9 program Effect