OSDN Git Service

何戦目の表示が10以上のときに:になるのを直す
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Thu, 26 Dec 2019 10:07:41 +0000 (19:07 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Thu, 26 Dec 2019 10:07:41 +0000 (19:07 +0900)
KancolleSniffer/Model/CellInfo.cs

index 103cf98..fe5fcdb 100644 (file)
@@ -12,6 +12,8 @@
 // See the License for the specific language governing permissions and\r
 // limitations under the License.\r
 \r
+using System.Linq;\r
+\r
 namespace KancolleSniffer.Model\r
 {\r
     public class CellInfo : Sniffer.IPort\r
@@ -102,6 +104,8 @@ namespace KancolleSniffer.Model
             }\r
         }\r
 \r
-        private string BattleCount => ((char)('0' + _battleCount)).ToString();\r
+        private static readonly char[] FullNumber ="0123456789".ToCharArray();\r
+\r
+        private string BattleCount => new string(_battleCount.ToString().Select(ch => FullNumber[ch - '0']).ToArray());\r
     }\r
 }
\ No newline at end of file