ArcGISCompare.frmMaster.CheckDefaultValues C# (CSharp) Method

CheckDefaultValues() public method

public CheckDefaultValues ( TreeNode &N, FeatureData theS, FeatureData theD ) : void
N TreeNode
theS FeatureData
theD FeatureData
return void
        public void CheckDefaultValues(ref TreeNode N, FeatureData theS, FeatureData theD)
        {
            ISubtypes theSS;
            ISubtypes theDS;
            Boolean firstTime = false;
            IEnumSubtype theE;
            IEnumSubtype theF;
            int theV, theQ;
            string strV, strQ;
            Boolean isFound;
            TreeNode FDV = null;
            string theSDVal, theDDVal, theVText;

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

            if (theSS.HasSubtype == theDS.HasSubtype && theSS.HasSubtype)
            {
                TreeNode S = new TreeNode("Default Values");
                theE = theSS.Subtypes;
                theVText = theE.Next(out theV);
                while (theV != 0)
                {
                    IFields theFlds = theS.theFlds;
                    IFields destFlds = theD.theFlds;
                    firstTime = true;

                    for (int C = 0; C < theFlds.FieldCount; C++)
                    {
                        if (theFlds.get_Field(C).Editable)
                        {
                            theDDVal = "";
                            theSDVal = theSS.get_DefaultValue(theV, theFlds.get_Field(C).Name).ToString();
                            if (destFlds.FindField(theFlds.get_Field(C).Name) >= 0)
                            {
                                theDDVal = theDS.get_DefaultValue(theV, theFlds.get_Field(C).Name).ToString();
                            }
                            if (theSDVal != theDDVal)
                            {
                                if (firstTime)
                                {
                                    FDV = new TreeNode("For Feature Type - " + theVText) { ImageIndex = 1, SelectedImageIndex = 1 };
                                }
                                TreeNode DV = new TreeNode("Default Value " + theSDVal + " for Field " + theFlds.get_Field(C).Name + " unmatched") { ImageIndex = 1, SelectedImageIndex = 1 };
                                DV.Nodes.Add(new Guid().ToString(), "Template is " + theSDVal, 1, 1);
                                DV.Nodes.Add(new Guid().ToString(), "Implementation is " + theDDVal, 1, 1);
                                FDV.Nodes.Add(DV);
                                if (firstTime)
                                {
                                    S.Nodes.Add(FDV);
                                    firstTime = false;
                                }
                            }
                        }
                    }
                    firstTime = true;
                    theVText = theE.Next(out theV);
                }
                if (S.Nodes.Count == 0)
                {
                    S.Nodes.Add("All Default Values Agree Template and Implementation");
                }
                else
                {
                    N.ImageIndex = 1;
                    N.SelectedImageIndex = 1;
                    S.ImageIndex = 1;
                    S.SelectedImageIndex = 1;
                }
                N.Nodes.Add(S);
            }
        }