示例#1
0
        /// <inheritdoc/>
        public virtual void SetChildOrder(Base child, int order)
        {
            if (order > bands.Count)
            {
                order = bands.Count;
            }
            int oldOrder = child.ZOrder;

            if (oldOrder != -1 && order != -1 && oldOrder != order)
            {
                if (oldOrder <= order)
                {
                    order--;
                }
                bands.Remove(child as BandBase);
                bands.Insert(order, child as BandBase);
            }
        }
示例#2
0
 /// <inheritdoc/>
 public override void SetChildOrder(Base child, int order)
 {
     if (child is BandBase && !IsRunning)
     {
         if (order > bands.Count)
         {
             order = bands.Count;
         }
         int oldOrder = child.ZOrder;
         if (oldOrder != -1 && order != -1 && oldOrder != order)
         {
             if (oldOrder <= order)
             {
                 order--;
             }
             bands.Remove(child as BandBase);
             bands.Insert(order, child as BandBase);
         }
     }
     else
     {
         base.SetChildOrder(child, order);
     }
 }