//Add annotation internal void addAnnotation(Event ev) { EventAnnotation annotation = new EventAnnotation(ev, this, sessionStart, sessionEnd); this.mapFromEventToEventAnnotations[ev] = annotation; currentSession.addEvent(ev); renderEventAnnotation(annotation); }
private void renderEventAnnotation(EventAnnotation annotation) { annotation.Dock = DockStyle.Fill; middleBottomTableLayoutPanel.RowCount = lastAnnotationCell.Y + 1; middleBottomTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F)); middleBottomTableLayoutPanel.Size = new System.Drawing.Size(970, 60 * middleBottomTableLayoutPanel.RowCount + 4); middleBottomTableLayoutPanel.Controls.Add(annotation, lastAnnotationCell.X, lastAnnotationCell.Y); lastAnnotationCell.Y += 1; }