Various small things on tool dialogs, mostly adding/removing todos

This commit is contained in:
andres.delikat 2011-03-24 14:48:15 +00:00
parent d21a4ecd88
commit 2c75645a1f
5 changed files with 96 additions and 94 deletions

View File

@ -910,7 +910,7 @@ namespace BizHawk.MultiClient
Global.Config.DisableCheatsOnLoad ^= true;
}
private void DisableAllCheats()
public void DisableAllCheats()
{
for (int x = 0; x < cheatList.Count; x++)
cheatList[x].Disable();

View File

@ -13,7 +13,6 @@ namespace BizHawk.MultiClient
public partial class HexEditor : Form
{
//TODO:
//Freeze address feature
//different back color for frozen addresses
//Find text box - autohighlights matches, and shows total matches
//Users can customize background, & text colors
@ -21,6 +20,9 @@ namespace BizHawk.MultiClient
//Text box showing currently highlighted address(es) & total
//Show num addresses in group box title (show "address" if 1 address)
//big font for currently mouse over'ed value?
//Unfreeze All items - this one is tricky though, the dialog should keep track of
// which addresses were frozen using this dialog (its own cheatList), and only
// remove those from the Cheats window cheat list
int defaultWidth;
int defaultHeight;

View File

@ -11,7 +11,7 @@ namespace BizHawk.MultiClient
public class MemoryViewer : Panel
{
//TODO: highlighting and address determining for 2 & 4 byte viewing
//2 & 4 byte typign in
//2 & 4 byte typing in
//show nibbles on top of highlighted address
//Multi-highlight

View File

@ -45,12 +45,15 @@
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.watchesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.memoryDomainsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.newWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.editWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.removeWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.duplicateWatchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.insertSeparatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pokeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.freezeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.insertSeparatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.clearChangeCountsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.moveUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -59,6 +62,7 @@
this.showChangeCountsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showPreviousValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.prevValueShowsChangeAmountToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.restoreWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.WatchListView = new BizHawk.VirtualListView();
this.Address = new System.Windows.Forms.ColumnHeader();
@ -71,6 +75,7 @@
this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.duplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.pokeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.freezeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewInHexEditorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.insertSeperatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -81,28 +86,23 @@
this.showPreviousValueToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.prevValueAsChangeAmountToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.WatchCountLabel = new System.Windows.Forms.Label();
this.MessageLabel = new System.Windows.Forms.Label();
this.newToolStripButton = new System.Windows.Forms.ToolStripButton();
this.openToolStripButton = new System.Windows.Forms.ToolStripButton();
this.saveToolStripButton = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
this.NewWatchStripButton1 = new System.Windows.Forms.ToolStripButton();
this.EditWatchToolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.cutToolStripButton = new System.Windows.Forms.ToolStripButton();
this.ClearChangeCountstoolStripButton = new System.Windows.Forms.ToolStripButton();
this.DuplicateWatchToolStripButton = new System.Windows.Forms.ToolStripButton();
this.PoketoolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.FreezetoolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.MoveUpStripButton1 = new System.Windows.Forms.ToolStripButton();
this.MoveDownStripButton1 = new System.Windows.Forms.ToolStripButton();
this.freezeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.freezeAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.FreezetoolStripButton2 = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.memoryDomainsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.WatchCountLabel = new System.Windows.Forms.Label();
this.MessageLabel = new System.Windows.Forms.Label();
this.MemDomainLabel = new System.Windows.Forms.Label();
this.menuStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
@ -246,6 +246,17 @@
this.watchesToolStripMenuItem.Text = "&Watches";
this.watchesToolStripMenuItem.DropDownOpened += new System.EventHandler(this.watchesToolStripMenuItem_DropDownOpened);
//
// memoryDomainsToolStripMenuItem
//
this.memoryDomainsToolStripMenuItem.Name = "memoryDomainsToolStripMenuItem";
this.memoryDomainsToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
this.memoryDomainsToolStripMenuItem.Text = "Memory Domains";
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(219, 6);
//
// newWatchToolStripMenuItem
//
this.newWatchToolStripMenuItem.Name = "newWatchToolStripMenuItem";
@ -278,14 +289,6 @@
this.duplicateWatchToolStripMenuItem.Text = "&Duplicate Watch";
this.duplicateWatchToolStripMenuItem.Click += new System.EventHandler(this.duplicateWatchToolStripMenuItem_Click);
//
// insertSeparatorToolStripMenuItem
//
this.insertSeparatorToolStripMenuItem.Name = "insertSeparatorToolStripMenuItem";
this.insertSeparatorToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
this.insertSeparatorToolStripMenuItem.Text = "Insert Separator";
this.insertSeparatorToolStripMenuItem.Click += new System.EventHandler(this.insertSeparatorToolStripMenuItem_Click);
//
// pokeAddressToolStripMenuItem
//
this.pokeAddressToolStripMenuItem.Name = "pokeAddressToolStripMenuItem";
@ -294,6 +297,22 @@
this.pokeAddressToolStripMenuItem.Text = "Poke Address";
this.pokeAddressToolStripMenuItem.Click += new System.EventHandler(this.pokeAddressToolStripMenuItem_Click);
//
// freezeAddressToolStripMenuItem
//
this.freezeAddressToolStripMenuItem.Name = "freezeAddressToolStripMenuItem";
this.freezeAddressToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.freezeAddressToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
this.freezeAddressToolStripMenuItem.Text = "Freeze Address";
this.freezeAddressToolStripMenuItem.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem_Click);
//
// insertSeparatorToolStripMenuItem
//
this.insertSeparatorToolStripMenuItem.Name = "insertSeparatorToolStripMenuItem";
this.insertSeparatorToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.I)));
this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
this.insertSeparatorToolStripMenuItem.Text = "Insert Separator";
this.insertSeparatorToolStripMenuItem.Click += new System.EventHandler(this.insertSeparatorToolStripMenuItem_Click);
//
// clearChangeCountsToolStripMenuItem
//
this.clearChangeCountsToolStripMenuItem.Name = "clearChangeCountsToolStripMenuItem";
@ -359,6 +378,11 @@
this.prevValueShowsChangeAmountToolStripMenuItem.Text = "Prev Value as change";
this.prevValueShowsChangeAmountToolStripMenuItem.Click += new System.EventHandler(this.prevValueShowsChangeAmountToolStripMenuItem_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(188, 6);
//
// restoreWindowSizeToolStripMenuItem
//
this.restoreWindowSizeToolStripMenuItem.Name = "restoreWindowSizeToolStripMenuItem";
@ -470,6 +494,13 @@
this.pokeToolStripMenuItem.Text = "&Poke";
this.pokeToolStripMenuItem.Click += new System.EventHandler(this.pokeToolStripMenuItem_Click);
//
// freezeToolStripMenuItem
//
this.freezeToolStripMenuItem.Name = "freezeToolStripMenuItem";
this.freezeToolStripMenuItem.Size = new System.Drawing.Size(227, 22);
this.freezeToolStripMenuItem.Text = "&Freeze";
this.freezeToolStripMenuItem.Click += new System.EventHandler(this.freezeToolStripMenuItem_Click);
//
// viewInHexEditorToolStripMenuItem
//
this.viewInHexEditorToolStripMenuItem.Name = "viewInHexEditorToolStripMenuItem";
@ -553,35 +584,6 @@
this.toolStrip1.TabIndex = 2;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripSeparator
//
this.toolStripSeparator.Name = "toolStripSeparator";
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
//
// WatchCountLabel
//
this.WatchCountLabel.AutoSize = true;
this.WatchCountLabel.Location = new System.Drawing.Point(22, 57);
this.WatchCountLabel.Name = "WatchCountLabel";
this.WatchCountLabel.Size = new System.Drawing.Size(56, 13);
this.WatchCountLabel.TabIndex = 4;
this.WatchCountLabel.Text = "0 watches";
//
// MessageLabel
//
this.MessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.MessageLabel.AutoSize = true;
this.MessageLabel.Location = new System.Drawing.Point(28, 390);
this.MessageLabel.Name = "MessageLabel";
this.MessageLabel.Size = new System.Drawing.Size(187, 13);
this.MessageLabel.TabIndex = 5;
this.MessageLabel.Text = " ";
//
// newToolStripButton
//
this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -612,6 +614,11 @@
this.saveToolStripButton.Text = "&Save";
this.saveToolStripButton.Click += new System.EventHandler(this.saveToolStripButton_Click);
//
// toolStripSeparator
//
this.toolStripSeparator.Name = "toolStripSeparator";
this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
//
// NewWatchStripButton1
//
this.NewWatchStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -677,6 +684,16 @@
this.PoketoolStripButton2.ToolTipText = "Poke address";
this.PoketoolStripButton2.Click += new System.EventHandler(this.PoketoolStripButton2_Click);
//
// FreezetoolStripButton2
//
this.FreezetoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.FreezetoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.cheat;
this.FreezetoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.FreezetoolStripButton2.Name = "FreezetoolStripButton2";
this.FreezetoolStripButton2.Size = new System.Drawing.Size(23, 22);
this.FreezetoolStripButton2.Text = "Freeze";
this.FreezetoolStripButton2.Click += new System.EventHandler(this.FreezetoolStripButton2_Click);
//
// toolStripButton1
//
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -688,6 +705,11 @@
this.toolStripButton1.ToolTipText = "Insert Separator";
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
//
// MoveUpStripButton1
//
this.MoveUpStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -708,46 +730,24 @@
this.MoveDownStripButton1.Text = "Move Down";
this.MoveDownStripButton1.Click += new System.EventHandler(this.MoveDownStripButton1_Click);
//
// freezeToolStripMenuItem
// WatchCountLabel
//
this.freezeToolStripMenuItem.Name = "freezeToolStripMenuItem";
this.freezeToolStripMenuItem.Size = new System.Drawing.Size(227, 22);
this.freezeToolStripMenuItem.Text = "&Freeze";
this.freezeToolStripMenuItem.Click += new System.EventHandler(this.freezeToolStripMenuItem_Click);
this.WatchCountLabel.AutoSize = true;
this.WatchCountLabel.Location = new System.Drawing.Point(22, 57);
this.WatchCountLabel.Name = "WatchCountLabel";
this.WatchCountLabel.Size = new System.Drawing.Size(56, 13);
this.WatchCountLabel.TabIndex = 4;
this.WatchCountLabel.Text = "0 watches";
//
// freezeAddressToolStripMenuItem
// MessageLabel
//
this.freezeAddressToolStripMenuItem.Name = "freezeAddressToolStripMenuItem";
this.freezeAddressToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.freezeAddressToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
this.freezeAddressToolStripMenuItem.Text = "Freeze Address";
this.freezeAddressToolStripMenuItem.Click += new System.EventHandler(this.freezeAddressToolStripMenuItem_Click);
//
// FreezetoolStripButton2
//
this.FreezetoolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.FreezetoolStripButton2.Image = global::BizHawk.MultiClient.Properties.Resources.cheat;
this.FreezetoolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
this.FreezetoolStripButton2.Name = "FreezetoolStripButton2";
this.FreezetoolStripButton2.Size = new System.Drawing.Size(23, 22);
this.FreezetoolStripButton2.Text = "Freeze";
this.FreezetoolStripButton2.Click += new System.EventHandler(this.FreezetoolStripButton2_Click);
//
// toolStripSeparator7
//
this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(188, 6);
//
// memoryDomainsToolStripMenuItem
//
this.memoryDomainsToolStripMenuItem.Name = "memoryDomainsToolStripMenuItem";
this.memoryDomainsToolStripMenuItem.Size = new System.Drawing.Size(222, 22);
this.memoryDomainsToolStripMenuItem.Text = "Memory Domains";
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(219, 6);
this.MessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.MessageLabel.AutoSize = true;
this.MessageLabel.Location = new System.Drawing.Point(28, 390);
this.MessageLabel.Name = "MessageLabel";
this.MessageLabel.Size = new System.Drawing.Size(187, 13);
this.MessageLabel.TabIndex = 5;
this.MessageLabel.Text = " ";
//
// MemDomainLabel
//

View File

@ -789,17 +789,18 @@ namespace BizHawk.MultiClient
private void restoreWindowSizeToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Size = new System.Drawing.Size(defaultWidth, defaultHeight);
WatchListView.Columns[0].Width = 59; //Address
WatchListView.Columns[1].Width = 59; //Value
WatchListView.Columns[0].Width = Global.Config.RamWatchAddressWidth;
WatchListView.Columns[1].Width = Global.Config.RamWatchValueWidth;
if (showPreviousValueToolStripMenuItem.Checked)
WatchListView.Columns[2].Width = 59; //Prev
WatchListView.Columns[2].Width = Global.Config.RamWatchPrevWidth;
else
WatchListView.Columns[2].Width = 0;
if (showChangeCountsToolStripMenuItem.Checked)
WatchListView.Columns[3].Width = 54; //Change counts
WatchListView.Columns[3].Width = Global.Config.RamWatchChangeWidth;
else
WatchListView.Columns[3].Width = 0;
WatchListView.Columns[4].Width = 130; //Notes
WatchListView.Columns[4].Width = Global.Config.RamWatchNotesWidth;
}
private void newToolStripButton_Click(object sender, EventArgs e)
@ -1248,6 +1249,5 @@ namespace BizHawk.MultiClient
else
memoryDomainsToolStripMenuItem.Enabled = false;
}
}
}