示例#1
0
 private void AddOption(string key, string value)
 {
     if (value.Length > 0)
     {
         Settings.Add(key, value);
     }
     if (key == "osudir" && File.Exists(Path.Combine(value, "osu!.db")))
     {
         Database    = new OsuDbFile(Path.Combine(value, "osu!.db"), byHash: true);
         ScoresDb    = new ScoresDb(Path.Combine(value, "scores.db"));
         HasDatabase = true;
     }
 }
 private void AddOption(string key, string value)
 {
     if (value.Length > 0)
     {
         Settings.Add(key, value);
         if (key == "osudir" &&
             File.Exists(Path.Combine(value, "osu!.db")) &&
             File.Exists(Path.Combine(value, "scores.db")) &&
             Directory.Exists(Path.Combine(value, "Data", "r")))
         {
             Database         = new OsuDbFile(Path.Combine(value, "osu!.db"), byHash: true);
             ScoresDb         = new ScoresDb(Path.Combine(value, "scores.db"));
             OsuDirAccessible = true;
         }
     }
 }
 public void SetContent(OsuDbFile database)
 {
     this.database = database;
     listBox1.Items.AddRange(database.Beatmaps.ToArray());
 }