/// <summary> /// 取消对象选择 /// </summary> /// <param name="obj"></param> /// <returns></returns> public ISelectableObject Remove(ISelectableObject obj) { if (!this.SelectionObjects.Contains(obj)) { return(obj); } this.SelectionObjects.Remove(obj); obj.Selected(false); return(obj); }
/// <summary> /// 添加选择对象 /// </summary> /// <param name="obj"></param> /// <returns></returns> public ISelectableObject Add(ISelectableObject obj) { if (this.SelectionObjects.Contains(obj)) { return(obj); } this.SelectionObjects.Add(obj); obj.Selected(true); return(obj); }