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); } } }
public virtual bool OnChildSlotDoubleClick(ItemSlotPure child) { int childIndex = _slots.IndexOf(child); if (childIndex >= 0) { action2(child, childIndex); return(true); } else { return(false); } }
protected override void action1(ItemSlotPure child, int childIndex) { Console.WriteLine("Show details of item and its siblings: {0} at index {1}", child.CurrentItemId, childIndex); }
protected virtual void action2(ItemSlotPure child, int childIndex) { }