protected override void ProcessRecord()
{
base.ProcessRecord();
// 20140312
// if (InputObject.Current.NativeWindowHandle != 0)
if (InputObject.GetCurrent().NativeWindowHandle != 0)
{
// 20140312
// NativeMethods.SetForegroundWindow((IntPtr)InputObject.Current.NativeWindowHandle);
NativeMethods.SetForegroundWindow((IntPtr)InputObject.GetCurrent().NativeWindowHandle);
}
else
{
InputObject.SetFocus();
}
WriteObject(InputObject);
}
}