+ private Record CreateShipRecord(ShipStatus ship)\r
+ {\r
+ var param = " Lv" + ship.Level +\r
+ " 加重" + ship.EffectiveAntiAirForShip.ToString("d") +\r
+ AntiAirPropellantBarrageChance(ship);\r
+ var name = ship.Name;\r
+ var realWidth = Scaler.ScaleWidth(ListForm.PanelWidth - 10);\r
+ return new Record\r
+ {\r
+ Ship = StringTruncator.Truncate(name, param, realWidth, GetFont(name)) + param,\r
+ Id = ship.Id\r
+ };\r
+ }\r
+\r
+ private Record CreateAntiAirRecord(double[] forFleet, ShipStatus ship)\r
+ {\r
+ var rate = ship.EffectiveAntiAirForShip / 4.0;\r
+ var diff = forFleet.Select(x => (x + ship.EffectiveAntiAirForShip) / 10.0);\r
+ return new Record\r
+ {\r
+ Rate = "割合" + rate.ToString("f1") + "% ",\r
+ Diff = "固定" + string.Join("/", diff.Select(d => d.ToString("f1")))\r
+ };\r
+ }\r
+\r
+ private static Font GetFont(string name)\r
+ {\r
+ return ShipLabel.Name.StartWithLetter(name)\r
+ ? ShipLabel.Name.LatinFont\r
+ : ShipLabel.Name.BaseFont;\r
+ }\r
+\r
+ private static string AntiAirPropellantBarrageChance(ShipStatus ship)\r
+ {\r
+ // ReSharper disable once CompareOfFloatsByEqualityOperator\r
+ if (ship.AntiAirPropellantBarrageChance == 0)\r
+ return "";\r
+ var chance = ship.AntiAirPropellantBarrageChance;\r
+ return " 弾幕" + (chance < 100 ? chance.ToString("f1") : ((int)chance).ToString());\r
+ }\r
+\r