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);
            }
        }
        public void Remove(BadRegistryKey BadRegKey)
        {
            if (BadRegKey == null)
            {
                throw new ArgumentNullException("BadRegKey");
            }

            this.InnerList.Remove(BadRegKey);
        }
        public int Add(BadRegistryKey BadRegKey)
        {
            if (BadRegKey == null)
            {
                throw new ArgumentNullException("BadRegKey");
            }

            return(this.InnerList.Add(BadRegKey));
        }
        public void Insert(int index, BadRegistryKey BadRegKey)
        {
            if (BadRegKey == null)
            {
                throw new ArgumentNullException("BadRegKey");
            }

            this.InnerList.Insert(index, BadRegKey);
        }
예제 #5
0
        private void treeViewAdvResults_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
        {
            BadRegistryKey brk = e.Node.Tag as BadRegistryKey;

            if (!string.IsNullOrEmpty(brk.Problem) && !string.IsNullOrEmpty(brk.RegKeyPath))
            {
                Common_Tools.DetailsRegKey details = new Common_Tools.DetailsRegKey(brk.Problem, brk.RegKeyPath, brk.ValueName, brk.Data);
                details.ShowDialog(this);
            }
        }
예제 #6
0
        private void ViewInRegEdit(object sender, EventArgs e)
        {
            if (this.treeViewAdvResults.SelectedNodes.Count > 0)
            {
                BadRegistryKey brk          = this.treeViewAdvResults.SelectedNode.Tag as BadRegistryKey;
                string         strSubKey    = brk.RegKeyPath;
                string         strValueName = brk.ValueName;

                RegEditGo.GoTo(strSubKey, strValueName);
            }
        }
예제 #7
0
        private void treeViewAdvResults_ExcludeSelected(object sender, EventArgs e)
        {
            if (this.treeViewAdvResults.SelectedNodes.Count > 0)
            {
                for (int i = 0; i < this.treeViewAdvResults.SelectedNodes.Count; i++)
                {
                    BadRegistryKey brk = this.treeViewAdvResults.SelectedNodes[i].Tag as BadRegistryKey;

                    if (!string.IsNullOrEmpty(brk.RegKeyPath))
                    {
                        Properties.Settings.Default.arrayExcludeList.Add(new ExcludeList.ExcludeItem(brk.RegKeyPath, null, null));
                    }
                }

                MessageBox.Show(this, Properties.Resources.mainAddExcludeEntry, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void VerifyCheckState()
        {
            CheckState state = CheckState.Indeterminate;

            for (int i = 0; i < this.Nodes.Count; i++)
            {
                BadRegistryKey brk     = this.Nodes[i] as BadRegistryKey;
                CheckState     current = brk.Checked;

                if (i == 0)
                {
                    state = current;
                }
                else if (state != current)
                {
                    state = CheckState.Indeterminate;
                    break;
                }
            }

            this.SetIsChecked(state, false, true);
        }
 public bool Contains(BadRegistryKey BadRegKey)
 {
     return(this.InnerList.Contains(BadRegKey));
 }
 public int IndexOf(BadRegistryKey BadRegKey)
 {
     return(this.InnerList.IndexOf(BadRegKey));
 }