static void BuildDataBase1()
 {
     DataBase dataBase = new DataBase(new LongHash());
     dataBase.BuildDataBase(@"D:\Music\");
     dataBase.Save(@"D:\Music\Avatar\DataBase.txt");
     Utility.ShutDown();
 }
        static void BuildDataBase(string dataFolder, IHashMaker hashMaker, string dataBaseFile, bool shutDown)
        {
            if (!Directory.Exists(dataFolder))
            {
                WriteLog(string.Format("'{0}' doesn't exist! ", dataFolder));
                return;
            }

            DataBase dataBase = new DataBase(hashMaker);
            dataBase.BuildDataBase(dataFolder);
            dataBase.SaveInBinary(dataBaseFile);
            if (shutDown)
                Utility.ShutDown();
        }
        static void AppendData(string indexFile, IHashMaker hashMaker, string dataFolder)
        {
            if (!Directory.Exists(dataFolder))
            {
                WriteLog(string.Format("'{0}' doesn't exist! ", dataFolder));
                return;
            }

            if (!File.Exists(indexFile))
            {
                WriteLog(string.Format("'{0}' file doesn't exist! ", indexFile));
                return;
            }

            DataBase dataBase = new DataBase(hashMaker);
            dataBase.CheckDuplicate = true;
            dataBase.Load(indexFile);
            dataBase.BuildDataBase(dataFolder);
            dataBase.Save(indexFile);
        }