Beispiel #1
0
        public void ShowMenu(Project project, Timer timer, Time time,
		                      TimerTimeline timertimeline, SelectionCanvas selectionCanvas)
        {
            this.timer = timer;
            this.time = time;
            this.project = project;
            this.timertimeline = timertimeline;
            this.selectionCanvas = selectionCanvas;
            delitem.Visible = project != null && timer != null;
            Popup ();
        }
        protected override void FillCanvas()
        {
            TimelineObject tl;
            int            i = 0;

            tl = new TimerTimeline(project.Periods.Select(p => p as Timer).ToList(),
                                   true, NodeDraggingMode.All, false, duration,
                                   i * StyleConf.TimelineCategoryHeight,
                                   VASDrawing.Utils.ColorForRow(i), App.Current.Style.PaletteBackgroundDark);
            AddTimeline(tl, null);
            PeriodsTimeline = tl as TimerTimeline;
            i++;

            foreach (Timer t in project.Timers)
            {
                tl = new TimerTimeline(new List <Timer> {
                    t
                }, false, NodeDraggingMode.All, false, duration,
                                       i * StyleConf.TimelineCategoryHeight,
                                       VASDrawing.Utils.ColorForRow(i), App.Current.Style.PaletteBackgroundDark);
                AddTimeline(tl, t);
            }

            foreach (EventType type in project.EventTypes)
            {
                List <TimelineEvent> timelineEventList = project.EventsByType(type);
                var timelineEventLongoMatchList        = new List <TimelineEvent> ();
                timelineEventList.ForEach(x => timelineEventLongoMatchList.Add(x));
                tl = new SportCategoryTimeline(project as ProjectLongoMatch, timelineEventLongoMatchList, duration,
                                               i * StyleConf.TimelineCategoryHeight,
                                               VASDrawing.Utils.ColorForRow(i), playsFilter);
                AddTimeline(tl, type);
                i++;
            }
            UpdateVisibleCategories();
            Update();
            HeightRequest = Objects.Count * StyleConf.TimelineCategoryHeight;
        }
        void FillCanvas()
        {
            // Add the timeline for periods
            PeriodsTimeline = new TimerTimeline (timers, true, NodeDraggingMode.All, true, duration, StyleConf.TimelineCameraHeight, 0,
                App.Current.Style.PaletteBackground, App.Current.Style.PaletteBackgroundLight);
            AddTimeLine (PeriodsTimeline);

            // And for the cameras
            for (int i = 1; i < fileSet.Count; i++) {
                CameraTimeline cameraTimeLine = new CameraTimeline (fileSet [i], false, true, duration, i * StyleConf.TimelineCameraHeight,
                                                    App.Current.Style.PaletteBackground,
                                                    App.Current.Style.PaletteBackgroundLight);
                AddTimeLine (cameraTimeLine);
            }
            Update ();
            // Calculate height depending on number of cameras - 1 (for the main camera) + the line for periods
            HeightRequest = StyleConf.TimelineCameraHeight * fileSet.Count;
        }