示例#1
0
 public void Show(IEnumerable <string> list)
 {
     _slots.Clear();
     foreach (string itemId in list)
     {
         if (!string.IsNullOrEmpty(itemId))
         {
             var slot = new ItemSlotPure();
             slot.ParentTable = this;
             slot.Show(itemId);
             _slots.Add(slot);
         }
     }
 }
示例#2
0
        public virtual bool OnChildSlotDoubleClick(ItemSlotPure child)
        {
            int childIndex = _slots.IndexOf(child);

            if (childIndex >= 0)
            {
                action2(child, childIndex);
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#3
0
 protected override void action1(ItemSlotPure child, int childIndex)
 {
     Console.WriteLine("Show details of item and its siblings: {0} at index {1}",
                       child.CurrentItemId, childIndex);
 }
示例#4
0
 protected virtual void action2(ItemSlotPure child, int childIndex)
 {
 }