Changeset 2680


Ignore:
Timestamp:
5/24/2012 10:31:52 AM (3 years ago)
Author:
lowjoel
Message:

Add a menu strip to the Reports List View containing a Delete command like the Windows Problems and Solutions dialog.

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

Legend:

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

    r2679 r2680  
    5050        private void InitializeComponent() 
    5151        { 
     52            this.components = new System.ComponentModel.Container(); 
    5253            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BlackBoxMainForm)); 
    5354            this.MainLbl = new System.Windows.Forms.Label(); 
     
    5960            this.ReportsLvErrorColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 
    6061            this.DataCollectionPolicyLbl = new System.Windows.Forms.LinkLabel(); 
     62            this.ReportsMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 
     63            this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 
    6164            ((System.ComponentModel.ISupportInitialize)(this.BlackBoxPic)).BeginInit(); 
     65            this.ReportsMenuStrip.SuspendLayout(); 
    6266            this.SuspendLayout(); 
    6367            //  
     
    9599            this.ReportsLvTimestampColumn, 
    96100            this.ReportsLvErrorColumn}); 
     101            this.ReportsLv.ContextMenuStrip = this.ReportsMenuStrip; 
    97102            this.ReportsLv.FullRowSelect = true; 
    98103            this.ReportsLv.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; 
     
    117122            this.DataCollectionPolicyLbl.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.DataCollectionPolicyLbl_LinkClicked); 
    118123            //  
     124            // ReportsMenuStrip 
     125            //  
     126            this.ReportsMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 
     127            this.deleteToolStripMenuItem}); 
     128            this.ReportsMenuStrip.Name = "ReportsMenuStrip"; 
     129            resources.ApplyResources(this.ReportsMenuStrip, "ReportsMenuStrip"); 
     130            this.ReportsMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.ReportsMenuStrip_Opening); 
     131            //  
     132            // deleteToolStripMenuItem 
     133            //  
     134            this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; 
     135            resources.ApplyResources(this.deleteToolStripMenuItem, "deleteToolStripMenuItem"); 
     136            this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); 
     137            //  
    119138            // BlackBoxMainForm 
    120139            //  
     
    133152            this.ShowInTaskbar = false; 
    134153            ((System.ComponentModel.ISupportInitialize)(this.BlackBoxPic)).EndInit(); 
     154            this.ReportsMenuStrip.ResumeLayout(false); 
    135155            this.ResumeLayout(false); 
    136156            this.PerformLayout(); 
     
    148168        private System.Windows.Forms.ColumnHeader ReportsLvErrorColumn; 
    149169        private System.Windows.Forms.LinkLabel DataCollectionPolicyLbl; 
     170        private System.Windows.Forms.ContextMenuStrip ReportsMenuStrip; 
     171        private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; 
    150172    } 
    151173} 
  • trunk/eraser/Eraser.BlackBox/BlackBoxMainForm.cs

    r2679 r2680  
    6464        } 
    6565 
     66        private void ReportsMenuStrip_Opening(object sender, CancelEventArgs e) 
     67        { 
     68            if (ReportsLv.SelectedItems.Count == 0) 
     69            { 
     70                e.Cancel = true; 
     71            } 
     72        } 
     73 
     74        private void deleteToolStripMenuItem_Click(object sender, EventArgs e) 
     75        { 
     76        } 
     77 
    6678        private void DataCollectionPolicyLbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) 
    6779        { 
  • trunk/eraser/Eraser.BlackBox/BlackBoxMainForm.resx

    r2679 r2680  
    148148  </data> 
    149149  <data name="&gt;&gt;MainLbl.ZOrder" xml:space="preserve"> 
    150     <value>5</value> 
     150    <value>6</value> 
    151151  </data> 
    152152  <data name="SubmitBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
     
    175175  </data> 
    176176  <data name="&gt;&gt;SubmitBtn.ZOrder" xml:space="preserve"> 
    177     <value>4</value> 
     177    <value>5</value> 
    178178  </data> 
    179179  <data name="PostponeBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
     
    202202  </data> 
    203203  <data name="&gt;&gt;PostponeBtn.ZOrder" xml:space="preserve"> 
    204     <value>3</value> 
     204    <value>4</value> 
    205205  </data> 
    206206  <data name="BlackBoxPic.Location" type="System.Drawing.Point, System.Drawing"> 
     
    223223  </data> 
    224224  <data name="&gt;&gt;BlackBoxPic.ZOrder" xml:space="preserve"> 
    225     <value>2</value> 
     225    <value>3</value> 
    226226  </data> 
    227227  <data name="ReportsLv.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
     
    240240    <value>250</value> 
    241241  </data> 
     242  <metadata name="ReportsMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 
     243    <value>17, 17</value> 
     244  </metadata> 
     245  <data name="deleteToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> 
     246    <value>152, 22</value> 
     247  </data> 
     248  <data name="deleteToolStripMenuItem.Text" xml:space="preserve"> 
     249    <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> 
    242260  <data name="ReportsLv.Location" type="System.Drawing.Point, System.Drawing"> 
    243261    <value>12, 157</value> 
     
    259277  </data> 
    260278  <data name="&gt;&gt;ReportsLv.ZOrder" xml:space="preserve"> 
    261     <value>1</value> 
     279    <value>2</value> 
    262280  </data> 
    263281  <data name="DataCollectionPolicyLbl.AutoSize" type="System.Boolean, mscorlib"> 
     
    286304  </data> 
    287305  <data name="&gt;&gt;DataCollectionPolicyLbl.ZOrder" xml:space="preserve"> 
    288     <value>0</value> 
     306    <value>1</value> 
    289307  </data> 
    290308  <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> 
     
    18751893    <value>System.Windows.Forms.ColumnHeader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    18761894  </data> 
     1895  <data name="&gt;&gt;deleteToolStripMenuItem.Name" xml:space="preserve"> 
     1896    <value>deleteToolStripMenuItem</value> 
     1897  </data> 
     1898  <data name="&gt;&gt;deleteToolStripMenuItem.Type" xml:space="preserve"> 
     1899    <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     1900  </data> 
    18771901  <data name="&gt;&gt;$this.Name" xml:space="preserve"> 
    18781902    <value>BlackBoxMainForm</value> 
Note: See TracChangeset for help on using the changeset viewer.