private void UpdateLogFoldersInfo() { Userfolder = new FFXIVUserFolder(FFXIVUserFolder.DefaultUserFolderPath); CharacterFolder[] chFolders = Userfolder.GetCharacterFolders(); fF14FastReportDataSet.CharactorFolder.Clear(); foreach (CharacterFolder cf in chFolders) { fF14FastReportDataSet.CharactorFolder.AddCharactorFolderRow(cf.FolderName, cf.FolderFullPath, cf.CharacterName, cf.ServerName, cf.LastLoginTimeFromLogFile, cf.LastPlayTimeFromLogFile); } }
private void InitializeData() { LogCount = 0;//カウントを0にする int logcount = logmemoryInfo.GetLogCount(); FF14LogParser _actionReport = new FF14LogParser(); if (logcount > 1000) {//ファイルからよまないとね SetStatus("ログファイルからデータを読み込んでいます。0/"+logcount +"行"); FFXIVUserFolder userfolder = new FFXIVUserFolder(); CharacterFolder playnow = null; foreach(CharacterFolder cf in userfolder.GetCharacterFolders()) { if(playnow==null)playnow =cf; if (cf.LastPlayTimeFromLogFile > playnow.LastPlayTimeFromLogFile) { playnow = cf; } } List<FFXIVLog> LogsFromFile = new List<FFXIVLog>(); logcount = logmemoryInfo.GetLogCount(); if (playnow.LastPlayTimeFromLogFile > FFXIVLog.StartDateTime) { int filenum = 0; while(filenum < logmemoryInfo.GetLogCount()/1000) { foreach (FFXIVLog log in FFXIVLogFileReader.GetLogsFromFile(playnow.GetLogFilePath(filenum))) { _actionReport.Add(log); } filenum++; SetStatus("ログファイルからデータを読み込んでいます。"+filenum+"000/" + logcount + "行"); } } SetStatus("メモリからログを読み込んでいます。"); foreach (byte[] data in logmemoryInfo.GetNewLogsData()) { _actionReport.Add(FFXIVLog.ParseSingleLog(data)); } } actionReport = _actionReport; SetFormActionReport(); SetLogCount(); //rankingForm.report.SetActionReport(actionReport); }