Esempio n. 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Get the Chapter Verse Reference representation for a footnote (ie. sectionCV-CV Footnote(footnoteCV))
		/// Or Title representation (ie. Title Footnote(OwnOrd))
		/// </summary>
		/// <param name="footnote"></param>
		/// <returns></returns>
		/// ------------------------------------------------------------------------------------
		public string ContainingRefAsString(ScrFootnote footnote)
		{
			footnote.IgnoreDisplaySettings = true; // so we can access GetReference.
			string parentContext = "";
			string footnoteRef = "";
			int hvoContainingObj;
			if (footnote.TryGetContainingSectionHvo(out hvoContainingObj))
			{
				ScrSection section = new ScrSection(Cache, hvoContainingObj);
				parentContext = ChapterVerseBridgeAsString(section);
				footnoteRef = footnote.GetReference(m_cache.DefaultUserWs).Trim();
			}
			else if (footnote.TryGetContainingTitle(out hvoContainingObj))
			{
				parentContext = ResourceHelper.GetResourceString("kstidScriptureTitle");
				footnoteRef = footnote.OwnOrd.ToString();
			}
			return String.Format("{0} {1}({2})", parentContext,
				ResourceHelper.GetResourceString("kstidScriptureFootnote"), footnoteRef);
		}