Exemple #1
0
        public EventGenWnd()
        {
            InitializeComponent();

            _timelineModel = new Timeline(TimeSpan.FromMinutes(2));
            timelineView.SetModel(_timelineModel);
            timelineView.ChangeZoom(zoomSlider.Value);
            currentTime.DataContext = _timelineModel;
            videoProgress.Maximum = _timelineModel.Range.TotalSeconds;
            videoProgress.DataContext = _timelineModel;

            _timelineModel.PropertyChanged += TimelinePropertyChanged;

            _session = new EventGen.timeline.Session(_timelineModel);

            LoginProcedure();

            DataContext = this;

            _timer = new DispatcherTimer();
            _timer.Interval = new TimeSpan(0, 0, 0, 0, 100);
            _timer.Tick += onUpdateCurrentTimeFromVideo;

            myMediaElement.MediaEnded += mediaEnded;
        }
        public CustomTimelineWnd()
        {
            InitializeComponent();

            _timelineModel = new Timeline(TimeSpan.FromMinutes(2));
            timelineView.SetModel(_timelineModel);
            currentTime.DataContext = _timelineModel;
        }
Exemple #3
0
        public void SetModel(Timeline model)
        {
            _model = model;
            model.Events.CollectionChanged += notifyCollectionChangedEventHandler;

            _currentMarker = new CurrentMarker(this, model);

            ChangeZoom(zoom);
        }
        public CurrentMarker(TimelineView timelineView, Timeline timeline)
        {
            InitializeComponent();

            _timelineView = timelineView;
            _timeline = timeline;
            if (_timeline == null)
                throw new NotSupportedException("no timeline model");

            _timeline.PropertyChanged += propertyChanged;

            addToScene();
        }
Exemple #5
0
        public SubmitionWnd(Timeline timelineModel, DateTime baseDateTime)
        {
            InitializeComponent();

            _timelineModel = timelineModel;
            _baseDateTime = baseDateTime;

            //compute stats 
            var fakeEventId = 0;
            foreach (var te in _timelineModel.Events)
            {
                _totalsReport.CountEvent(te.e, fakeEventId++);
            }
            stats.Text = StatsUtils.GetEventTotals(_totalsReport).Text;
        }
Exemple #6
0
 public Session(Timeline timeline)
 {
     _timeline = timeline;
 }
Exemple #7
0
        public TimelineEvent(BinaryReader r, Timeline timeline)
        {
            this.timeline = timeline;

            Read(r);

            //update view params
            var evm = new EventViewModel(e, userId, DateTime.Now, devType);
            _userColor = evm.userColor;
            _userName = evm.userName;
            _devName = evm.devType;
            _eventName = evm.evt;
        }
Exemple #8
0
        public TimelineEvent(StEvent e, int userId, int discussionId, Timeline timeline, TimeSpan timespan, int topicId,
                             DeviceType devType)
        {
            this.timeline = timeline;
            this.e = e;
            this.userId = userId;
            this.discussionId = discussionId;
            this.Span = timespan;
            this.topicId = topicId;
            this.devType = devType;

            var evm = new EventViewModel(e, userId, DateTime.Now, devType);
            _userColor = evm.userColor;
            _userName = evm.userName;
            _devName = evm.devType;
            _eventName = evm.evt;
        }