Ram Search - hooking up some windows stuff like saving window size position
This commit is contained in:
parent
03d891cdf8
commit
2913e8167a
|
@ -33,6 +33,10 @@
|
|||
|
||||
// RamSearch Settings
|
||||
public bool AutoLoadRamSearch = false;
|
||||
public int RamSearchWndx = -1; //Negative numbers will be ignored even with save window position set
|
||||
public int RamSearchWndy = -1;
|
||||
public int RamSearchWidth = -1; //Negative numbers will be ignored
|
||||
public int RamSearchHeight = -1;
|
||||
|
||||
//Movie Settings
|
||||
public RecentFiles RecentMovies = new RecentFiles(8);
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
this.GreaterThanRadio = new System.Windows.Forms.RadioButton();
|
||||
this.LessThanRadio = new System.Windows.Forms.RadioButton();
|
||||
this.AutoSearchCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.SearchtoolStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
|
||||
|
@ -112,7 +113,7 @@
|
|||
this.PoketoolStripButton1});
|
||||
this.SearchtoolStrip1.Location = new System.Drawing.Point(3, 0);
|
||||
this.SearchtoolStrip1.Name = "SearchtoolStrip1";
|
||||
this.SearchtoolStrip1.Size = new System.Drawing.Size(185, 25);
|
||||
this.SearchtoolStrip1.Size = new System.Drawing.Size(154, 25);
|
||||
this.SearchtoolStrip1.TabIndex = 0;
|
||||
this.SearchtoolStrip1.Text = "Search";
|
||||
//
|
||||
|
@ -192,8 +193,9 @@
|
|||
//
|
||||
// listView1
|
||||
//
|
||||
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.Address,
|
||||
this.Value,
|
||||
|
@ -243,6 +245,7 @@
|
|||
this.openToolStripMenuItem,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.saveToolStripMenuItem,
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem,
|
||||
this.hackyAutoLoadToolStripMenuItem,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
|
@ -290,7 +293,7 @@
|
|||
//
|
||||
// toolStripContainer1
|
||||
//
|
||||
this.toolStripContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
this.toolStripContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
// toolStripContainer1.ContentPanel
|
||||
|
@ -465,6 +468,7 @@
|
|||
//
|
||||
// CompareToBox
|
||||
//
|
||||
this.CompareToBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.CompareToBox.Controls.Add(this.NumberOfChangesBox);
|
||||
this.CompareToBox.Controls.Add(this.SpecificAddressBox);
|
||||
this.CompareToBox.Controls.Add(this.SpecificValueBox);
|
||||
|
@ -551,6 +555,7 @@
|
|||
//
|
||||
// ComparisonBox
|
||||
//
|
||||
this.ComparisonBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ComparisonBox.Controls.Add(this.label1);
|
||||
this.ComparisonBox.Controls.Add(this.DifferentByBox);
|
||||
this.ComparisonBox.Controls.Add(this.ModuloBox);
|
||||
|
@ -681,6 +686,7 @@
|
|||
//
|
||||
// AutoSearchCheckBox
|
||||
//
|
||||
this.AutoSearchCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.AutoSearchCheckBox.AutoSize = true;
|
||||
this.AutoSearchCheckBox.Location = new System.Drawing.Point(250, 432);
|
||||
this.AutoSearchCheckBox.Name = "AutoSearchCheckBox";
|
||||
|
@ -689,6 +695,13 @@
|
|||
this.AutoSearchCheckBox.Text = "Auto Search";
|
||||
this.AutoSearchCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// restoreOriginalWindowSizeToolStripMenuItem
|
||||
//
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Name = "restoreOriginalWindowSizeToolStripMenuItem";
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Size = new System.Drawing.Size(204, 22);
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Text = "Restore Window Size";
|
||||
this.restoreOriginalWindowSizeToolStripMenuItem.Click += new System.EventHandler(this.restoreOriginalWindowSizeToolStripMenuItem_Click);
|
||||
//
|
||||
// RamSearch
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -706,6 +719,8 @@
|
|||
this.Name = "RamSearch";
|
||||
this.Text = "Ram Search";
|
||||
this.Load += new System.EventHandler(this.RamSearch_Load);
|
||||
this.Resize += new System.EventHandler(this.RamSearch_Resize);
|
||||
this.LocationChanged += new System.EventHandler(this.RamSearch_LocationChanged);
|
||||
this.SearchtoolStrip1.ResumeLayout(false);
|
||||
this.SearchtoolStrip1.PerformLayout();
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
|
@ -789,5 +804,6 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem restoreOriginalWindowSizeToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -18,7 +18,8 @@ namespace BizHawk.MultiClient
|
|||
//Save window position & Size
|
||||
//Menu Bar
|
||||
//Reset window position item
|
||||
|
||||
int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired
|
||||
int defaultHeight;
|
||||
|
||||
List<Watch> searchList = new List<Watch>();
|
||||
|
||||
|
@ -29,12 +30,23 @@ namespace BizHawk.MultiClient
|
|||
|
||||
private void RamSearch_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;
|
||||
|
||||
SetTotal();
|
||||
|
||||
for (int x = 0; x < Global.Emulator.MainMemory.Size; x++)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
if (Global.Config.RamSearchWndx >= 0 && Global.Config.RamSearchWndy >= 0)
|
||||
this.Location = new Point(Global.Config.RamSearchWndx, Global.Config.RamSearchWndy);
|
||||
|
||||
if (Global.Config.RamSearchWidth >= 0 && Global.Config.RamSearchHeight >= 0)
|
||||
{
|
||||
this.Size = new System.Drawing.Size(Global.Config.RamSearchWidth, Global.Config.RamSearchHeight);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetTotal()
|
||||
|
@ -151,7 +163,6 @@ namespace BizHawk.MultiClient
|
|||
private void WatchtoolStripButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
//TODO: get listview watch object and feed to ram watch
|
||||
//Global.MainForm.RamWatch1 = new RamWatch();
|
||||
|
||||
if (!Global.MainForm.RamWatch1.IsDisposed)
|
||||
Global.MainForm.RamWatch1.Focus();
|
||||
|
@ -161,5 +172,22 @@ namespace BizHawk.MultiClient
|
|||
Global.MainForm.RamWatch1.Show();
|
||||
}
|
||||
}
|
||||
|
||||
private void RamSearch_LocationChanged(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamSearchWndx = this.Location.X;
|
||||
Global.Config.RamSearchWndy = this.Location.Y;
|
||||
}
|
||||
|
||||
private void RamSearch_Resize(object sender, EventArgs e)
|
||||
{
|
||||
Global.Config.RamSearchWidth = this.Right - this.Left;
|
||||
Global.Config.RamSearchHeight = this.Bottom - this.Top;
|
||||
}
|
||||
|
||||
private void restoreOriginalWindowSizeToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Size = new System.Drawing.Size(defaultWidth, defaultHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,20 +171,23 @@
|
|||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>259, 17</value>
|
||||
</metadata>
|
||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>358, 17</value>
|
||||
</metadata>
|
||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAjpJREFUOE+Nkl9I
|
||||
U2EYxl0RQuFQI7oIuqno30U3XXoRVCAJXbibWkTgRRd2MZoZjcks13CptLQIIqi2Ylu2dJrQFslkljZo
|
||||
rXmxtanMsJVIus1xMl319JyzU2bN6oMf34Hv/J73fb9zFEV/WXq9S1u2a5Nm1erizaWl5UXC7Ex2Mhq/
|
||||
02I8aqSWJrkV9cvtPut4MoOpHBD8DDydB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DQl/AS67XoBys2zA7f5CQOdYoXKEUpJwEnwgMXKtVwzokA24dON5wM+2e96xXbYtVBZk3ic4AeLE
|
||||
ZOmeWzagsdF21h5IYYB3IMwstD1J+DHEFZ/OorLyyIjsCPmu/c0Pux2Pza33cS+UwTOOEP5a6GKUjKdy
|
||||
0NS3TlG2EvWSERYe7LN986gQajsInVb7Vq1uiJ1p8+auul+ia3gcN+++yteoNKOUbKSObP4ZsOCsEuWI
|
||||
cS8cOh2O15kTPGwnp8k5ad4r3E3S5xPkwo8ktA2vCjHTHlFuarLPlpSsdfHoGNlBNpKtZBvZRNaRVaI8
|
||||
7z5QC0/NElmpLO/lkY7slKoouP/K4uh9HUcHE+bdcJ6qFytLsp5v7CKrJXFR+P3JYDB4LjQIsjWtVJb1
|
||||
8PyHvOafshRWIV3Kee5aqfJ/y98BrcSCFWcIYBgAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ClearChangeCountstoolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
@ -202,9 +205,6 @@
|
|||
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>358, 17</value>
|
||||
</metadata>
|
||||
<data name="DataSizetoolStripSplitButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
|
|
Loading…
Reference in New Issue