Пример #1
0
 public ReSortieBarViewModel(Fleet fleet)
 {
     var minCondition = fleet.GetShips().Select(s => s.Condition).Min();
     if (minCondition >= 40)
     {
         this.CanReSortie = true;
     }
     else
     {
         this.period = DateTimeOffset.Now.Add(TimeSpan.FromMinutes(40 - minCondition));
     }
 }
Пример #2
0
 /// <summary>
 /// 指定した艦隊に、現在入渠中の艦娘がいるかどうかを確認します。
 /// </summary>
 public bool CheckRepairing(Fleet fleet)
 {
     var repairingShipIds = this.Docks.Values.Where(x => x.Ship != null).Select(x => x.Ship.Id).ToArray();
     return fleet.GetShips().Where(x => x != null).Any(x => repairingShipIds.Any(id => id == x.Id));
 }