本文整理汇总了C#中PwGroup.GetTopSearchSkippedGroups方法的典型用法代码示例。如果您正苦于以下问题:C# PwGroup.GetTopSearchSkippedGroups方法的具体用法?C# PwGroup.GetTopSearchSkippedGroups怎么用?C# PwGroup.GetTopSearchSkippedGroups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PwGroup
的用法示例。
在下文中一共展示了PwGroup.GetTopSearchSkippedGroups方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowSearchResultsStatusMessage
private void ShowSearchResultsStatusMessage(PwGroup pgSearchSkippedRoot)
{
const string strParam = @"{PARAM}";
StringBuilder sb = new StringBuilder();
int n = m_lvEntries.Items.Count;
if(n == 1) sb.Append(KPRes.SearchEntriesFound1);
else
{
string strFound = KPRes.SearchEntriesFound;
string str = StrUtil.ReplaceCaseInsensitive(strFound,
strParam, n.ToString());
if(str == strFound) { Debug.Assert(false); return; }
sb.Append(str);
}
if(pgSearchSkippedRoot != null)
{
List<PwGroup> lSkipped = pgSearchSkippedRoot.GetTopSearchSkippedGroups();
if(lSkipped.Count > 0)
{
sb.Append(", ");
if(lSkipped.Count == 1) sb.Append(KPRes.GroupsSkipped1);
else
{
string strSkipped = KPRes.GroupsSkipped;
string str = StrUtil.ReplaceCaseInsensitive(strSkipped,
strParam, lSkipped.Count.ToString());
if(str == strSkipped) { Debug.Assert(false); return; }
sb.Append(str);
}
sb.Append(" (");
int m = Math.Min(lSkipped.Count, 3);
for(int i = 0; i < m; ++i)
{
if(i > 0) sb.Append(", ");
sb.Append('\'');
sb.Append(StrUtil.EncodeMenuText(lSkipped[i].Name.Trim()));
sb.Append('\'');
}
if(m < lSkipped.Count) sb.Append(", ...");
sb.Append(')');
}
}
sb.Append('.');
SetStatusEx(sb.ToString());
}