Ram Watch - Insert Separator Menu & Toolbar items
This commit is contained in:
parent
479dc75b32
commit
e696508bc2
|
@ -71,6 +71,8 @@
|
|||
this.MoveDownStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.WatchCountLabel = new System.Windows.Forms.Label();
|
||||
this.MessageLabel = new System.Windows.Forms.Label();
|
||||
this.insertSeparatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
|
@ -211,6 +213,7 @@
|
|||
this.editWatchToolStripMenuItem,
|
||||
this.removeWatchToolStripMenuItem,
|
||||
this.duplicateWatchToolStripMenuItem,
|
||||
this.insertSeparatorToolStripMenuItem,
|
||||
this.toolStripSeparator3,
|
||||
this.moveUpToolStripMenuItem,
|
||||
this.moveDownToolStripMenuItem});
|
||||
|
@ -317,6 +320,7 @@
|
|||
this.EditWatchToolStripButton1,
|
||||
this.cutToolStripButton,
|
||||
this.DuplicateWatchToolStripButton,
|
||||
this.toolStripButton1,
|
||||
this.toolStripSeparator5,
|
||||
this.MoveUpStripButton1,
|
||||
this.MoveDownStripButton1});
|
||||
|
@ -447,6 +451,25 @@
|
|||
this.MessageLabel.TabIndex = 5;
|
||||
this.MessageLabel.Text = " ";
|
||||
//
|
||||
// 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(202, 22);
|
||||
this.insertSeparatorToolStripMenuItem.Text = "Insert Separator";
|
||||
this.insertSeparatorToolStripMenuItem.Click += new System.EventHandler(this.insertSeparatorToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripButton1
|
||||
//
|
||||
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripButton1.Name = "toolStripButton1";
|
||||
this.toolStripButton1.Size = new System.Drawing.Size(23, 22);
|
||||
this.toolStripButton1.Text = "-";
|
||||
this.toolStripButton1.ToolTipText = "Insert Separator";
|
||||
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
||||
//
|
||||
// RamWatch
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -518,5 +541,7 @@
|
|||
private System.Windows.Forms.ToolStripButton EditWatchToolStripButton1;
|
||||
private System.Windows.Forms.ToolStripButton DuplicateWatchToolStripButton;
|
||||
private System.Windows.Forms.Label MessageLabel;
|
||||
private System.Windows.Forms.ToolStripMenuItem insertSeparatorToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||
}
|
||||
}
|
|
@ -14,7 +14,6 @@ namespace BizHawk.MultiClient
|
|||
public partial class RamWatch : Form
|
||||
{
|
||||
//TODO:
|
||||
//implement separator feature
|
||||
//Display value differently based on signed or hex, endian, type
|
||||
//Currently address is 4 digit hex, but at some point it needs to be smart enough to adjust size based on the emulator core used
|
||||
//Make a context menu for add/remove/Dup/etc, make the context menu & edit watch windows appear in relation to where they right clicked
|
||||
|
@ -639,6 +638,24 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
private void InsertSeparator()
|
||||
{
|
||||
Watch w = new Watch();
|
||||
w.type = atype.SEPARATOR;
|
||||
|
||||
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
|
||||
int x;
|
||||
if (indexes.Count > 0)
|
||||
{
|
||||
x = indexes[0];
|
||||
if (indexes[0] > 0)
|
||||
watchList.Insert(indexes[0], w);
|
||||
}
|
||||
else
|
||||
watchList.Add(w);
|
||||
DisplayWatchList();
|
||||
}
|
||||
|
||||
private void cutToolStripButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
RemoveWatch();
|
||||
|
@ -668,5 +685,15 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
DuplicateWatch();
|
||||
}
|
||||
|
||||
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
InsertSeparator();
|
||||
}
|
||||
|
||||
private void insertSeparatorToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
InsertSeparator();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -234,6 +234,14 @@
|
|||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAElJREFUOE9jYBje
|
||||
4MCBA/9hmGSfgjQCNcExlE+8OUPUAHRnI4cB0eFByBCiAhOXIURphsUTxbEAMghmCEk2o6cUijQTn+wo
|
||||
UAkAY/VsRlvaylwAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAExJREFUOE9jYBgF
|
||||
gyAEutob/s+dM5NszPDgwYP/3759/v/kycP/ly6d/w/if/r4kiD+DwQgtWADQBhkAIwNomEKwAwcAGzA
|
||||
KBgOIQAAPXilpdAN2CQAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 822 B |
Loading…
Reference in New Issue