當前位置: 首頁>>代碼示例>>C#>>正文


C# GridEntry.Equals方法代碼示例

本文整理匯總了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();
        }
開發者ID:mind0n,項目名稱:hive,代碼行數:25,代碼來源:PropertyGridView.cs

示例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());
 }
開發者ID:pritesh-mandowara-sp,項目名稱:DecompliedDotNetLibraries,代碼行數:25,代碼來源:PropertyGridView.cs


注:本文中的System.Windows.Forms.PropertyGridInternal.GridEntry.Equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。