Exemplo n.º 1
0
        IEnumerator IEnumerable.GetEnumerator()
        {
            GoCollectionEnumerator goCollectionEnumerator = this;

            goCollectionEnumerator.Reset();
            return(goCollectionEnumerator);
        }
Exemplo n.º 2
0
        IEnumerator <GoObject> IEnumerable <GoObject> .GetEnumerator()
        {
            GoCollectionEnumerator goCollectionEnumerator = this;

            goCollectionEnumerator.Reset();
            return(goCollectionEnumerator);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Gets an enumerator for iterating over the GoObjects.
        /// </summary>
        public GoCollectionEnumerator GetEnumerator()
        {
            GoCollectionEnumerator result = this;

            result.Reset();
            return(result);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Gets an enumerator for iterating over the GoObjects in this collection.
        /// </summary>
        public virtual GoCollectionEnumerator GetEnumerator()
        {
            GoCollectionEnumerator result = new GoCollectionEnumerator(myObjects, forward: true);

            result.myOriginalCollection = this;
            result.myOriginalChanges    = myChanges;
            return(result);
        }
Exemplo n.º 5
0
 /// <summary>
 /// Call <see cref="M:Northwoods.Go.GoObject.AddSelectionHandles(Northwoods.Go.GoSelection,Northwoods.Go.GoObject)" /> on the
 /// <see cref="P:Northwoods.Go.GoObject.SelectionObject" /> of each selected object
 /// if <see cref="M:Northwoods.Go.GoObject.CanView" /> is true, or call
 /// <see cref="M:Northwoods.Go.GoObject.RemoveSelectionHandles(Northwoods.Go.GoSelection)" /> otherwise.
 /// </summary>
 /// <seealso cref="M:Northwoods.Go.GoSelection.RemoveAllSelectionHandles" />
 public void AddAllSelectionHandles()
 {
     using (GoCollectionEnumerator goCollectionEnumerator = GetEnumerator())
     {
         while (goCollectionEnumerator.MoveNext())
         {
             GoObject current         = goCollectionEnumerator.Current;
             GoObject selectionObject = current.SelectionObject;
             if (selectionObject != null)
             {
                 if (current.CanView())
                 {
                     selectionObject.AddSelectionHandles(this, current);
                 }
                 else
                 {
                     selectionObject.RemoveSelectionHandles(this);
                 }
             }
         }
     }
 }