예제 #1
0
        public void SetRegionDecorator(int id, int did, IRegionDecorator value)
        {
            SubVirtualRegion region;

            if (subRegions.TryGetValue(id, out region))
            {
                region.SetDecorator(did, value);
            }
        }
예제 #2
0
 public void SetDecorator(int idx, IRegionDecorator value)//设置子装饰器状态
 {
     if (decorators.Count > idx)
     {
         if (value != null)
         {
             decorators[idx] = value;
         }
         else
         {
             decorators.RemoveAt(idx);
         }
     }
     else
     {
         if (value != null)
         {
             AddDecorator(value);
         }
     }
 }
예제 #3
0
 public void AddDecorator(IRegionDecorator decorator)
 {
     decorators.Add(decorator);
 }