Пример #1
0
        public bool ImportSong(PcoSong song, bool overwrite)
        {
            var arr = song.Arrangements.FirstOrDefault();

            if (arr == null)
            {
                return(false);
            }

            var presentation = this.connector.GetImportedPresentation(
                arr.ChordChart,
                song.Title);

            if (presentation == null)
            {
                return(false);
            }

            presentation.CCLINo               = string.Format("{0}", song.CcliId);
            presentation.Author               = song.Author;
            presentation.Publisher            = song.Copyright;
            presentation.Title                = song.Title;
            presentation.IsCopyrightDisplayed = true;

            foreach (var arrangement in song.Arrangements)
            {
                this.SetArrangement(presentation, arrangement);
            }

            RVPresentationDocument.AddPresentation(presentation, overwrite);

            return(true);
        }
Пример #2
0
        public RVPresentation GetPresentation(string file)
        {
            if (!this.IsImported(file))
            {
                return(null);
            }

            return((RVPresentation)RVPresentationDocument.GetPresentation(file));
        }
Пример #3
0
        public Importer()
        {
            this.connector = new PcoFileImporter(new ProPresenter.BO.Common.RVPresentationParameters
            {
                Height           = 768,
                Width            = 1024,
                SelectedCategory = "Song",
            });

            RVPresentationDocument.Load();
        }
Пример #4
0
 public bool IsImported(string file)
 {
     return(RVPresentationDocument.ContainsPresentation(file));
 }