private void Remove(HijackItem item) { if (m_items.Contains(item)) { m_items.Remove(item); RowCount--; Update(); } }
private HijackItem Create() { var item = new HijackItem(this); item.LabelFrom = EditLabel("", () => item.SetFrom(From)); item.LabelFromStatus = new ImageCell(Resources.Error, () => item.ResolveFrom()); item.LabelTo = EditLabel("", () => item.SetTo(To)); item.LabelToStatus = new ImageCell(Resources.Error, () => item.ResolveTo()); item.ApplyButton = new ButtonCell("Copy", () => item.Action()); item.RemoveButton = new ImageCell(Resources.Close, () => Remove(item)); item.Update(); return(item); }