本文整理汇总了C#中XCore.Mediator.BroadcastPendingItems方法的典型用法代码示例。如果您正苦于以下问题:C# Mediator.BroadcastPendingItems方法的具体用法?C# Mediator.BroadcastPendingItems怎么用?C# Mediator.BroadcastPendingItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XCore.Mediator
的用法示例。
在下文中一共展示了Mediator.BroadcastPendingItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupDlg
/// <summary>
/// This method assumes all of the Find and UsedBy items are included in the fcfList.
/// </summary>
/// <param name="mediator"></param>
/// <param name="fcfList"></param>
/// <param name="startingItem"></param>
internal void SetupDlg(Mediator mediator, List<FindComboFillerBase> fcfList, FindComboFillerBase startingItem)
{
if (mediator == null)
throw new ArgumentException("No Mediator.");
if (fcfList == null)
throw new ArgumentException("No items found.");
if (fcfList.Count < 1)
throw new ArgumentException("There has to be at least one item.");
foreach (FindComboFillerBase fcf in fcfList)
{
if (fcf.List_UBF.Count == 0)
throw new ArgumentException("No sub-items found.");
}
if (startingItem != null && !fcfList.Contains(startingItem))
throw new ArgumentException("'startingItem' is not in the 'fcfList' list.");
m_mediator = mediator;
m_cbFind.BeginUpdate();
m_cbFind.Items.Clear();
m_cbFind.Items.AddRange(fcfList.ToArray());
m_cbFind.EndUpdate();
m_cbFind.SelectedItem = startingItem;
m_mediator.BroadcastPendingItems();
}