コード例 #1
0
        private static void NativeAppendText(BaseProdControl control, string newText)
        {
            int hwnd = control.UIAElement.Current.NativeWindowHandle;

            if (hwnd == 0)
            {
                /* If it doesn't have one, send keys, then */
                InternalUtilities.SendKeysAppendText(control.UIAElement, newText);
            }

            ProdEditNative.AppendTextNative((IntPtr)control.UIAElement.Current.NativeWindowHandle, newText);
        }
コード例 #2
0
        private static void NativeClearText(BaseProdControl control)
        {
            int hwnd = control.UIAElement.Current.NativeWindowHandle;

            if (hwnd != 0)
            {
                ProdEditNative.ClearTextNative((IntPtr)hwnd);
            }

            /* If it doesn't have one, send keys, then */
            InternalUtilities.SendKeysSetText(control.UIAElement, "^a");
            InternalUtilities.SendKeysSetText(control.UIAElement, "{Backspace}");
        }