コード例 #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()));
 }