本文整理汇总了C#中PlayList.AddItem方法的典型用法代码示例。如果您正苦于以下问题:C# PlayList.AddItem方法的具体用法?C# PlayList.AddItem怎么用?C# PlayList.AddItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayList
的用法示例。
在下文中一共展示了PlayList.AddItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RaiseContentChangeWhenAddItemToPlayList
public void RaiseContentChangeWhenAddItemToPlayList()
{
var newItem = new PlayListItem(new ImageId(30), "");
var playListListener = MockRepository.GenerateMock<PlayListListener>();
playListListener.Expect(l => l.ContentChanged(new PlayListContent(0, "", new []{newItem})));
var playList = new PlayList(new PlayListContent(0, "", new PlayListItem[0]), null);
playList.AddListener(playListListener);
playList.AddItem(newItem);
}
示例2: UpdateListViewWhenContentOfPlayListChange
public void UpdateListViewWhenContentOfPlayListChange()
{
var playList = new PlayList(new PlayListContent(2, "name", new PlayListItem[0]), null);
m_Model.SelectedPlayListChanged(playList);
var newItem = new PlayListItem(new ImageId(33), "trentatre");
playList.AddItem(newItem);
Assert.That(GetPlayListItemsInListView(), Is.EquivalentTo(new[] {newItem}));
}
示例3: UplaodListViewOnlyForChnageInSelectedPlayList
public void UplaodListViewOnlyForChnageInSelectedPlayList()
{
var playList1 = new PlayList(new PlayListContent(1, "name", new PlayListItem[0]), null);
var playList2 = new PlayList(new PlayListContent(2, "name", new PlayListItem[0]), null);
m_Model.SelectedPlayListChanged(playList1);
m_Model.SelectedPlayListChanged(playList2);
m_Model.SelectedPlayListChanged(playList1);
var newItem = new PlayListItem(new ImageId(33), "trentatre");
playList2.AddItem(newItem);
Assert.That(GetPlayListItemsInListView(), Is.Empty);
}