Changeset 2683


Ignore:
Timestamp:
5/24/2012 1:25:30 PM (2 years ago)
Author:
lowjoel
Message:

Also display submitted reports, with a status of "Submitted." This allows users to delete submitted reports.

Location:
trunk/eraser/Eraser.BlackBox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.BlackBox/BlackBoxMainForm.Designer.cs

    r2682 r2683  
    6262            this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    6363            this.DataCollectionPolicyLbl = new System.Windows.Forms.LinkLabel(); 
     64            this.ReportsLvStatusColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 
    6465            ((System.ComponentModel.ISupportInitialize)(this.BlackBoxPic)).BeginInit(); 
    6566            this.ReportsMenuStrip.SuspendLayout(); 
     
    99100            this.ReportsLv.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 
    100101            this.ReportsLvTimestampColumn, 
    101             this.ReportsLvErrorColumn}); 
     102            this.ReportsLvErrorColumn, 
     103            this.ReportsLvStatusColumn}); 
    102104            this.ReportsLv.ContextMenuStrip = this.ReportsMenuStrip; 
    103105            this.ReportsLv.FullRowSelect = true; 
     
    107109            this.ReportsLv.View = System.Windows.Forms.View.Details; 
    108110            this.ReportsLv.ItemActivate += new System.EventHandler(this.ReportsLv_ItemActivate); 
     111            this.ReportsLv.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ReportsLv_ItemCheck); 
    109112            //  
    110113            // ReportsLvTimestampColumn 
     
    136139            this.DataCollectionPolicyLbl.TabStop = true; 
    137140            this.DataCollectionPolicyLbl.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.DataCollectionPolicyLbl_LinkClicked); 
     141            //  
     142            // ReportsLvStatusColumn 
     143            //  
     144            resources.ApplyResources(this.ReportsLvStatusColumn, "ReportsLvStatusColumn"); 
    138145            //  
    139146            // BlackBoxMainForm 
     
    173180        private System.Windows.Forms.ContextMenuStrip ReportsMenuStrip; 
    174181        private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; 
     182        private System.Windows.Forms.ColumnHeader ReportsLvStatusColumn; 
    175183    } 
    176184} 
  • trunk/eraser/Eraser.BlackBox/BlackBoxMainForm.cs

    r2682 r2683  
    4545            foreach (BlackBoxReport report in BlackBox.GetDumps()) 
    4646            { 
    47                 if (report.Submitted) 
    48                     continue; 
    49  
    5047                ListViewItem item = ReportsLv.Items.Add(report.Timestamp.ToString( 
    51                     "F", CultureInfo.CurrentCulture)); 
     48                    "g", CultureInfo.CurrentCulture)); 
    5249                if (report.StackTrace.Count != 0) 
    5350                    item.SubItems.Add(report.StackTrace[0].ExceptionType); 
     51                else 
     52                    item.SubItems.Add(string.Empty); 
     53                item.SubItems.Add(report.Submitted ? 
     54                    S._("Submitted") : S._("Not submitted")); 
    5455                item.Tag = report; 
    55                 item.Checked = true; 
     56                item.Checked = !report.Submitted; 
    5657            } 
    5758            ReportsLv.EndUpdate(); 
     59        } 
     60 
     61        private void ReportsLv_ItemCheck(object sender, ItemCheckEventArgs e) 
     62        { 
     63            BlackBoxReport report = ((BlackBoxReport)ReportsLv.Items[e.Index].Tag); 
     64            if (e.NewValue == CheckState.Checked && report.Submitted) 
     65                e.NewValue = CheckState.Unchecked; 
    5866        } 
    5967 
  • trunk/eraser/Eraser.BlackBox/BlackBoxMainForm.resx

    r2682 r2683  
    232232  </data> 
    233233  <data name="ReportsLvTimestampColumn.Width" type="System.Int32, mscorlib"> 
    234     <value>280</value> 
     234    <value>160</value> 
    235235  </data> 
    236236  <data name="ReportsLvErrorColumn.Text" xml:space="preserve"> 
     
    239239  <data name="ReportsLvErrorColumn.Width" type="System.Int32, mscorlib"> 
    240240    <value>250</value> 
     241  </data> 
     242  <data name="ReportsLvStatusColumn.Text" xml:space="preserve"> 
     243    <value>Status</value> 
     244  </data> 
     245  <data name="ReportsLvStatusColumn.Width" type="System.Int32, mscorlib"> 
     246    <value>120</value> 
    241247  </data> 
    242248  <metadata name="ReportsMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 
    243249    <value>17, 17</value> 
    244250  </metadata> 
     251  <data name="ReportsMenuStrip.Size" type="System.Drawing.Size, System.Drawing"> 
     252    <value>108, 26</value> 
     253  </data> 
     254  <data name="&gt;&gt;ReportsMenuStrip.Name" xml:space="preserve"> 
     255    <value>ReportsMenuStrip</value> 
     256  </data> 
     257  <data name="&gt;&gt;ReportsMenuStrip.Type" xml:space="preserve"> 
     258    <value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     259  </data> 
     260  <data name="ReportsLv.Location" type="System.Drawing.Point, System.Drawing"> 
     261    <value>12, 142</value> 
     262  </data> 
     263  <data name="ReportsLv.Size" type="System.Drawing.Size, System.Drawing"> 
     264    <value>537, 376</value> 
     265  </data> 
     266  <data name="ReportsLv.TabIndex" type="System.Int32, mscorlib"> 
     267    <value>2</value> 
     268  </data> 
     269  <data name="&gt;&gt;ReportsLv.Name" xml:space="preserve"> 
     270    <value>ReportsLv</value> 
     271  </data> 
     272  <data name="&gt;&gt;ReportsLv.Type" xml:space="preserve"> 
     273    <value>System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     274  </data> 
     275  <data name="&gt;&gt;ReportsLv.Parent" xml:space="preserve"> 
     276    <value>$this</value> 
     277  </data> 
     278  <data name="&gt;&gt;ReportsLv.ZOrder" xml:space="preserve"> 
     279    <value>2</value> 
     280  </data> 
    245281  <data name="deleteToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
    246282    <value>152, 22</value> 
     
    248284  <data name="deleteToolStripMenuItem.Text" xml:space="preserve"> 
    249285    <value>Delete</value> 
    250   </data> 
    251   <data name="ReportsMenuStrip.Size" type="System.Drawing.Size, System.Drawing"> 
    252     <value>108, 26</value> 
    253   </data> 
    254   <data name="&gt;&gt;ReportsMenuStrip.Name" xml:space="preserve"> 
    255     <value>ReportsMenuStrip</value> 
    256   </data> 
    257   <data name="&gt;&gt;ReportsMenuStrip.Type" xml:space="preserve"> 
    258     <value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    259   </data> 
    260   <data name="ReportsLv.Location" type="System.Drawing.Point, System.Drawing"> 
    261     <value>12, 142</value> 
    262   </data> 
    263   <data name="ReportsLv.Size" type="System.Drawing.Size, System.Drawing"> 
    264     <value>537, 376</value> 
    265   </data> 
    266   <data name="ReportsLv.TabIndex" type="System.Int32, mscorlib"> 
    267     <value>2</value> 
    268   </data> 
    269   <data name="&gt;&gt;ReportsLv.Name" xml:space="preserve"> 
    270     <value>ReportsLv</value> 
    271   </data> 
    272   <data name="&gt;&gt;ReportsLv.Type" xml:space="preserve"> 
    273     <value>System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    274   </data> 
    275   <data name="&gt;&gt;ReportsLv.Parent" xml:space="preserve"> 
    276     <value>$this</value> 
    277   </data> 
    278   <data name="&gt;&gt;ReportsLv.ZOrder" xml:space="preserve"> 
    279     <value>2</value> 
    280286  </data> 
    281287  <data name="DataCollectionPolicyLbl.AutoSize" type="System.Boolean, mscorlib"> 
     
    18991905    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    19001906  </data> 
     1907  <data name="&gt;&gt;ReportsLvStatusColumn.Name" xml:space="preserve"> 
     1908    <value>ReportsLvStatusColumn</value> 
     1909  </data> 
     1910  <data name="&gt;&gt;ReportsLvStatusColumn.Type" xml:space="preserve"> 
     1911    <value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     1912  </data> 
    19011913  <data name="&gt;&gt;$this.Name" xml:space="preserve"> 
    19021914    <value>BlackBoxMainForm</value> 
Note: See TracChangeset for help on using the changeset viewer.