protected void Update(int line1, int line2)
 {
     //if closing dont update ui
     if (close)
     {
         return;
     }
     //if stepping
     if (stepping)
     {
         //step over
         step = false;
         //wait
         pauseEvent.Reset();
         pauseEvent.WaitOne(Timeout.Infinite);
         //wait for next step
         while (!step)
         {
             Thread.Sleep(50);
         }
     }
     //add wait location
     pauseEvent.WaitOne(Timeout.Infinite);
     //Highlight lines in ui
     Output.UpdateBox(line1, line2);
     //if not stepping wait
     if (!stepping)
     {
         System.Threading.Thread.Sleep(Output.time);
     }
 }