Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit d297a789
由
LN
编写于
2024-03-25 14:47:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
3274cda8
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
25 行增加
和
4 行删除
TSA-V/frmBoard/FrmAddBoard.cs
TSA-V/frmBoard/FrmAddBoard.cs
查看文件 @
d297a78
...
...
@@ -568,15 +568,36 @@ namespace TSA_V
{
string
defPath
=
Path
.
GetPathRoot
(
Application
.
StartupPath
)
+
@"image\"
;
//List<string> newFiles = FileUtil.FileProcess(openFileDialog.FileNames);
bool
result
=
GerberVS
.
AGerberController
.
OpenLayers
(
openFileDialog
.
FileNames
,
defPath
,
out
string
filename
);
if
(
result
&&
File
.
Exists
(
filename
))
GerberVS
.
BoundingBox
boxBound
=
GerberVS
.
AGerberController
.
OpenLayers
(
openFileDialog
.
FileNames
,
defPath
,
out
string
filename
);
if
(
boxBound
!=
null
&&
File
.
Exists
(
filename
))
{
double
x
=
boxBound
.
Right
-
boxBound
.
Left
;
double
y
=
boxBound
.
Top
-
boxBound
.
Bottom
;
string
msg
=
$
"位置左下角({Math.Round(boxBound.Left, 2)},{Math.Round(boxBound.Bottom, 2)}),"
+
$
"右上角({Math.Round(boxBound.Right, 2)},{Math.Round(boxBound.Top, 2)}):尺寸:{Math.Round(x, 2)}X{Math.Round(y, 2)}"
;
LogUtil
.
info
(
$
"gerber文件【{string.Join("
,
", openFileDialog.FileNames) }】成功导入到文件:{filename},{msg}"
);
FrmImageViewer
imageViewer
=
new
FrmImageViewer
(
filename
);
DialogResult
sureresult
=
imageViewer
.
ShowDialog
();
if
(!
sureresult
.
Equals
(
DialogResult
.
Cancel
))
{
{
int
l
=(
int
)
Math
.
Round
(
x
);
int
w
=
(
int
)
Math
.
Round
(
y
);
if
(
x
<=
10
||
w
<=
10
)
{
l
=
(
int
)(
x
*
25.4
);
w
=
(
int
)(
y
*
25.4
);
}
this
.
txtImagePath
.
Text
=
filename
;
int
currl
=
FormUtil
.
GetIntValue
(
txtBoardL
);
int
currw
=
FormUtil
.
GetIntValue
(
txtBoardW
);
if
(
currl
<=
0
)
{
txtBoardL
.
Text
=
l
.
ToString
();
}
if
(
currw
<=
0
)
{
txtBoardW
.
Text
=
w
.
ToString
();
}
}
}
else
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论