From 3f8a7b70a7100261c0ef2b462bc3cbb5705e0e33 Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 24 Jul 2019 22:58:15 +0200 Subject: Bugfix for names from line-up in teams Fixes michzimny/aktywator#56 --- Aktywator/Bws.cs | 11 +++++++++-- Aktywator/Resources/BuildDate.txt | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 36ef372..126a60f 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -733,6 +733,13 @@ namespace Aktywator } pairs[sectionNumber].Add(new PairPosition { pairNo = nsPairNumber, position = "NS", table = tableNumber }); pairs[sectionNumber].Add(new PairPosition { pairNo = ewPairNumber, position = "EW", table = tableNumber }); + if (tournament.type == Tournament.TYPE_TEAMY && MainForm.teamNames.arePlayerNamesDisplayed()) + { + sectionPairs[sectionNumber].Add(nsPairNumber + TeamNamesSettings.OpenClosedDiff); + sectionPairs[sectionNumber].Add(ewPairNumber + TeamNamesSettings.OpenClosedDiff); + pairs[sectionNumber].Add(new PairPosition { pairNo = nsPairNumber + TeamNamesSettings.OpenClosedDiff, position = "EW", table = tableNumber + SKOK_STOLOW }); + pairs[sectionNumber].Add(new PairPosition { pairNo = ewPairNumber + TeamNamesSettings.OpenClosedDiff, position = "NS", table = tableNumber + SKOK_STOLOW }); + } } d.Close(); @@ -833,13 +840,13 @@ namespace Aktywator PairPosition pair = pairs[sections.Key].Find(delegate(PairPosition p) { return p.pairNo == pairNumber; }); for (int i = 0; i < names[pair.pairNo].Count; i++) { countNew += this.updateName(sections.Key.ToString(), pair.table.ToString(), pair.position[i].ToString(), names[pair.pairNo][i]); - if (tournament.type == Tournament.TYPE_TEAMY) + if (tournament.type == Tournament.TYPE_TEAMY && !MainForm.teamNames.arePlayerNamesDisplayed()) { char otherTableSeat = seatMapping[(Array.IndexOf(seatMapping, pair.position[i]) + 2) % 4]; countNew += this.updateName(sections.Key.ToString(), (pair.table + SKOK_STOLOW).ToString(), otherTableSeat.ToString(), names[pair.pairNo][i]); } } - count += names[pair.pairNo].Count * ((tournament.type == Tournament.TYPE_TEAMY) ? 2 : 1); + count += names[pair.pairNo].Count * ((tournament.type == Tournament.TYPE_TEAMY && !MainForm.teamNames.arePlayerNamesDisplayed()) ? 2 : 1); } } } diff --git a/Aktywator/Resources/BuildDate.txt b/Aktywator/Resources/BuildDate.txt index aeb1927..48f4768 100644 --- a/Aktywator/Resources/BuildDate.txt +++ b/Aktywator/Resources/BuildDate.txt @@ -1 +1 @@ -2018-11-18 +2019-07-24 -- cgit v1.2.3