summaryrefslogtreecommitdiff
path: root/Aktywator
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-11-26 17:41:19 +0100
committeremkael <emkael@tlen.pl>2016-11-26 17:41:19 +0100
commit5738d7e27fa1da52cbe50a2e26a0bd3a7749335e (patch)
treeb86e2705a9476097a69fe3bb85da4febcf9213da /Aktywator
parent792069c65af52df86286d9596c2e7eab340d18ff (diff)
* reading boards only for selected sections (and accummulating count)
Diffstat (limited to 'Aktywator')
-rw-r--r--Aktywator/Bws.cs7
-rw-r--r--Aktywator/MainForm.cs4
2 files changed, 7 insertions, 4 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs
index 606de96..335bc11 100644
--- a/Aktywator/Bws.cs
+++ b/Aktywator/Bws.cs
@@ -514,9 +514,10 @@ namespace Aktywator
}
}
- public void loadHandRecords(PBN pbn)
+ public int loadHandRecords(PBN pbn)
{
- foreach (string section in this.getSections().Split(','))
+ int count = 0;
+ foreach (string section in this.getSelectedSections())
{
this.clearRecords(section);
for (int i = this.lowBoard(section.Trim()); i <= this.highBoard(section.Trim()); i++)
@@ -570,8 +571,10 @@ namespace Aktywator
ddStr.Append(")");
sql.query(ddStr.ToString());
}
+ count++;
}
}
+ return count;
}
}
}
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index 1326777..8979d6b 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -277,8 +277,8 @@ namespace Aktywator
try
{
PBN pbn = new PBN(openPBN.FileName, bws.lowBoard(), bws.highBoard());
- bws.loadHandRecords(pbn);
- MessageBox.Show("Wczytanych rozkładów: " + pbn.count, "Rozkłady wczytane!", MessageBoxButtons.OK, MessageBoxIcon.Information);
+ int count = bws.loadHandRecords(pbn);
+ MessageBox.Show("Wczytanych rozkładów: " + count, "Rozkłady wczytane!", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (Exception ex)
{