public void RemovePeriodNode_PeriodNodeSelected_SelectionUpdated()
        {
            PeriodsTimelineView view       = timeline.Objects.OfType <PeriodsTimelineView> ().First();
            TimerTimeNodeView   periodNode = (TimerTimeNodeView)view.First();

            Selection sel = new Selection(periodNode, SelectionPosition.All, 0);

            timeline.UpdateSelection(sel);
            project.Periods.Remove(periodNode.Timer.Model as Period);

            Assert.AreEqual(0, timeline.Selections.Count);
        }
Пример #2
0
        void FillCanvasForPeriodsTimeline(ref int line)
        {
            var timeline = new PeriodsTimelineView {
                DraggingMode    = NodeDraggingMode.All,
                Duration        = ViewModel.Project.FileSet.Duration,
                Height          = Sizes.TimelineCategoryHeight,
                OffsetY         = line * Sizes.TimelineCategoryHeight,
                LineColor       = App.Current.Style.ThemeBase,
                BackgroundColor = VASDrawing.Utils.ColorForRow(line),
                ShowLine        = false
            };

            timeline.SetViewModel((ViewModel.Project as LMProjectVM).Periods);
            AddTimeline(timeline, timeline.ViewModel);
            line++;
        }
Пример #3
0
        void FillCanvas()
        {
            int i = 0;

            // Add the timeline for periods
            PeriodsTimeline = new PeriodsTimelineView {
                ShowLine        = true,
                Duration        = ViewModel.Project.FileSet.Duration,
                DraggingMode    = NodeDraggingMode.All,
                Height          = Sizes.TimelineCameraHeight,
                OffsetY         = 0,
                LineColor       = App.Current.Style.ThemeContrastDisabled,
                BackgroundColor = App.Current.Style.ScreenBase
            };
            PeriodsTimeline.ViewModel = ViewModel.Project.Periods;
            AddTimeLine(PeriodsTimeline);
            i++;

            // Now add the timeline for the secondary cameras.
            // The main camera does not have a timeline since its the master camera and secondary cameras are synced
            // with respect of the main camera.
            foreach (MediaFileVM fileVM in ViewModel.Project.FileSet.Skip(1))
            {
                CameraTimelineView cameraTimeLine = new CameraTimelineView {
                    ShowName        = false,
                    ShowLine        = true,
                    Height          = Sizes.TimelineCameraHeight,
                    OffsetY         = i * Sizes.TimelineCameraHeight,
                    LineColor       = App.Current.Style.ThemeContrastDisabled,
                    BackgroundColor = App.Current.Style.ScreenBase,
                };
                cameraTimeLine.ViewModel = fileVM;
                AddTimeLine(cameraTimeLine);
                i++;
            }
            Update();
        }