/// ------------------------------------------------------------------------------------ /// <summary> /// Called when selected Scripture reference changed in the key terms view. /// </summary> /// <param name="sender">The sender.</param> /// <param name="refArgs">The <see cref="T:SIL.FieldWorks.TE.ScrRefEventArgs"/> instance /// containing the event data.</param> /// ------------------------------------------------------------------------------------ internal void OnScrReferenceChanged(object sender, ScrRefEventArgs refArgs) { UpdateToolStripButtons(refArgs == null ? m_wrapper.SelectedReference : refArgs.KeyTermRef); }
/// ------------------------------------------------------------------------------------- /// <summary> /// This method gets called whenever the focused reference in the rendering pane changes. /// We respond by telling the draft view to scroll to and select the text of the new /// verse. /// </summary> /// ------------------------------------------------------------------------------------- private void RenderingScrRefChanged(object sender, ScrRefEventArgs e) { if (!IsRangeSelectionInKtRef(e.KeyTermRef) && EditingHelper != null && EditingHelper.CurrentSelection != null) { // Check if there's anything displayed in the data grid if (e.RefBCV <= 0) EditingHelper.GoToFirstBook(); else { IWfiWordform wordform = e.KeyTermRef.RenderingRA; EditingHelper.SelectVerseText(e.KeyTermRef.RefInCurrVersification, wordform == null ? null : wordform.Form.GetAlternativeTss(wordform.Cache.DefaultVernWs)); } ((Control)DraftView).Focus(); } }