diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 96278176f9..faa8202244 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -21,8 +21,8 @@ namespace BizHawk.MultiClient private bool wasPaused = false; //For handling automatic pausing when entering the menu private int FrameAdvanceDelay = 0; private bool EmulatorPaused = false; - RamWatch RamWatch1 = new RamWatch(); - RamSearch RamSearch1 = new RamSearch(); + public RamWatch RamWatch1 = new RamWatch(); + public RamSearch RamSearch1 = new RamSearch(); public MainForm(string[] args) { @@ -1014,16 +1014,26 @@ namespace BizHawk.MultiClient private void LoadRamWatch() { - RamWatch1 = new RamWatch(); - if (Global.Config.AutoLoadRamWatch) - RamWatch1.LoadWatchFromRecent(Global.Config.RecentWatches.GetRecentFileByPosition(0)); - RamWatch1.Show(); + if (!RamWatch1.IsHandleCreated || RamWatch1.IsDisposed) + { + RamWatch1 = new RamWatch(); + if (Global.Config.AutoLoadRamWatch) + RamWatch1.LoadWatchFromRecent(Global.Config.RecentWatches.GetRecentFileByPosition(0)); + RamWatch1.Show(); + } + else + RamWatch1.Focus(); } private void LoadRamSearch() { - RamSearch1 = new RamSearch(); - RamSearch1.Show(); + if (!RamSearch1.IsHandleCreated || RamSearch1.IsDisposed) + { + RamSearch1 = new RamSearch(); + RamSearch1.Show(); + } + else + RamSearch1.Focus(); } private void RAMWatchToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/BizHawk.MultiClient/tools/RamSearch.Designer.cs b/BizHawk.MultiClient/tools/RamSearch.Designer.cs index 21a53e1e71..a3ed0810e1 100644 --- a/BizHawk.MultiClient/tools/RamSearch.Designer.cs +++ b/BizHawk.MultiClient/tools/RamSearch.Designer.cs @@ -112,7 +112,7 @@ this.PoketoolStripButton1}); this.SearchtoolStrip1.Location = new System.Drawing.Point(3, 0); this.SearchtoolStrip1.Name = "SearchtoolStrip1"; - this.SearchtoolStrip1.Size = new System.Drawing.Size(154, 25); + this.SearchtoolStrip1.Size = new System.Drawing.Size(185, 25); this.SearchtoolStrip1.TabIndex = 0; this.SearchtoolStrip1.Text = "Search"; // @@ -170,6 +170,7 @@ this.WatchtoolStripButton1.Name = "WatchtoolStripButton1"; this.WatchtoolStripButton1.Size = new System.Drawing.Size(23, 22); this.WatchtoolStripButton1.Text = "toolStripButton1"; + this.WatchtoolStripButton1.Click += new System.EventHandler(this.WatchtoolStripButton1_Click); // // PoketoolStripButton1 // diff --git a/BizHawk.MultiClient/tools/RamSearch.cs b/BizHawk.MultiClient/tools/RamSearch.cs index 3b13ff80e6..b2c36b5530 100644 --- a/BizHawk.MultiClient/tools/RamSearch.cs +++ b/BizHawk.MultiClient/tools/RamSearch.cs @@ -147,5 +147,19 @@ namespace BizHawk.MultiClient else ModuloBox.Enabled = false; } + + 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(); + else + { + Global.MainForm.RamWatch1 = new RamWatch(); + Global.MainForm.RamWatch1.Show(); + } + } } } diff --git a/BizHawk.MultiClient/tools/RamSearch.resx b/BizHawk.MultiClient/tools/RamSearch.resx index 9a3182373f..fdbe107037 100644 --- a/BizHawk.MultiClient/tools/RamSearch.resx +++ b/BizHawk.MultiClient/tools/RamSearch.resx @@ -181,10 +181,10 @@ nwacI1lUVWkeyyF/Ztx0hAeDn4DoHOCl5MsAfgEYXgCeMXCIZ2da+rI0jxXqQGH3JRGg4H3P1tlIkJ1E ySh5Q8JfgKuul6DcVDDgbn8+oHM8XzlCKUk4CT6QGLnRKwV0FAy4cutFwM+2e96xXbYtVhZl3ic4AeLE ZOmeXzGgocF2wR5IYYB3IM4stj1F+DGkFZ/JoqLi+GjBEXJdh5oedTuemFsf4H4og+ccIfw138UYmUgJ - 0NS1TlO2EvWyERYfVtq+eVQItR2BTqt9q1bXx863eYXr7lfoGp7AbcfrXLVKM0bJRmrJtp8Bi86Dkhwx + 0NS1TlO2EvWyERYfVtq+eVQItR2BTqt9q1bXx863eYXr7lfoGp7AbfvrXLVKM0bJRmrJtp8Bi86Dkhwx HoBDp8OpWnOCh+3kHLkoz3uNu0n+fKKc/5HEtuFVIWbaL8mNjfa5kpL1Lh6dJLvJFrKD7CRbyQayRpIX 3Idr4KleJiuV5b080pE9chUF919ZGr2v48RgwrwPzrN1UmVZ1vONvWStLC4Jvz8ZDAbPpXpRtqaVyrIe - nv+Q1/1TlsM2ypfSzF0rV/5v+Tuw9oIXhM1Q5QAAAABJRU5ErkJggg== + nv+Q1/1TlsM2ypfSzF0rV/5v+TuvXYIWQgoMnAAAAABJRU5ErkJggg==