public void SelectGroup(GroupSelection group) { if (_myMethod.Equals(AutomationMethods.SendMessage)) { Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keydown, (IntPtr)group, IntPtr.Zero); Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keyup, (IntPtr)group, IntPtr.Zero); } else if (_myMethod.Equals(AutomationMethods.PostMessage)) { Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keydown, (IntPtr)group, IntPtr.Zero); Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keyup, (IntPtr)group, IntPtr.Zero); } }
public void PerformCompleteKeypress(Keys key) { if (_myMethod.Equals(AutomationMethods.SendMessage)) { Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keydown, (IntPtr)key, IntPtr.Zero); Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keyup, (IntPtr)key, IntPtr.Zero); } else if (_myMethod.Equals(AutomationMethods.PostMessage)) { Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keydown, (IntPtr)key, IntPtr.Zero); Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keyup, (IntPtr)key, IntPtr.Zero); } }