示例#1
0
        /// <summary>
        /// 清除AccountLog.txt
        /// </summary>
        /// <returns></returns>
        private void ClearAccountLog()
        {
            string strAccountLogPath = System.Environment.CurrentDirectory + @"\Setting\AccountLog.txt";

            var lst = ConsoleFile.ReadFile_By_Path(strAccountLogPath);

            lst.RemoveAll(v => GetAccountLogDateTime(v) > 7 * 24);

            ConsoleFile.SaveFile_By_Path(strAccountLogPath, lst);
        }
示例#2
0
        /// <summary>
        /// 清除PlayerDaily.txt
        /// </summary>
        private void ClearPlayerDaily()
        {
            string strPlayerDailyPath = System.Environment.CurrentDirectory + @"\Setting\PlayerDaily.txt";

            var lst = ConsoleFile.ReadFile_By_Path(strPlayerDailyPath);

            lst.RemoveAll(v => GetPlayerDailyTime(v) > 7 * 24);

            ConsoleFile.SaveFile_By_Path(strPlayerDailyPath, lst);
        }
示例#3
0
        /// <summary>
        /// 清除TaskUpgradeSchedule.txt
        /// </summary>
        private void ClearTaskUpgradeSchedule()
        {
            string strTaskUpgradeSchedulePath = System.Environment.CurrentDirectory + @"\Setting\TaskUpgradeSchedule.txt";
            var    lst = ConsoleFile.ReadFile_By_Path(strTaskUpgradeSchedulePath);

            if (lst.Count > 30)
            {
                // 将前面的20条删了
                lst.RemoveRange(0, 20);
                ConsoleFile.SaveFile_By_Path(strTaskUpgradeSchedulePath, lst);
            }
        }