示例#1
0
        protected override bool derivedCompare(DLink pLinkA, DLink pLinkB)
        {
            //This is called by baseFind

            Debug.Assert(pLinkA != null);
            Debug.Assert(pLinkB != null);

            //Cast to type
            Glyph pGlyphA = (Glyph)pLinkA;
            Glyph pGlyphB = (Glyph)pLinkB;

            // result of comparison, expression results a bool
            bool nameCompare = pGlyphA.GetName() == pGlyphB.GetName();
            bool keyCompare  = pGlyphA.key == pGlyphB.key;

            return(nameCompare && keyCompare);
        }
示例#2
0
        //----------------------------------------------------------------------
        // Override Abstract methods
        //----------------------------------------------------------------------

        //EDIT THE FOLLOWING METHODS---------------------
        protected override Boolean derivedCompareNodes(MLink pLinkA, MLink pLinkB)
        {
            // This is used in baseFindNode()
            Debug.Assert(pLinkA != null);
            Debug.Assert(pLinkB != null);

            Glyph pDataA = (Glyph)pLinkA;
            Glyph pDataB = (Glyph)pLinkB;

            Boolean status = false;

            if (pDataA.GetName() == pDataB.GetName())
            {
                status = true;
            }

            return(status);
        }