Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c0471236
由
LN
编写于
2025-03-14 17:22:53 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
补料功能完善
1 个父辈
855b5efd
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
101 行增加
和
49 行删除
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.ru-RU.resx
TSA-V/Properties/Resource.zh-CN.resx
TSA-V/frmBoard/FrmPointInfo.cs
TSA-V/frmCom/FrmScanPutCom.Designer.cs
TSA-V/frmCom/FrmScanPutCom.cs
TSA-V/Properties/Resource.en-US.resx
查看文件 @
c047123
...
@@ -2806,5 +2806,7 @@
...
@@ -2806,5 +2806,7 @@
<data name = "FrmNImageViewer_btnCut_Text" xml:space = "preserve"> <value> Cut </value> </data>
<data name = "FrmNImageViewer_btnCut_Text" xml:space = "preserve"> <value> Cut </value> </data>
<data name = "FrmNImageViewer_btnR_Text" xml:space = "preserve"> <value> Rotate </value> </data>
<data name = "FrmNImageViewer_btnR_Text" xml:space = "preserve"> <value> Rotate </value> </data>
<data name = "FrmNImageViewer_btnCancel_Text" xml:space = "preserve"> <value> Cancel </value> </data>
<data name = "FrmNImageViewer_btnCancel_Text" xml:space = "preserve"> <value> Cancel </value> </data>
<data name = "FrmNImageViewer_btnOK_Text" xml:space = "preserve"> <value> OK </value> </data>
<data name = "FrmNImageViewer_btnOK_Text" xml:space = "preserve"> <value> OK </value> </data>
<data name = "FrmScanPutCom_label7_Text" xml:space = "preserve"> <value> Pos: </value> </data>
<data name = "NotFindPNPos" xml:space = "preserve"> <value> Data Not Found: PN={0}, Location={1}, Please Scan Again</value> </data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/Properties/Resource.ru-RU.resx
查看文件 @
c047123
...
@@ -2785,4 +2785,6 @@
...
@@ -2785,4 +2785,6 @@
<data name = "FrmNImageViewer_btnR_Text" xml:space = "preserve"> <value> 旋转 </value> </data>
<data name = "FrmNImageViewer_btnR_Text" xml:space = "preserve"> <value> 旋转 </value> </data>
<data name = "FrmNImageViewer_btnCancel_Text" xml:space = "preserve"> <value> 取消 </value> </data>
<data name = "FrmNImageViewer_btnCancel_Text" xml:space = "preserve"> <value> 取消 </value> </data>
<data name = "FrmNImageViewer_btnOK_Text" xml:space = "preserve"> <value> 确认 </value> </data>
<data name = "FrmNImageViewer_btnOK_Text" xml:space = "preserve"> <value> 确认 </value> </data>
<data name = "FrmScanPutCom_label7_Text" xml:space = "preserve"> <value> Pos: </value> </data>
<data name = "NotFindPNPos" xml:space = "preserve"> <value> 未找到数据:PN={0},位置={1},请重新扫码 </value> </data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
c047123
...
@@ -3029,4 +3029,6 @@
...
@@ -3029,4 +3029,6 @@
<data name = "FrmNImageViewer_btnR_Text" xml:space = "preserve"> <value> 旋转 </value> </data>
<data name = "FrmNImageViewer_btnR_Text" xml:space = "preserve"> <value> 旋转 </value> </data>
<data name = "FrmNImageViewer_btnCancel_Text" xml:space = "preserve"> <value> 取消 </value> </data>
<data name = "FrmNImageViewer_btnCancel_Text" xml:space = "preserve"> <value> 取消 </value> </data>
<data name = "FrmNImageViewer_btnOK_Text" xml:space = "preserve"> <value> 确认 </value> </data>
<data name = "FrmNImageViewer_btnOK_Text" xml:space = "preserve"> <value> 确认 </value> </data>
<data name = "FrmScanPutCom_label7_Text" xml:space = "preserve"> <value> 料盘位置: </value> </data>
<data name = "NotFindPNPos" xml:space = "preserve"> <value> 未找到数据:PN={0},位置={1},请重新扫码 </value> </data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/frmBoard/FrmPointInfo.cs
查看文件 @
c047123
...
@@ -110,6 +110,7 @@ namespace TSA_V
...
@@ -110,6 +110,7 @@ namespace TSA_V
{
{
pnList
.
Insert
(
0
,
point
.
PN
);
pnList
.
Insert
(
0
,
point
.
PN
);
}
}
cmbPnList
.
DataSource
=
null
;
cmbPnList
.
Items
.
Clear
();
cmbPnList
.
Items
.
Clear
();
cmbPnList
.
DataSource
=
pnList
;
cmbPnList
.
DataSource
=
pnList
;
cmbPnList
.
SelectedIndex
=
pnList
.
IndexOf
(
point
.
PN
);
cmbPnList
.
SelectedIndex
=
pnList
.
IndexOf
(
point
.
PN
);
...
...
TSA-V/frmCom/FrmScanPutCom.Designer.cs
查看文件 @
c047123
此文件的差异被折叠,
点击展开。
TSA-V/frmCom/FrmScanPutCom.cs
查看文件 @
c047123
...
@@ -92,6 +92,8 @@ namespace TSA_V
...
@@ -92,6 +92,8 @@ namespace TSA_V
private
void
ClearCom
()
private
void
ClearCom
()
{
{
txtScanPn
.
Text
=
string
.
Empty
;
txtScanPn
.
Text
=
string
.
Empty
;
cmbPosition
.
Items
.
Clear
();
cmbPosition
.
Text
=
""
;
currPn
=
""
;
currPn
=
""
;
currCom
=
null
;
currCom
=
null
;
...
@@ -104,24 +106,32 @@ namespace TSA_V
...
@@ -104,24 +106,32 @@ namespace TSA_V
txtScanPn
.
Focus
();
txtScanPn
.
Focus
();
btnSaveCount
.
Visible
=
false
;
btnSaveCount
.
Visible
=
false
;
}
}
private
int
getIndex
(
string
pn
)
private
List
<
ComponetInfo
>
getDataByPN
(
string
pn
)
{
{
List
<
ComponetInfo
>
result
=
(
from
m
in
comList
where
m
.
PN
.
Equals
(
pn
)
select
m
).
ToList
();
return
result
;
}
private
int
getIndex
(
string
pn
,
string
pos
)
{
int
index
=
-
1
;
int
index
=
-
1
;
for
(
int
i
=
0
;
i
<
comList
.
Count
;
i
++)
for
(
int
i
=
0
;
i
<
comList
.
Count
;
i
++)
{
{
if
(
comList
[
i
].
PN
.
Equals
(
pn
))
if
(
comList
[
i
].
PN
.
Equals
(
pn
))
{
{
index
=
i
;
if
(
pos
==
""
||
comList
[
i
].
PositionNum
==
pos
)
break
;
{
index
=
i
;
break
;
}
}
}
}
}
return
index
;
return
index
;
}
}
private
void
ShowCom
()
private
void
ShowCom
()
{
{
lblMsg
.
Text
=
""
;
currCom
=
comList
[
currIndex
];
currCom
=
comList
[
currIndex
];
currPosition
=
CSVPositionReader
<
TSAVPosition
>.
GetPositonByNum
(
currCom
.
PositionNum
);
currPosition
=
CSVPositionReader
<
TSAVPosition
>.
GetPositonByNum
(
currCom
.
PositionNum
);
cmbPosition
.
Text
=
currCom
.
PositionNum
;
this
.
lblPN
.
Text
=
currCom
.
PN
;
this
.
lblPN
.
Text
=
currCom
.
PN
;
this
.
numCount
.
Text
=
currCom
.
ComCount
.
ToString
();
this
.
numCount
.
Text
=
currCom
.
ComCount
.
ToString
();
this
.
lblTagNo
.
Text
=
currCom
.
TagNo
;
this
.
lblTagNo
.
Text
=
currCom
.
TagNo
;
...
@@ -177,42 +187,7 @@ namespace TSA_V
...
@@ -177,42 +187,7 @@ namespace TSA_V
this
.
Close
();
this
.
Close
();
}
}
protected
override
bool
ProcessCmdKey
(
ref
Message
msg
,
Keys
keyData
)
protected
override
bool
ProcessCmdKey
(
ref
Message
msg
,
Keys
keyData
)
{
{
// 按快捷键Ctrl+S执行按钮的点击事件方法
//if (keyData.Equals(Keys.Up) || keyData.Equals(Keys.MButton | Keys.Space))
//{
// if (btnPre.Enabled)
// {
// btnPre.PerformClick();
// }
// return true;
//}
//else if (keyData.Equals(Keys.Down) || keyData.Equals(Keys.Back | Keys.Space))
//{
// if (btnNext.Enabled)
// {
// this.btnNext.PerformClick();
// }
// return true;
//}
//else if (keyData.Equals(Keys.Left) || keyData.Equals(Keys.LButton | Keys.MButton | Keys.Space))
//{
// if (btnPre.Enabled)
// {
// btnPre.PerformClick();
// }
// return true;
//}
//else if (keyData.Equals(Keys.Right) || keyData.Equals(Keys.LButton | Keys.RButton | Keys.MButton | Keys.Space))
//{
// if (btnNext.Enabled)
// {
// this.btnNext.PerformClick();
// }
// return true;
//}
return
base
.
ProcessCmdKey
(
ref
msg
,
keyData
);
// 其他键按默认处理
return
base
.
ProcessCmdKey
(
ref
msg
,
keyData
);
// 其他键按默认处理
}
}
private
void
btnSaveCount_LinkClicked
(
object
sender
,
EventArgs
e
)
private
void
btnSaveCount_LinkClicked
(
object
sender
,
EventArgs
e
)
...
@@ -239,6 +214,10 @@ namespace TSA_V
...
@@ -239,6 +214,10 @@ namespace TSA_V
lblMoveStr
.
Text
=
""
;
lblMoveStr
.
Text
=
""
;
txtScanPn
.
Focus
();
txtScanPn
.
Focus
();
}
}
else
if
(
currIndex
<
0
)
{
cmbPosition
.
Focus
();
}
else
else
{
{
numCount
.
Focus
();
numCount
.
Focus
();
...
@@ -263,7 +242,7 @@ namespace TSA_V
...
@@ -263,7 +242,7 @@ namespace TSA_V
}
}
}
}
}
}
}
}
private
void
CheckWorkWait
()
private
void
CheckWorkWait
()
{
{
...
@@ -292,7 +271,10 @@ namespace TSA_V
...
@@ -292,7 +271,10 @@ namespace TSA_V
}
}
private
void
FrmPutCom_Shown
(
object
sender
,
EventArgs
e
)
private
void
FrmPutCom_Shown
(
object
sender
,
EventArgs
e
)
{
{
cmbPosition
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
cmbPosition
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
lblMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
}
}
private
void
txtScanPn_KeyDown
(
object
sender
,
KeyEventArgs
e
)
private
void
txtScanPn_KeyDown
(
object
sender
,
KeyEventArgs
e
)
...
@@ -301,24 +283,87 @@ namespace TSA_V
...
@@ -301,24 +283,87 @@ namespace TSA_V
if
(
e
.
KeyCode
==
Keys
.
Enter
)
if
(
e
.
KeyCode
==
Keys
.
Enter
)
{
{
if
(
currPn
==
""
)
if
(
currPn
==
""
)
{
{
string
pn
=
txtScanPn
.
Text
.
Trim
();
string
pn
=
txtScanPn
.
Text
.
Trim
();
currIndex
=
getIndex
(
pn
);
List
<
ComponetInfo
>
list
=
getDataByPN
(
pn
);
if
(
currIndex
>=
0
)
if
(
list
.
Count
>
0
)
{
{
currPn
=
pn
;
currPn
=
pn
;
ShowCom
();
cmbPosition
.
Items
.
Clear
();
foreach
(
ComponetInfo
obj
in
list
)
{
cmbPosition
.
Items
.
Add
(
obj
.
PositionNum
);
}
cmbPosition
.
Text
=
""
;
cmbPosition
.
Focus
();
cmbPosition
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
if
(
list
.
Count
==
1
)
{
cmbPosition
.
Text
=
list
[
0
].
PositionNum
;
currIndex
=
getIndex
(
pn
,
""
);
ShowCom
();
}
}
}
else
else
{
{
//未找到对应的PN,请重新输入
//未找到对应的PN,请重新输入
currPn
=
""
;
currPn
=
""
;
currIndex
=
-
1
;
currIndex
=
-
1
;
MessageBox
.
Show
(
ResourceControl
.
GetString
(
"NotFindPN"
,
"未找到对应的
PN={0},请重新扫码"
,
new
string
[]
{
pn
}));
lblMsg
.
Text
=
(
ResourceControl
.
GetString
(
"NotFindPN"
,
"未找到数据:
PN={0},请重新扫码"
,
new
string
[]
{
pn
}));
txtScanPn
.
Clear
();
txtScanPn
.
Clear
();
}
}
}
}
}
}
}
}
private
void
cmbPosition_KeyDown
(
object
sender
,
KeyEventArgs
e
)
{
if
(
currPn
==
""
||
cmbPosition
.
Text
.
Trim
()
==
""
)
{
return
;
}
if
(
e
.
KeyCode
==
Keys
.
Enter
)
{
string
pos
=
cmbPosition
.
Text
.
Trim
();
currIndex
=
getIndex
(
currPn
,
pos
);
if
(
currIndex
>=
0
)
{
ShowCom
();
}
else
{
//未找到对应的PN,请重新输入
currIndex
=
-
1
;
lblMsg
.
Text
=
(
ResourceControl
.
GetString
(
"NotFindPNPos"
,
"未找到数据:PN={0},位置={1},请重新扫码"
,
new
string
[]
{
currPn
,
pos
}));
cmbPosition
.
Text
=
""
;
}
}
}
private
void
cmbPosition_SelectedIndexChanged
(
object
sender
,
EventArgs
e
)
{
if
(
currPn
==
""
||
cmbPosition
.
Text
.
Trim
()==
""
)
{
return
;
}
string
pos
=
cmbPosition
.
Text
.
Trim
();
currIndex
=
getIndex
(
currPn
,
pos
);
if
(
currIndex
>=
0
)
{
ShowCom
();
}
else
{
//未找到对应的PN,请重新输入
currIndex
=
-
1
;
lblMsg
.
Text
=(
ResourceControl
.
GetString
(
"NotFindPNPos"
,
"未找到数据:PN={0},位置={1},请重新扫码"
,
new
string
[]
{
currPn
,
pos
}));
cmbPosition
.
Text
=
""
;
}
}
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论