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

A MEDIA PLAYLIST LIST APPLICATION

The next three sections will cover implementing the tracks functionality as a text file and as an XML file instead of using a database file to store and retrieve the data:

  • This section outlines the tracks class that is used to programmatically implement much of the required functionality.
  • The next section shows how to store and retrieve the data as a text file and as an XML file.
  • The following section shows how to implement all of this as a Managed Code console application.
  • The later sections of this chapter implement the same store and retrieve functions using a remote SQL Server and using a SQL Compact database file.

There are many high-level libraries to programmatically serialize program data into text, binary, and XML formats to store it and also to read it back in as meaningful information. In this section you look at the application requirements for the playlist that accept the save and load functions. The List functionality used here could be applied to any list structured data application and is independent of the method to store and retrieve the data.

To handle the playlist in a program, you start with a class called track, which encapsulates all the programming features of an individual track, such as the fields and methods to manipulate the track:

image
//The track class [Serializable()] public class track { public track() { } public track(string ...

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