示例#1
0
 private ContextLayoutManager.LayoutQueue.Request _getNewRequest(
     RadElement e)
 {
     ContextLayoutManager.LayoutQueue.Request request1;
     if (this._pocket != null)
     {
         request1     = this._pocket;
         this._pocket = request1.Next;
         --this._pocketSize;
         ContextLayoutManager.LayoutQueue.Request request2;
         request1.Prev = request2 = (ContextLayoutManager.LayoutQueue.Request)null;
         request1.Next = request2;
     }
     else
     {
         ContextLayoutManager layoutManager = e.LayoutManager as ContextLayoutManager;
         try
         {
             request1 = new ContextLayoutManager.LayoutQueue.Request();
         }
         catch (OutOfMemoryException ex)
         {
             layoutManager?.setForceLayout(e);
             throw ex;
         }
     }
     request1.Target = e;
     return(request1);
 }
示例#2
0
 public void Remove(RadElement e)
 {
     ContextLayoutManager.LayoutQueue.Request request = this.getRequest(e);
     if (request == null)
     {
         return;
     }
     this._removeRequest(request);
     this.setRequest(e, (ContextLayoutManager.LayoutQueue.Request)null);
 }
示例#3
0
 private void ReuseRequest(ContextLayoutManager.LayoutQueue.Request r)
 {
     r.Target = (RadElement)null;
     if (this._pocketSize >= 153)
     {
         return;
     }
     r.Next       = this._pocket;
     this._pocket = r;
     ++this._pocketSize;
 }
示例#4
0
 internal LayoutQueue()
 {
     for (int index = 0; index < 153; ++index)
     {
         this._pocket = new ContextLayoutManager.LayoutQueue.Request()
         {
             Next = this._pocket
         }
     }
     ;
     this._pocketSize = 153;
 }
示例#5
0
 internal void RemoveOrphans(RadElement parent)
 {
     ContextLayoutManager.LayoutQueue.Request next;
     for (ContextLayoutManager.LayoutQueue.Request request = this._head; request != null; request = next)
     {
         RadElement target = request.Target;
         next = request.Next;
         ulong treeLevel = (ulong)parent.TreeLevel;
         if ((long)target.TreeLevel == (long)treeLevel + 1L && target.Parent == parent)
         {
             this._removeRequest(this.getRequest(target));
             this.setRequest(target, (ContextLayoutManager.LayoutQueue.Request)null);
         }
     }
 }
示例#6
0
 private void _addRequest(RadElement e)
 {
     ContextLayoutManager.LayoutQueue.Request newRequest = this._getNewRequest(e);
     if (newRequest == null)
     {
         return;
     }
     newRequest.Next = this._head;
     if (this._head != null)
     {
         this._head.Prev = newRequest;
     }
     this._head = newRequest;
     this.setRequest(e, newRequest);
 }
示例#7
0
            internal RadElement GetTopMost()
            {
                RadElement radElement = (RadElement)null;
                ulong      num        = ulong.MaxValue;

                for (ContextLayoutManager.LayoutQueue.Request request = this._head; request != null; request = request.Next)
                {
                    ulong treeLevel = (ulong)request.Target.TreeLevel;
                    if (treeLevel < num)
                    {
                        num        = treeLevel;
                        radElement = request.Target;
                    }
                }
                return(radElement);
            }
示例#8
0
 private void _removeRequest(ContextLayoutManager.LayoutQueue.Request entry)
 {
     if (entry.Prev == null)
     {
         this._head = entry.Next;
     }
     else
     {
         entry.Prev.Next = entry.Next;
     }
     if (entry.Next != null)
     {
         entry.Next.Prev = entry.Prev;
     }
     this.ReuseRequest(entry);
 }
示例#9
0
 internal override void setRequest(RadElement e, ContextLayoutManager.LayoutQueue.Request r)
 {
     e.MeasureRequest = r;
 }
示例#10
0
 internal abstract void setRequest(RadElement e, ContextLayoutManager.LayoutQueue.Request r);