Ram Watch - Set New Watch prompt location to open over the listview item of the dialog

This commit is contained in:
andres.delikat 2011-01-21 17:23:13 +00:00
parent 55e60f438e
commit 6384ca52d6
2 changed files with 9 additions and 1 deletions

View File

@ -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();
}

View File

@ -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)