示例#1
0
        public int Compare(object x, object y)
        {
            BadRegistryKey a   = x as BadRegistryKey;
            BadRegistryKey b   = y as BadRegistryKey;
            int            res = 0;

            if (_mode == "Problem")
            {
                string strA = ((a.IsLeaf) ? (a.Problem) : (a.SectionName));
                string strB = ((b.IsLeaf) ? (b.Problem) : (b.SectionName));
                res = string.Compare(strA, strB);
            }
            else if (_mode == "Location")
            {
                res = string.Compare(a.baseRegKey, b.baseRegKey);
            }
            else if (_mode == "Value Name")
            {
                res = string.Compare(a.ValueName, b.ValueName);
            }

            if (_order == SortOrder.Ascending)
            {
                return(-res);
            }
            else
            {
                return(res);
            }
        }
示例#2
0
        public void Remove(BadRegistryKey BadRegKey)
        {
            if (BadRegKey == null)
            {
                throw new ArgumentNullException("BadRegKey");
            }

            this.InnerList.Remove(BadRegKey);
        }
示例#3
0
        public void Insert(int index, BadRegistryKey BadRegKey)
        {
            if (BadRegKey == null)
            {
                throw new ArgumentNullException("BadRegKey");
            }

            this.InnerList.Insert(index, BadRegKey);
        }
示例#4
0
        public int Add(BadRegistryKey BadRegKey)
        {
            if (BadRegKey == null)
            {
                throw new ArgumentNullException("BadRegKey");
            }

            return(this.InnerList.Add(BadRegKey));
        }
示例#5
0
 public bool Contains(BadRegistryKey BadRegKey)
 {
     return(this.InnerList.Contains(BadRegKey));
 }
示例#6
0
 public int IndexOf(BadRegistryKey BadRegKey)
 {
     return(this.InnerList.IndexOf(BadRegKey));
 }