本文整理汇总了C#中XCore.List.Select方法的典型用法代码示例。如果您正苦于以下问题:C# List.Select方法的具体用法?C# List.Select怎么用?C# List.Select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XCore.List
的用法示例。
在下文中一共展示了List.Select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisplayEntriesRecursive
private static void DisplayEntriesRecursive(FdoCache cache, IWin32Window owner,
Mediator mediator, IVwStylesheet stylesheet,
IHelpTopicProvider helpProvider, string helpFileKey,
List<ILexEntry> entries, ITsString tssWf)
{
// Loop showing the SummaryDialogForm as long as the user clicks the Other button
// in that dialog.
bool otherButtonClicked = false;
do
{
using (var sdform = new SummaryDialogForm(new List<int>(entries.Select(le => le.Hvo)), tssWf,
helpProvider, helpFileKey,
stylesheet, cache, mediator))
{
SetCurrentModalForm(sdform);
if (owner == null)
sdform.StartPosition = FormStartPosition.CenterScreen;
sdform.ShowDialog(owner);
if (sdform.ShouldLink)
sdform.LinkToLexicon();
otherButtonClicked = sdform.OtherButtonClicked;
}
if (otherButtonClicked)
{
// Look for another entry to display. (If the user doesn't select another
// entry, loop back and redisplay the current entry.)
var entry = ShowFindEntryDialog(cache, mediator, tssWf, owner);
if (entry != null)
{
// We need a list that contains the entry we found to display on the
// next go around of this loop.
entries = new List<ILexEntry>();
entries.Add(entry);
tssWf = entry.HeadWord;
}
}
} while (otherButtonClicked);
}
示例2: ReorderItems
private void ReorderItems(List<ICmObject> vals)
{
if (RootPropertyIsRealRefSequence())
{
// Since we are re-ordering, presume all objects are replaced by the entire new value.
Cache.DomainDataByFlid.Replace(m_rootObj.Hvo, m_rootFlid, 0, vals.Count,
vals.Select(obj => obj.Hvo).ToArray(), vals.Count);
}
else
{
VirtualOrderingServices.SetVO(m_rootObj, m_rootFlid, vals);
}
}