コード例 #1
0
        IEnumerator IEnumerable.GetEnumerator()
        {
            GoCollectionEnumerator goCollectionEnumerator = this;

            goCollectionEnumerator.Reset();
            return(goCollectionEnumerator);
        }
コード例 #2
0
        IEnumerator <GoObject> IEnumerable <GoObject> .GetEnumerator()
        {
            GoCollectionEnumerator goCollectionEnumerator = this;

            goCollectionEnumerator.Reset();
            return(goCollectionEnumerator);
        }
コード例 #3
0
        /// <summary>
        /// Gets an enumerator for iterating over the GoObjects.
        /// </summary>
        public GoCollectionEnumerator GetEnumerator()
        {
            GoCollectionEnumerator result = this;

            result.Reset();
            return(result);
        }
コード例 #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);
        }
コード例 #5
0
ファイル: GoSelection.cs プロジェクト: lian5599/NewSolution
 /// <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);
                 }
             }
         }
     }
 }