Ejemplo n.º 1
0
 public TourSystem(ArtworkModeWindow artworkModeWindowParam)
 {
     artModeWin = artworkModeWindowParam;
     ///// Delete?
     tourAuthoringUI = new TourAuthoringUI(artModeWin, this);
     // event handlers for dragging of seek bar during tour playback
     artModeWin.tourSeekBarMarker.PreviewTouchDown += new EventHandler<TouchEventArgs>(TourSeekBarMarker_PreviewTouchDown);
     artModeWin.tourSeekBarMarker.PreviewMouseDown += new MouseButtonEventHandler(TourSeekBarMarker_PreviewMouseDown);
     artModeWin.tourSeekBarMarker.PreviewTouchMove += new EventHandler<TouchEventArgs>(TourSeekBarMarker_PreviewTouchMove);
     artModeWin.tourSeekBarMarker.PreviewMouseMove += new MouseEventHandler(TourSeekBarMarker_PreviewMouseMove);
     artModeWin.tourSeekBarMarker.PreviewTouchUp += new EventHandler<TouchEventArgs>(TourSeekBarMarker_PreviewTouchUp);
     artModeWin.tourSeekBarMarker.PreviewMouseUp += new MouseButtonEventHandler(TourSeekBarMarker_PreviewMouseUp);
     startDragPoint = new Point();
     loadTourButtons();
     tourPlaybackOn = false;
     tourAuthoringOn = false;
     mouseIsDown = false;
 }
Ejemplo n.º 2
0
        public void LoadTourAuthoringUIFromDict()
        {
            tourAuthoringUI = new TourAuthoringUI(artModeWin, this);

            tourAuthoringUI.timelineCount = tourBiDictionary.firstKeys.Count; //clear the old yellow moveable thing

            tourAuthoringUI.ClearAuthoringUI();

            tourAuthoringUI.timelineCount = tourBiDictionary.firstKeys.Count;

            tourAuthoringUI.timelineLength = tourStoryboard.Duration.TimeSpan.TotalSeconds;

            tourAuthoringUI.canvasWrapper.Children.Clear();
            tourAuthoringUI.initialize();
            tourAuthoringUI.initAuthTools();

            int i = 0;
            foreach (Timeline tourTL in tourBiDictionary.firstKeys)
            {
                BiDictionary<double, TourEvent> tourTL_dict = tourBiDictionary[tourTL][0];

                TourAuthoringUI.timelineInfo timelineInfo = tourAuthoringUI.addTimeline(tourTL, tourTL_dict, ((TourTL)tourTL).displayName, i * tourAuthoringUI.timelineHeight);

                foreach (double beginTime in tourTL_dict.firstKeys) // MediaTimeline will ignore this
                {
                    TourEvent tourEvent = tourTL_dict[beginTime][0];
                    tourAuthoringUI.addTourEvent(timelineInfo, tourEvent, timelineInfo.lengthSV, beginTime, tourEvent.duration);
                }

                if (((TourTL)tourTL).type == TourTLType.audio) // for MediaTimeline
                {
                    TourMediaTL mediaTL = tourTL as TourMediaTL;
                    double mediaBeginTime = 0;
                    if (mediaTL.BeginTime.HasValue)
                    {
                        mediaBeginTime = mediaTL.BeginTime.Value.TotalSeconds;
                    }

                    tourAuthoringUI.addAudioEvent(timelineInfo, null, timelineInfo.lengthSV, mediaBeginTime, tourTL.Duration.TimeSpan.TotalSeconds); // will this work?
                }

                i++;
            }
        }