diff --git a/BizHawk.MultiClient/RamWatch.Designer.cs b/BizHawk.MultiClient/RamWatch.Designer.cs index 5e86b49880..b8cce977e1 100644 --- a/BizHawk.MultiClient/RamWatch.Designer.cs +++ b/BizHawk.MultiClient/RamWatch.Designer.cs @@ -264,6 +264,7 @@ this.WatchListView.UseCompatibleStateImageBehavior = false; this.WatchListView.View = System.Windows.Forms.View.Details; this.WatchListView.AfterLabelEdit += new System.Windows.Forms.LabelEditEventHandler(this.WatchListView_AfterLabelEdit); + this.WatchListView.SelectedIndexChanged += new System.EventHandler(this.WatchListView_SelectedIndexChanged); // // Address // diff --git a/BizHawk.MultiClient/RamWatch.cs b/BizHawk.MultiClient/RamWatch.cs index 3576118ddc..1de8f1ce68 100644 --- a/BizHawk.MultiClient/RamWatch.cs +++ b/BizHawk.MultiClient/RamWatch.cs @@ -14,11 +14,10 @@ namespace BizHawk.MultiClient public partial class RamWatch : Form { //TODO: - //Recent files & autoload //Keep track of changes to watch list in order to prompt the user to save changes, also use this to enable/disable things like quick save //implement separator feature - //Display address as hex - //Since window is resizable, save window size + //Display value differently based on signed or hex, endian, type + //Currently address is 4 digit hex, but at some point it needs to be smart enough to adjust size based on the emulator core used int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired int defaultHeight; List watchList = new List(); @@ -71,7 +70,7 @@ namespace BizHawk.MultiClient for (int x = 0; x < watchList.Count; x++) { - str += watchList[x].address.ToString() + "\t"; //TODO: Make hex + str += string.Format("{0:X4}", watchList[x].address) + "\t"; str += watchList[x].GetTypeByChar().ToString() + "\t"; str += watchList[x].GetSignedByChar().ToString() + "\t"; @@ -297,7 +296,7 @@ namespace BizHawk.MultiClient WatchListView.Items.Clear(); for (int x = 0; x < watchList.Count; x++) { - ListViewItem item = new ListViewItem(watchList[x].address.ToString()); + ListViewItem item = new ListViewItem(String.Format("{0:X4}", watchList[x].address)); item.SubItems.Add(watchList[x].value.ToString()); item.SubItems.Add(watchList[x].notes); WatchListView.Items.Add(item); @@ -437,5 +436,12 @@ namespace BizHawk.MultiClient { this.Size = new System.Drawing.Size(defaultWidth, defaultHeight); } + + private void WatchListView_SelectedIndexChanged(object sender, EventArgs e) + { + //TODO: debug/testing + ListView.SelectedIndexCollection i = this.WatchListView.SelectedIndices; + i = WatchListView.SelectedIndices; + } } }