Ram Watch - default window size menu item
This commit is contained in:
parent
a5a15dda28
commit
60d32c4606
|
@ -60,6 +60,8 @@
|
|||
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripButton3 = new System.Windows.Forms.ToolStripButton();
|
||||
this.WatchCountLabel = new System.Windows.Forms.Label();
|
||||
this.restoreWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
|
@ -85,6 +87,8 @@
|
|||
this.appendFileToolStripMenuItem,
|
||||
this.recentToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.restoreWindowSizeToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
this.exitToolStripMenuItem});
|
||||
this.filesToolStripMenuItem.Name = "filesToolStripMenuItem";
|
||||
this.filesToolStripMenuItem.Size = new System.Drawing.Size(40, 20);
|
||||
|
@ -323,6 +327,18 @@
|
|||
this.WatchCountLabel.TabIndex = 4;
|
||||
this.WatchCountLabel.Text = "0 watches";
|
||||
//
|
||||
// restoreWindowSizeToolStripMenuItem
|
||||
//
|
||||
this.restoreWindowSizeToolStripMenuItem.Name = "restoreWindowSizeToolStripMenuItem";
|
||||
this.restoreWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
|
||||
this.restoreWindowSizeToolStripMenuItem.Text = "Restore Window Size";
|
||||
this.restoreWindowSizeToolStripMenuItem.Click += new System.EventHandler(this.restoreWindowSizeToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(201, 6);
|
||||
//
|
||||
// RamWatch
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -381,5 +397,7 @@
|
|||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripMenuItem clearToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem autoLoadToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem restoreWindowSizeToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
}
|
||||
}
|
|
@ -19,7 +19,8 @@ namespace BizHawk.MultiClient
|
|||
//implement separator feature
|
||||
//Display address as hex
|
||||
//Since window is resizable, save window size
|
||||
|
||||
int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired
|
||||
int defaultHeight;
|
||||
List<Watch> watchList = new List<Watch>();
|
||||
string currentWatchFile = "";
|
||||
|
||||
|
@ -306,6 +307,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void RamWatch_Load(object sender, EventArgs e)
|
||||
{
|
||||
defaultWidth = this.Size.Width; //Save these first so that the user can restore to its original size
|
||||
defaultHeight = this.Size.Height;
|
||||
|
||||
if (Global.Config.RamWatchWndx >= 0 && Global.Config.RamWatchWndy >= 0)
|
||||
this.Location = new Point(Global.Config.RamWatchWndx, Global.Config.RamWatchWndy);
|
||||
|
||||
|
@ -428,5 +432,10 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.RamWatchWidth = this.Right - this.Left;
|
||||
Global.Config.RamWatchHeight = this.Bottom - this.Top;
|
||||
}
|
||||
|
||||
private void restoreWindowSizeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Size = new System.Drawing.Size(defaultWidth, defaultHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue