Changeset 948
- Timestamp:
- 5/1/2009 3:41:10 AM (4 years ago)
- Location:
- branches/eraser6
- Files:
-
- 6 edited
-
Eraser/Program.cs (modified) (5 diffs)
-
Eraser/SchedulerPanel.cs (modified) (1 diff)
-
Eraser/SettingsPanel.cs (modified) (5 diffs)
-
Eraser/TaskDataSelectionForm.cs (modified) (1 diff)
-
Eraser/UpdateForm.cs (modified) (3 diffs)
-
Util/Localisation.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eraser6/Eraser/Program.cs
r939 r948 28 28 using System.Text; 29 29 using System.Threading; 30 using System.Runtime.Serialization; 30 31 using System.Runtime.Serialization.Formatters.Binary; 31 32 using System.Globalization; … … 37 38 using Eraser.Util; 38 39 using Microsoft.Win32; 39 using System.Runtime.Serialization;40 40 41 41 namespace Eraser … … 170 170 MessageBox.Show(S._("Could not load task list. All task entries have " + 171 171 "been lost. The error returned was: {0}", e.Message), S._("Eraser"), 172 MessageBoxButtons.OK, MessageBoxIcon.Error); 172 MessageBoxButtons.OK, MessageBoxIcon.Error, 173 MessageBoxDefaultButton.Button1, 174 S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 173 175 } 174 176 … … 354 356 "running with higher privileges than this instance of Eraser.\n\n" + 355 357 "Eraser will now exit."), S._("Eraser"), MessageBoxButtons.OK, 356 MessageBoxIcon.Information); 358 MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 359 S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 357 360 } 358 361 catch (TimeoutException) … … 1183 1186 MessageBox.Show(S._("Could not load the setting {0} for plugin {1}. " + 1184 1187 "The setting has been lost.", key, pluginID.ToString()), 1185 S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Error); 1188 S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Error, 1189 MessageBoxDefaultButton.Button1, 1190 S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 1186 1191 } 1187 1192 -
branches/eraser6/Eraser/SchedulerPanel.cs
r944 r948 461 461 S._("Eraser"), MessageBoxButtons.YesNo, MessageBoxIcon.Question, 462 462 MessageBoxDefaultButton.Button1, 463 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0) != DialogResult.Yes)463 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0) != DialogResult.Yes) 464 464 { 465 465 return; -
branches/eraser6/Eraser/SettingsPanel.cs
r944 r948 247 247 defaults), S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Warning, 248 248 MessageBoxDefaultButton.Button1, 249 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);249 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 250 250 saveSettings_Click(null, null); 251 251 } … … 295 295 MessageBox.Show(this, S._("The path you selected is invalid."), S._("Eraser"), 296 296 MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 297 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);297 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 298 298 } 299 299 } … … 379 379 "the next time Eraser is started."), S._("Eraser"), MessageBoxButtons.OK, 380 380 MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 381 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);381 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 382 382 } 383 383 … … 421 421 "Eraser is restarted."), S._("Eraser"), MessageBoxButtons.OK, 422 422 MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 423 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);423 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 424 424 } 425 425 settings.IntegrateWithShell = uiContextMenu.Checked; … … 437 437 S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Information, 438 438 MessageBoxDefaultButton.Button1, 439 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);439 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 440 440 managerSettings.ActivePrng = newPRNG.Guid; 441 441 } -
branches/eraser6/Eraser/TaskDataSelectionForm.cs
r915 r948 229 229 MessageBox.Show(this, S._("The path you selected is invalid."), S._("Eraser"), 230 230 MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 231 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);231 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 232 232 } 233 233 } -
branches/eraser6/Eraser/UpdateForm.cs
r947 r948 133 133 MessageBox.Show(this, e.Error.Message, S._("Eraser"), MessageBoxButtons.OK, 134 134 MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 135 RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading :0);135 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 136 136 137 137 Close(); … … 212 212 "Eraser."), S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Information, 213 213 MessageBoxDefaultButton.Button1, 214 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);214 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 215 215 Close(); 216 216 } … … 359 359 MessageBoxButtons.OK, MessageBoxIcon.Error, 360 360 MessageBoxDefaultButton.Button1, 361 RightToLeft == RightToLeft.Yes? MessageBoxOptions.RtlReading : 0);361 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 362 362 363 363 Close(); -
branches/eraser6/Util/Localisation.cs
r909 r948 66 66 //Format the string. 67 67 return string.Format(CultureInfo.CurrentCulture, localStr, args); 68 } 69 70 /// <summary> 71 /// Returns true if the given control is right-to-left reading. 72 /// </summary> 73 /// <param name="control">The control to query.</param> 74 /// <returns>True if the control is right-to-left reading.</returns> 75 public static bool IsRightToLeft(Control control) 76 { 77 if (control == null) 78 return CultureInfo.CurrentCulture.TextInfo.IsRightToLeft; 79 80 switch (control.RightToLeft) 81 { 82 case RightToLeft.No: 83 return false; 84 case RightToLeft.Yes: 85 return true; 86 default: 87 return IsRightToLeft(control.Parent); 88 } 68 89 } 69 90
Note: See TracChangeset
for help on using the changeset viewer.
