@@ -39,7 +39,7 @@ public partial class OptionsForm : Form
39
39
readonly UpdateManager UpdateManager ;
40
40
readonly string BaseDocumentationUrl ;
41
41
42
- private GettextResourceManager Catalog = new GettextResourceManager ( "Menu" ) ;
42
+ private GettextResourceManager catalog = new GettextResourceManager ( "Menu" ) ;
43
43
44
44
public class ComboBoxMember
45
45
{
@@ -51,7 +51,7 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
51
51
{
52
52
InitializeComponent ( ) ;
53
53
54
- Localizer . Localize ( this , Catalog ) ;
54
+ Localizer . Localize ( this , catalog ) ;
55
55
56
56
Settings = settings ;
57
57
UpdateManager = updateManager ;
@@ -91,22 +91,22 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
91
91
if ( comboLanguage . SelectedValue == null ) comboLanguage . SelectedIndex = 0 ;
92
92
93
93
comboOtherUnits . DataSource = new [ ] {
94
- new ComboBoxMember { Code = "Route" , Name = Catalog . GetString ( "Route" ) } ,
95
- new ComboBoxMember { Code = "Automatic" , Name = Catalog . GetString ( "Player's location" ) } ,
96
- new ComboBoxMember { Code = "Metric" , Name = Catalog . GetString ( "Metric" ) } ,
97
- new ComboBoxMember { Code = "US" , Name = Catalog . GetString ( "Imperial US" ) } ,
98
- new ComboBoxMember { Code = "UK" , Name = Catalog . GetString ( "Imperial UK" ) } ,
94
+ new ComboBoxMember { Code = "Route" , Name = catalog . GetString ( "Route" ) } ,
95
+ new ComboBoxMember { Code = "Automatic" , Name = catalog . GetString ( "Player's location" ) } ,
96
+ new ComboBoxMember { Code = "Metric" , Name = catalog . GetString ( "Metric" ) } ,
97
+ new ComboBoxMember { Code = "US" , Name = catalog . GetString ( "Imperial US" ) } ,
98
+ new ComboBoxMember { Code = "UK" , Name = catalog . GetString ( "Imperial UK" ) } ,
99
99
} . ToList ( ) ;
100
100
comboOtherUnits . DisplayMember = "Name" ;
101
101
comboOtherUnits . ValueMember = "Code" ;
102
102
comboOtherUnits . SelectedValue = Settings . Units ;
103
103
104
104
comboPressureUnit . DataSource = new [ ] {
105
- new ComboBoxMember { Code = "Automatic" , Name = Catalog . GetString ( "Automatic" ) } ,
106
- new ComboBoxMember { Code = "bar" , Name = Catalog . GetString ( "bar" ) } ,
107
- new ComboBoxMember { Code = "PSI" , Name = Catalog . GetString ( "psi" ) } ,
108
- new ComboBoxMember { Code = "inHg" , Name = Catalog . GetString ( "inHg" ) } ,
109
- new ComboBoxMember { Code = "kgf/cm^2" , Name = Catalog . GetString ( "kgf/cm²" ) } ,
105
+ new ComboBoxMember { Code = "Automatic" , Name = catalog . GetString ( "Automatic" ) } ,
106
+ new ComboBoxMember { Code = "bar" , Name = catalog . GetString ( "bar" ) } ,
107
+ new ComboBoxMember { Code = "PSI" , Name = catalog . GetString ( "psi" ) } ,
108
+ new ComboBoxMember { Code = "inHg" , Name = catalog . GetString ( "inHg" ) } ,
109
+ new ComboBoxMember { Code = "kgf/cm^2" , Name = catalog . GetString ( "kgf/cm²" ) } ,
110
110
} . ToList ( ) ;
111
111
comboPressureUnit . DisplayMember = "Name" ;
112
112
comboPressureUnit . ValueMember = "Code" ;
@@ -184,23 +184,23 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
184
184
185
185
// DataLogger tab
186
186
var dictionaryDataLoggerSeparator = new Dictionary < string , string > ( ) ;
187
- dictionaryDataLoggerSeparator . Add ( "comma" , Catalog . GetString ( "comma" ) ) ;
188
- dictionaryDataLoggerSeparator . Add ( "semicolon" , Catalog . GetString ( "semicolon" ) ) ;
189
- dictionaryDataLoggerSeparator . Add ( "tab" , Catalog . GetString ( "tab" ) ) ;
190
- dictionaryDataLoggerSeparator . Add ( "space" , Catalog . GetString ( "space" ) ) ;
187
+ dictionaryDataLoggerSeparator . Add ( "comma" , catalog . GetString ( "comma" ) ) ;
188
+ dictionaryDataLoggerSeparator . Add ( "semicolon" , catalog . GetString ( "semicolon" ) ) ;
189
+ dictionaryDataLoggerSeparator . Add ( "tab" , catalog . GetString ( "tab" ) ) ;
190
+ dictionaryDataLoggerSeparator . Add ( "space" , catalog . GetString ( "space" ) ) ;
191
191
comboDataLoggerSeparator . DataSource = new BindingSource ( dictionaryDataLoggerSeparator , null ) ;
192
192
comboDataLoggerSeparator . DisplayMember = "Value" ;
193
193
comboDataLoggerSeparator . ValueMember = "Key" ;
194
- comboDataLoggerSeparator . Text = Catalog . GetString ( Settings . DataLoggerSeparator ) ;
194
+ comboDataLoggerSeparator . Text = catalog . GetString ( Settings . DataLoggerSeparator ) ;
195
195
var dictionaryDataLogSpeedUnits = new Dictionary < string , string > ( ) ;
196
- dictionaryDataLogSpeedUnits . Add ( "route" , Catalog . GetString ( "route" ) ) ;
197
- dictionaryDataLogSpeedUnits . Add ( "mps" , Catalog . GetString ( "m/s" ) ) ;
198
- dictionaryDataLogSpeedUnits . Add ( "kmph" , Catalog . GetString ( "km/h" ) ) ;
199
- dictionaryDataLogSpeedUnits . Add ( "mph" , Catalog . GetString ( "mph" ) ) ;
196
+ dictionaryDataLogSpeedUnits . Add ( "route" , catalog . GetString ( "route" ) ) ;
197
+ dictionaryDataLogSpeedUnits . Add ( "mps" , catalog . GetString ( "m/s" ) ) ;
198
+ dictionaryDataLogSpeedUnits . Add ( "kmph" , catalog . GetString ( "km/h" ) ) ;
199
+ dictionaryDataLogSpeedUnits . Add ( "mph" , catalog . GetString ( "mph" ) ) ;
200
200
comboDataLogSpeedUnits . DataSource = new BindingSource ( dictionaryDataLogSpeedUnits , null ) ;
201
201
comboDataLogSpeedUnits . DisplayMember = "Value" ;
202
202
comboDataLogSpeedUnits . ValueMember = "Key" ;
203
- comboDataLogSpeedUnits . Text = Catalog . GetString ( Settings . DataLogSpeedUnits ) ;
203
+ comboDataLogSpeedUnits . Text = catalog . GetString ( Settings . DataLogSpeedUnits ) ;
204
204
checkDataLogger . Checked = Settings . DataLogger ;
205
205
checkDataLogPerformance . Checked = Settings . DataLogPerformance ;
206
206
checkDataLogPhysics . Checked = Settings . DataLogPhysics ;
@@ -215,18 +215,18 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
215
215
checkListDataLogTSContents . Enabled = checkDataLogTrainSpeed . Checked ;
216
216
numericDataLogTSInterval . Value = Settings . DataLogTSInterval ;
217
217
checkListDataLogTSContents . Items . AddRange ( new object [ ] {
218
- Catalog . GetString ( "Time" ) ,
219
- Catalog . GetString ( "Train Speed" ) ,
220
- Catalog . GetString ( "Max. Speed" ) ,
221
- Catalog . GetString ( "Signal State" ) ,
222
- Catalog . GetString ( "Track Elevation" ) ,
223
- Catalog . GetString ( "Direction" ) ,
224
- Catalog . GetString ( "Control Mode" ) ,
225
- Catalog . GetString ( "Distance Travelled" ) ,
226
- Catalog . GetString ( "Throttle %" ) ,
227
- Catalog . GetString ( "Brake Cyl Press" ) ,
228
- Catalog . GetString ( "Dyn Brake %" ) ,
229
- Catalog . GetString ( "Gear Setting" )
218
+ catalog . GetString ( "Time" ) ,
219
+ catalog . GetString ( "Train Speed" ) ,
220
+ catalog . GetString ( "Max. Speed" ) ,
221
+ catalog . GetString ( "Signal State" ) ,
222
+ catalog . GetString ( "Track Elevation" ) ,
223
+ catalog . GetString ( "Direction" ) ,
224
+ catalog . GetString ( "Control Mode" ) ,
225
+ catalog . GetString ( "Distance Travelled" ) ,
226
+ catalog . GetString ( "Throttle %" ) ,
227
+ catalog . GetString ( "Brake Cyl Press" ) ,
228
+ catalog . GetString ( "Dyn Brake %" ) ,
229
+ catalog . GetString ( "Gear Setting" )
230
230
} ) ;
231
231
for ( var i = 0 ; i < checkListDataLogTSContents . Items . Count ; i ++ )
232
232
checkListDataLogTSContents . SetItemChecked ( i , Settings . DataLogTSContents [ i ] == 1 ) ;
@@ -236,16 +236,16 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
236
236
comboLanguage . Text = Settings . Language ;
237
237
238
238
var updateChannelNames = new Dictionary < string , string > {
239
- { "stable" , Catalog . GetString ( "Stable (recommended)" ) } ,
240
- { "testing" , Catalog . GetString ( "Testing" ) } ,
241
- { "unstable" , Catalog . GetString ( "Unstable" ) } ,
242
- { "" , Catalog . GetString ( "None" ) } ,
239
+ { "stable" , catalog . GetString ( "Stable (recommended)" ) } ,
240
+ { "testing" , catalog . GetString ( "Testing" ) } ,
241
+ { "unstable" , catalog . GetString ( "Unstable" ) } ,
242
+ { "" , catalog . GetString ( "None" ) } ,
243
243
} ;
244
244
var updateChannelDescriptions = new Dictionary < string , string > {
245
- { "stable" , Catalog . GetString ( "Infrequent updates to official, hand-picked versions. Recommended for most users." ) } ,
246
- { "testing" , Catalog . GetString ( "Weekly updates which may contain noticable defects. For project supporters." ) } ,
247
- { "unstable" , Catalog . GetString ( "Daily updates which may contain serious defects. For developers only." ) } ,
248
- { "" , Catalog . GetString ( "No updates." ) } ,
245
+ { "stable" , catalog . GetString ( "Infrequent updates to official, hand-picked versions. Recommended for most users." ) } ,
246
+ { "testing" , catalog . GetString ( "Weekly updates which may contain noticable defects. For project supporters." ) } ,
247
+ { "unstable" , catalog . GetString ( "Daily updates which may contain serious defects. For developers only." ) } ,
248
+ { "" , catalog . GetString ( "No updates." ) } ,
249
249
} ;
250
250
var spacing = labelUpdateMode . Margin . Size ;
251
251
var indent = 180 ;
@@ -284,10 +284,10 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, string ba
284
284
// see also function Message(CabControl control, ConfirmLevel level, string message)
285
285
// in Source\Orts.Simulation\Simulation\Confirmer.cs
286
286
comboControlConfirmations . DataSource = new [ ] {
287
- new ComboBoxMember { Code = "None" , Name = Catalog . GetString ( "None" ) } ,
288
- new ComboBoxMember { Code = "Information" , Name = Catalog . GetString ( "Information" ) } ,
289
- new ComboBoxMember { Code = "Warning" , Name = Catalog . GetString ( "Warning" ) } ,
290
- new ComboBoxMember { Code = "Error" , Name = Catalog . GetString ( "Error" ) } ,
287
+ new ComboBoxMember { Code = "None" , Name = catalog . GetString ( "None" ) } ,
288
+ new ComboBoxMember { Code = "Information" , Name = catalog . GetString ( "Information" ) } ,
289
+ new ComboBoxMember { Code = "Warning" , Name = catalog . GetString ( "Warning" ) } ,
290
+ new ComboBoxMember { Code = "Error" , Name = catalog . GetString ( "Error" ) } ,
291
291
} . ToList ( ) ;
292
292
comboControlConfirmations . DisplayMember = "Name" ;
293
293
comboControlConfirmations . ValueMember = "Code" ;
@@ -382,7 +382,7 @@ void InitializeKeyboardSettings()
382
382
keyInputControl . ReadOnly = true ;
383
383
keyInputControl . Tag = command ;
384
384
panelKeys . Controls . Add ( keyInputControl ) ;
385
- toolTip1 . SetToolTip ( keyInputControl , Catalog . GetString ( "Click to change this key" ) ) ;
385
+ toolTip1 . SetToolTip ( keyInputControl , catalog . GetString ( "Click to change this key" ) ) ;
386
386
387
387
++ i ;
388
388
}
@@ -398,7 +398,7 @@ void SaveKeyboardSettings()
398
398
void buttonOK_Click ( object sender , EventArgs e )
399
399
{
400
400
var result = Settings . Input . CheckForErrors ( ) ;
401
- if ( result != "" && DialogResult . Yes != MessageBox . Show ( Catalog . GetString ( "Continue with conflicting key assignments?\n \n " ) + result , Application . ProductName , MessageBoxButtons . YesNo ) )
401
+ if ( result != "" && DialogResult . Yes != MessageBox . Show ( catalog . GetString ( "Continue with conflicting key assignments?\n \n " ) + result , Application . ProductName , MessageBoxButtons . YesNo ) )
402
402
return ;
403
403
404
404
DialogResult = DialogResult . OK ;
@@ -518,7 +518,7 @@ private string GetValidWindowSize(string text)
518
518
519
519
void buttonDefaultKeys_Click ( object sender , EventArgs e )
520
520
{
521
- if ( DialogResult . Yes == MessageBox . Show ( Catalog . GetString ( "Remove all custom key assignments?" ) , Application . ProductName , MessageBoxButtons . YesNo ) )
521
+ if ( DialogResult . Yes == MessageBox . Show ( catalog . GetString ( "Remove all custom key assignments?" ) , Application . ProductName , MessageBoxButtons . YesNo ) )
522
522
{
523
523
Settings . Input . Reset ( ) ;
524
524
InitializeKeyboardSettings ( ) ;
@@ -529,7 +529,7 @@ void buttonExport_Click(object sender, EventArgs e)
529
529
{
530
530
var outputPath = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . DesktopDirectory ) , "Open Rails Keyboard.txt" ) ;
531
531
Settings . Input . DumpToText ( outputPath ) ;
532
- MessageBox . Show ( Catalog . GetString ( "A listing of all keyboard commands and keys has been placed here:\n \n " ) + outputPath , Application . ProductName ) ;
532
+ MessageBox . Show ( catalog . GetString ( "A listing of all keyboard commands and keys has been placed here:\n \n " ) + outputPath , Application . ProductName ) ;
533
533
}
534
534
535
535
void buttonCheckKeys_Click ( object sender , EventArgs e )
@@ -538,12 +538,12 @@ void buttonCheckKeys_Click(object sender, EventArgs e)
538
538
if ( errors != "" )
539
539
MessageBox . Show ( errors , Application . ProductName ) ;
540
540
else
541
- MessageBox . Show ( Catalog . GetString ( "No errors found." ) , Application . ProductName ) ;
541
+ MessageBox . Show ( catalog . GetString ( "No errors found." ) , Application . ProductName ) ;
542
542
}
543
543
544
544
private void numericUpDownFOV_ValueChanged ( object sender , EventArgs e )
545
545
{
546
- labelFOVHelp . Text = Catalog . GetStringFmt ( "{0:F0}° vertical FOV is the same as:\n {1:F0}° horizontal FOV on 4:3\n {2:F0}° horizontal FOV on 16:9" , numericViewingFOV . Value , numericViewingFOV . Value * 4 / 3 , numericViewingFOV . Value * 16 / 9 ) ;
546
+ labelFOVHelp . Text = catalog . GetStringFmt ( "{0:F0}° vertical FOV is the same as:\n {1:F0}° horizontal FOV on 4:3\n {2:F0}° horizontal FOV on 16:9" , numericViewingFOV . Value , numericViewingFOV . Value * 4 / 3 , numericViewingFOV . Value * 16 / 9 ) ;
547
547
}
548
548
549
549
private void trackBarDayAmbientLight_Scroll ( object sender , EventArgs e )
@@ -563,19 +563,19 @@ private void SetAdhesionLevelValue()
563
563
int level = trackAdhesionFactor . Value - trackAdhesionFactorChange . Value ;
564
564
565
565
if ( level > 159 )
566
- AdhesionLevelValue . Text = Catalog . GetString ( "Very easy" ) ;
566
+ AdhesionLevelValue . Text = catalog . GetString ( "Very easy" ) ;
567
567
else if ( level > 139 )
568
- AdhesionLevelValue . Text = Catalog . GetString ( "Easy" ) ;
568
+ AdhesionLevelValue . Text = catalog . GetString ( "Easy" ) ;
569
569
else if ( level > 119 )
570
- AdhesionLevelValue . Text = Catalog . GetString ( "MSTS Compatible" ) ;
570
+ AdhesionLevelValue . Text = catalog . GetString ( "MSTS Compatible" ) ;
571
571
else if ( level > 89 )
572
- AdhesionLevelValue . Text = Catalog . GetString ( "Normal" ) ;
572
+ AdhesionLevelValue . Text = catalog . GetString ( "Normal" ) ;
573
573
else if ( level > 69 )
574
- AdhesionLevelValue . Text = Catalog . GetString ( "Hard" ) ;
574
+ AdhesionLevelValue . Text = catalog . GetString ( "Hard" ) ;
575
575
else if ( level > 59 )
576
- AdhesionLevelValue . Text = Catalog . GetString ( "Very Hard" ) ;
576
+ AdhesionLevelValue . Text = catalog . GetString ( "Very Hard" ) ;
577
577
else
578
- AdhesionLevelValue . Text = Catalog . GetString ( "Good luck!" ) ;
578
+ AdhesionLevelValue . Text = catalog . GetString ( "Good luck!" ) ;
579
579
}
580
580
581
581
private void AdhesionPropToWeatherCheckBox_CheckedChanged ( object sender , EventArgs e )
@@ -585,7 +585,7 @@ private void AdhesionPropToWeatherCheckBox_CheckedChanged(object sender, EventAr
585
585
586
586
private void trackDayAmbientLight_ValueChanged ( object sender , EventArgs e )
587
587
{
588
- labelDayAmbientLight . Text = Catalog . GetStringFmt ( "{0}%" , trackDayAmbientLight . Value * 5 ) ;
588
+ labelDayAmbientLight . Text = catalog . GetStringFmt ( "{0}%" , trackDayAmbientLight . Value * 5 ) ;
589
589
}
590
590
591
591
private void trackAntiAliasing_ValueChanged ( object sender , EventArgs e )
@@ -621,15 +621,15 @@ private void trackAntiAliasing_ValueChanged(object sender, EventArgs e)
621
621
private void trackLODBias_ValueChanged ( object sender , EventArgs e )
622
622
{
623
623
if ( trackLODBias . Value == - 100 )
624
- labelLODBias . Text = Catalog . GetStringFmt ( "No detail (-{0}%)" , - trackLODBias . Value ) ;
624
+ labelLODBias . Text = catalog . GetStringFmt ( "No detail (-{0}%)" , - trackLODBias . Value ) ;
625
625
else if ( trackLODBias . Value < 0 )
626
- labelLODBias . Text = Catalog . GetStringFmt ( "Less detail (-{0}%)" , - trackLODBias . Value ) ;
626
+ labelLODBias . Text = catalog . GetStringFmt ( "Less detail (-{0}%)" , - trackLODBias . Value ) ;
627
627
else if ( trackLODBias . Value == 0 )
628
- labelLODBias . Text = Catalog . GetStringFmt ( "Default detail (+{0}%)" , trackLODBias . Value ) ;
628
+ labelLODBias . Text = catalog . GetStringFmt ( "Default detail (+{0}%)" , trackLODBias . Value ) ;
629
629
else if ( trackLODBias . Value < 100 )
630
- labelLODBias . Text = Catalog . GetStringFmt ( "More detail (+{0}%)" , trackLODBias . Value ) ;
630
+ labelLODBias . Text = catalog . GetStringFmt ( "More detail (+{0}%)" , trackLODBias . Value ) ;
631
631
else
632
- labelLODBias . Text = Catalog . GetStringFmt ( "All detail (+{0}%)" , trackLODBias . Value ) ;
632
+ labelLODBias . Text = catalog . GetStringFmt ( "All detail (+{0}%)" , trackLODBias . Value ) ;
633
633
}
634
634
635
635
0 commit comments