@@ -106,17 +106,21 @@ private void editProgram()
106
106
feedbackAudioResponse . Checked = editProgram . FeedbackAudioResponse ;
107
107
expositonAudioResponse . Checked = editProgram . ExpositionAudioResponse ;
108
108
randomModelStimulusTime . Checked = editProgram . RandomIntervalModelStimulus ;
109
- switch ( editProgram . getExpositionType ( ) )
109
+ if ( editProgram . getExpositionType ( ) == "DMTS" )
110
110
{
111
- case "DMTS" :
112
- this . expositionType . SelectedIndex = 0 ;
113
- break ;
114
- case "DNMTS" :
115
- this . expositionType . SelectedIndex = 1 ;
116
- break ;
117
- case "DMTS/DNMTS" :
118
- this . expositionType . SelectedIndex = 2 ;
119
- break ;
111
+ this . expositionType . SelectedIndex = 0 ;
112
+ }
113
+ else if ( editProgram . getExpositionType ( ) == "DNMTS" )
114
+ {
115
+ this . expositionType . SelectedIndex = 1 ;
116
+ }
117
+ else if ( editProgram . getExpositionType ( ) == LocRM . GetString ( "alternatingDMTS_DNMTS" , currentCulture ) )
118
+ {
119
+ this . expositionType . SelectedIndex = 2 ;
120
+ }
121
+ else
122
+ {
123
+ this . expositionType . SelectedIndex = 3 ;
120
124
}
121
125
122
126
// reads program instructions to instruction box if there are any
@@ -297,7 +301,7 @@ private void expositionType_Validating(object sender, CancelEventArgs e)
297
301
298
302
private bool validExpositionType ( out string errorMessage )
299
303
{
300
- if ( this . expositionType . SelectedIndex >= 0 && this . expositionType . SelectedIndex < 3 )
304
+ if ( this . expositionType . SelectedIndex >= 0 && this . expositionType . SelectedIndex < 4 )
301
305
{
302
306
errorMessage = "" ;
303
307
return true ;
@@ -318,7 +322,7 @@ private void expositionType_SelectedIndexChanged(object sender, EventArgs e)
318
322
{
319
323
this . errorProvider1 . Clear ( ) ;
320
324
this . errorProvider2 . Clear ( ) ;
321
- if ( this . expositionType . SelectedIndex > 2 )
325
+ if ( this . expositionType . SelectedIndex > 3 )
322
326
{
323
327
this . errorProvider1 . SetError ( this . expositionType , LocRM . GetString ( "unavailableExpo" , currentCulture ) ) ;
324
328
}
@@ -348,7 +352,7 @@ private void expositionType_SelectedIndexChanged(object sender, EventArgs e)
348
352
DNMTSBackgroundColor . Enabled = true ;
349
353
DNMTSBackground . Enabled = true ;
350
354
}
351
- else if ( this . expositionType . SelectedIndex == 2 )
355
+ else if ( this . expositionType . SelectedIndex == 2 || this . expositionType . SelectedIndex == 3 )
352
356
{
353
357
DMTSBackgroundLabel . Enabled = true ;
354
358
DMTSColorPanel . Enabled = true ;
0 commit comments