ArcGISCompare.frmMaster.CheckSubTypeProperties C# (CSharp) Method

CheckSubTypeProperties() public method

public CheckSubTypeProperties ( TreeNode &N, FeatureData theS, FeatureData theD ) : void
N TreeNode
theS FeatureData
theD FeatureData
return void
        public void CheckSubTypeProperties(ref TreeNode N, FeatureData theS, FeatureData theD)
        {
            ISubtypes theSS;
            ISubtypes theDS;
            IEnumSubtype theE;
            IEnumSubtype theF;
            int theV, theQ;
            string strV, strQ;
            Boolean isFound;
            string theVText, theDText;

            theSS = theS.theST;
            theDS = theD.theST;

            if (theSS.HasSubtype != theDS.HasSubtype)
            {
                if (theSS.HasSubtype) { N.Nodes.Add(new Guid().ToString(), "Template Has Subtypes and Implementation does NOT", 1, 1); }
                else { N.Nodes.Add(new Guid().ToString(), "Implementation Has Subtypes and Template does NOT", 1, 1); }
            }
            else if (theSS.HasSubtype)
            {
                TreeNode S = new TreeNode("SubTypes");
                theE = theSS.Subtypes;
                theF = theDS.Subtypes;
                theVText = theE.Next(out theV);
                while (theV != 0)
                {
                    strV = theV.ToString() + " - " + theVText;
                    theF.Reset();
                    strQ = "";
                    isFound = false;
                    theDText = theF.Next(out theQ);
                    while (theQ != 0)
                    {
                        strQ = theQ.ToString() + " - " + theDText;
                        if (strQ == strV) { isFound = true; }
                        theDText = theF.Next(out theQ);
                    }
                    if (!isFound) { S.Nodes.Add(new Guid().ToString(), "SubType " + strQ + " missing from Implementation", 1, 1); }
                    theVText = theE.Next(out theV);
                }
                theF.Reset();
                theVText = theF.Next(out theV);
                while (theV != 0)
                {
                    strV = theV.ToString() + " - " + theVText;
                    theE.Reset();
                    strQ = "";
                    isFound = false;
                    theDText = theE.Next(out theQ);
                    while (theQ != 0)
                    {
                        strQ = theQ.ToString() + " - " + theDText;
                        if (strQ == strV) { isFound = true; }
                        theDText = theE.Next(out theQ);
                    }
                    if (!isFound) { S.Nodes.Add(new Guid().ToString(), "SubType " + strQ + " missing from Template", 1, 1); }
                    theVText = theE.Next(out theV);
                }
                if (S.Nodes.Count == 0)
                {
                    S.Nodes.Add("All SubTypes Agree Between Template and Implementation");
                }
                else
                {
                    N.ImageIndex = 1;
                    N.SelectedImageIndex = 1;
                    S.ImageIndex = 1;
                    S.SelectedImageIndex = 1;
                }
                N.Nodes.Add(S);
            }
        }