public void AddTracePoint(TracePoint tp)
 {
     if (points_collected == null)
     {
         points_collected = new List <TracePoint>();                          // first point is to be added
     }
     points_collected.Add(tp);
 }
 /// <summary>
 /// Loads from an string containing all tags representing
 /// </summary>
 /// <param name="strXML"></param>
 /// <returns></returns>
 private bool fromXML(string strXML)
 {
     try
     {
         cBaseXML inXML = new cBaseXML(strXML);
         // get the user info
         this.user_id = inXML.NodeData(tags[(int)TagNames.User]);
         // get task id
         this.task_id = inXML.NodeData(tags[(int)TagNames.TaskID]);
         // get input device
         this.input_device = GetDevice(inXML.NodeData(tags[(int)TagNames.InputDevice]));
         // get screen resolution
         this.test_screen = GetScreenSize(inXML.NodeData(tags[(int)TagNames.TestScreenResolution]));
         // get if test completed
         this.test_completed = Convert.ToBoolean(inXML.NodeData(tags[(int)TagNames.TestCompleted]));
         // finally get all the mouse trace points
         cBaseXML   trcXML = new cBaseXML(inXML.NodeData(tags[(int)TagNames.MouseTrail]));
         string     trc    = "notyet";
         TracePoint tp;
         do
         {
             // update trace
             trc = trcXML.NodeData(TracePoint.TheTag);
             if (trc != "")
             {
                 tp = new TracePoint(trc);
                 this.AddTracePoint(tp);
                 trcXML.Remove(TracePoint.TheTag);
             }
         } while (trc != "");
         return(true);
     }
     catch
     {
         return(false);
     }
 }