예제 #1
0
        public override bool CompareTo(object Comparand)
        {
            FWOpenableDocument cmpDoc = Comparand as FWOpenableDocument;

            bool docEmpty       = cmpDoc == null ? true : cmpDoc.IsEmpty();
            bool CurrentIsEmpty = this.IsEmpty();

            if (cmpDoc != null)
            {
                if (docEmpty)
                {
                    return(CurrentIsEmpty);
                }
                else if (!CurrentIsEmpty)
                {
                    return(InternalCompare(cmpDoc));
                }
                else
                {
                    return(true);
                }
            }
            else
            {
                return(CurrentIsEmpty);
            }
        }
예제 #2
0
        public override Comparison.IDiffViewer GetDifferenceViewer(object Comparand)
        {
            FWOpenableDocument cmpDoc = Comparand as FWOpenableDocument;

            var DiffViewer = new Comparison.FWDiffViewer(this, cmpDoc);

            return(DiffViewer);
        }
예제 #3
0
 protected override bool InternalCompare(FWOpenableDocument cmpDoc)
 {
     if (cmpDoc is DCSSchemaDocument)
     {
         return(SchemaContent == ((DCSSchemaDocument)cmpDoc).SchemaContent);
     }
     else
     {
         return(false);
     }
 }
예제 #4
0
 protected virtual bool InternalCompare(FWOpenableDocument cmpDoc)
 {
     Comparison.StreamComparator sc = new Comparison.StreamComparator();
     return(sc.CompareStreams(GetDataStream(), cmpDoc.GetDataStream()));
 }