public void TakeKeyboardFocus(bool forward)
{
HandleRef ref2 = new HandleRef(this, base.Handle);
int num = (int) Microsoft.ManagementConsole.Interop.NativeMethods.SendMessage(ref2.Handle, 0x129, IntPtr.Zero, IntPtr.Zero);
if ((num & 1) != 0)
{
HandleRef ref3 = new HandleRef(this, base.Handle);
Microsoft.ManagementConsole.Interop.NativeMethods.SendMessage(ref3.Handle, 0x127, (IntPtr) 0x10002, IntPtr.Zero);
}
if (base.Controls.Count != 0)
{
base.SelectNextControl(null, forward, true, true, true);
}
}
}