void ShowPlaysMenu(Point coords, CategoryTimeline catTimeline) { EventType ev = null; List<TimelineEvent> plays; plays = Selections.Select (p => (p.Drawable as TimelineEventObject).Event).ToList (); ev = eventsTimelines.GetKeyByValue (catTimeline); if (ev != null && ShowMenuEvent != null) { ShowMenuEvent (plays, ev, Utils.PosToTime (coords, SecondsPerPixel)); } }
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, Utils.ColorForRow (i), Config.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, Utils.ColorForRow (i), Config.Style.PaletteBackgroundDark); AddTimeline (tl, t); } foreach (EventType type in project.EventTypes) { tl = new CategoryTimeline (project, project.EventsByType (type), duration, i * StyleConf.TimelineCategoryHeight, Utils.ColorForRow (i), playsFilter); AddTimeline (tl, type); i++; } UpdateVisibleCategories (); Update (); }