Ram Watch - save window size too
This commit is contained in:
parent
887d82770c
commit
a5a15dda28
|
@ -13,6 +13,8 @@
|
|||
public RecentFiles RecentWatches = new RecentFiles(8);
|
||||
public int RamWatchWndx = -1; //Negative numbers will be ignored even with save window position set
|
||||
public int RamWatchWndy = -1;
|
||||
public int RamWatchWidth = -1; //Negative numbers will be ignored
|
||||
public int RamWatchHeight = -1;
|
||||
|
||||
// Client Hotkey Bindings
|
||||
public string HardResetBinding = "LeftShift+Tab";
|
||||
|
|
|
@ -337,6 +337,7 @@
|
|||
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
|
||||
this.Text = "Ram Watch";
|
||||
this.Load += new System.EventHandler(this.RamWatch_Load);
|
||||
this.Resize += new System.EventHandler(this.RamWatch_Resize);
|
||||
this.LocationChanged += new System.EventHandler(this.RamWatch_LocationChanged);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace BizHawk.MultiClient
|
|||
//implement separator feature
|
||||
//Display address as hex
|
||||
//Since window is resizable, save window size
|
||||
//Fix window position setting, shoudl it be set in a specific event?
|
||||
|
||||
List<Watch> watchList = new List<Watch>();
|
||||
string currentWatchFile = "";
|
||||
|
@ -309,6 +308,14 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
if (Global.Config.RamWatchWndx >= 0 && Global.Config.RamWatchWndy >= 0)
|
||||
this.Location = new Point(Global.Config.RamWatchWndx, Global.Config.RamWatchWndy);
|
||||
|
||||
if (Global.Config.RamWatchWidth >= 0 && Global.Config.RamWatchHeight >= 0)
|
||||
{
|
||||
//this.Right = this.Left + Global.Config.RamWatchWidth;
|
||||
//this.Bottom = this.Top + Global.Config.RamWatchHeight;
|
||||
this.Size = new System.Drawing.Size(Global.Config.RamWatchWidth, Global.Config.RamWatchHeight);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void filesToolStripMenuItem_DropDownOpened(object sender, EventArgs e)
|
||||
|
@ -415,5 +422,11 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.RamWatchWndx = this.Location.X;
|
||||
Global.Config.RamWatchWndy = this.Location.Y;
|
||||
}
|
||||
|
||||
private void RamWatch_Resize(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamWatchWidth = this.Right - this.Left;
|
||||
Global.Config.RamWatchHeight = this.Bottom - this.Top;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue