Beispiel #1
0
 public static RecordDatabase getInstance()
 {
     if (instance == null)
     {
         instance = XmlDatabaser.loadDatabase <RecordDatabase>(DatabaseName);
     }
     return(instance);
 }
        public static int saveRacerRecord(TrackRecordList list, RecordData racer)
        {
            int ret = list.addRecord(racer);

            RecordDatabase db        = RecordDatabase.getInstance();
            String         saveError = XmlDatabaser.saveDatabase(RecordDatabase.DatabaseName, db);

            if (saveError != null) //Save succeeded
            {
                MessageBox.Show(saveError, "Ant+ Racer Database Error");
            }

            return(ret);
        }