Learn to use an item manager
In this lecture you will learn to use the item manager. The item manager is a great tool to manage your data classes. It will take care of persistent storage, selection, event management and can be used for many other neat features. You will significantly be more efficient with coding if you master the item manager.
Create an item manager class to keep a list!
The following video shows you how to use the item manager to manage your data classes created in the previous lecture.
Learn what a singleton instance is!
The purpose of a singleton instance is that only one instance of a class exists during the running of the application. If there is an application with multiple threads, the locking procedure helps to prevent to be multiple instances of a class.
Make your item manager persistent!
The previous video and the following figure shows you how to save your data to your storage. In this case, an xml file will be generated in the c:\Program Files\Ozeki\Ozeki10\Data\BarrierControl folder with the License_ prefix. It will keep the license plate number and the automatically generated timestamp. The Task 4 will show you how to add it manually with your app.
Save an item in the item manager!
You can add an item to the item manager through its singleton instance. You need to use the Add method of the class.
More information
- Créez votre première application en C#.Net
- Envoyez des messages depuis votre application C#.Net à votre robot Lego
- Recevez des messages de votre robot et gérez les événements
- Convertissez une application SNAP en C#
- Créez une interface utilisateur pour plusieurs robots
- Créez une version C#.Net de l'application de contrôle de barrière
- Créez une interface utilisateur réactive pour différentes tailles d'écran
- Créez une classe de données
- Apprenez à utiliser un gestionnaire d'éléments
- Grilles et formulaires générés automatiquement