Play Movie dialog - hook up details list

This commit is contained in:
andres.delikat 2011-05-13 00:17:59 +00:00
parent c6c96af860
commit 06f771292f
4 changed files with 22 additions and 7 deletions

View File

@ -102,6 +102,7 @@
this.MovieView.TabIndex = 3;
this.MovieView.UseCompatibleStateImageBehavior = false;
this.MovieView.View = System.Windows.Forms.View.Details;
this.MovieView.SelectedIndexChanged += new System.EventHandler(this.MovieView_SelectedIndexChanged);
//
// columnHeader1
//

View File

@ -111,5 +111,19 @@ namespace BizHawk.MultiClient
{
}
private void MovieView_SelectedIndexChanged(object sender, EventArgs e)
{
DetailsView.Items.Clear();
int x = MovieView.SelectedIndices[0];
Dictionary<string, string> h = MovieList[x].GetHeaderInfo();
foreach (var kvp in h)
{
ListViewItem item = new ListViewItem(kvp.Key);
item.SubItems.Add(kvp.Value);
DetailsView.Items.Add(item);
}
}
}
}

View File

@ -107,7 +107,7 @@ namespace BizHawk.MultiClient
using (StreamWriter sw = new StreamWriter(Filename))
{
foreach (KeyValuePair<string, string> kvp in Header.GetHeaderInfo())
foreach (KeyValuePair<string, string> kvp in Header.HeaderParams)
{
sw.WriteLine(kvp.Key + " " + kvp.Value);
}
@ -319,5 +319,10 @@ namespace BizHawk.MultiClient
{
return rerecordCount;
}
public Dictionary<string, string> GetHeaderInfo()
{
return Header.HeaderParams;
}
}
}

View File

@ -14,7 +14,7 @@ namespace BizHawk.MultiClient
//GameName - Which game
//TODO: GUID, checksum of game, other stuff
Dictionary<string, string> HeaderParams = new Dictionary<string, string>(); //Platform specific options go here
public Dictionary<string, string> HeaderParams = new Dictionary<string, string>(); //Platform specific options go here
public List<string> Comments = new List<string>();
public const string EMULATIONVERSION = "EmulationVersion";
@ -80,10 +80,5 @@ namespace BizHawk.MultiClient
HeaderParams.TryGetValue(key, out value);
return value;
}
public Dictionary<string, string> GetHeaderInfo()
{
return HeaderParams;
}
}
}