summaryrefslogtreecommitdiff
path: root/Aktywator
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-12-28 01:24:02 +0100
committeremkael <emkael@tlen.pl>2017-12-28 01:24:02 +0100
commitbcad5e05ec264e551e1b9a4879b90cfb1c9754cc (patch)
tree0a199eb78e30ebb4b3a9fc71a3f59cd395e37413 /Aktywator
parentbafe17f105fabce8fc13f592accdf629102c22f4 (diff)
Fix for #27 - incorrect names for multiple BWS sections
Diffstat (limited to 'Aktywator')
-rw-r--r--Aktywator/Bws.cs21
-rw-r--r--Aktywator/Resources/BuildDate.txt2
2 files changed, 10 insertions, 13 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs
index 9dedb84..e589418 100644
--- a/Aktywator/Bws.cs
+++ b/Aktywator/Bws.cs
@@ -624,10 +624,7 @@ namespace Aktywator
while (d.Read())
{
- if ("*".Equals(section))
- {
- section = this.getBWSNumber(d, 0).ToString();
- }
+ string pairSection = "*".Equals(section) ? this.getBWSNumber(d, 0).ToString() : section;
string table = this.getBWSNumber(d, 1).ToString();
int ns = this.getBWSNumber(d, 2);
int ew = this.getBWSNumber(d, 3);
@@ -638,14 +635,14 @@ namespace Aktywator
{
throw new KeyNotFoundException(ns.ToString());
}
- countNew += updateName(section, table, "N", names[ns][0]);
- countNew += updateName(section, table, "S", names[ns][1]);
+ countNew += updateName(pairSection, table, "N", names[ns][0]);
+ countNew += updateName(pairSection, table, "S", names[ns][1]);
count += 2;
if (tournament.type == Tournament.TYPE_TEAMY)
{
- countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "E",
+ countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "E",
names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ns + TeamNamesSettings.OpenClosedDiff][0] : names[ns][0]);
- countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "W",
+ countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "W",
names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ns + TeamNamesSettings.OpenClosedDiff][1] : names[ns][1]);
count += 2;
}
@@ -667,14 +664,14 @@ namespace Aktywator
{
throw new KeyNotFoundException(ew.ToString());
}
- countNew += updateName(section, table, "E", names[ew][0]);
- countNew += updateName(section, table, "W", names[ew][1]);
+ countNew += updateName(pairSection, table, "E", names[ew][0]);
+ countNew += updateName(pairSection, table, "W", names[ew][1]);
count += 2;
if (tournament.type == Tournament.TYPE_TEAMY)
{
- countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "N",
+ countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "N",
names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ew + TeamNamesSettings.OpenClosedDiff][0] : names[ew][0]);
- countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "S",
+ countNew += updateName(pairSection, (int.Parse(table) + SKOK_STOLOW).ToString(), "S",
names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ew + TeamNamesSettings.OpenClosedDiff][1] : names[ew][1]);
count += 2;
}
diff --git a/Aktywator/Resources/BuildDate.txt b/Aktywator/Resources/BuildDate.txt
index df14300..0417c53 100644
--- a/Aktywator/Resources/BuildDate.txt
+++ b/Aktywator/Resources/BuildDate.txt
@@ -1 +1 @@
-2017-12-16
+2017-12-28