From c3be44ed94e61c3c4bb6a69f0db891580ee7a037 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 22 Aug 2017 13:13:08 +0200 Subject: Filling empty player names with spaces so that "name n/a" message is not displayed in the bridgemate --- Aktywator/ParyTournament.cs | 4 ++-- Aktywator/RRBTournament.cs | 6 +++--- Aktywator/TeamyTournament.cs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Aktywator/ParyTournament.cs b/Aktywator/ParyTournament.cs index 9a592d7..f467119 100644 --- a/Aktywator/ParyTournament.cs +++ b/Aktywator/ParyTournament.cs @@ -39,13 +39,13 @@ namespace Aktywator { pairs.Add(pairNo, new List()); } - pairs[pairNo].Add(dbData.IsDBNull(1) ? "" : dbData.GetString(1)); + pairs[pairNo].Add(dbData.IsDBNull(1) ? " " : dbData.GetString(1)); } foreach (KeyValuePair> pair in pairs) { while (pair.Value.Count < 2) { - pair.Value.Add(""); + pair.Value.Add(" "); } } dbData.Close(); diff --git a/Aktywator/RRBTournament.cs b/Aktywator/RRBTournament.cs index 20a3c21..a86e199 100644 --- a/Aktywator/RRBTournament.cs +++ b/Aktywator/RRBTournament.cs @@ -63,14 +63,14 @@ namespace Aktywator { if ("pauza".Equals(player.InnerText.Trim())) { - names[pairNo].Add(""); + names[pairNo].Add(" "); } else { string[] name = player.InnerText.Trim().Split(' '); if (name.Length > 0) { - name[0] = (name[0].Length > 0) ? name[0][0].ToString() : ""; + name[0] = (name[0].Length > 0) ? name[0][0].ToString() : " "; } names[pairNo].Add(String.Join(" ", name)); } @@ -81,7 +81,7 @@ namespace Aktywator { while (pair.Value.Count < 2) { - pair.Value.Add(""); + pair.Value.Add(" "); } } return names; diff --git a/Aktywator/TeamyTournament.cs b/Aktywator/TeamyTournament.cs index 7bc3496..78ce0e0 100644 --- a/Aktywator/TeamyTournament.cs +++ b/Aktywator/TeamyTournament.cs @@ -35,8 +35,8 @@ namespace Aktywator while (dbData.Read()) { List names = new List(); - names.Add(dbData.IsDBNull(1) ? "" : dbData.GetString(1)); - names.Add(""); + names.Add(dbData.IsDBNull(1) ? " " : dbData.GetString(1)); + names.Add(" "); teams.Add(dbData.GetInt32(0), names); } dbData.Close(); -- cgit v1.2.3