SIL.FieldWorks.Common.Framework.DetailControls.GhostStringSlice.GhostStringSliceView.OnKeyPress C# (CSharp) Méthode

OnKeyPress() protected méthode

If the view's root object is valid, then call the base method. Otherwise do nothing. (See LT-8656 and LT-9119.)
protected OnKeyPress ( KeyPressEventArgs e ) : void
e System.Windows.Forms.KeyPressEventArgs
Résultat void
			protected override void OnKeyPress(KeyPressEventArgs e)
			{
				try
				{
					var obj = m_fdoCache.ServiceLocator.GetInstance<ICmObjectRepository>().GetObject(m_hvoObj);
					if (obj.IsValidObject)
						base.OnKeyPress(e);
					else
						e.Handled = true;
				}
				catch
				{
					e.Handled = true;
				}
			}