From 6384ca52d6417a46a2898a94e92575f5f961f9e0 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Fri, 21 Jan 2011 17:23:13 +0000 Subject: [PATCH] Ram Watch - Set New Watch prompt location to open over the listview item of the dialog --- BizHawk.MultiClient/RamWatch.cs | 7 ++++++- BizHawk.MultiClient/RamWatchNewWatch.cs | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/BizHawk.MultiClient/RamWatch.cs b/BizHawk.MultiClient/RamWatch.cs index f2eaaf53a8..7b6804b7e7 100644 --- a/BizHawk.MultiClient/RamWatch.cs +++ b/BizHawk.MultiClient/RamWatch.cs @@ -211,11 +211,16 @@ namespace BizHawk.MultiClient void AddNewWatch() { + Point p = new Point(WatchListView.Location.X, WatchListView.Location.Y); + Point q = new Point(); + q = PointToScreen(p); + RamWatchNewWatch r = new RamWatchNewWatch(); + r.location = q; + r.ShowDialog(); if (r.userSelected == true) { - //TODO: check for duplicates before adding? All parameters would have to match, otherwise it should be allowed watchList.Add(r.watch); DisplayWatchList(); } diff --git a/BizHawk.MultiClient/RamWatchNewWatch.cs b/BizHawk.MultiClient/RamWatchNewWatch.cs index f1afec21f4..7a931cf76e 100644 --- a/BizHawk.MultiClient/RamWatchNewWatch.cs +++ b/BizHawk.MultiClient/RamWatchNewWatch.cs @@ -15,6 +15,7 @@ namespace BizHawk.MultiClient public Watch watch = new Watch(); public bool userSelected = false; public bool customSetup = false; + public Point location = new Point(); public RamWatchNewWatch() { @@ -88,6 +89,8 @@ namespace BizHawk.MultiClient else LittleEndianRadio.Checked = true; } + if (location.X > 0 && location.Y > 0) + this.Location = location; } private void Cancel_Click(object sender, EventArgs e)