/// <summary> /// Creates a cBaseXML object based on the instance data /// </summary> /// <returns></returns> private cBaseXML toXML() { cBaseXML meXML = new cBaseXML(); meXML.Add(tags[(int)TagNames.TaskID], this.task_id, true); meXML.Add(tags[(int)TagNames.Shape], this.shape.ToString(), true); meXML.Add(tags[(int)TagNames.BackColor], this.back_color.R.ToString() + "," + this.back_color.G.ToString() + "," + this.back_color.B.ToString(), true); meXML.Add(tags[(int)TagNames.BorderColor], this.border_color.R.ToString() + "," + this.border_color.G.ToString() + "," + this.border_color.B.ToString(), true); meXML.Add(tags[(int)TagNames.TargetLocation], this.target_location.X.ToString() + "," + this.target_location.Y.ToString(), true); meXML.Add(tags[(int)TagNames.CursorLocation], this.cursor_location.X.ToString() + "," + this.cursor_location.Y.ToString(), true); meXML.Add(tags[(int)TagNames.TargetSize], this.target_size.Width.ToString() + "," + this.target_size.Height.ToString(), true); return(meXML); }
/// <summary> /// Creates a cBaseXML object based on the instance data /// </summary> /// <returns></returns> private cBaseXML toXML() { cBaseXML meXML = new cBaseXML(); meXML.Add(tags[(int)TagNames.User], this.user_id, true); meXML.Add(tags[(int)TagNames.TaskID], this.task_id, true); meXML.Add(tags[(int)TagNames.InputDevice], this.input_device.ToString(), true); meXML.Add(tags[(int)TagNames.TestScreenResolution], this.test_screen.Width.ToString() + "," + this.test_screen.Height.ToString(), true); meXML.Add(tags[(int)TagNames.MouseTrail], ",", true); // add blank and replace this with points later cBaseXML trailXML = null; if (points_collected != null && points_collected.Count > 0) { trailXML = new cBaseXML(); foreach (TracePoint trailpoint in points_collected) { trailXML.Add(TracePoint.TheTag, trailpoint.ToString(), false); } meXML.Add(tags[(int)TagNames.MouseTrail], trailXML.ToString(), true); } meXML.Add(tags[(int)TagNames.TestCompleted], this.TestCompleted.ToString(), true); return(meXML); }