Winform窗体初始化Listview控件
时间:2011-04-28 来源:心澄欲遣
#region 初始化历史播放列表
/// <summary>
/// 初始化历史播放列表
/// </summary>
private void InitHistoryPlayList(string date, string deviceID)
{
try
{
this.lvwHistoryPlaylists.Items.Clear();
List<CheckedItRecord> checkItRecordList = timsControl.GetPublishSuccessInfo(date, deviceID);
if (checkItRecordList != null)
{
foreach (CheckedItRecord checkedItRecord in checkItRecordList)
{
ListViewItem lvitem = new ListViewItem();
lvitem.Tag = checkedItRecord.RecordID;
lvitem.SubItems[0].Text = "";
lvitem.SubItems.Add(checkedItRecord.BeginTime.ToString());
lvitem.SubItems.Add(checkedItRecord.Content);
lvwHistoryPlaylists.Items.Add(lvitem);
}
}
}
catch (Exception exp)
{
MessageBox.Show("初始化当前播放列表出错!");
}
}
#endregion
相关阅读 更多 +