0
我目前正在使用ObjectListView,现在,我试图得到它,所以如果我点击一个对象(行),它会给我关于该歌曲(列表形式)的信息。对象列表<Song>
目前,我有一个自定义列表:
public Song(string title, string artist, string album, string genre, string time, int playcount, string location)
{
this.Title = title;
this.Artist = artist;
this.Album = album;
this.Genre = genre;
this.Time = Convert_Time(Convert.ToInt32(time));
this.PlayCount = playcount;
this.Location = Convert_Location(location) ;
}
我希望能够将对象转换成列表形式。
private void olvMain_SelectedIndexChanged(object sender, EventArgs e)
{
object thing = olvMain.GetItem(olvMain.SelectedIndex).RowObject;
}
目前它返回Genesis.Song,它恰好包含所选歌曲的所有数据。但是,我无法以对象形式访问信息。有无论如何转换/提取它?
是的......我不能相信我忘了:/ tysm:P – Mike 2009-10-22 22:52:12