Ram Watch - implement Edit Watch function

This commit is contained in:
andres.delikat 2011-01-21 04:14:30 +00:00
parent 162b43c240
commit 15d2cfbd60
2 changed files with 14 additions and 1 deletions

View File

@ -172,6 +172,19 @@ namespace BizHawk.MultiClient
void EditWatch() void EditWatch()
{ {
ListView.SelectedIndexCollection indexes = WatchListView.SelectedIndices;
RamWatchNewWatch r = new RamWatchNewWatch();
int x = indexes[0];
r.SetToEditWatch( watchList[x] );
r.ShowDialog();
if (r.userSelected == true)
{
//TODO: check if edited watch is an exact duplicate and prevent?
//TODO: changes have been made, flag it
watchList[x] = r.watch;
DisplayWatchList();
}
} }
void RemoveWatch() void RemoveWatch()

View File

@ -20,7 +20,7 @@ namespace BizHawk.MultiClient
InitializeComponent(); InitializeComponent();
} }
public void SetEditToEditWatch(Watch w) public void SetToEditWatch(Watch w)
{ {
//Sets this dialog to Edit Watch and receives default values //Sets this dialog to Edit Watch and receives default values
this.Text = "Edit Watch"; this.Text = "Edit Watch";