예제 #1
0
        /// <summary>
        /// Dequeues the current block attribute set and returns it, queuing a new attribute set.
        /// </summary>
        /// <returns></returns>
        public BlockAttribs NextAttribs(RABlock block)
        {
            BlockAttribs attribs = _newAttribs;

            _blockManager.Add(attribs, block);
            _blockManager.SetPrevAttribs(attribs);

            switch (attribs.Persistence)
            {
            case AttribPersistence.Off:
                _newAttribs = new BlockAttribs();
                break;

            case AttribPersistence.On:
                _newAttribs = new BlockAttribs();
                break;

            case AttribPersistence.Once:
                _newAttribs = _blockManager.GetPrevious(1);
                break;
            }

            return(attribs);
        }
예제 #2
0
파일: Repeater.cs 프로젝트: Sloves/Rant
 public Repeater(Block block, BlockAttribs attribs)
 {
     _block   = block;
     _count   = attribs.Repetitons == Each ? block.Items.Length : attribs.Repetitons;
     _attribs = attribs;
 }