SIL.FieldWorks.FdoUi.Dialogs.RelatedWordsView.HandleSelectionChange C# (CSharp) Method

HandleSelectionChange() private method

Handle a selection change by growing it to a word (unless the new selection IS the one we're growing to a word).
private HandleSelectionChange ( object sender, SIL.FieldWorks.Common.RootSites.VwSelectionArgs args ) : void
sender object
args SIL.FieldWorks.Common.RootSites.VwSelectionArgs
return void
		private void HandleSelectionChange(object sender, VwSelectionArgs args)
		{
			CheckDisposed();

			IVwRootBox rootb = args.RootBox;
			IVwSelection vwselNew = args.Selection;
			Debug.Assert(vwselNew != null);

			if (!m_fInSelChange)
			{
				m_fInSelChange = true;
				try
				{
					if (!vwselNew.IsRange)
					{
						vwselNew.GrowToWord().Install();
					}
				}
				finally
				{
					m_fInSelChange = false;
				}
			}
			if (SelChanged != null)
				SelChanged(this, new EventArgs());
		}