Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
 /// <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);
 }