Beispiel #1
0
        // Token: 0x06006B26 RID: 27430 RVA: 0x001EEDF4 File Offset: 0x001ECFF4
        internal bool InterruptFormatting(int dcpCur, int vrCur)
        {
            BackgroundFormatInfo backgroundFormatInfo = base.StructuralCache.BackgroundFormatInfo;

            if (!BackgroundFormatInfo.IsBackgroundFormatEnabled)
            {
                return(false);
            }
            if (base.StructuralCache.CurrentFormatContext.FinitePage)
            {
                return(false);
            }
            if (vrCur < TextDpi.ToTextDpi(double.IsPositiveInfinity(backgroundFormatInfo.ViewportHeight) ? 500.0 : backgroundFormatInfo.ViewportHeight))
            {
                return(false);
            }
            if (backgroundFormatInfo.BackgroundFormatStopTime > DateTime.UtcNow)
            {
                return(false);
            }
            if (!backgroundFormatInfo.DoesFinalDTRCoverRestOfText)
            {
                return(false);
            }
            if (dcpCur + base.ParagraphStartCharacterPosition <= backgroundFormatInfo.LastCPUninterruptible)
            {
                return(false);
            }
            base.StructuralCache.BackgroundFormatInfo.CPInterrupted = dcpCur + base.ParagraphStartCharacterPosition;
            return(true);
        }
Beispiel #2
0
        //-----------------------------------------------------
        // 
        //  Constructors 
        //
        //----------------------------------------------------- 

        #region Constructors

        /// <summary> 
        /// Structural Cache contructor.
        /// </summary> 
        /// <param name="owner">Owner of the conent</param> 
        /// <param name="textContainer">TextContainer representing content</param>
        internal StructuralCache(FlowDocument owner, TextContainer textContainer) 
        {
            Invariant.Assert(owner != null);
            Invariant.Assert(textContainer != null);
            Invariant.Assert(textContainer.Parent != null); 

            _owner = owner; 
            _textContainer = textContainer; 
            _backgroundFormatInfo = new BackgroundFormatInfo(this);
        } 
Beispiel #3
0
        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        /// Structural Cache contructor.
        /// </summary>
        /// <param name="owner">Owner of the conent</param>
        /// <param name="textContainer">TextContainer representing content</param>
        internal StructuralCache(FlowDocument owner, TextContainer textContainer)
        {
            Invariant.Assert(owner != null);
            Invariant.Assert(textContainer != null);
            Invariant.Assert(textContainer.Parent != null);

            _owner                = owner;
            _textContainer        = textContainer;
            _backgroundFormatInfo = new BackgroundFormatInfo(this);
        }