public string ToString(bool detail) { string empty = string.Empty; empty += $"{base.ToString()}\n"; AreaTankerModel nonDeploymentTankerCount = GetNonDeploymentTankerCount(); empty += $"海域に未配備の輸送船数:{nonDeploymentTankerCount.GetCount()}(帰港中:{nonDeploymentTankerCount.GetCountMove()})\n"; if (detail) { empty += $"[--海域一覧--]\n"; Dictionary <int, MapAreaModel> area = Area; foreach (MapAreaModel value in area.Values) { SortieManager sortieManager = SelectArea(value.Id); MapModel[] maps = sortieManager.Maps; empty += $"{value} "; foreach (MapModel mapModel in maps) { empty = ((!mapModel.Map_Possible) ? (empty + string.Format("({0}-{1}{2}{3}) ", mapModel.AreaId, mapModel.No, (!mapModel.Cleared) ? string.Empty : "[Clear]", (!mapModel.ClearedOnce) ? string.Empty : "!")) : (empty + string.Format("{0}-{1}{2}{3} ", mapModel.AreaId, mapModel.No, (!mapModel.Cleared) ? string.Empty : "[Clear]", (!mapModel.ClearedOnce) ? string.Empty : "!"))); } empty += "\n"; } empty += $"[--海域一覧--]"; } return(empty); }
public string ToString(bool detail) { string text = string.Empty; text += string.Format("{0}\n", base.ToString()); AreaTankerModel nonDeploymentTankerCount = this.GetNonDeploymentTankerCount(); text += string.Format("海域に未配備の輸送船数:{0}(帰港中:{1})\n", nonDeploymentTankerCount.GetCount(), nonDeploymentTankerCount.GetCountMove()); if (detail) { text += string.Format("[--海域一覧--]\n", new object[0]); Dictionary <int, MapAreaModel> area = this.Area; using (Dictionary <int, MapAreaModel> .ValueCollection.Enumerator enumerator = area.get_Values().GetEnumerator()) { while (enumerator.MoveNext()) { MapAreaModel current = enumerator.get_Current(); SortieManager sortieManager = this.SelectArea(current.Id); MapModel[] maps = sortieManager.Maps; text += string.Format("{0} ", current); for (int i = 0; i < maps.Length; i++) { MapModel mapModel = maps[i]; if (mapModel.Map_Possible) { text += string.Format("{0}-{1}{2}{3} ", new object[] { mapModel.AreaId, mapModel.No, (!mapModel.Cleared) ? string.Empty : "[Clear]", (!mapModel.ClearedOnce) ? string.Empty : "!" }); } else { text += string.Format("({0}-{1}{2}{3}) ", new object[] { mapModel.AreaId, mapModel.No, (!mapModel.Cleared) ? string.Empty : "[Clear]", (!mapModel.ClearedOnce) ? string.Empty : "!" }); } } text += "\n"; } } text += string.Format("[--海域一覧--]", new object[0]); } return(text); }