Skip to content

Commit

Permalink
Fixed reading threads from config
Browse files Browse the repository at this point in the history
  • Loading branch information
integralfx committed Jul 27, 2019
1 parent da9cc38 commit 1512e39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MemTestHelper2/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ private bool LoadConfig()
txtRAM.Text = appSettings[key];
break;
case "threads":
cboThreads.SelectedItem = appSettings[key];
cboThreads.SelectedItem = Int32.Parse(appSettings[key]);
break;

case "xOffset":
Expand Down Expand Up @@ -502,7 +502,7 @@ private bool SaveConfig()
{
var dict = new Dictionary<string, string>();
dict.Add("ram", txtRAM.Text);
dict.Add("threads", cboThreads.SelectedItem.ToString());
dict.Add("threads", ((int)cboThreads.SelectedItem).ToString());
dict.Add("xOffset", udXOffset.Value.ToString());
dict.Add("yOffset", udYOffset.Value.ToString());
dict.Add("xSpacing", udXSpacing.Value.ToString());
Expand Down Expand Up @@ -683,7 +683,7 @@ private void LayOutMemTests()
// Only close MemTests started by MemTestHelper.
private void CloseMemTests()
{
Parallel.For(0, (int)cboThreads.SelectedItem, i =>
Parallel.For(0, memtests.Length, i =>
{
try
{
Expand Down

0 comments on commit 1512e39

Please sign in to comment.