// Use this for initialization void Start() { LoadCalibrationData (); clusters = new List<GameObject>(); clusters.AddRange(GameObject.FindGameObjectsWithTag("Cluster")); annotations = new Dictionary<int,Annotation>(); gameObjectsInTheScene = new List<GameObject> (); canvas = GameObject.Find("/Canvas"); xmlReaderWriter = new XmlReaderWriter (xmlPath); xmlReaderWriter.LoadFromFile (); Take take = xmlReaderWriter.Take; currentCalibration = take.Name; //organize annotations per time and duration // write text annotation Annotation value; textAnnotationList = take.TextAnnotationList; int idTextAnnoations = 0; // use this as id because the id on the xml might not be in sequence foreach (AnnotationText annotationText in textAnnotationList) { //if(!annotations.TryGetValue(annotationText.Begin, out value)) annotations.Add(idTextAnnoations, annotationText); idTextAnnoations++; //else { // int beginning = annotationText.Begin + 5; // annotations.Add(beginning, annotationText); //} //WriteTextAnnotation(annotationText); } inkAnnotationList = take.InkAnnotationList; foreach (AnnotationInk annotationInk in inkAnnotationList) { //if(!annotations.TryGetValue(annotationInk.Begin, out value)) annotations.Add(annotationInk.ID, annotationInk); //else // annotations.Add(++annotationInk.Begin, annotationInk); //WriteInkAnnotation(annotationInk); } linkAnnotationList = take.LinkAnnotationList; foreach (AnnotationLink annotationLink in linkAnnotationList) { //if(!annotations.TryGetValue(annotationLink.Begin, out value)) annotations.Add(annotationLink.ID, annotationLink); //else // annotations.Add(++annotationLink.Begin, annotationLink); //WriteLinkAnnotation(annotationLink); } //TODO: ADD MARK ANNOTATIONS //markAnnotationList = take.MarkAnnotationList; annotationListOrderByID = annotations.Keys.ToList(); //DebugAnnotationSorting (); }