public static List <string> EventsSection(EventsSection section) { var list = BaseListFormat("Events"); list.AddRange(new List <string> { @"//Background and Video events", $"0,0,\"{section.BackgroundImage ?? ""}\",0,0", }); if (section.Video != null) { list.Add($"Video,{section.VideoOffset},\"{section.Video}\""); } list.Add(@"//Break Periods"); if (section.Breaks.Count > 0) { list.AddRange(section.Breaks.ConvertAll(b => $"2,{b.StartTime},{b.EndTime}")); } list.Add(@"//Storyboard Layer 0 (Background)"); section.Storyboard.BackgroundLayer.ForEach(sbObject => list.AddRange(WriteHelper.StoryboardObject(sbObject, Enums.StoryboardLayer.Background))); list.Add(@"//Storyboard Layer 1 (Fail)"); section.Storyboard.FailLayer.ForEach(sbObject => list.AddRange(WriteHelper.StoryboardObject(sbObject, Enums.StoryboardLayer.Fail))); list.Add(@"//Storyboard Layer 2 (Pass)"); section.Storyboard.PassLayer.ForEach(sbObject => list.AddRange(WriteHelper.StoryboardObject(sbObject, Enums.StoryboardLayer.Pass))); list.Add(@"//Storyboard Layer 3 (Foreground)"); section.Storyboard.ForegroundLayer.ForEach(sbObject => list.AddRange(WriteHelper.StoryboardObject(sbObject, Enums.StoryboardLayer.Foreground))); list.Add(@"//Storyboard Sound Samples"); section.Storyboard.SamplesLayer.ForEach(sbObject => list.AddRange(WriteHelper.StoryboardObject(sbObject, (sbObject as Storyboards.Objects.StoryboardSample).Layer))); return(list); }
public void LoadConfiguration() { EventsSection settings = Upac.Events.Configuration.ConfigurationManager.Settings; Assert.IsNotNull(settings); bool enabled = settings.Enabled; Assert.IsTrue(enabled); EventCollection collection = settings.Events; Assert.IsNotNull(collection); int count = collection.Count; Assert.AreEqual(2, count); EventElement element = collection[0]; Assert.IsTrue(element.Enabled); Assert.AreEqual("New", element.TargetEvent); Assert.AreEqual("umbraco.cms.businesslogic.web.Document, cms", element.TargetType); Assert.AreEqual(element.TargetType + "." + element.TargetEvent, element.Key); Assert.AreEqual(2, element.Handlers.Count); HandlerElement handler = element.Handlers[0]; Assert.IsTrue(handler.Enabled); element = collection[1]; Assert.IsFalse(element.Enabled); }
private static void AddSectionsToAllUsers() { NewsSection.AddSectionToAllUsers(); EventsSection.AddSectionToAllUsers(); BulletinsSection.AddSectionToAllUsers(); GroupsSection.AddSectionToAllUsers(); NotificationSettingsSection.AddSectionToAllUsers(); }
public Beatmap() { GeneralSection = new GeneralSection(); EditorSection = new EditorSection(); MetadataSection = new MetadataSection(); DifficultySection = new DifficultySection(); EventsSection = new EventsSection(); }
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { NewsSection.AddSectionToAllUsers(applicationContext); EventsSection.AddSectionToAllUsers(applicationContext); BulletinsSection.AddSectionToAllUsers(applicationContext); RegisterRoutes(); base.ApplicationStarted(umbracoApplication, applicationContext); }
public OsuBeatmap(Qua qua, Arguments args) { GeneralSection = new GeneralSection(qua, args); EditorSection = new EditorSection(qua, args); MetadataSection = new MetadataSection(qua, args); DifficultySection = new DifficultySection(qua, args); EventsSection = new EventsSection(qua, args); TimingPointsSection = new TimingPointsSection(qua, args); HitObjectsSection = new HitObjectsSection(qua, args); }