public static List <RomInformation> GetAllRomList() { List <RomInformation> lAllRomInfo = BQDB.GetAllGameInfo(); foreach (var romInfo in lAllRomInfo) { romInfo.ExpandInfo.LargeIcon = BQIO.GetRomLargeIco(romInfo); romInfo.ExpandInfo.SmallIcon = BQIO.GetRomSmallIco(romInfo); } return(lAllRomInfo); }
public static void UpdateRomInfoToDB(RomInformation pRomInfo) { RomInformation lTempRomInformation = BQDB.GetGameInfo(pRomInfo.BasicInfo.Serial); if (lTempRomInformation != null) { if (MergeRomInfo(pRomInfo, lTempRomInformation)) { BQDB.UpdateGameInfo(pRomInfo.BasicInfo); } } else { BQDB.InsertRomInfo(pRomInfo.BasicInfo); } }
public static void Initialize() { // initialize components _RomParserList = Assembly.Load("BQRomParsers").GetTypes() .Where(elementClass => typeof(IRomParser).IsAssignableFrom(elementClass)).Select(type => (IRomParser)Activator.CreateInstance(type)).ToList(); _RomInfoNetCrawlerList = Assembly.Load("BQNetCrawlers").GetTypes() .Where(elementClass => typeof(IRomInfoNetCrawler).IsAssignableFrom(elementClass)).Select(type => (IRomInfoNetCrawler)Activator.CreateInstance(type)).ToList(); // initialize work folder BQDirectory.Initilize(); // Check3dsdb try { BQLog.UpdateProgress("初始化Rom信息", 2, 5); if (!BQ3dsdbXML.Check3dsdb()) { BQ3dsdbXML.Update3dsdbXMLFile(); } } catch (Exception ex) { throw new BQException() { Source = ex.Source, BQErrorMessage = "Update DB Error" }; } try { BQLog.UpdateProgress("初始化Rom数据库", 3, 5); // CheckDB if (!BQDB.CheckDBExist()) { BQDB.CreateNewDB(); List <RomInformation> AllRomInfoList = BQ3dsdbXML.GetAllRomInfo(); BQDB.InsertRomInfoList(AllRomInfoList); } } catch (Exception ex) { throw new BQException() { Source = ex.Source, BQErrorMessage = "Update DB Error" }; } }
public static List <RomInformation> InitializeFirstRomList() { List <RomInformation> lAllRomInfo = new List <RomInformation>(); List <string> lRomSerialList = BQIO.GetAllRomFileFromLocal(); for (int i = 0; i < lRomSerialList.Count; i++) { RomInformation lRomInformation = BQDB.GetGameInfo(lRomSerialList[i]); if (lRomInformation != null) { lAllRomInfo.Add(lRomInformation); } } foreach (var romInfo in lAllRomInfo) { romInfo.ExpandInfo.LargeIcon = BQIO.GetRomLargeIco(romInfo); romInfo.ExpandInfo.SmallIcon = BQIO.GetRomSmallIco(romInfo); } return(lAllRomInfo); }