Changeset 866


Ignore:
Timestamp:
01/06/09 08:45:42 (5 years ago)
Author:
lowjoel
Message:

Don't allow accessing a null reference after FindForm? has been called (Don't know why it returns null?). Fixes #139.

Location:
branches/eraser6/Eraser
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Eraser/SchedulerPanel.cs

    r863 r866  
    121121            //Display a balloon notification if the parent frame has been minimised. 
    122122            MainForm parent = (MainForm)FindForm(); 
    123             Debug.Assert(parent != null); 
    124             if (parent.WindowState == FormWindowState.Minimized || !parent.Visible) 
     123            if (parent != null && (parent.WindowState == FormWindowState.Minimized || !parent.Visible)) 
    125124            { 
    126125                parent.ShowNotificationBalloon(S._("New task added"), S._("{0} " + 
     
    241240            //Show a balloon to inform the user 
    242241            MainForm parent = (MainForm)FindForm(); 
    243             if (parent.WindowState == FormWindowState.Minimized || !parent.Visible) 
     242            if (parent != null && parent.WindowState == FormWindowState.Minimized || !parent.Visible) 
    244243            { 
    245244                string message = null; 
     
    249248                { 
    250249                    case LogLevel.WARNING: 
    251                         message = S._("The task {0} has completed with warnings", e.Task.UIText); 
     250                        message = S._("The task {0} has completed with warnings.", e.Task.UIText); 
    252251                        icon = ToolTipIcon.Warning; 
    253252                        break; 
    254253                    case LogLevel.ERROR: 
    255                         message = S._("The task {0} has completed with errors", e.Task.UIText); 
     254                        message = S._("The task {0} has completed with errors.", e.Task.UIText); 
    256255                        icon = ToolTipIcon.Error; 
    257256                        break; 
    258257                    case LogLevel.FATAL: 
    259                         message = S._("The task {0} did not complete", e.Task.UIText); 
     258                        message = S._("The task {0} did not complete.", e.Task.UIText); 
    260259                        icon = ToolTipIcon.Error; 
    261260                        break; 
    262261                    default: 
    263                         message = S._("The task {0} has completed", e.Task.UIText); 
     262                        message = S._("The task {0} has completed.", e.Task.UIText); 
    264263                        icon = ToolTipIcon.Info; 
    265264                        break; 
  • branches/eraser6/Eraser/Strings.NL.resx

    r865 r866  
    196196    <value>Wordt uitgevoerd...</value> 
    197197  </data> 
    198   <data name="The task {0} has completed with warnings" xml:space="preserve"> 
    199     <value>(Untranslated)</value> 
    200   </data> 
    201   <data name="The task {0} has completed with errors" xml:space="preserve"> 
    202     <value>(Untranslated)</value> 
    203   </data> 
    204   <data name="The task {0} did not complete" xml:space="preserve"> 
    205     <value>(Untranslated)</value> 
    206   </data> 
    207   <data name="The task {0} has completed" xml:space="preserve"> 
     198  <data name="The task {0} has completed with warnings." xml:space="preserve"> 
     199    <value>(Untranslated)</value> 
     200  </data> 
     201  <data name="The task {0} has completed with errors." xml:space="preserve"> 
     202    <value>(Untranslated)</value> 
     203  </data> 
     204  <data name="The task {0} did not complete." xml:space="preserve"> 
     205    <value>(Untranslated)</value> 
     206  </data> 
     207  <data name="The task {0} has completed." xml:space="preserve"> 
    208208    <value>(Untranslated)</value> 
    209209  </data> 
  • branches/eraser6/Eraser/Strings.en.resx

    r865 r866  
    196196    <value>Running...</value> 
    197197  </data> 
    198   <data name="The task {0} has completed with warnings" xml:space="preserve"> 
    199     <value>The task {0} has completed with warnings</value> 
    200   </data> 
    201   <data name="The task {0} has completed with errors" xml:space="preserve"> 
    202     <value>The task {0} has completed with errors</value> 
    203   </data> 
    204   <data name="The task {0} did not complete" xml:space="preserve"> 
    205     <value>The task {0} did not complete</value> 
    206   </data> 
    207   <data name="The task {0} has completed" xml:space="preserve"> 
    208     <value>The task {0} has completed</value> 
     198  <data name="The task {0} has completed with warnings." xml:space="preserve"> 
     199    <value>The task {0} has completed with warnings.</value> 
     200  </data> 
     201  <data name="The task {0} has completed with errors." xml:space="preserve"> 
     202    <value>The task {0} has completed with errors.</value> 
     203  </data> 
     204  <data name="The task {0} did not complete." xml:space="preserve"> 
     205    <value>The task {0} did not complete.</value> 
     206  </data> 
     207  <data name="The task {0} has completed." xml:space="preserve"> 
     208    <value>The task {0} has completed.</value> 
    209209  </data> 
    210210  <data name="Task executed" xml:space="preserve"> 
  • branches/eraser6/Eraser/Strings.resx

    r865 r866  
    196196    <value>Running...</value> 
    197197  </data> 
    198   <data name="The task {0} has completed with warnings" xml:space="preserve"> 
    199     <value>The task {0} has completed with warnings</value> 
    200   </data> 
    201   <data name="The task {0} has completed with errors" xml:space="preserve"> 
    202     <value>The task {0} has completed with errors</value> 
    203   </data> 
    204   <data name="The task {0} did not complete" xml:space="preserve"> 
    205     <value>The task {0} did not complete</value> 
    206   </data> 
    207   <data name="The task {0} has completed" xml:space="preserve"> 
    208     <value>The task {0} has completed</value> 
     198  <data name="The task {0} has completed with warnings." xml:space="preserve"> 
     199    <value>The task {0} has completed with warnings.</value> 
     200  </data> 
     201  <data name="The task {0} has completed with errors." xml:space="preserve"> 
     202    <value>The task {0} has completed with errors.</value> 
     203  </data> 
     204  <data name="The task {0} did not complete." xml:space="preserve"> 
     205    <value>The task {0} did not complete.</value> 
     206  </data> 
     207  <data name="The task {0} has completed." xml:space="preserve"> 
     208    <value>The task {0} has completed.</value> 
    209209  </data> 
    210210  <data name="Task executed" xml:space="preserve"> 
Note: See TracChangeset for help on using the changeset viewer.