Ram Watch - add conditional Unfreeze All context menu item, allow unfreeze on multiple highlighted frozen addresses
This commit is contained in:
parent
c3c3fd6c20
commit
efbeac59b5
|
@ -87,6 +87,7 @@
|
||||||
this.showChangeCountsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.showChangeCountsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.showPreviousValueToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
this.showPreviousValueToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.showDifferenceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.showDifferenceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.showDomainToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.WatchCountLabel = new System.Windows.Forms.Label();
|
this.WatchCountLabel = new System.Windows.Forms.Label();
|
||||||
this.MessageLabel = new System.Windows.Forms.Label();
|
this.MessageLabel = new System.Windows.Forms.Label();
|
||||||
this.MemDomainLabel = new System.Windows.Forms.Label();
|
this.MemDomainLabel = new System.Windows.Forms.Label();
|
||||||
|
@ -114,7 +115,7 @@
|
||||||
this.Diff = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.Diff = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.DomainColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.DomainColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.Notes = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.Notes = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.showDomainToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
this.unfreezeAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.menuStrip1.SuspendLayout();
|
this.menuStrip1.SuspendLayout();
|
||||||
this.contextMenuStrip1.SuspendLayout();
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
|
@ -490,6 +491,7 @@
|
||||||
this.duplicateToolStripMenuItem,
|
this.duplicateToolStripMenuItem,
|
||||||
this.pokeToolStripMenuItem,
|
this.pokeToolStripMenuItem,
|
||||||
this.freezeToolStripMenuItem,
|
this.freezeToolStripMenuItem,
|
||||||
|
this.unfreezeAllToolStripMenuItem,
|
||||||
this.viewInHexEditorToolStripMenuItem,
|
this.viewInHexEditorToolStripMenuItem,
|
||||||
this.toolStripSeparator6,
|
this.toolStripSeparator6,
|
||||||
this.insertSeperatorToolStripMenuItem,
|
this.insertSeperatorToolStripMenuItem,
|
||||||
|
@ -501,7 +503,7 @@
|
||||||
this.showDifferenceToolStripMenuItem,
|
this.showDifferenceToolStripMenuItem,
|
||||||
this.showDomainToolStripMenuItem});
|
this.showDomainToolStripMenuItem});
|
||||||
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
this.contextMenuStrip1.Size = new System.Drawing.Size(189, 324);
|
this.contextMenuStrip1.Size = new System.Drawing.Size(189, 346);
|
||||||
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
|
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip1_Opening);
|
||||||
//
|
//
|
||||||
// editToolStripMenuItem
|
// editToolStripMenuItem
|
||||||
|
@ -606,6 +608,13 @@
|
||||||
this.showDifferenceToolStripMenuItem.Text = "Show Difference";
|
this.showDifferenceToolStripMenuItem.Text = "Show Difference";
|
||||||
this.showDifferenceToolStripMenuItem.Click += new System.EventHandler(this.showDifferenceToolStripMenuItem_Click);
|
this.showDifferenceToolStripMenuItem.Click += new System.EventHandler(this.showDifferenceToolStripMenuItem_Click);
|
||||||
//
|
//
|
||||||
|
// showDomainToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.showDomainToolStripMenuItem.Name = "showDomainToolStripMenuItem";
|
||||||
|
this.showDomainToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
|
||||||
|
this.showDomainToolStripMenuItem.Text = "Show Domain";
|
||||||
|
this.showDomainToolStripMenuItem.Click += new System.EventHandler(this.showDomainToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// WatchCountLabel
|
// WatchCountLabel
|
||||||
//
|
//
|
||||||
this.WatchCountLabel.AutoSize = true;
|
this.WatchCountLabel.AutoSize = true;
|
||||||
|
@ -876,12 +885,12 @@
|
||||||
this.Notes.Text = "Notes";
|
this.Notes.Text = "Notes";
|
||||||
this.Notes.Width = 128;
|
this.Notes.Width = 128;
|
||||||
//
|
//
|
||||||
// showDomainToolStripMenuItem
|
// unfreezeAllToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.showDomainToolStripMenuItem.Name = "showDomainToolStripMenuItem";
|
this.unfreezeAllToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Unfreeze;
|
||||||
this.showDomainToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
|
this.unfreezeAllToolStripMenuItem.Name = "unfreezeAllToolStripMenuItem";
|
||||||
this.showDomainToolStripMenuItem.Text = "Show Domain";
|
this.unfreezeAllToolStripMenuItem.Size = new System.Drawing.Size(188, 22);
|
||||||
this.showDomainToolStripMenuItem.Click += new System.EventHandler(this.showDomainToolStripMenuItem_Click);
|
this.unfreezeAllToolStripMenuItem.Text = "Unfreeze &All";
|
||||||
//
|
//
|
||||||
// RamWatch
|
// RamWatch
|
||||||
//
|
//
|
||||||
|
@ -1003,5 +1012,6 @@
|
||||||
private System.Windows.Forms.ColumnHeader DomainColumn;
|
private System.Windows.Forms.ColumnHeader DomainColumn;
|
||||||
private System.Windows.Forms.ToolStripMenuItem domainToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem domainToolStripMenuItem;
|
||||||
private System.Windows.Forms.ToolStripMenuItem showDomainToolStripMenuItem;
|
private System.Windows.Forms.ToolStripMenuItem showDomainToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem unfreezeAllToolStripMenuItem;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -998,53 +998,93 @@ namespace BizHawk.MultiClient
|
||||||
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
|
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
|
||||||
if (indexes.Count == 0)
|
if (indexes.Count == 0)
|
||||||
{
|
{
|
||||||
contextMenuStrip1.Items[0].Visible = false;
|
editToolStripMenuItem.Visible = false;
|
||||||
contextMenuStrip1.Items[1].Visible = false;
|
removeToolStripMenuItem.Visible = false;
|
||||||
contextMenuStrip1.Items[2].Visible = false;
|
duplicateToolStripMenuItem.Visible = false;
|
||||||
contextMenuStrip1.Items[3].Visible = false;
|
pokeToolStripMenuItem.Visible = false;
|
||||||
contextMenuStrip1.Items[4].Visible = false;
|
freezeToolStripMenuItem.Visible = false;
|
||||||
contextMenuStrip1.Items[5].Visible = false;
|
viewInHexEditorToolStripMenuItem.Visible = false;
|
||||||
contextMenuStrip1.Items[6].Visible = false;
|
toolStripSeparator6.Visible = false;
|
||||||
contextMenuStrip1.Items[8].Visible = false;
|
insertSeperatorToolStripMenuItem.Visible = false;
|
||||||
contextMenuStrip1.Items[9].Visible = false;
|
moveUpToolStripMenuItem1.Visible = false;
|
||||||
|
moveDownToolStripMenuItem1.Visible = false;
|
||||||
|
toolStripSeparator2.Visible = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (int x = 0; x < contextMenuStrip1.Items.Count; x++)
|
for (int i = 0; i < contextMenuStrip1.Items.Count; i++)
|
||||||
contextMenuStrip1.Items[x].Visible = true;
|
{
|
||||||
|
contextMenuStrip1.Items[i].Visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (indexes.Count == 1)
|
if (indexes.Count == 1)
|
||||||
{
|
{
|
||||||
if (Global.CheatList.IsActiveCheat(Domain, Watches[indexes[0]].Address))
|
if (Global.CheatList.IsActiveCheat(Domain, Watches[indexes[0]].Address))
|
||||||
{
|
{
|
||||||
contextMenuStrip1.Items[4].Text = "&Unfreeze address";
|
freezeToolStripMenuItem.Text = "&Unfreeze address";
|
||||||
contextMenuStrip1.Items[4].Image =
|
freezeToolStripMenuItem.Image =
|
||||||
BizHawk.MultiClient.Properties.Resources.Unfreeze;
|
BizHawk.MultiClient.Properties.Resources.Unfreeze;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
contextMenuStrip1.Items[4].Text = "&Freeze address";
|
freezeToolStripMenuItem.Text = "&Freeze address";
|
||||||
contextMenuStrip1.Items[4].Image =
|
freezeToolStripMenuItem.Image =
|
||||||
|
BizHawk.MultiClient.Properties.Resources.Freeze;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool allCheats = true;
|
||||||
|
foreach (int i in indexes)
|
||||||
|
{
|
||||||
|
if (!Global.CheatList.IsActiveCheat(Domain, Watches[i].Address))
|
||||||
|
{
|
||||||
|
allCheats = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (allCheats)
|
||||||
|
{
|
||||||
|
freezeToolStripMenuItem.Text = "&Unfreeze address";
|
||||||
|
freezeToolStripMenuItem.Image =
|
||||||
|
BizHawk.MultiClient.Properties.Resources.Unfreeze;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
freezeToolStripMenuItem.Text = "&Freeze address";
|
||||||
|
freezeToolStripMenuItem.Image =
|
||||||
BizHawk.MultiClient.Properties.Resources.Freeze;
|
BizHawk.MultiClient.Properties.Resources.Freeze;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Global.Config.RamWatchShowChangeColumn)
|
if (Global.Config.RamWatchShowChangeColumn)
|
||||||
contextMenuStrip1.Items[11].Text = "Hide change counts";
|
{
|
||||||
|
showChangeCountsToolStripMenuItem1.Text = "Hide change counts";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
contextMenuStrip1.Items[11].Text = "Show change counts";
|
{
|
||||||
|
showChangeCountsToolStripMenuItem1.Text = "Show change counts";
|
||||||
|
}
|
||||||
|
|
||||||
if (Global.Config.RamWatchShowPrevColumn)
|
if (Global.Config.RamWatchShowPrevColumn)
|
||||||
contextMenuStrip1.Items[12].Text = "Hide previous value";
|
{
|
||||||
|
showPreviousValueToolStripMenuItem1.Text = "Hide previous value";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
contextMenuStrip1.Items[12].Text = "Show previous value";
|
{
|
||||||
|
showPreviousValueToolStripMenuItem1.Text = "Show previous value";
|
||||||
|
}
|
||||||
|
|
||||||
if (Global.Config.RamWatchShowDiffColumn)
|
if (Global.Config.RamWatchShowDiffColumn)
|
||||||
contextMenuStrip1.Items[13].Text = "Hide difference value";
|
{
|
||||||
|
showDifferenceToolStripMenuItem.Text = "Hide difference value";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
contextMenuStrip1.Items[13].Text = "Show difference value";
|
{
|
||||||
|
showDifferenceToolStripMenuItem.Text = "Show difference value";
|
||||||
|
}
|
||||||
|
|
||||||
if (Global.Config.RamWatchShowDomainColumn)
|
if (Global.Config.RamWatchShowDomainColumn)
|
||||||
{
|
{
|
||||||
|
@ -1055,6 +1095,15 @@ namespace BizHawk.MultiClient
|
||||||
showDomainToolStripMenuItem.Text = "Show domain";
|
showDomainToolStripMenuItem.Text = "Show domain";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Global.CheatList.HasActiveCheats)
|
||||||
|
{
|
||||||
|
unfreezeAllToolStripMenuItem.Visible = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unfreezeAllToolStripMenuItem.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WatchListView_MouseDoubleClick(object sender, MouseEventArgs e)
|
private void WatchListView_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||||
|
|
Loading…
Reference in New Issue