public void LoadLastStopCount() { this.FailedCount = BattleDBHelper.GetHistoryCount(WowLoginStates.Unknown, WowLoginStates.InvalidPassword, WowLoginStates.NeedCaptcha, WowLoginStates.MissAccount, WowLoginStates.IsNotExist, WowLoginStates.IsNotCurretServerAccount); this.RetryCount = BattleDBHelper.GetHistoryCount(WowLoginStates.IncorrectCaptcha, WowLoginStates.TooManyAttempt); this.SucceedCount = BattleDBHelper.GetHistoryCount(WowLoginStates.SingleGameAccount, WowLoginStates.MultiGameAccount, WowLoginStates.Unbattle_TCB, WowLoginStates.Unbattle_WLK, WowLoginStates.Unbattle_OK, WowLoginStates.Trial, WowLoginStates.LoginWithNoGameAccount); this.UselessCount = BattleDBHelper.GetHistoryCount(WowLoginStates.HttpError, WowLoginStates.SucceedUnknown, WowLoginStates.WebSiteError, WowLoginStates.TimeOut, WowLoginStates.Locked, WowLoginStates.LoginWithEmptyResponse, WowLoginStates.TempDisabled, WowLoginStates.TestAccountOutOfExpire, WowLoginStates.PermanentDisabled, WowLoginStates.AuthenticatorCode, WowLoginStates.Frozen); }
private void DisposeLastFileExporter() { if (null != this.fileExporter) { this.fileExporter.Dispose(); this.fileExporter = null; } BattleDBHelper.SaveCacheData(); }
public virtual void Output(UserAccountItem userItem) { lock (output) { if ((null != userItem)) { BattleDBHelper.InsertHistory(userItem); BattleDBHelper.InsertQueriedItems(userItem); StreamWriter sw = GetStreamWriter(userItem); string content = userItem.ToString(); this.Output(content, sw); this.WriteRawData(userItem); this.OutputByRegion(userItem); } } }
protected override void LoadFile() { try { if ((null == this.HttperParamsItem) || (string.IsNullOrEmpty(this.HttperParamsItem.DataFilePath))) { return; } this.accountList.Clear(); this.TotalCount = 0; using (StreamReader sr = new StreamReader(this.HttperParamsItem.DataFilePath)) { while (!sr.EndOfStream && !isDisposed) { PwdResetItem item = TextToItemHelper.GetPwdResetItem(sr.ReadLine(), this.HttperParamsItem.DataFormat, WowLogManager.Instance); if (null != item) { item.Index = ++this.TotalCount; this.accountList.Add(item); } if (this.TotalCount % 10 == 0) { this.SetAutoResetEvent(false); Application.DoEvents(); } } } } finally { if (accountList.Count == 0) { LogManager.InfoWithCallback("-> 请检查数据文件的格式是否正确,当前格式无法解析EMAIL、姓名!!!!"); this.IsFinished = true; } BattleDBHelper.SaveCacheData(); LogManager.InfoWithCallback("-> 完成数据从文件提取,正在开始网络查询!"); this.SetAutoResetEvent(true); } }