@@ -303,7 +303,20 @@ orderby folder.Key
303303 checkWindowed . Checked = ! Settings . FullScreen ;
304304 comboWindowSize . Text = Settings . WindowSize ;
305305 checkWindowGlass . Checked = Settings . WindowGlass ;
306- checkControlConfirmations . Checked = ! Settings . SuppressConfirmations ;
306+
307+ // keep values in line with enum Orts.Simulation.ConfirmLevel
308+ // see also function Message(CabControl control, ConfirmLevel level, string message)
309+ // in Source\Orts.Simulation\Simulation\Confirmer.cs
310+ comboControlConfirmations . DataSource = new [ ] {
311+ new ComboBoxMember { Code = "None" , Name = catalog . GetString ( "None" ) } ,
312+ new ComboBoxMember { Code = "Information" , Name = catalog . GetString ( "Information" ) } ,
313+ new ComboBoxMember { Code = "Warning" , Name = catalog . GetString ( "Warning" ) } ,
314+ new ComboBoxMember { Code = "Error" , Name = catalog . GetString ( "Error" ) } ,
315+ } . ToList ( ) ;
316+ comboControlConfirmations . DisplayMember = "Name" ;
317+ comboControlConfirmations . ValueMember = "Code" ;
318+ comboControlConfirmations . SelectedIndex = Settings . SuppressConfirmations ;
319+
307320 numericWebServerPort . Value = Settings . WebServerPort ;
308321 checkPerformanceTuner . Checked = Settings . PerformanceTuner ;
309322 labelPerformanceTunerTarget . Enabled = checkPerformanceTuner . Checked ;
@@ -493,7 +506,7 @@ void buttonOK_Click(object sender, EventArgs e)
493506 Settings . FullScreen = ! checkWindowed . Checked ;
494507 Settings . WindowSize = GetValidWindowSize ( comboWindowSize . Text ) ;
495508 Settings . WindowGlass = checkWindowGlass . Checked ;
496- Settings . SuppressConfirmations = ! checkControlConfirmations . Checked ;
509+ Settings . SuppressConfirmations = comboControlConfirmations . SelectedIndex ;
497510 Settings . WebServerPort = ( int ) numericWebServerPort . Value ;
498511 Settings . PerformanceTuner = checkPerformanceTuner . Checked ;
499512 Settings . PerformanceTunerTarget = ( int ) numericPerformanceTunerTarget . Value ;
@@ -876,7 +889,7 @@ private void InitializeHelpIcons()
876889 ( pbUpdateMode , new Control [ ] { labelUpdateMode } ) ,
877890 ( pbWindowed , new Control [ ] { checkWindowed , labelWindowSize , comboWindowSize } ) ,
878891 ( pbWindowGlass , new [ ] { checkWindowGlass } ) ,
879- ( pbControlConfirmations , new [ ] { checkControlConfirmations } ) ,
892+ ( pbControlConfirmations , new Control [ ] { labelControlConfirmations , comboControlConfirmations } ) ,
880893 ( pbWebServerPort , new Control [ ] { labelWebServerPort } ) ,
881894 ( pbPerformanceTuner , new Control [ ] { checkPerformanceTuner , labelPerformanceTunerTarget } ) ,
882895 } ;
0 commit comments