Exemple #1
0
        /// <summary>
        /// Deep clone not required. Does not copy the subscribers.
        /// </summary>
        public object Clone()
        {
            PDFInkList rv = (PDFInkList)MemberwiseClone();

            rv.OnPDFInkListChanged = null;
            return(rv);
        }
Exemple #2
0
        internal PDFInkList GetInks(Dictionary <string, byte[]> library_items_inks_cache)
        {
            if (null == inks)
            {
                inks = new PDFInkList();
                PDFInkSerializer.ReadFromDisk(this, inks, library_items_inks_cache);
                inks.OnPDFInkListChanged += inks_OnPDFInkListChanged;
            }

            return(inks);
        }
Exemple #3
0
        /// <summary>
        /// NB: only call this as part of document creation.
        /// </summary>
        public void CloneMetaData(PDFDocument existing_pdf_document)
        {
            bindable = null;

            Logging.Info("Cloning metadata from {0}", existing_pdf_document.Title);
            dictionary  = (DictionaryBasedObject)existing_pdf_document.dictionary.Clone();
            annotations = (PDFAnnotationList)existing_pdf_document.Annotations.Clone();
            highlights  = (PDFHightlightList)existing_pdf_document.Highlights.Clone();
            inks        = (PDFInkList)existing_pdf_document.Inks.Clone();
            SaveToMetaData();

            // Copy the citations
            PDFDocumentCitationManager.CloneFrom(existing_pdf_document.PDFDocumentCitationManager);

            //  Now clear out the references for the annotations and highlights, so that when they are reloaded the events are resubscribed
            annotations = null;
            highlights  = null;
            inks        = null;
        }
Exemple #4
0
        /// <summary>
        /// Deep clone not required. Does not copy the subscribers.
        /// </summary>
        public object Clone()
        {
            PDFInkList rv = (PDFInkList)MemberwiseClone();

            return(rv);
        }