コード例 #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 int Add(BadRegistryKey BadRegKey)
        {
            if (BadRegKey == null)
            {
                throw new ArgumentNullException("BadRegKey");
            }

            return(this.InnerList.Add(BadRegKey));
        }
コード例 #4
0
        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);
            }
        }
コード例 #8
0
        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);
        }
コード例 #9
0
 public bool Contains(BadRegistryKey BadRegKey)
 {
     return(this.InnerList.Contains(BadRegKey));
 }
コード例 #10
0
 public int IndexOf(BadRegistryKey BadRegKey)
 {
     return(this.InnerList.IndexOf(BadRegKey));
 }