示例#1
0
 /// <summary>
 /// Call <see cref="M:Northwoods.Go.GoView.RaiseSelectionStarting" /> and <see cref="M:Northwoods.Go.GoView.RaiseSelectionFinished" />
 /// around the addition of all of the objects in the given collection to this selection.
 /// </summary>
 /// <param name="coll"></param>
 public override void AddRange(IGoCollection coll)
 {
     if (coll != null && !coll.IsEmpty)
     {
         GoView view = View;
         view?.RaiseSelectionStarting();
         base.AddRange(coll);
         view?.RaiseSelectionFinished();
     }
 }
示例#2
0
        /// <summary>
        /// Clearing the selection raises the <see cref="T:Northwoods.Go.GoView" />.<see cref="E:Northwoods.Go.GoView.SelectionStarting" />
        /// and <see cref="E:Northwoods.Go.GoView.SelectionFinished" /> events, if there were multiple objects selected.
        /// </summary>
        public override void Clear()
        {
            GoView view = View;
            bool   num  = view != null && Count > 1;

            if (num)
            {
                view.RaiseSelectionStarting();
            }
            base.Clear();
            if (num)
            {
                view.RaiseSelectionFinished();
            }
        }