Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
1069_MIMO_PlUS
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 8e4d028e
由
张东亮
编写于
2023-09-08 15:00:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
监控界面
1 个父辈
db9f527e
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
11 行删除
Common/util/WindowUtil.cs
TheMachine/Form1.Designer.cs
Common/util/WindowUtil.cs
查看文件 @
8e4d028
...
...
@@ -36,6 +36,10 @@ namespace Common
public
static
IntPtr
PutIntoForm
(
Panel
panel
,
string
titleName
)
{
IntPtr
appWin
=
FindWindow
(
null
,
titleName
);
if
(
appWin
==
IntPtr
.
Zero
)
{
appWin
=
GetDesktopWindows
(
titleName
);
}
// Put it into this form
SetParent
(
appWin
,
panel
.
Handle
);
...
...
@@ -141,7 +145,7 @@ namespace Common
public
static
IntPtr
GetDesktopWindows
(
string
windowName
,
StringComparison
comparison
=
StringComparison
.
Ordinal
)
{
WindowInfo
[]
allWindow
=
WindowUtil
.
GetAllDesktopWindows
();
var
wnd
=
allWindow
.
FirstOrDefault
(
s
=>
s
.
szWindowName
.
Equals
(
windowName
,
comparison
));
var
wnd
=
allWindow
.
FirstOrDefault
(
s
=>
s
.
szWindowName
.
StartsWith
(
windowName
,
comparison
));
// s.szWindowName.Equals(windowName, comparison)
return
wnd
.
hWnd
;
}
}
...
...
TheMachine/Form1.Designer.cs
查看文件 @
8e4d028
...
...
@@ -55,10 +55,10 @@ namespace TheMachine
this
.
btn_IgnoreX09
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_PauseBuzzer
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabMonitor
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
panelVideo
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
btn_stop
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_run
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
panelVideo
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
tabc
.
SuspendLayout
();
this
.
tabP1
.
SuspendLayout
();
...
...
@@ -262,7 +262,7 @@ namespace TheMachine
// pictureBox2
//
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
269
);
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
8
,
269
);
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
436
,
271
);
this
.
pictureBox2
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
...
...
@@ -329,14 +329,6 @@ namespace TheMachine
this
.
tabMonitor
.
Text
=
"监控"
;
this
.
tabMonitor
.
UseVisualStyleBackColor
=
true
;
//
// panelVideo
//
this
.
panelVideo
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panelVideo
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panelVideo
.
Name
=
"panelVideo"
;
this
.
panelVideo
.
Size
=
new
System
.
Drawing
.
Size
(
1000
,
560
);
this
.
panelVideo
.
TabIndex
=
274
;
//
// listView1
//
this
.
listView1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
...
@@ -376,6 +368,14 @@ namespace TheMachine
this
.
btn_run
.
UseVisualStyleBackColor
=
true
;
this
.
btn_run
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_run_Click
);
//
// panelVideo
//
this
.
panelVideo
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
panelVideo
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
panelVideo
.
Name
=
"panelVideo"
;
this
.
panelVideo
.
Size
=
new
System
.
Drawing
.
Size
(
1000
,
560
);
this
.
panelVideo
.
TabIndex
=
276
;
//
// Form1
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
9F
,
17F
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论