示例#1
0
 public static Configuration GetConfiguration()
 {
     Configuration config = new Configuration("Configuration");
     var soundList = DataBaseService.Current.Db.Table<SoundInfo>().ToList();
     int maxId = -1;
     foreach (SoundInfo sound in soundList)
     {
         Player p = new Player(new Uri(sound.Uri, UriKind.Relative));
         config._mappings.Add(sound.Id, p);
         config._soundsInfo.Add(sound);
         if (sound.Id > maxId)
         {
             maxId = sound.Id;
         }
     }
     SoundService.Current.SetLastSoundId(maxId + 1);
     return config;
 }
示例#2
0
 private void LoadConfiguration()
 {
     Configuration.CheckNewSoundInConfig(XDocument.Load("Configuration.xml").Root.Elements().First());
     _config = Configuration.GetConfiguration();
 }