private List <object> GetExportDataForReferenceBlock(Block refBlock, string bookId)
        {
            var row = new List <object>();

            row.Add(null);
            if (IncludeVoiceActors)
            {
                row.Add(null);
            }
            row.Add(refBlock.StyleTag);
            row.Add(bookId);
            row.Add(refBlock.ChapterNumber);
            row.Add(refBlock.InitialVerseNumberOrBridge);
            row.Add((CharacterVerseData.IsCharacterStandard(refBlock.CharacterId) ?
                     CharacterVerseData.GetStandardCharacterIdAsEnglish(refBlock.CharacterId) : refBlock.CharacterId));
            if (LocalizationManager.UILanguageId != "en")
            {
                row.Add(null);
            }
            row.Add(refBlock.Delivery);
            row.Add(null);
            row.Add(refBlock.GetText(true, true));
            if (Project.ReferenceText.HasSecondaryReferenceText)
            {
                row.Add(refBlock.PrimaryReferenceText);
            }
            row.Add(0);
            return(row);
        }
Beispiel #2
0
        internal static Tuple <int, string, List <object> > GetExportDataForBlock(Block block, int blockNumber, string bookId, VoiceActor.VoiceActor voiceActor = null, string singleVoiceNarratorOverride = null, bool useCharacterIdInScript = true)
        {
            // NOTE: if the order here changes, there may be changes needed in GenerateExcelFile
            List <object> list = new List <object>();

            list.Add(blockNumber);
            if (voiceActor != null)
            {
                list.Add(voiceActor.Name);
            }
            list.Add(block.StyleTag);
            list.Add(bookId);
            list.Add(block.ChapterNumber);
            list.Add(block.InitialStartVerseNumber);
            string characterId;

            if (singleVoiceNarratorOverride != null)
            {
                characterId = singleVoiceNarratorOverride;
            }
            else
            {
                characterId = useCharacterIdInScript ? block.CharacterIdInScript : block.CharacterId;
            }
            list.Add(CharacterVerseData.IsCharacterStandard(characterId) ? CharacterVerseData.GetStandardCharacterIdAsEnglish(characterId) : characterId);
            list.Add(block.Delivery);
            list.Add(block.GetText(true));
            list.Add(block.GetText(false).Length);
            return(new Tuple <int, string, List <object> >(voiceActor == null ? -1 : voiceActor.Id, bookId, list));
        }
        internal static List <object> GetExportDataForBlock(Block block, int blockNumber, string bookId,
                                                            VoiceActor.VoiceActor voiceActor, string singleVoiceNarratorOverride, bool useCharacterIdInScript, bool includeSecondaryDirectorsGuide)
        {
            // NOTE: if the order here changes, there may be changes needed in GenerateExcelFile
            List <object> list = new List <object>();

            list.Add(blockNumber);
            if (voiceActor != null)
            {
                list.Add(voiceActor.Name);
            }
            list.Add(block.StyleTag);
            list.Add(bookId);
            list.Add(block.ChapterNumber);
            list.Add(block.InitialVerseNumberOrBridge);
            string characterId;

            if (singleVoiceNarratorOverride != null)
            {
                characterId = singleVoiceNarratorOverride;
            }
            else
            {
                characterId = useCharacterIdInScript ? block.CharacterIdInScript : block.CharacterId;
            }
            list.Add(CharacterVerseData.IsCharacterStandard(characterId) ? CharacterVerseData.GetStandardCharacterIdAsEnglish(characterId) : characterId);

            // add a column for the localized character id
            if (LocalizationManager.UILanguageId != "en")
            {
                list.Add(CharacterVerseData.GetCharacterNameForUi(characterId));
            }

            list.Add(block.Delivery);
            list.Add(block.GetText(true));
            list.Add(block.PrimaryReferenceText);
            if (includeSecondaryDirectorsGuide)
            {
                var primaryRefBlock = (block.MatchesReferenceText) ? block.ReferenceBlocks.Single() : null;
                if (primaryRefBlock != null && primaryRefBlock.MatchesReferenceText)
                {
                    list.Add(primaryRefBlock.PrimaryReferenceText);
                }
                else
                {
                    list.Add(null);
                }
            }
            list.Add(block.GetText(false).Length);
            return(list);
        }