O'Reilly logo

Professional Windows® Embedded Compact 7 by Thierry Joubert, David Jones, Samuel Phung

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BUILDING THE MANAGED CODE DATA APPLICATION (TEXT AND XML)

To implement the PlaylistConsole Application, you need a Smart Device C# Application that uses .NET CF 3.5. You create a console application and add the previous Playlist functions. To the previous code implement the main() function and add a further function, as shown next.

You need a Retail mode Compact 7 device with the Compact Framework 3.5 component. Refer to Chapter 9, “Debug and Remote Tools,” to see how to build, deploy, and test a Managed Code application on a Compact device. Your device also needs to have been built with the Managed SQL Compact component:

  • Create a C# SmartDevice Console Compact Framework 3.5 application called PlayListConsole.
  • The following is the shell of the program for the program. It is used for the CSV Text File and Serialization implementations of the data storage as well as for SQL Server and SQL Compact access. Replace the console program code with the following:
image
using System; using System.IO; using System.Collections.Generic; using System.Data; using System.Linq; //XML Serialization: //Uncomment the next line //using System.Xml.Serialization; //Remote SQL: //Add a reference to System.Data.SQLClient //Uncomment the following: //using System.Data.SqlClient; //SQLCompact: //Add a reference to System.Data.SQLServerCe //Uncomment the next line //using System.Data.SqlServerCe; public static ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required