public void SetSimSettings(SimulationSettings simSettings) { if (simSettings != null) { this.simSettings = simSettings; SimType = simSettings.SimType; Sessions = simSettings.Sessions; Hours = simSettings.Hours; Score = simSettings.Score; chkSimDisplay.IsChecked = simSettings.EnableSimDisplay; if (!simSettings.EncogSelected) { grpEncogSettings.Visibility = Visibility.Collapsed; this.Height -= grpEncogSettings.Height; } else { HiddenLayers = simSettings.HiddenLayers; txtHiddenLayers.Text = HiddenLayers.ToString(); HiddenLayerNeurons = (simSettings.HiddenLayerNeurons <= 0) ? simSettings.NumSlots * simSettings.NumShelves : simSettings.HiddenLayerNeurons; txtHiddenLayerNeurons.Text = HiddenLayerNeurons.ToString(); } calculateMaxScore(); simScoreSlider.Value = simSettings.DefaultScorePercentage; simScoreSliderLbl.Content = simScoreSlider.Value + "%"; switch (SimType) { case SimulationType.Sessions: rdbSessions.IsChecked = true; txtSimInput.Text = Sessions.ToString(); showScoreSlider(false); break; case SimulationType.Time: rdbTime.IsChecked = true; txtSimInput.Text = Hours.ToString(); showScoreSlider(false); break; default: rdbScore.IsChecked = true; txtSimInput.Text = Score.ToString(); showScoreSlider(true); break; } } }