From 8b1f024231571b16940aab83c1a131bf9a1eb5d5 Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 26 Nov 2016 17:39:59 +0100 Subject: * hand record clearing, per section --- Aktywator/MainForm.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Aktywator/MainForm.cs') diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index f684e34..aa3a447 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -287,5 +287,18 @@ namespace Aktywator } } + 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); + } + } + } } -- cgit v1.2.3 From 792069c65af52df86286d9596c2e7eab340d18ff Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 26 Nov 2016 17:40:45 +0100 Subject: * updating label for boards to read on section selection --- Aktywator/Bws.cs | 2 +- Aktywator/MainForm.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Aktywator/MainForm.cs') diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index dee1112..606de96 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -50,7 +50,7 @@ namespace Aktywator return character.ToString(); } - private string getBoardRangeText(string[] sectors) + public string getBoardRangeText(string[] sectors) { StringBuilder sb = new StringBuilder(); sb.Append("Wczytywane rozkłady:"); diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index aa3a447..1326777 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -287,6 +287,11 @@ 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 -- cgit v1.2.3 From 5738d7e27fa1da52cbe50a2e26a0bd3a7749335e Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 26 Nov 2016 17:41:19 +0100 Subject: * reading boards only for selected sections (and accummulating count) --- Aktywator/Bws.cs | 7 +++++-- Aktywator/MainForm.cs | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'Aktywator/MainForm.cs') 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) { -- cgit v1.2.3 From 74b40d51511b877129495ff76069b2fba57dc192 Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 26 Nov 2016 17:47:19 +0100 Subject: * version number bump --- Aktywator/MainForm.cs | 4 ++-- Aktywator/Properties/AssemblyInfo.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Aktywator/MainForm.cs') diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index 8979d6b..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; diff --git a/Aktywator/Properties/AssemblyInfo.cs b/Aktywator/Properties/AssemblyInfo.cs index 6805b75..df9c1fc 100644 --- a/Aktywator/Properties/AssemblyInfo.cs +++ b/Aktywator/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Michał Zimniewicz")] [assembly: AssemblyProduct("Aktywator")] -[assembly: AssemblyCopyright("Copyright © 2011 Michał Zimniewicz")] +[assembly: AssemblyCopyright("Copyright © 2011-2016 Michał Zimniewicz")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.0.6.0")] +[assembly: AssemblyFileVersion("1.0.6.0")] -- cgit v1.2.3