/// ------------------------------------------------------------------------------------ /// <summary> /// Initialize the dialog values /// </summary> /// <param name="cache">The cache</param> /// <param name="styleSheet">The style sheet</param> /// <param name="footnoteMarkerType">type of footnote marker</param> /// <param name="footnoteMarkerSymbol">The symbolic footnote marker. This is only used /// when the marker type is "custom symbol" (but a value should be specified regardless /// in order to fillin the text box in the UI).</param> /// <param name="displayReference">flag whether to display the footnote reference and /// check associated check box.</param> /// <param name="displayCusSymbol">flag whether to display the custom symbol and /// check associated check box.</param> /// <param name="helpTopicProvider">The help topic provider.</param> /// ------------------------------------------------------------------------------------ public void Initialize(FdoCache cache, IVwStylesheet styleSheet, FootnoteMarkerTypes footnoteMarkerType, string footnoteMarkerSymbol, bool displayReference, bool displayCusSymbol, IHelpTopicProvider helpTopicProvider) { CheckDisposed(); m_cache = cache; m_helpTopicProvider = helpTopicProvider; m_styleSheet = styleSheet; m_fRestartSequence = cache.LangProject.TranslatedScriptureOA.RestartFootnoteSequence; if (m_styleSheet is FwStyleSheet) { string fontFace = ((FwStyleSheet)m_styleSheet).GetFaceNameFromStyle( ScrStyleNames.FootnoteMarker, cache.ServiceLocator.WritingSystems.DefaultVernacularWritingSystem.Handle, cache.LanguageWritingSystemFactoryAccessor); txtMarker.Font = new Font(fontFace, 10); } txtMarker.MaxLength = kMaxMarkerLength; switch (footnoteMarkerType) { case FootnoteMarkerTypes.AutoFootnoteMarker: optAlpha.Checked = true; chkShowCustomSymbol.Checked = true; break; case FootnoteMarkerTypes.NoFootnoteMarker: optNone.Checked = true; chkShowCustomSymbol.Checked = false; break; case FootnoteMarkerTypes.SymbolicFootnoteMarker: optSymbol.Checked = true; txtMarker.Text = footnoteMarkerSymbol; chkShowCustomSymbol.Checked = displayCusSymbol; break; } chkShowRef.Checked = displayReference; }