Debugger - breakpoints - add num breakpoints and num active

This commit is contained in:
adelikat 2014-12-13 17:48:11 +00:00
parent 9997c4fa8d
commit 822c8562b0
2 changed files with 26 additions and 3 deletions

View File

@ -34,6 +34,7 @@
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.BreakpointStatsLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// AddBreakpointButton
@ -74,11 +75,11 @@
this.BreakpointView.GridLines = true;
this.BreakpointView.HideSelection = false;
this.BreakpointView.ItemCount = 0;
this.BreakpointView.Location = new System.Drawing.Point(0, 0);
this.BreakpointView.Location = new System.Drawing.Point(0, 19);
this.BreakpointView.Name = "BreakpointView";
this.BreakpointView.SelectAllInProgress = false;
this.BreakpointView.selectedItem = -1;
this.BreakpointView.Size = new System.Drawing.Size(193, 384);
this.BreakpointView.Size = new System.Drawing.Size(193, 365);
this.BreakpointView.TabIndex = 5;
this.BreakpointView.TabStop = false;
this.BreakpointView.UseCompatibleStateImageBehavior = false;
@ -103,10 +104,20 @@
this.columnHeader3.Text = "Name";
this.columnHeader3.Width = 80;
//
// BreakpointStatsLabel
//
this.BreakpointStatsLabel.AutoSize = true;
this.BreakpointStatsLabel.Location = new System.Drawing.Point(3, 3);
this.BreakpointStatsLabel.Name = "BreakpointStatsLabel";
this.BreakpointStatsLabel.Size = new System.Drawing.Size(35, 13);
this.BreakpointStatsLabel.TabIndex = 8;
this.BreakpointStatsLabel.Text = "label1";
//
// BreakpointControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.BreakpointStatsLabel);
this.Controls.Add(this.RemoveBreakpointButton);
this.Controls.Add(this.AddBreakpointButton);
this.Controls.Add(this.BreakpointView);
@ -114,6 +125,7 @@
this.Size = new System.Drawing.Size(193, 413);
this.Load += new System.EventHandler(this.BreakpointControl_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
@ -125,5 +137,6 @@
private System.Windows.Forms.Button AddBreakpointButton;
private System.Windows.Forms.Button RemoveBreakpointButton;
private System.Windows.Forms.ColumnHeader columnHeader3;
private System.Windows.Forms.Label BreakpointStatsLabel;
}
}

View File

@ -30,7 +30,7 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
private void BreakpointControl_Load(object sender, EventArgs e)
{
UpdateStatsLabel();
}
private void BreakPointView_QueryItemText(int index, int column, out string text)
@ -83,6 +83,7 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
BreakpointView.ItemCount = Breakpoints.Count;
BreakpointView.Refresh();
UpdateBreakpointRemoveButton();
UpdateStatsLabel();
}
else
{
@ -93,6 +94,7 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
public void Shutdown()
{
Breakpoints.Clear();
UpdateStatsLabel();
}
private void AddBreakpointButton_Click(object sender, EventArgs e)
@ -110,6 +112,7 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
BreakpointView.ItemCount = Breakpoints.Count;
UpdateBreakpointRemoveButton();
UpdateStatsLabel();
}
private IEnumerable<int> SelectedIndices
@ -141,6 +144,7 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
BreakpointView.ItemCount = Breakpoints.Count;
UpdateBreakpointRemoveButton();
UpdateStatsLabel();
}
}
}
@ -169,6 +173,7 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
BreakpointView.ItemCount = Breakpoints.Count;
UpdateBreakpointRemoveButton();
UpdateStatsLabel();
}
}
}
@ -180,5 +185,10 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
RemoveBreakpointButton_Click(null, null);
}
}
private void UpdateStatsLabel()
{
BreakpointStatsLabel.Text = string.Format("{0} Total / {1} Active", Breakpoints.Count(), Breakpoints.Count(x => x.Active));
}
}
}