SIL.FieldWorks.XWorks.MorphologyEditor.InflAffixTemplateControl.OnLostFocus C# (CSharp) Method

OnLostFocus() protected method

When focus is lost, stop filtering messages to catch characters
protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
return void
		protected override void OnLostFocus(EventArgs e)
		{
			// During deletion of a Grammar Category, Windows/.Net can pass through here after
			// the template has been deleted, resulting a crash trying to verify the slot names
			// of the template.  See LT-13932.
			if (m_template.IsValidObject && !AllSlotNamesOk)
			{
				UndoableUnitOfWorkHelper.Do(MEStrings.ksUndoChangeSlotName, MEStrings.ksRedoChangeSlotName,
					Cache.ActionHandlerAccessor,
					() =>
					{
						foreach (var slot in m_template.PrefixSlotsRS)
							FixSlotName(slot);
						foreach (var slot in m_template.SuffixSlotsRS)
							FixSlotName(slot);
					});
			}
			base.OnLostFocus(e);
		}