Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
29950113
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
29950113
编写于
12月 12, 2018
作者:
S
Sam Harwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused code
上级
6694cda7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
54 deletion
+0
-54
src/VisualStudio/IntegrationTest/TestUtilities/IntegrationHelper.cs
...Studio/IntegrationTest/TestUtilities/IntegrationHelper.cs
+0
-19
src/VisualStudio/IntegrationTest/TestUtilities/Interop/NativeMethods.cs
...io/IntegrationTest/TestUtilities/Interop/NativeMethods.cs
+0
-35
未找到文件。
src/VisualStudio/IntegrationTest/TestUtilities/IntegrationHelper.cs
浏览文件 @
29950113
...
...
@@ -197,25 +197,6 @@ public static void SetForegroundWindow(IntPtr window)
{
var
activeWindow
=
NativeMethods
.
GetLastActivePopup
(
window
);
NativeMethods
.
SwitchToThisWindow
(
activeWindow
,
true
);
//// Make the window a top-most window so it will appear above any existing top-most windows
//NativeMethods.SetWindowPos(window, (IntPtr)NativeMethods.HWND_TOPMOST, 0, 0, 0, 0, (NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE));
//// Move the window into the foreground as it may not have been achieved by the 'SetWindowPos' call
//var success = NativeMethods.SetForegroundWindow(window);
//if (!success)
//{
// throw new InvalidOperationException("Setting the foreground window failed.");
//}
//// Ensure the window is 'Active' as it may not have been achieved by 'SetForegroundWindow'
//NativeMethods.SetActiveWindow(window);
//// Give the window the keyboard focus as it may not have been achieved by 'SetActiveWindow'
//NativeMethods.SetFocus(window);
//// Remove the 'Top-Most' qualification from the window
//NativeMethods.SetWindowPos(window, (IntPtr)NativeMethods.HWND_NOTOPMOST, 0, 0, 0, 0, (NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE));
}
public
static
void
SendInput
(
NativeMethods
.
INPUT
[]
inputs
)
...
...
src/VisualStudio/IntegrationTest/TestUtilities/Interop/NativeMethods.cs
浏览文件 @
29950113
...
...
@@ -48,11 +48,6 @@ internal static class NativeMethods
public
const
uint
GW_CHILD
=
5
;
public
const
uint
GW_ENABLEDPOPUP
=
6
;
public
const
int
HWND_NOTOPMOST
=
-
2
;
public
const
int
HWND_TOPMOST
=
-
1
;
public
const
int
HWND_TOP
=
0
;
public
const
int
HWND_BOTTOM
=
1
;
public
const
uint
INPUT_MOUSE
=
0
;
public
const
uint
INPUT_KEYBOARD
=
1
;
public
const
uint
INPUT_HARDWARE
=
2
;
...
...
@@ -63,22 +58,6 @@ internal static class NativeMethods
public
const
uint
KEYEVENTF_UNICODE
=
0x0004
;
public
const
uint
KEYEVENTF_SCANCODE
=
0x0008
;
public
const
uint
SWP_NOSIZE
=
0x0001
;
public
const
uint
SWP_NOMOVE
=
0x0002
;
public
const
uint
SWP_NOZORDER
=
0x0004
;
public
const
uint
SWP_NOREDRAW
=
0x008
;
public
const
uint
SWP_NOACTIVATE
=
0x0010
;
public
const
uint
SWP_DRAWFRAME
=
0x0020
;
public
const
uint
SWP_FRAMECHANGED
=
0x0020
;
public
const
uint
SWP_SHOWWINDOW
=
0x0040
;
public
const
uint
SWP_HIDEWINDOW
=
0x0080
;
public
const
uint
SWP_NOCOPYBITS
=
0x0100
;
public
const
uint
SWP_NOOWNERZORDER
=
0x0200
;
public
const
uint
SWP_NOREPOSITION
=
0x0200
;
public
const
uint
SWP_NOSENDCHANGING
=
0x0400
;
public
const
uint
SWP_DEFERERASE
=
0x2000
;
public
const
uint
SWP_ASYNCWINDOWPOS
=
0x4000
;
public
const
uint
WM_GETTEXT
=
0x000D
;
public
const
uint
WM_GETTEXTLENGTH
=
0x000E
;
...
...
@@ -172,20 +151,6 @@ public struct MOUSEINPUT
[
DllImport
(
User32
,
CharSet
=
CharSet
.
Unicode
,
SetLastError
=
true
)]
public
static
extern
IntPtr
SendMessage
(
IntPtr
hWnd
,
uint
uMsg
,
IntPtr
wParam
,
[
Out
,
MarshalAs
(
UnmanagedType
.
LPWStr
)]
StringBuilder
lParam
);
[
DllImport
(
User32
,
SetLastError
=
true
)]
public
static
extern
IntPtr
SetActiveWindow
(
IntPtr
hWnd
);
[
DllImport
(
User32
,
SetLastError
=
true
)]
public
static
extern
IntPtr
SetFocus
(
IntPtr
hWnd
);
[
DllImport
(
User32
,
SetLastError
=
false
)]
[
return
:
MarshalAs
(
UnmanagedType
.
Bool
)]
public
static
extern
bool
SetForegroundWindow
(
IntPtr
hWnd
);
[
DllImport
(
User32
,
SetLastError
=
true
)]
[
return
:
MarshalAs
(
UnmanagedType
.
Bool
)]
public
static
extern
bool
SetWindowPos
(
IntPtr
hWnd
,
[
Optional
]
IntPtr
hWndInsertAfter
,
int
X
,
int
Y
,
int
cx
,
int
cy
,
uint
uFlags
);
[
DllImport
(
User32
,
SetLastError
=
true
)]
public
static
extern
IntPtr
GetLastActivePopup
(
IntPtr
hWnd
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录