summaryrefslogtreecommitdiff
path: root/Aktywator/Bws.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-12-28 02:13:55 +0100
committeremkael <emkael@tlen.pl>2017-12-28 02:13:55 +0100
commit511333516d2e08daa9d6b148f5e908d63dc89238 (patch)
tree0b97188580d01b2b42e4515dfca96faebf286cd6 /Aktywator/Bws.cs
parent80cd31c1c8e7cef2cfbf6148df3d9ec2d2a23279 (diff)
parent4f5d46d5a077fa47b44f8987552f7e58a7e2f65d (diff)
Merge branch '1.1-beta' into emkaelv1.1.2.9
Diffstat (limited to 'Aktywator/Bws.cs')
-rw-r--r--Aktywator/Bws.cs21
1 files changed, 9 insertions, 12 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;
}