summaryrefslogtreecommitdiff
path: root/Aktywator/MainForm.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-08-23 20:56:59 +0200
committeremkael <emkael@tlen.pl>2017-08-23 20:56:59 +0200
commitbbf238ffe5a7cd27a6e1162f2731bea9b17bc526 (patch)
tree75448688af23a9e534118b37787f718cf70ad7f4 /Aktywator/MainForm.cs
parent9b82b77300a1c44828c271557f44bfc9fe27ee30 (diff)
Separate settings for separate sections
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r--Aktywator/MainForm.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index 712a104..0187e84 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -67,6 +67,7 @@ namespace Aktywator
bws.convert();
labelFilename.Text = filename;
+ this.fillSectionSelector(bws.getSections());
// cloning Setting List returned from Bws, because we're going to extend it for version tracking purposes
this.bwsSettings = new List<Setting>(bws.initSettings());
this.bwsSettings.Add(new Setting("BM2ShowPlayerNames", this.xShowPlayerNames, bws, new Version(2, 0, 0), new Version(1, 3, 1)));
@@ -77,6 +78,14 @@ namespace Aktywator
this.WindowState = FormWindowState.Normal;
}
+ private void fillSectionSelector(string sections)
+ {
+ cbSettingsSection.SelectedIndex = 0;
+ foreach (string section in sections.Split(',')) {
+ cbSettingsSection.Items.Add(bws.sectorNumberToLetter(Int32.Parse(section.Trim())));
+ }
+ }
+
private void bindSettingChanges()
{
foreach (Setting s in this.bwsSettings)
@@ -538,5 +547,10 @@ namespace Aktywator
}
}
+ private void cbSettingsSection_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ bws.loadSettings();
+ }
+
}
}