private void UpdateEvents()
        {
            this.Events.Clear();

#if DEBUG
            var debugEvents = new List<ReplayEvent>();
            var ev = new ReplayEvent();
            ev.AdminId = SyncManager.Instance.UserId;
            ev.Camera = CameraDetails.ChangeReplayTime(400, 4);
            ev.Type = ReplayEvent.EventTypes.Interesting;
            ev.Text = "Test event 1";
            debugEvents.Add(ev);

            ev = new ReplayEvent();
            ev.AdminId = SyncManager.Instance.UserId;
            ev.Camera = CameraDetails.ChangeReplayTime(500, 7);
            ev.Type = ReplayEvent.EventTypes.Incident;
            ev.Text = "Test event 2";
            debugEvents.Add(ev);

            ev = new ReplayEvent();
            ev.AdminId = SyncManager.Instance.UserId;
            ev.Camera = CameraDetails.ChangeReplayTime(850, 7);
            ev.Type = ReplayEvent.EventTypes.Interesting;
            ev.Text = "Test event 3";
            debugEvents.Add(ev);

            foreach (var @event in debugEvents)
            {
#else
            foreach (var @event in SyncManager.Instance.State.Events)
            {
#endif
                var container = new ReplayEventContainer(@event);
                container.RelativePosition = @event.Camera.SessionTime/this.SessionTime;
                this.Events.Add(container);
            }
            this.UpdateEventPositions();
        }
 public void UpdateEventPosition(ReplayEventContainer @event)
 {
     @event.AbsolutePosition = this.BarLength*@event.RelativePosition - @event.MouseGridWidth;
 }
        public void AddEvent(ReplayEvent @event)
        {
            var container = new ReplayEventContainer(@event);
            container.RelativePosition = @event.Camera.SessionTime / this.SessionTime;
            this.Events.Add(container);
            this.UpdateEventPosition(container);

            var command = SyncCommandHelper.AddEvent(@event);
            SyncManager.Instance.SendStateUpdate(command);
        }