diff options
author | Michał Zimniewicz <michzimny@users.noreply.github.com> | 2017-02-25 22:39:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-25 22:39:59 +0100 |
commit | 00a15a32c5bb9d09b560c911373f9952e75fb0c3 (patch) | |
tree | 99636365c2aebbec4ca90307548e03a32a65e755 /Aktywator/MainForm.cs | |
parent | ad415aedefc4868787e16772af784a03d4a9d769 (diff) | |
parent | 183a2e900871f30313cd2540a7bfd8706f8fe723 (diff) |
Merge pull request #6 from emkael/hand-records-sections
Hand records per section
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r-- | Aktywator/MainForm.cs | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index f684e34..b63b291 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -11,8 +11,8 @@ namespace Aktywator { public partial class MainForm : Form { - public string version = "1.0.4"; - public string date = "12.04.2013"; + public string version = "1.0.6"; + public string date = "26.11.2016"; private Bws bws; private Tournament tournament; @@ -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) { @@ -287,5 +287,23 @@ namespace Aktywator } } + private void cblSections_SelectedIndexChanged(object sender, EventArgs e) + { + this.lWczytywane.Text = bws.getBoardRangeText(bws.getSelectedSections()); + } + + private void bClearHands_Click(object sender, EventArgs e) + { + try + { + bws.clearHandRecords(); + MessageBox.Show("Wyczyszczono rozkłady", "Rozkłady wyczyszczone!", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Błąd czyszczenia rozkładów", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } } |