You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

1 month ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.IO;
using System.Text;
using Sog;
namespace bill_statistics
{
public static partial class LogWrapper
{
public static void LogShareFBInfo()
{
FileStream fsFile = new FileStream("./bill_out_shareFB.txt", FileMode.Create);
StreamWriter fileWriter = new StreamWriter(fsFile, Encoding.UTF8);
string strMessage = "Date\t分享总人数\t分享总次数(不包含破产补助)\t破产补助\t登录\t周结算\t社交按钮\t评价";
fileWriter.WriteLine(strMessage);
foreach (KeyValuePair<DateTime, BillInfoEveryDay> pair in BillAlldays.Instance.m_billAllDays)
{
DateTime dateTime = pair.Key;
BillInfoEveryDay info = pair.Value;
strMessage = string.Format("{0}/{1}/{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\t{9}"
, dateTime.Year, dateTime.Month, dateTime.Day
, info.GetShareFBUserCount()
, info.GetShareFacebookCount(info.m_activeUser)
, info.GetShareFBTypeCount(999) //破产补助999比较特殊
, info.GetShareFBTypeCount(1)
, info.GetShareFBTypeCount(2)
, info.GetShareFBTypeCount(3)
, info.GetShareFBTypeCount(4)
);
fileWriter.WriteLine(strMessage);
}
fileWriter.Dispose();
fsFile.Dispose();
}
}
}