\r
using System;\r
using System.Collections.Generic;\r
+using System.Globalization;\r
using System.IO;\r
using System.Linq;\r
using System.Text;\r
set => _writer = new LogWriter(value).Write;\r
}\r
\r
+ public static string FormatDateTime(DateTime date)\r
+ {\r
+ return date.ToString(DateTimeFormat, CultureInfo.InvariantCulture);\r
+ }\r
+\r
public Logger(ShipInfo ship, ItemInfo item, BattleInfo battle)\r
{\r
_shipInfo = ship;\r
if ((_logType & LogType.Mission) != 0)\r
{\r
_writer("遠征報告書",\r
- string.Join(",", _nowFunc().ToString(DateTimeFormat),\r
+ string.Join(",", FormatDateTime(_nowFunc()),\r
rstr, json.api_quest_name, string.Join(",", material)),\r
"日付,結果,遠征,燃料,弾薬,鋼材,ボーキ,開発資材,高速修復材,高速建造材");\r
}\r
if ((_logType & LogType.Achivement) != 0 && json.api_get_eo_rate() && (int)json.api_get_eo_rate != 0)\r
{\r
_writer("戦果",\r
- _nowFunc().ToString(DateTimeFormat) + "," + _lastExp + "," + (int)json.api_get_eo_rate,\r
+ FormatDateTime(_nowFunc()) + "," + _lastExp + "," + (int)json.api_get_eo_rate,\r
"日付,経験値,EO");\r
}\r
_map = json;\r
if (entry.api_type != 18)\r
continue;\r
_writer("戦果",\r
- _nowFunc().ToString(DateTimeFormat) + "," + _lastExp + "," + (int)entry.api_count,\r
+ FormatDateTime(_nowFunc()) + "," + _lastExp + "," + (int)entry.api_count,\r
"日付,経験値,EO");\r
break;\r
}\r
-\r
}\r
\r
public void InspectBattle(dynamic json)\r
: (int)result.api_get_exmap_rate;\r
if (rate != 0)\r
{\r
- _writer("戦果", _nowFunc().ToString(DateTimeFormat) + "," + _lastExp + "," + rate,\r
+ _writer("戦果", FormatDateTime(_nowFunc()) + "," + _lastExp + "," + rate,\r
"日付,経験値,EO");\r
}\r
}\r
}\r
var fp = _shipInfo.GetFighterPower(BattleInfo.DeckId(_battle));\r
var fpower = fp[0] == fp[1] ? fp[0].ToString() : fp[0] + "~" + fp[1];\r
- _writer("海戦・ドロップ報告書", string.Join(",", _nowFunc().ToString(DateTimeFormat),\r
- result.api_quest_name,\r
- cell, boss,\r
- result.api_win_rank,\r
- BattleFormationName((int)_battle.api_formation[2]),\r
- FormationName(_battle.api_formation[0]),\r
- FormationName(_battle.api_formation[1]),\r
- result.api_enemy_info.api_deck_name,\r
- dropType, dropName,\r
- string.Join(",", fships),\r
- string.Join(",", eships),\r
- fpower, _battleInfo.EnemyFighterPower.AirCombat + _battleInfo.EnemyFighterPower.UnknownMark,\r
- AirControlLevelName(_battle)),\r
+ _writer("海戦・ドロップ報告書", string.Join(",", FormatDateTime(_nowFunc()),\r
+ result.api_quest_name,\r
+ cell, boss,\r
+ result.api_win_rank,\r
+ BattleFormationName((int)_battle.api_formation[2]),\r
+ FormationName(_battle.api_formation[0]),\r
+ FormationName(_battle.api_formation[1]),\r
+ result.api_enemy_info.api_deck_name,\r
+ dropType, dropName,\r
+ string.Join(",", fships),\r
+ string.Join(",", eships),\r
+ fpower, _battleInfo.EnemyFighterPower.AirCombat + _battleInfo.EnemyFighterPower.UnknownMark,\r
+ AirControlLevelName(_battle)),\r
"日付,海域,マス,ボス,ランク,艦隊行動,味方陣形,敵陣形,敵艦隊,ドロップ艦種,ドロップ艦娘," +\r
"味方艦1,味方艦1HP,味方艦2,味方艦2HP,味方艦3,味方艦3HP,味方艦4,味方艦4HP,味方艦5,味方艦5HP,味方艦6,味方艦6HP," +\r
"敵艦1,敵艦1HP,敵艦2,敵艦2HP,敵艦3,敵艦3HP,敵艦4,敵艦4HP,敵艦5,敵艦5HP,敵艦6,敵艦6HP," +\r
"味方制空値,敵制空値,制空状態"\r
- );\r
+ );\r
_map = _battle = null;\r
_start = false;\r
}\r
{\r
if (_lastDate != DateTime.MinValue)\r
{\r
- _writer("戦果", _lastDate.ToString(DateTimeFormat) + "," + _lastExp + ",0", "日付,経験値,EO");\r
+ _writer("戦果", FormatDateTime(_lastDate) + "," + _lastExp + ",0", "日付,経験値,EO");\r
}\r
- _writer("戦果", now.ToString(DateTimeFormat) + "," + exp + ",0", "日付,経験値,EO");\r
+ _writer("戦果", FormatDateTime(now) + "," + exp + ",0", "日付,経験値,EO");\r
if (isNewMonth)\r
{\r
- _endOfMonth = new DateTime(now.Year, now.Month, DateTime.DaysInMonth(now.Year, now.Month), 22, 0, 0);\r
+ _endOfMonth = new DateTime(now.Year, now.Month, DateTime.DaysInMonth(now.Year, now.Month),\r
+ 22, 0, 0);\r
if (_endOfMonth.CompareTo(now) <= 0)\r
{\r
var days = _endOfMonth.Month == 12\r
return;\r
if (_lastDate != DateTime.MinValue)\r
{\r
- _writer("戦果", _lastDate.ToString(DateTimeFormat) + "," + _lastExp + ",0", "日付,経験値,EO");\r
+ _writer("戦果", FormatDateTime(_lastDate) + "," + _lastExp + ",0", "日付,経験値,EO");\r
}\r
}\r
\r
type = spec.TypeName;\r
}\r
_writer("開発報告書",\r
- _nowFunc().ToString(DateTimeFormat) + "," +\r
+ FormatDateTime(_nowFunc()) + "," +\r
string.Join(",", name, type,\r
values["api_item1"], values["api_item2"], values["api_item3"], values["api_item4"],\r
Secretary(), _basic.api_level),\r
var ship = _shipInfo.GetSpec((int)kdock.api_created_ship_id);\r
var avail = ((dynamic[])json).Count(e => (int)e.api_state == 0);\r
_writer("建造報告書",\r
- _nowFunc().ToString(DateTimeFormat) + "," +\r
+ FormatDateTime(_nowFunc()) + "," +\r
string.Join(",", material.First() >= 1500 ? "大型艦建造" : "通常艦建造",\r
ship.Name, ship.ShipTypeName, string.Join(",", material), avail, Secretary(), _basic.api_level),\r
"日付,種類,名前,艦種,燃料,弾薬,鋼材,ボーキ,開発資材,空きドック,秘書艦,司令部Lv");\r
{\r
_prevTime = now;\r
_writer("資材ログ",\r
- now.ToString(DateTimeFormat) + "," +\r
+ FormatDateTime(now) + "," +\r
string.Join(",", _currentMaterial),\r
"日付,燃料,弾薬,鋼材,ボーキ,高速建造材,高速修復材,開発資材,改修資材");\r
}\r
if (ships.Length >= 2)\r
ship2 = ships[1].Name + "(" + ships[1].Level + ")";\r
_writer("改修報告書",\r
- now.ToString(DateTimeFormat) + "," +\r
+ FormatDateTime(now) + "," +\r
string.Join(",", name, level, success, certain, useName, useNum,\r
diff[(int)Material.Fuel], diff[(int)Material.Bullet], diff[(int)Material.Steal],\r
diff[(int)Material.Bouxite],\r