Ejemplo n.º 1
0
 private static void ProcessProgressReceivingData(Match m, OnTestEventHandler OnTestProgress)
 {
     if (m != null && m.Success && OnTestProgress != null)
     {
         OnTestProgress(TestEventType.ReceivingData, int.Parse(m.Groups[1].Value), -1, m.Groups[2].Value);
     }
 }
Ejemplo n.º 2
0
 private static void ProcessProgressResponseEnded(Match m, OnTestEventHandler OnTestProgress)
 {
     if (m != null && m.Success && OnTestProgress != null)
     {
         OnTestProgress(TestEventType.ResponseEnded, -1, -1, m.Groups[1].Value);
     }
 }
Ejemplo n.º 3
0
 private static void ProcessProgressTestStarted(Match m, OnTestEventHandler OnTestProgress)
 {
     if (m != null && m.Success && OnTestProgress != null)
     {
         OnTestProgress(TestEventType.TestStarted, -1, -1, null);
     }
 }
Ejemplo n.º 4
0
 private static void ProcessProgressScreenCapture(Match m, OnTestEventHandler OnTestProgress)
 {
     if (m != null && m.Success && OnTestProgress != null)
     {
         OnTestProgress(TestEventType.CapturingSegment, int.Parse(m.Groups[1].ToString()), int.Parse(m.Groups[2].ToString()), null);
     }
 }
Ejemplo n.º 5
0
        public static void ProcessProgress(string p, OnTestEventHandler OnTestProgress)
        {
            if (String.IsNullOrEmpty(p) || OnTestProgress == null)
            {
                return;
            }

            try
            {
                Match m = null;

                foreach (Regex rg in progressMessages.Keys)
                {
                    m = rg.Match(p);
                    if (m.Success)
                    {
                        progressMessages[rg](m, OnTestProgress);
                    }
                }
            }
            catch
            {
            }
        }