Пример #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;
        }
Пример #2
0
        public CustomTimelineWnd()
        {
            InitializeComponent();

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

            _currentMarker = new CurrentMarker(this, model);

            ChangeZoom(zoom);
        }
Пример #4
0
        public CurrentMarker(TimelineView timelineView, Timeline timeline)
        {
            InitializeComponent();

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

            _timeline.PropertyChanged += propertyChanged;

            addToScene();
        }
Пример #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;
        }
Пример #6
0
 public Session(Timeline timeline)
 {
     _timeline = timeline;
 }
Пример #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;
        }
Пример #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;
        }