Changeset 1768


Ignore:
Timestamp:
2/8/2010 7:20:53 AM (2 years ago)
Author:
lowjoel
Message:

Also specify MessageBoxOptions?.RightAlign? if the dialog which owns the message box is RTL-reading. addresses #275: Code Review

Location:
branches/eraser6/CodeReview
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/CodeReview/Eraser.DefaultPlugins/CustomMethodPassEditor.cs

    r1681 r1768  
    213213                     MessageBoxButtons.OK, MessageBoxIcon.Information, 
    214214                     MessageBoxDefaultButton.Button1, 
    215                      S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     215                     S.IsRightToLeft(this) ? 
     216                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    216217            } 
    217218        } 
  • branches/eraser6/CodeReview/Eraser.DefaultPlugins/ErasureMethods/FirstLast16KB.cs

    r1767 r1768  
    5454                    "be set in the Plugin Settings dialog."), Name, MessageBoxButtons.OK, 
    5555                    MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 
    56                     S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     56                    S.IsRightToLeft(null) ? 
     57                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    5758            } 
    5859        } 
  • branches/eraser6/CodeReview/Eraser/AboutForm.cs

    r1681 r1768  
    207207                    "was: {0}", ex.Message), S._("Eraser"), MessageBoxButtons.OK, 
    208208                    MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 
    209                     S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     209                    S.IsRightToLeft(null) ? 
     210                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    210211            } 
    211212        } 
  • branches/eraser6/CodeReview/Eraser/BlackBoxUploadForm.cs

    r1681 r1768  
    130130                    S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Error, 
    131131                    MessageBoxDefaultButton.Button1, S.IsRightToLeft(this) ? 
    132                         MessageBoxOptions.RtlReading : 0); 
     132                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    133133                Close(); 
    134134            } 
  • branches/eraser6/CodeReview/Eraser/LogForm.cs

    r1745 r1768  
    193193                selectedEntry.Timestamp.ToString("F", CultureInfo.CurrentCulture), 
    194194                MessageBoxButtons.OK, icon, MessageBoxDefaultButton.Button1, 
    195                 S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     195                S.IsRightToLeft(this) ? 
     196                    MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    196197        } 
    197198 
  • branches/eraser6/CodeReview/Eraser/MainForm.cs

    r1765 r1768  
    282282                    S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Error, 
    283283                    MessageBoxDefaultButton.Button1, S.IsRightToLeft(this) ? 
    284                         MessageBoxOptions.RtlReading : 0); 
     284                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    285285            } 
    286286        } 
  • branches/eraser6/CodeReview/Eraser/Program.GuiProgram.cs

    r1745 r1768  
    152152                        //is running with higher privileges than this instance. Tell the 
    153153                        //user this is the case and show him how to resolve the issue. 
    154                         MessageBox.Show(S._("Another instance of Eraser is already running but it is " + 
    155                             "running with higher privileges than this instance of Eraser.\n\n" + 
     154                        MessageBox.Show(S._("Another instance of Eraser is already running but it " + 
     155                            "is running with higher privileges than this instance of Eraser.\n\n" + 
    156156                            "Eraser will now exit."), S._("Eraser"), MessageBoxButtons.OK, 
    157157                            MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 
    158                             S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     158                            S.IsRightToLeft(null) ? 
     159                                MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    159160                    } 
    160161                    catch (IOException ex) 
     
    164165                            S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Error, 
    165166                            MessageBoxDefaultButton.Button1, 
    166                             S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0)); 
     167                            S.IsRightToLeft(null) ? 
     168                                MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0)); 
    167169                    } 
    168170                    catch (TimeoutException) 
  • branches/eraser6/CodeReview/Eraser/Program.cs

    r1709 r1768  
    526526                    MessageBoxButtons.OK, MessageBoxIcon.Error, 
    527527                    MessageBoxDefaultButton.Button1, 
    528                     S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     528                    S.IsRightToLeft(null) ? 
     529                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    529530            } 
    530531 
  • branches/eraser6/CodeReview/Eraser/SchedulerPanel.cs

    r1765 r1768  
    146146        { 
    147147            if (MessageBox.Show(this, S._("Are you sure you want to delete the selected tasks?"), 
    148                    S._("Eraser"), MessageBoxButtons.YesNo, MessageBoxIcon.Question, 
    149                    MessageBoxDefaultButton.Button1, 
    150                    S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0) != DialogResult.Yes) 
     148                    S._("Eraser"), MessageBoxButtons.YesNo, MessageBoxIcon.Question, 
     149                    MessageBoxDefaultButton.Button1, S.IsRightToLeft(this) ? 
     150                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0 
     151                ) != DialogResult.Yes) 
    151152            { 
    152153                return; 
     
    445446                            catch (SerializationException ex) 
    446447                            { 
    447                                 MessageBox.Show(S._("Could not import task list from {0}. The error " + 
    448                                     "returned was: {1}", file, ex.Message), S._("Eraser"), 
     448                                MessageBox.Show(S._("Could not import task list from {0}. The " + 
     449                                    "error returned was: {1}", file, ex.Message), S._("Eraser"), 
    449450                                    MessageBoxButtons.OK, MessageBoxIcon.Error, 
    450451                                    MessageBoxDefaultButton.Button1, 
    451                                     S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     452                                    S.IsRightToLeft(null) ? 
     453                                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    452454                            } 
    453455                        } 
  • branches/eraser6/CodeReview/Eraser/Settings.cs

    r1681 r1768  
    9898                                    S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Error, 
    9999                                    MessageBoxDefaultButton.Button1, 
    100                                     S.IsRightToLeft(null) ? MessageBoxOptions.RtlReading : 0); 
     100                                    S.IsRightToLeft(null) ? 
     101                                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    101102                            } 
    102103                    } 
  • branches/eraser6/CodeReview/Eraser/SettingsPanel.cs

    r1681 r1768  
    243243                    defaults), S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Warning, 
    244244                    MessageBoxDefaultButton.Button1, 
    245                     S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     245                    S.IsRightToLeft(this) ? 
     246                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    246247                saveSettings_Click(null, null); 
    247248            } 
     
    286287                MessageBox.Show(this, S._("The path you selected is invalid."), S._("Eraser"), 
    287288                    MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 
    288                     S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     289                    S.IsRightToLeft(this) ? 
     290                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    289291            } 
    290292        } 
     
    367369                    "the next time Eraser is started."), S._("Eraser"), MessageBoxButtons.OK, 
    368370                    MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 
    369                     S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     371                    S.IsRightToLeft(this) ? 
     372                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    370373            } 
    371374 
     
    409412                    "Eraser is restarted."), S._("Eraser"), MessageBoxButtons.OK, 
    410413                    MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 
    411                     S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     414                    S.IsRightToLeft(this) ? 
     415                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    412416            } 
    413417            settings.IntegrateWithShell = uiContextMenu.Checked; 
     
    425429                    S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Information, 
    426430                    MessageBoxDefaultButton.Button1, 
    427                     S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     431                    S.IsRightToLeft(this) ? 
     432                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    428433                managerSettings.ActivePrng = newPRNG.Guid; 
    429434            } 
  • branches/eraser6/CodeReview/Eraser/TaskDataSelectionForm.cs

    r1709 r1768  
    233233                MessageBox.Show(this, S._("The path you selected is invalid."), S._("Eraser"), 
    234234                    MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 
    235                     S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     235                    S.IsRightToLeft(this) ? 
     236                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    236237            } 
    237238        } 
  • branches/eraser6/CodeReview/Eraser/UpdateForm.cs

    r1759 r1768  
    131131                    MessageBox.Show(this, e.Error.Message, S._("Eraser"), MessageBoxButtons.OK, 
    132132                        MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, 
    133                         S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     133                        S.IsRightToLeft(this) ? 
     134                            MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    134135 
    135136                Close(); 
     
    199200                    "Eraser."), S._("Eraser"), MessageBoxButtons.OK, MessageBoxIcon.Information, 
    200201                    MessageBoxDefaultButton.Button1, 
    201                     S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     202                    S.IsRightToLeft(this) ? 
     203                        MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    202204                Close(); 
    203205            } 
     
    353355                        MessageBoxButtons.OK, MessageBoxIcon.Error, 
    354356                        MessageBoxDefaultButton.Button1, 
    355                         S.IsRightToLeft(this) ? MessageBoxOptions.RtlReading : 0); 
     357                        S.IsRightToLeft(this) ? 
     358                            MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); 
    356359 
    357360                Close(); 
Note: See TracChangeset for help on using the changeset viewer.