//对外接口 public void AddItem(JokeItem item) { if (item == null) { throw new ArgumentNullException("参数不能为空!"); } else { this.jokeItems.Add(item); this.Invalidate(); } }
public void RemoveItem(JokeItem item) { this.jokeItems.Remove(item); this.Invalidate(); }