Exemplo n.º 1
0
 /// ------------------------------------------------------------------------------------
 /// <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);
 }
Exemplo n.º 2
0
		/// ------------------------------------------------------------------------------------
		/// <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);
		}
Exemplo n.º 3
0
		/// -------------------------------------------------------------------------------------
		/// <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();
			}
		}