Better non-visible regression testing & the close button working.
This commit is contained in:
		@@ -84,6 +84,8 @@ namespace EduNetworkBuilder
 | 
			
		||||
        public bool ReplayInProgress = false;
 | 
			
		||||
        public DateTime NextReplayAction = DateTime.UtcNow;
 | 
			
		||||
        public int NextReplayIndex = -1;
 | 
			
		||||
        public bool StartedNewReplayAction = false;
 | 
			
		||||
        public bool ProcessingNonVisually = false;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// WhatFrom: If we are launched from a homework, we remember it here.
 | 
			
		||||
@@ -1682,6 +1684,7 @@ namespace EduNetworkBuilder
 | 
			
		||||
                    {
 | 
			
		||||
                        //we did something.  keep replaying
 | 
			
		||||
                        NB.MarkToUpdate();
 | 
			
		||||
                        StartedNewReplayAction = true;
 | 
			
		||||
                    }
 | 
			
		||||
                    else
 | 
			
		||||
                    {
 | 
			
		||||
@@ -2471,6 +2474,27 @@ namespace EduNetworkBuilder
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// This is used when we are doing a replay behind the scenes.
 | 
			
		||||
        /// We may have many things that we do.  We still want to time-out if 
 | 
			
		||||
        /// a packet needs to drop.  So we loop through, but have a timeout on each
 | 
			
		||||
        /// individual action.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public void NonVisualProcessPacketsMultipleTimes()
 | 
			
		||||
        {
 | 
			
		||||
            int counter = 0;
 | 
			
		||||
            while (counter < 1000 && myPackets.Count > 0)
 | 
			
		||||
            {
 | 
			
		||||
                Tick(true); //Skip visuals
 | 
			
		||||
                if(StartedNewReplayAction)
 | 
			
		||||
                {
 | 
			
		||||
                    counter = 0; //reset counter to zero
 | 
			
		||||
                    StartedNewReplayAction = false; //reset it
 | 
			
		||||
                }
 | 
			
		||||
                counter++;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        int BreakNetComponent(NetworkComponent What, HowToBreak How, string Data)
 | 
			
		||||
        {
 | 
			
		||||
            int didit = 0;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user