Beispiel #1
0
        public string StoryBtHtml(ProjectSettings projectSettings, TeamMembersData membersData,
                                  StoryStageLogic stageLogic, TeamMemberData loggedOnMember, int nVerseIndex,
                                  ViewItemToInsureOn viewItemToInsureOn, int nNumCols)
        {
            string strRow = null;

            if (IsViewItemOn(viewItemToInsureOn, ViewItemToInsureOn.eVernacularLangField))
            {
                strRow += String.Format(Properties.Resources.HTML_TableCellWidthAlignTop, 100 / nNumCols,
                                        String.Format(Properties.Resources.HTML_Textarea,
                                                      TextareaId(nVerseIndex, StoryLineControl.CstrFieldNameVernacular),
                                                      StoryData.CstrLangVernacularStyleClassName,
                                                      VernacularText));
            }

            if (IsViewItemOn(viewItemToInsureOn, ViewItemToInsureOn.eNationalLangField))
            {
                strRow += String.Format(Properties.Resources.HTML_TableCellWidthAlignTop, 100 / nNumCols,
                                        String.Format(Properties.Resources.HTML_Textarea,
                                                      TextareaId(nVerseIndex, StoryLineControl.CstrFieldNameNationalBt),
                                                      StoryData.CstrLangNationalBtStyleClassName,
                                                      NationalBTText));
            }

            if (IsViewItemOn(viewItemToInsureOn, ViewItemToInsureOn.eEnglishBTField))
            {
                strRow += String.Format(Properties.Resources.HTML_TableCellWidthAlignTop, 100 / nNumCols,
                                        String.Format(Properties.Resources.HTML_Textarea,
                                                      TextareaId(nVerseIndex, StoryLineControl.CstrFieldNameInternationalBt),
                                                      StoryData.CstrLangInternationalBtStyleClassName,
                                                      InternationalBTText));
            }

            string strStoryLineRow = String.Format(Properties.Resources.HTML_TableRow,
                                                   strRow);

            if (IsViewItemOn(viewItemToInsureOn, ViewItemToInsureOn.eAnchorFields))
            {
                strStoryLineRow += Anchors.Html(nVerseIndex, nNumCols);
            }

            if (IsViewItemOn(viewItemToInsureOn, ViewItemToInsureOn.eRetellingFields) &&
                (Retellings.Count > 0))
            {
                strStoryLineRow += Retellings.Html(nVerseIndex, nNumCols);
            }

            if (IsViewItemOn(viewItemToInsureOn, ViewItemToInsureOn.eStoryTestingQuestionFields) &&
                (TestQuestions.Count > 0))
            {
                strStoryLineRow += TestQuestions.Html(projectSettings, viewItemToInsureOn,
                                                      stageLogic, loggedOnMember, nVerseIndex, nNumCols,
                                                      membersData.HasOutsideEnglishBTer);
            }

            return(strStoryLineRow);
        }
Beispiel #2
0
        public static ViewItemToInsureOn SetItemsToInsureOn
        (
            bool bLangVernacular,
            bool bLangNationalBT,
            bool bLangInternationalBT,
            bool bAnchors,
            bool bStoryTestingQuestions,
            bool bRetellings,
            bool bConsultantNotes,
            bool bCoachNotes,
            bool bBibleViewer
        )
        {
            ViewItemToInsureOn items = 0;

            if (bLangVernacular)
            {
                items |= ViewItemToInsureOn.eVernacularLangField;
            }
            if (bLangNationalBT)
            {
                items |= ViewItemToInsureOn.eNationalLangField;
            }
            if (bLangInternationalBT)
            {
                items |= ViewItemToInsureOn.eEnglishBTField;
            }
            if (bAnchors)
            {
                items |= ViewItemToInsureOn.eAnchorFields;
            }
            if (bStoryTestingQuestions)
            {
                items |= ViewItemToInsureOn.eStoryTestingQuestionFields;
            }
            if (bRetellings)
            {
                items |= ViewItemToInsureOn.eRetellingFields;
            }
            if (bConsultantNotes)
            {
                items |= ViewItemToInsureOn.eConsultantNoteFields;
            }
            if (bCoachNotes)
            {
                items |= ViewItemToInsureOn.eCoachNotesFields;
            }
            if (bBibleViewer)
            {
                items |= ViewItemToInsureOn.eBibleViewer;
            }
            return(items);
        }
Beispiel #3
0
 public static bool IsViewItemOn(ViewItemToInsureOn eValue, ViewItemToInsureOn eFlag)
 {
     return((eValue & eFlag) == eFlag);
 }