public void Generate(Project project, IXenonASTElement _Parent) { Slide titleslide = new Slide { Name = "UNNAMED_2parttitle", Number = project.NewSlideNumber, Lines = new List<SlideLine>(), Asset = "", Format = SlideFormat.TwoPartTitle, MediaType = MediaType.Image }; SlideLineContent slcpart1 = new SlideLineContent() { Data = Part1 }; SlideLineContent slcpart2 = new SlideLineContent() { Data = Part2 }; SlideLine slpart1 = new SlideLine() { Content = new List<SlideLineContent>() { slcpart1 } }; SlideLine slpart2 = new SlideLine() { Content = new List<SlideLineContent>() { slcpart2 } }; titleslide.Lines.Add(slpart1); titleslide.Lines.Add(slpart2); titleslide.Data["orientation"] = Orientation; if (project.GetAttribute("alphatranscol").Count > 0) { titleslide.Colors.Add("keytrans", GraphicsHelper.ColorFromRGB(project.GetAttribute("alphatranscol").FirstOrDefault())); } project.Slides.Add(titleslide); }
public void Generate(Project project, IXenonASTElement _Project) { // create a full image slide Slide imageslide = new Slide(); imageslide.Name = "UNNAMED_image"; imageslide.Number = project.NewSlideNumber; imageslide.Lines = new List <SlideLine>(); string assetpath = ""; var asset = project.Assets.Find(p => p.Name == AssetName); if (asset != null) { assetpath = asset.CurrentPath; } SlideLineContent slc = new SlideLineContent() { Data = assetpath }; SlideLine sl = new SlideLine() { Content = new List <SlideLineContent>() { slc } }; imageslide.Lines.Add(sl); imageslide.Format = SlideFormat.ScaledImage; imageslide.Asset = assetpath; imageslide.MediaType = MediaType.Image; imageslide.Data["key-type"] = KeyType; project.Slides.Add(imageslide); }
public void Generate(Project project, IXenonASTElement _Parent) { Slide sermonslide = new Slide { Name = "UNNAMED_sermon", Number = project.NewSlideNumber, Lines = new List <SlideLine>(), Asset = "", Format = SlideFormat.SermonTitle, MediaType = MediaType.Image }; SlideLineContent slcref = new SlideLineContent() { Data = Reference }; SlideLineContent slctitle = new SlideLineContent() { Data = Title }; SlideLineContent slcpreacher = new SlideLineContent() { Data = Preacher }; SlideLine slref = new SlideLine() { Content = new List <SlideLineContent>() { slcref } }; SlideLine sltitle = new SlideLine() { Content = new List <SlideLineContent>() { slctitle } }; SlideLine slpreacher = new SlideLine() { Content = new List <SlideLineContent>() { slcpreacher } }; sermonslide.Lines.Add(sltitle); sermonslide.Lines.Add(slref); sermonslide.Lines.Add(slpreacher); if (project.GetAttribute("alphatranscol").Count > 0) { sermonslide.Colors.Add("keytrans", GraphicsHelper.ColorFromRGB(project.GetAttribute("alphatranscol").FirstOrDefault())); } project.Slides.Add(sermonslide); }
public void Generate(Project project, IXenonASTElement _Project) { // create a full image slide Slide imageslide = new Slide(); imageslide.Name = "UNNAMED_image"; imageslide.Number = project.NewSlideNumber; imageslide.Lines = new List <SlideLine>(); string assetpath = ""; var asset = project.Assets.Find(p => p.Name == AssetName); if (asset != null) { assetpath = asset.CurrentPath; } SlideLineContent slc = new SlideLineContent() { Data = assetpath }; SlideLine sl = new SlideLine() { Content = new List <SlideLineContent>() { slc } }; imageslide.Lines.Add(sl); imageslide.Format = SlideFormat.AutoscaledImage; imageslide.Asset = assetpath; imageslide.MediaType = MediaType.Image; imageslide.Data["key-type"] = KeyType; if (project.ProjectVariables.ContainsKey("invert-autofit")) { bool val = Convert.ToBoolean(project.GetAttribute("invert-autofit")[0]); imageslide.Data["invert-color"] = val | InvertColor; } else { imageslide.Data["invert-color"] = InvertColor; } var match = Regex.Match(Options, @"cc-bw-(?<val>\d{3})"); if (match.Success) { imageslide.Data["color-correct-black-white"] = Convert.ToInt32(match.Groups["val"].Value); } project.Slides.Add(imageslide); }
public void Generate(Project project, IXenonASTElement _Parent) { Slide readingslide = new Slide(); readingslide.Name = "UNNAMED_reading"; readingslide.Number = project.NewSlideNumber; readingslide.Lines = new List <SlideLine>(); readingslide.Asset = ""; readingslide.Format = SlideFormat.Reading; readingslide.MediaType = MediaType.Image; SlideLineContent slcref = new SlideLineContent() { Data = Reference }; SlideLineContent slcname = new SlideLineContent() { Data = Name }; SlideLine slref = new SlideLine() { Content = new List <SlideLineContent>() { slcref } }; SlideLine slname = new SlideLine() { Content = new List <SlideLineContent>() { slcname } }; readingslide.Lines.Add(slname); readingslide.Lines.Add(slref); if (project.GetAttribute("alphatranscol").Count > 0) { readingslide.Colors.Add("keytrans", GraphicsHelper.ColorFromRGB(project.GetAttribute("alphatranscol").FirstOrDefault())); } project.Slides.Add(readingslide); }
public void Generate(Project project, IXenonASTElement _Parent) { VerseLayoutEngine vle = new VerseLayoutEngine(); vle.BuildLines(Content.Select(p => p.TextContent).ToList()); XenonASTTextHymn parent = _Parent as XenonASTTextHymn; Slide slide = new Slide(); slide.Name = $"texthymn_{parent.HymnName}_verse"; slide.Number = project.NewSlideNumber; slide.Asset = ""; slide.Lines = new List <SlideLine>(); slide.Format = SlideFormat.HymnTextVerse; slide.MediaType = MediaType.Image; slide.Data["title"] = parent.HymnTitle; slide.Data["name"] = parent.HymnName; slide.Data["number"] = parent.Number; slide.Data["tune"] = parent.Tune; slide.Data["copyright"] = parent.CopyrightInfo; slide.Data["sub-name"] = SubName; slide.Data["is-overlay"] = parent.IsOverlay; foreach (var line in vle.LayoutLines) { SlideLineContent slc = new SlideLineContent() { Data = string.Join("", line.Words).Trim() }; SlideLine sl = new SlideLine() { Content = new List <SlideLineContent>() { slc } }; slide.Lines.Add(sl); } project.Slides.Add(slide); }
public void Generate(Project project, IXenonASTElement _Parent) { // create a liturgy image slide Slide imageslide = new Slide { Name = "UNNAMED_image", Number = project.NewSlideNumber, Lines = new List <SlideLine>() }; string assetpath = ""; var asset = project.Assets.Find(p => p.Name == AssetName); if (asset != null) { assetpath = asset.CurrentPath; } SlideLineContent slc = new SlideLineContent() { Data = assetpath }; SlideLine sl = new SlideLine() { Content = new List <SlideLineContent>() { slc } }; imageslide.Lines.Add(sl); imageslide.Format = SlideFormat.LiturgyImage; imageslide.Asset = assetpath; imageslide.MediaType = MediaType.Image; if (project.GetAttribute("alphatranscol").Count > 0) { imageslide.Colors.Add("keytrans", GraphicsHelper.ColorFromRGB(project.GetAttribute("alphatranscol").FirstOrDefault())); } project.Slides.Add(imageslide); }
public void Generate(Project project, IXenonASTElement _Parent) { // create a video slide Slide videoslide = new Slide { Name = "UNNAMED_video", Number = project.NewSlideNumber, Lines = new List <SlideLine>() }; string assetpath = ""; var asset = project.Assets.Find(p => p.Name == AssetName); if (asset != null) { assetpath = asset.CurrentPath; } SlideLineContent slc = new SlideLineContent() { Data = assetpath }; SlideLine sl = new SlideLine() { Content = new List <SlideLineContent>() { slc } }; videoslide.Lines.Add(sl); videoslide.Format = SlideFormat.Video; videoslide.Asset = AssetName; videoslide.MediaType = MediaType.Video; videoslide.Data["key-type"] = KeyType; project.Slides.Add(videoslide); }
public void Generate(Project project, IXenonASTElement _Parent) { Slide titleslide = new Slide { Name = "UNNAMED_anthemtitle", Number = project.NewSlideNumber, Lines = new List <SlideLine>(), Asset = "", Format = SlideFormat.AnthemTitle, MediaType = MediaType.Image }; SlideLineContent slcatitle = new SlideLineContent() { Data = AnthemTitle }; SlideLineContent slcmusician = new SlideLineContent() { Data = Musician }; SlideLineContent slcaccompanianst = new SlideLineContent() { Data = Accompanianst }; SlideLineContent slccredits = new SlideLineContent() { Data = Credits }; SlideLine slatitle = new SlideLine() { Content = new List <SlideLineContent>() { slcatitle } }; SlideLine slmusician = new SlideLine() { Content = new List <SlideLineContent>() { slcmusician } }; SlideLine slaccompanianst = new SlideLine() { Content = new List <SlideLineContent>() { slcaccompanianst } }; SlideLine slcredits = new SlideLine() { Content = new List <SlideLineContent>() { slccredits } }; titleslide.Lines.Add(slatitle); titleslide.Lines.Add(slmusician); titleslide.Lines.Add(slaccompanianst); titleslide.Lines.Add(slcredits); if (project.GetAttribute("alphatranscol").Count > 0) { titleslide.Colors.Add("keytrans", GraphicsHelper.ColorFromRGB(project.GetAttribute("alphatranscol").FirstOrDefault())); } project.Slides.Add(titleslide); }