本文整理匯總了C#中System.Windows.Forms.PropertyGridInternal.GridEntry.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# GridEntry.Equals方法的具體用法?C# GridEntry.Equals怎麽用?C# GridEntry.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.PropertyGridInternal.GridEntry
的用法示例。
在下文中一共展示了GridEntry.Equals方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetRowFromGridEntry
private /*protected virtual*/ int GetRowFromGridEntry(GridEntry gridEntry) {
GridEntryCollection rgipesAll = GetAllGridEntries();
if (gridEntry == null || rgipesAll == null)
return -1;
int bestMatch = -1;
for (int i = 0; i < rgipesAll.Count; i++) {
// try for an exact match. semantics of equals are a bit loose here...
//
if (gridEntry == rgipesAll[i]) {
return i - GetScrollOffset();
}
else if (bestMatch == -1 && gridEntry.Equals(rgipesAll[i])) {
bestMatch = i - GetScrollOffset();
}
}
if (bestMatch != -1) {
return bestMatch;
}
return -1 - GetScrollOffset();
}
示例2: GetRowFromGridEntry
private int GetRowFromGridEntry(GridEntry gridEntry)
{
GridEntryCollection allGridEntries = this.GetAllGridEntries();
if ((gridEntry == null) || (allGridEntries == null))
{
return -1;
}
int num = -1;
for (int i = 0; i < allGridEntries.Count; i++)
{
if (gridEntry == allGridEntries[i])
{
return (i - this.GetScrollOffset());
}
if ((num == -1) && gridEntry.Equals(allGridEntries[i]))
{
num = i - this.GetScrollOffset();
}
}
if (num != -1)
{
return num;
}
return (-1 - this.GetScrollOffset());
}