Changeset 2676


Ignore:
Timestamp:
05/24/12 09:41:51 (3 years ago)
Author:
lowjoel
Message:

Instead of hooking the OnGUIIdle event of the application, we should implement the INotifiable interface defined recently to push notifications to the user. This will prevent the dialog from springing up when we show the erasure confirmation dialog when invoked from the shell context menu.

Location:
trunk/eraser/Eraser.BlackBox
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.BlackBox/Eraser.BlackBox.csproj

    r2669 r2676  
    9090      <DependentUpon>BlackBoxMainForm.cs</DependentUpon> 
    9191    </Compile> 
     92    <Compile Include="BlackBoxNotifier.cs" /> 
    9293    <Compile Include="BlackBoxReport.cs" /> 
    9394    <Compile Include="BlackBoxUploadForm.cs"> 
  • trunk/eraser/Eraser.BlackBox/Plugin.cs

    r2516 r2676  
    3636            BlackBox blackBox = BlackBox.Get(); 
    3737 
    38             //Hook the Application's idle loop to display the form 
    39             Application.Idle += OnGUIIdle; 
     38            bool allSubmitted = true; 
     39            foreach (BlackBoxReport report in blackBox.GetDumps()) 
     40                if (!report.Submitted) 
     41                { 
     42                    allSubmitted = false; 
     43                    break; 
     44                } 
     45 
     46            if (!allSubmitted) 
     47            { 
     48                Host.Instance.Notifiers.Add(new BlackBoxNotifier()); 
     49            } 
    4050        } 
    4151 
     
    6878        { 
    6979            Application.Idle -= OnGUIIdle; 
    70             BlackBox blackBox = BlackBox.Get(); 
    71  
    72             bool allSubmitted = true; 
    73             foreach (BlackBoxReport report in blackBox.GetDumps()) 
    74                 if (!report.Submitted) 
    75                 { 
    76                     allSubmitted = false; 
    77                     break; 
    78                 } 
    79  
    80             if (allSubmitted) 
    81                 return; 
    82  
    83             BlackBoxMainForm form = new BlackBoxMainForm(); 
    84             form.Show(); 
     80             
    8581        } 
    8682    } 
Note: See TracChangeset for help on using the changeset viewer.