コード例 #1
0
        public DocumentModificationResult AddDocumentPageBitmap(OrderedBitmap bitmap)
        {
            if (_documentPages.ContainsKey((int)bitmap.Order))
            {
                return(DocumentModificationResult.Failure(new AddedBitmapForPageTwice((int)bitmap.Order)));
            }

            return(ReplaceDocumentPageBitmap(bitmap));
        }
コード例 #2
0
        public DocumentModificationResult ReplaceDocumentPageBitmap(OrderedBitmap bitmap)
        {
            if (!TemplateDefinition.DefinedPages.ContainsKey((int)bitmap.Order))
            {
                return(DocumentModificationResult.Failure(new AddedBitmapForNonexistentPage((int)bitmap.Order)));
            }

            if (_documentPages.ContainsKey((int)bitmap.Order))
            {
                _documentPages[(int)bitmap.Order] = bitmap;
            }
            else
            {
                _documentPages.Add((int)bitmap.Order, bitmap);
            }

            return(DocumentModificationResult.Success());
        }