diff options
-rw-r--r-- | Aktywator/Bws.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 381e10f..3331ae0 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -27,7 +27,16 @@ namespace Aktywator this._filename = filename; sql = new Sql(filename); this.main = main; - main.lWczytywane.Text = this.getBoardRangeText(this.getSections().Split(',')); + string[] sections = this.getSections().Split(','); + main.lWczytywane.Text = this.getBoardRangeText(sections); + foreach (string section in sections) + { + main.cblSections.Items.Add(this.sectorNumberToLetter(Int16.Parse(section))); + } + for (int i = 0; i < main.cblSections.Items.Count; i++) + { + main.cblSections.SetItemChecked(i, true); + } } private int sectorLetterToNumber(string sector) @@ -58,6 +67,16 @@ namespace Aktywator return sb.ToString(); } + public string[] getSelectedSections() + { + List<string> sections = new List<string>(); + foreach (string section in main.cblSections.CheckedItems) + { + sections.Add(this.sectorLetterToNumber(section).ToString()); + } + return sections.ToArray(); + } + public void initSettings() { settings = new List<Setting>(); |