Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a7800ec3
由
LN
编写于
2021-08-17 14:36:16 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
元器件库字段修改,解析方式修改:
编号改为位号 名称改为物料编码 位置改为料盘位置。
1 个父辈
57ff2c2d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
270 行增加
和
167 行删除
DeviceLibrary/config/元器件信息模板-英文.csv
DeviceLibrary/config/元器件信息模板.csv
DeviceLibrary/csvLoad/CSVAttribute.cs
DeviceLibrary/csvLoad/CSVReaderBase.cs
DeviceLibrary/csvLoad/CSVReaderManager.cs
DeviceLibrary/csvLoad/position/ComponetInfo.cs
DeviceLibrary/manager/WorkInfo.cs
TSA-V/FrmAddBoard.cs
TSA-V/FrmAddCom.cs
TSA-V/FrmBoardInfo.Designer.cs
TSA-V/FrmBoardInfo.cs
TSA-V/FrmBoardList.cs
TSA-V/FrmComponentList.Designer.cs
TSA-V/FrmComponentList.cs
TSA-V/FrmMenu.cs
TSA-V/FrmWeldPointInfo.Designer.cs → TSA-V/FrmPointInfo.Designer.cs
TSA-V/FrmWeldPointInfo.cs → TSA-V/FrmPointInfo.cs
TSA-V/FrmWeldPointInfo.resx → TSA-V/FrmPointInfo.resx
TSA-V/FrmPutCom.Designer.cs
TSA-V/FrmPutCom.cs
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.zh-CN.resx
TSA-V/Smart-Workstation.csproj
TSA-V/workForm/FrmTSAV.cs
TSA-V/记录.txt
DeviceLibrary/config/元器件信息模板-英文.csv
查看文件 @
a7800ec
Num,
Name,Count,Position
Num,Describe,PositionX,PositionY,Notes
Num,
Code,Count,P
Num,Describe,PositionX,PositionY,Notes
Number, required, not repeated,Name required,Quantity required,Location, required (1-100),,,,
DeviceLibrary/config/元器件信息模板.csv
查看文件 @
a7800ec
编号,元器件名称,数量,
位置,元器件描述,X坐标,Y坐标,注意事项
位号,物料编码,数量,料盘
位置,元器件描述,X坐标,Y坐标,注意事项
必填,不可重复,必填,必填,必填(1-100),,,,
DeviceLibrary/csvLoad/CSVAttribute.cs
查看文件 @
a7800ec
...
...
@@ -14,7 +14,13 @@ namespace TSA_V.LoadCSVLibrary
{
this
.
IsMustHave
=
IsMust
;
FieldName
=
fieldName
;
FieldName1
=
filedName1
;
FiledNames
=
new
string
[]
{
filedName1
};
}
public
CSVAttribute
(
string
fieldName
,
bool
IsMust
=
false
,
params
string
[]
filedNames
)
{
this
.
IsMustHave
=
IsMust
;
FieldName
=
fieldName
;
this
.
FiledNames
=
filedNames
;
}
public
CSVAttribute
(
string
fieldName
,
bool
IsMust
)
{
...
...
@@ -25,10 +31,9 @@ namespace TSA_V.LoadCSVLibrary
{
FieldName
=
fieldName
;
}
public
string
[]
FiledNames
{
get
;
set
;
}
public
string
FieldName
{
get
;
set
;
}
public
string
FieldName1
{
get
;
set
;
}
public
string
FieldName
{
get
;
set
;
}
public
bool
IsMustHave
{
get
;
set
;
}
}
...
...
DeviceLibrary/csvLoad/CSVReaderBase.cs
查看文件 @
a7800ec
...
...
@@ -29,17 +29,47 @@ namespace TSA_V.LoadCSVLibrary
if
(
att
!=
null
)
{
string
csvName
=
att
.
FieldName
;
if
(
LibNameType
.
Equals
(
1
)&&(
String
.
IsNullOrEmpty
(
att
.
FieldName1
).
Equals
(
false
)))
//if (LibNameType.Equals(1)&&(String.IsNullOrEmpty(att.FieldName1 ).Equals(false)))
//{
// csvName = att.FieldName1;
//}
proCsvMap
.
Add
(
prop
.
Name
,
csvName
);
}
}
}
return
proCsvMap
;
}
public
static
Dictionary
<
string
,
List
<
string
>>
getProAttributeMaps
(
Type
type
)
{
Dictionary
<
string
,
List
<
string
>>
proCsvMap
=
new
Dictionary
<
string
,
List
<
string
>>();
PropertyInfo
[]
props
=
type
.
GetProperties
();
foreach
(
PropertyInfo
prop
in
props
)
{
object
[]
array
=
prop
.
GetCustomAttributes
(
false
);
if
(
array
.
Length
>
0
)
{
CSVAttribute
att
=
(
CSVAttribute
)
array
[
0
];
if
(
att
!=
null
)
{
string
csvName
=
att
.
FieldName
;
List
<
string
>
csvTitleList
=
new
List
<
string
>();
if
(!
String
.
IsNullOrEmpty
(
att
.
FieldName
))
{
csv
Name
=
att
.
FieldName1
;
csv
TitleList
.
Add
(
att
.
FieldName
)
;
}
proCsvMap
.
Add
(
prop
.
Name
,
csvName
);
if
(
att
.
FiledNames
!=
null
&&
att
.
FiledNames
.
Length
>
0
)
{
csvTitleList
.
AddRange
(
att
.
FiledNames
);
}
proCsvMap
.
Add
(
prop
.
Name
,
csvTitleList
);
}
}
}
return
proCsvMap
;
}
}
/// <summary>
/// 读取一个csv文件的所有内容
...
...
@@ -109,6 +139,12 @@ namespace TSA_V.LoadCSVLibrary
}
return
titleIndex
;
}
/// <summary>
/// 根据csv标题查找对应的索引
/// </summary>
/// <param name="lineValue">标题行的值</param>
/// <param name="cvsTitleList">csv标题集合</param>
/// <returns>key=csv标题,value=索引</returns>
protected
static
Dictionary
<
string
,
int
>
GetTitleIndex
(
string
lineValue
,
List
<
string
>
cvsTitleList
)
{
Dictionary
<
string
,
int
>
titleIndex
=
new
Dictionary
<
string
,
int
>();
...
...
@@ -136,6 +172,32 @@ namespace TSA_V.LoadCSVLibrary
}
return
titleIndex
;
}
/// <summary>
/// 根据属性名称查找对应的列索引
/// </summary>
/// <returns>key=属性名称,value=列索引</returns>
protected
static
Dictionary
<
string
,
int
>
GetProTitleIndex
(
string
lineValue
,
Dictionary
<
string
,
List
<
string
>>
proTitleMaps
)
{
Dictionary
<
string
,
int
>
titleIndex
=
new
Dictionary
<
string
,
int
>();
var
array
=
lineValue
.
Split
(
','
);
//验证列
for
(
int
i
=
0
;
i
<
array
.
Length
;
i
++)
{
string
title
=
array
[
i
];
List
<
string
>
propList
=
new
List
<
string
>(
proTitleMaps
.
Keys
);
foreach
(
string
pro
in
propList
)
{
List
<
string
>
titleMaps
=
proTitleMaps
[
pro
];
if
(
titleMaps
.
Contains
(
title
))
{
titleIndex
.
Add
(
pro
,
i
);
break
;
}
}
}
return
titleIndex
;
}
}
}
DeviceLibrary/csvLoad/CSVReaderManager.cs
查看文件 @
a7800ec
此文件的差异被折叠,
点击展开。
DeviceLibrary/csvLoad/position/ComponetInfo.cs
查看文件 @
a7800ec
...
...
@@ -8,7 +8,7 @@ using TSA_V.LoadCSVLibrary;
namespace
TSA_V.LoadCSVLibrary
{
public
class
ComponetInfo
:
CSVBase
{
{
public
ComponetInfo
()
{
PositionX
=
0
;
...
...
@@ -19,13 +19,13 @@ namespace TSA_V.LoadCSVLibrary
/// <summary>
///编号
/// </summary>
[
CSVAttribute
(
"Num"
,
"编号"
,
false
)]
[
CSVAttribute
(
"Num"
,
true
,
"位号"
,
"编号"
)]
public
string
PartNum
{
get
;
set
;
}
/// <summary>
/// 元器件名称
/// </summary>
[
CSVAttribute
(
"
Name"
,
"元器件名称"
,
true
)]
[
CSVAttribute
(
"
Code"
,
true
,
"物料编码"
,
"元器件名称"
,
"Name"
)]
public
string
ComponentName
{
get
;
set
;
}
/// <summary>
///元器件描述
...
...
@@ -42,7 +42,7 @@ namespace TSA_V.LoadCSVLibrary
/// <summary>
///位置
/// </summary>
[
CSVAttribute
(
"P
ositionNum"
,
"位置"
,
true
)]
[
CSVAttribute
(
"P
Num"
,
true
,
"料盘位置"
,
"位置"
,
"PositionNum"
)]
public
string
PositionNum
{
get
;
set
;
}
/// <summary>
...
...
DeviceLibrary/manager/WorkInfo.cs
查看文件 @
a7800ec
...
...
@@ -93,7 +93,7 @@ namespace TSA_V.DeviceLibrary
if
(
currIndex
>
0
&&
currBoard
!=
null
)
{
//如果是下一个并且当前是最后一个,其实是切换了新程序,需要减去刚刚的数量
CSV
Reader
BomManager
.
DelUseCount
(
currBoard
,
currIndex
);
CSVBomManager
.
DelUseCount
(
currBoard
,
currIndex
);
}
DeviceStatus
deviceStatus
=
MesUtil
.
GetCurrStatus
();
if
(
MesUtil
.
CodeISOk
)
...
...
@@ -205,7 +205,7 @@ namespace TSA_V.DeviceLibrary
currPoint
=
GetSmtList
()[
currIndex
];
//LogUtil.info(" 程序【" + currBoard.boardName + "】插件【" + currPoint.pointName + "】");
ComponetInfo
com
=
CSV
Reader
BomManager
.
GetCom
(
currBoard
.
bomName
,
currPoint
.
PartNum
);
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
currBoard
.
bomName
,
currPoint
.
PartNum
);
TSAVPosition
position
=
null
;
if
(
com
!=
null
)
{
...
...
@@ -234,7 +234,7 @@ namespace TSA_V.DeviceLibrary
if
(
isNext
&&
(
currIndex
==
0
))
{
BoardCount
++;
CSV
Reader
BomManager
.
DelUseCount
(
currBoard
,
GetSmtList
().
Count
);
CSVBomManager
.
DelUseCount
(
currBoard
,
GetSmtList
().
Count
);
}
}
//焊接工作
...
...
TSA-V/FrmAddBoard.cs
查看文件 @
a7800ec
...
...
@@ -114,7 +114,7 @@ namespace TSA_V
{
return
null
;
}
List
<
ComponetInfo
>
comList
=
CSV
Reader
BomManager
.
GetComList
(
board
.
bomName
);
List
<
ComponetInfo
>
comList
=
CSVBomManager
.
GetComList
(
board
.
bomName
);
if
(
chbSort
.
Checked
)
{
comList
=
(
from
m
in
comList
orderby
m
.
PositionX
ascending
,
m
.
PositionY
ascending
select
m
).
ToList
<
ComponetInfo
>();
...
...
@@ -277,7 +277,7 @@ namespace TSA_V
}
private
void
LoadComList
()
{
List
<
string
>
keyList
=
new
List
<
string
>(
LoadCSVLibrary
.
CSV
Reader
BomManager
.
allComMap
.
Keys
);
List
<
string
>
keyList
=
new
List
<
string
>(
LoadCSVLibrary
.
CSVBomManager
.
allComMap
.
Keys
);
this
.
cmbBomList
.
Items
.
Clear
();
foreach
(
string
key
in
keyList
)
{
...
...
TSA-V/FrmAddCom.cs
查看文件 @
a7800ec
...
...
@@ -33,7 +33,7 @@ namespace TSA_V
{
string
fileName
=
this
.
openFileDialog1
.
FileName
;
comList
=
CSV
Reader
BomManager
.
ReadFile
(
fileName
);
comList
=
CSVBomManager
.
ReadFile
(
fileName
);
if
(
comList
.
Count
>
0
)
{
...
...
@@ -106,7 +106,7 @@ namespace TSA_V
txtBomName
.
Focus
();
return
false
;
}
if
(
CSV
Reader
BomManager
.
allComMap
.
ContainsKey
(
bomName
))
if
(
CSVBomManager
.
allComMap
.
ContainsKey
(
bomName
))
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
CNameHasExits
,
"元器件库【{0}】已存在,请重新输入!"
,
bomName
));
txtBomName
.
Focus
();
...
...
@@ -119,7 +119,7 @@ namespace TSA_V
return
false
;
}
if
(
CSV
Reader
BomManager
.
AddBomList
(
bomName
,
comList
))
if
(
CSVBomManager
.
AddBomList
(
bomName
,
comList
))
{
return
true
;
}
return
false
;
...
...
TSA-V/FrmBoardInfo.Designer.cs
查看文件 @
a7800ec
...
...
@@ -762,14 +762,15 @@
// Column_PartNum
//
this
.
Column_PartNum
.
DataPropertyName
=
"partNum"
;
this
.
Column_PartNum
.
HeaderText
=
"
编
号"
;
this
.
Column_PartNum
.
HeaderText
=
"
位
号"
;
this
.
Column_PartNum
.
Name
=
"Column_PartNum"
;
this
.
Column_PartNum
.
ReadOnly
=
true
;
this
.
Column_PartNum
.
Width
=
80
;
//
// Column_Name
//
this
.
Column_Name
.
DataPropertyName
=
"pointName"
;
this
.
Column_Name
.
HeaderText
=
"
名称
"
;
this
.
Column_Name
.
HeaderText
=
"
物料编码
"
;
this
.
Column_Name
.
Name
=
"Column_Name"
;
this
.
Column_Name
.
ReadOnly
=
true
;
//
...
...
@@ -810,10 +811,10 @@
// Column_positionNum
//
this
.
Column_positionNum
.
DataPropertyName
=
"Column_positionNum"
;
this
.
Column_positionNum
.
HeaderText
=
"位置"
;
this
.
Column_positionNum
.
HeaderText
=
"
料盘
位置"
;
this
.
Column_positionNum
.
Name
=
"Column_positionNum"
;
this
.
Column_positionNum
.
ReadOnly
=
true
;
this
.
Column_positionNum
.
Width
=
7
0
;
this
.
Column_positionNum
.
Width
=
8
0
;
//
// Column_NeedSoldering
//
...
...
TSA-V/FrmBoardInfo.cs
查看文件 @
a7800ec
...
...
@@ -112,9 +112,9 @@ namespace TSA_V
this
.
更新为组装坐标
ToolStripMenuItem
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_UpdateN
,
"更新为组装位置"
);
this
.
Column_PartNum
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Num
,
"
编
号"
);
this
.
Column_Name
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"
名称
"
);
this
.
Column_positionNum
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"位置"
);
this
.
Column_PartNum
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Num
,
"
位
号"
);
this
.
Column_Name
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"
物料编号
"
);
this
.
Column_positionNum
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"
料盘
位置"
);
this
.
Column_NeedSoldering
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_NWeld
,
"需焊接"
);
this
.
Column_WeldTemp
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_WeldTemp
,
"焊接温度"
);
...
...
@@ -290,7 +290,7 @@ namespace TSA_V
view
.
Cells
[
Column_disable
.
Index
].
Value
=
point
.
Disable
;
if
(
updateBoardInfo
!=
null
)
{
ComponetInfo
com
=
CSV
Reader
BomManager
.
GetCom
(
updateBoardInfo
.
bomName
,
point
.
PartNum
);
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
updateBoardInfo
.
bomName
,
point
.
PartNum
);
if
(
com
!=
null
)
{
view
.
Cells
[
Column_Notes
.
Index
].
Value
=
com
.
Notes
;
...
...
@@ -1220,7 +1220,7 @@ namespace TSA_V
//List<SMTPointInfo> newList = (from m in allSmt orderby m.PositionX ascending, m.PositionY ascending select m).ToList<SMTPointInfo>();
List
<
LoadCSVLibrary
.
ComponetInfo
>
list
=
CSV
Reader
BomManager
.
GetComList
(
updateBoardInfo
.
bomName
);
List
<
LoadCSVLibrary
.
ComponetInfo
>
list
=
CSVBomManager
.
GetComList
(
updateBoardInfo
.
bomName
);
if
(
list
==
null
&&
list
.
Count
<=
0
)
{
LogUtil
.
info
(
"未找到元器件库列表【"
+
updateBoardInfo
.
bomName
+
"】"
);
...
...
TSA-V/FrmBoardList.cs
查看文件 @
a7800ec
...
...
@@ -46,18 +46,18 @@ namespace TSA_V
}
this
.
listPoint
.
Columns
.
Clear
();
ColumnHeader
preSendwire
=
new
ColumnHeader
();
preSendwire
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Num
,
"
编
号"
);
//设置列标题
preSendwire
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Num
,
"
位
号"
);
//设置列标题
preSendwire
.
Width
=
120
;
//设置列宽度
preSendwire
.
TextAlign
=
HorizontalAlignment
.
Left
;
//设置列的对齐方式
this
.
listPoint
.
Columns
.
Add
(
preSendwire
);
//将列头添加到ListView控件。
ColumnHeader
chName
=
new
ColumnHeader
();
chName
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"
名称
"
);
//设置列标题
chName
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"
物料编码
"
);
//设置列标题
chName
.
Width
=
100
;
//设置列宽度
chName
.
TextAlign
=
HorizontalAlignment
.
Left
;
//设置列的对齐方式
this
.
listPoint
.
Columns
.
Add
(
chName
);
//将列头添加到ListView控件。
ColumnHeader
position
=
new
ColumnHeader
();
position
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"位置"
);
//设置列标题
position
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"
料盘
位置"
);
//设置列标题
position
.
Width
=
80
;
//设置列宽度
position
.
TextAlign
=
HorizontalAlignment
.
Left
;
//设置列的对齐方式
this
.
listPoint
.
Columns
.
Add
(
position
);
//将列头添加到ListView控件。
...
...
@@ -160,7 +160,7 @@ namespace TSA_V
lvi
.
Text
=
point
.
PartNum
.
ToString
();
lvi
.
SubItems
.
Add
(
point
.
pointName
);
ComponetInfo
com
=
CSV
Reader
BomManager
.
GetCom
(
board
.
bomName
,
point
.
PartNum
);
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
board
.
bomName
,
point
.
PartNum
);
if
(
com
!=
null
)
{
lvi
.
SubItems
.
Add
(
com
.
PositionNum
);
...
...
@@ -265,7 +265,7 @@ namespace TSA_V
{
//SetSkin(this);
//LoadBoard();
if
((
BoardManager
.
boardList
.
Count
<=
0
)
&&
(
LoadCSVLibrary
.
CSV
Reader
BomManager
.
allComMap
.
Count
<=
0
))
if
((
BoardManager
.
boardList
.
Count
<=
0
)
&&
(
LoadCSVLibrary
.
CSVBomManager
.
allComMap
.
Count
<=
0
))
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ImportComList
,
"请先导入元器件库!"
));
this
.
Close
();
...
...
TSA-V/FrmComponentList.Designer.cs
查看文件 @
a7800ec
...
...
@@ -51,8 +51,6 @@
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnSave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
dgvList
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
btnBack
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnNew
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
Column_partNumber
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Name
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Count
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
...
...
@@ -62,6 +60,8 @@
this
.
Column_X
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Y
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Del
=
new
System
.
Windows
.
Forms
.
DataGridViewLinkColumn
();
this
.
btnBack
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnNew
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupInfo
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dgvList
)).
BeginInit
();
...
...
@@ -211,7 +211,7 @@
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
114
,
17
);
this
.
label7
.
TabIndex
=
73
;
this
.
label7
.
Text
=
"
编
号:"
;
this
.
label7
.
Text
=
"
位
号:"
;
this
.
label7
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// label6
...
...
@@ -220,7 +220,7 @@
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
114
,
17
);
this
.
label6
.
TabIndex
=
71
;
this
.
label6
.
Text
=
"位置:"
;
this
.
label6
.
Text
=
"
料盘
位置:"
;
this
.
label6
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtCount
...
...
@@ -295,7 +295,7 @@
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
114
,
17
);
this
.
label1
.
TabIndex
=
32
;
this
.
label1
.
Text
=
"
名称
:"
;
this
.
label1
.
Text
=
"
料盘位置
:"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btnSave
...
...
@@ -340,32 +340,6 @@
this
.
dgvList
.
CellContentClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
dgvList_CellContentClick
);
this
.
dgvList
.
SelectionChanged
+=
new
System
.
EventHandler
(
this
.
dgvList_SelectionChanged
);
//
// btnBack
//
this
.
btnBack
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnBack
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnBack
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnBack
.
Location
=
new
System
.
Drawing
.
Point
(
1110
,
623
);
this
.
btnBack
.
Name
=
"btnBack"
;
this
.
btnBack
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
63
);
this
.
btnBack
.
TabIndex
=
6
;
this
.
btnBack
.
Text
=
"返回(&B)"
;
this
.
btnBack
.
UseVisualStyleBackColor
=
true
;
this
.
btnBack
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBack_Click
);
//
// btnNew
//
this
.
btnNew
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnNew
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNew
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnNew
.
Location
=
new
System
.
Drawing
.
Point
(
971
,
623
);
this
.
btnNew
.
Name
=
"btnNew"
;
this
.
btnNew
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
63
);
this
.
btnNew
.
TabIndex
=
3
;
this
.
btnNew
.
Text
=
"上传元器件库"
;
this
.
btnNew
.
UseVisualStyleBackColor
=
true
;
this
.
btnNew
.
Click
+=
new
System
.
EventHandler
(
this
.
btnNew_Click
);
//
// Column_partNumber
//
this
.
Column_partNumber
.
DataPropertyName
=
"PartNum"
;
...
...
@@ -376,7 +350,7 @@
// Column_Name
//
this
.
Column_Name
.
DataPropertyName
=
"ComponentName"
;
this
.
Column_Name
.
HeaderText
=
"
名称
"
;
this
.
Column_Name
.
HeaderText
=
"
物料编码
"
;
this
.
Column_Name
.
Name
=
"Column_Name"
;
this
.
Column_Name
.
ReadOnly
=
true
;
//
...
...
@@ -391,7 +365,7 @@
// Column_Position
//
this
.
Column_Position
.
DataPropertyName
=
"PositionNum"
;
this
.
Column_Position
.
HeaderText
=
"位置"
;
this
.
Column_Position
.
HeaderText
=
"
料盘
位置"
;
this
.
Column_Position
.
Name
=
"Column_Position"
;
this
.
Column_Position
.
ReadOnly
=
true
;
this
.
Column_Position
.
Width
=
80
;
...
...
@@ -441,6 +415,32 @@
this
.
Column_Del
.
UseColumnTextForLinkValue
=
true
;
this
.
Column_Del
.
Width
=
70
;
//
// btnBack
//
this
.
btnBack
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnBack
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnBack
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnBack
.
Location
=
new
System
.
Drawing
.
Point
(
1110
,
623
);
this
.
btnBack
.
Name
=
"btnBack"
;
this
.
btnBack
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
63
);
this
.
btnBack
.
TabIndex
=
6
;
this
.
btnBack
.
Text
=
"返回(&B)"
;
this
.
btnBack
.
UseVisualStyleBackColor
=
true
;
this
.
btnBack
.
Click
+=
new
System
.
EventHandler
(
this
.
btnBack_Click
);
//
// btnNew
//
this
.
btnNew
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnNew
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNew
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnNew
.
Location
=
new
System
.
Drawing
.
Point
(
971
,
623
);
this
.
btnNew
.
Name
=
"btnNew"
;
this
.
btnNew
.
Size
=
new
System
.
Drawing
.
Size
(
131
,
63
);
this
.
btnNew
.
TabIndex
=
3
;
this
.
btnNew
.
Text
=
"上传元器件库"
;
this
.
btnNew
.
UseVisualStyleBackColor
=
true
;
this
.
btnNew
.
Click
+=
new
System
.
EventHandler
(
this
.
btnNew_Click
);
//
// FrmComponentList
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
TSA-V/FrmComponentList.cs
查看文件 @
a7800ec
...
...
@@ -33,9 +33,9 @@ namespace TSA_V
private
void
LanguagePro
()
{
this
.
Column_partNumber
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Num
,
"编号"
);
this
.
Column_Name
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"
名称
"
);
this
.
Column_Name
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"
物料编码
"
);
this
.
Column_Count
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Count
,
"数量"
);
this
.
Column_Position
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"位置"
);
this
.
Column_Position
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"
料盘
位置"
);
this
.
Column_Notes
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Notes
,
"注意事项"
);
this
.
Column_description
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Del
,
"描述"
);
this
.
Column_Del
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Delete
,
"删除"
);
...
...
@@ -53,7 +53,7 @@ namespace TSA_V
}
private
void
LoadComList
()
{
List
<
string
>
keyList
=
new
List
<
string
>
(
LoadCSVLibrary
.
CSV
Reader
BomManager
.
allComMap
.
Keys
);
List
<
string
>
keyList
=
new
List
<
string
>
(
LoadCSVLibrary
.
CSVBomManager
.
allComMap
.
Keys
);
this
.
cmbList
.
Items
.
Clear
();
foreach
(
string
key
in
keyList
)
{
...
...
@@ -72,7 +72,7 @@ namespace TSA_V
{
this
.
dgvList
.
Rows
.
Clear
();
string
key
=
cmbList
.
Text
;
List
<
ComponetInfo
>
list
=
CSV
Reader
BomManager
.
GetComList
(
key
);
List
<
ComponetInfo
>
list
=
CSVBomManager
.
GetComList
(
key
);
foreach
(
ComponetInfo
com
in
list
)
{
if
(
com
!=
null
)
...
...
@@ -160,11 +160,14 @@ namespace TSA_V
return
;
}
CSVReaderBomManager
.
SaveComponet
(
cmbList
.
Text
,
obj
);
//ComponentManager.Update(obj);
SetRowInfo
(
dgvList
.
Rows
[
rowIndex
],
obj
);
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ComSaveOk
,
"元器件【{0}】保存成功!"
,
obj
.
PartNum
+
"-"
+
obj
.
ComponentName
));
groupInfo
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ComInfo
,
"元器件【{0}】的基本信息"
,
obj
.
PartNum
+
"-"
+
obj
.
ComponentName
);
bool
result
=
CSVBomManager
.
UpdateComponet
(
cmbList
.
Text
,
obj
);
if
(
result
)
{
//ComponentManager.Update(obj);
SetRowInfo
(
dgvList
.
Rows
[
rowIndex
],
obj
);
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ComSaveOk
,
"元器件【{0}】保存成功!"
,
obj
.
PartNum
+
"-"
+
obj
.
ComponentName
));
groupInfo
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ComInfo
,
"元器件【{0}】的基本信息"
,
obj
.
PartNum
+
"-"
+
obj
.
ComponentName
);
}
}
}
}
...
...
@@ -194,7 +197,7 @@ namespace TSA_V
return
;
}
//判断编号是否存在
List
<
ComponetInfo
>
allList
=
CSV
Reader
BomManager
.
GetComList
(
cmbList
.
Text
);
List
<
ComponetInfo
>
allList
=
CSVBomManager
.
GetComList
(
cmbList
.
Text
);
List
<
ComponetInfo
>
objs
=
(
from
m
in
allList
where
m
.
PartNum
.
Equals
(
obj
.
PartNum
)
select
m
).
ToList
();
if
(
objs
.
Count
>
0
)
{
...
...
@@ -217,7 +220,7 @@ namespace TSA_V
return
;
}
CSV
Reader
BomManager
.
AddCom
(
cmbList
.
Text
,
obj
);
CSVBomManager
.
AddCom
(
cmbList
.
Text
,
obj
);
//ComponentManager.Update(obj);
...
...
@@ -299,19 +302,40 @@ namespace TSA_V
txtPartNum
.
Enabled
=
false
;
btnNewCom
.
Visible
=
true
;
//txtPosition.Text = obj.PositionNum;
int
selPosIndex
=
-
1
;
int
index
=
-
1
;
foreach
(
TSAVPosition
p
in
allPosition
)
{
index
++;
if
(
p
.
PositionNum
.
Equals
(
obj
.
PositionNum
))
{
selPosIndex
=
index
;
break
;
}
}
if
(
index
>=
0
)
if
(
selPosIndex
>=
0
)
{
this
.
cmbPositionNumList
.
SelectedIndex
=
selPosIndex
;
}
else
{
this
.
cmbPositionNumList
.
SelectedIndex
=
index
;
index
=
-
1
;
selPosIndex
=
-
1
;
foreach
(
TSAVPosition
p
in
allPosition
)
{
index
++;
if
(
p
.
PositionNo
.
ToString
().
Equals
(
obj
.
PositionNum
))
{
selPosIndex
=
index
;
break
;
}
}
if
(
selPosIndex
>=
0
)
{
this
.
cmbPositionNumList
.
SelectedIndex
=
selPosIndex
;
}
}
groupInfo
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ComInfo
,
"元器件【{ 0}】的基本信息"
,
obj
.
PartNum
+
" -"
+
obj
.
ComponentName
);
}
private
void
DeleteCom
(
int
rowIndex
)
...
...
@@ -329,7 +353,7 @@ namespace TSA_V
}
else
{
CSV
Reader
BomManager
.
RemoveCom
(
cmbList
.
Text
,
obj
);
CSVBomManager
.
RemoveCom
(
cmbList
.
Text
,
obj
);
this
.
dgvList
.
Rows
.
RemoveAt
(
rowIndex
);
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
DelComOk
,
"元器件【{0}】删除成功!"
,
obj
.
PartNum
+
"-"
+
obj
.
ComponentName
)
,
ResourceCulture
.
GetString
(
ResourceCulture
.
MsgTitle
,
"提示"
));
...
...
@@ -394,7 +418,7 @@ namespace TSA_V
if
(
cmbList
.
SelectedIndex
>=
0
)
{
string
key
=
cmbList
.
Text
;
List
<
ComponetInfo
>
list
=
CSV
Reader
BomManager
.
GetComList
(
key
);
List
<
ComponetInfo
>
list
=
CSVBomManager
.
GetComList
(
key
);
FrmPutCom
frm
=
new
FrmPutCom
();
if
(
frm
.
SetOperateInfo
(
key
,
list
))
{
...
...
@@ -436,7 +460,7 @@ namespace TSA_V
}
else
{
CSV
Reader
BomManager
.
RemoveBom
(
bomName
);
CSVBomManager
.
RemoveBom
(
bomName
);
dgvList
.
Rows
.
Clear
();
this
.
txtCount
.
Text
=
""
;
this
.
txtDes
.
Text
=
""
;
...
...
TSA-V/FrmMenu.cs
查看文件 @
a7800ec
...
...
@@ -118,7 +118,7 @@ namespace TSA_V
//加载板卡
BoardManager
.
LoadBoard
();
CSV
Reader
BomManager
.
LoadAllCom
();
CSVBomManager
.
LoadAllCom
();
WorkCountManager
.
LoadData
();
//CalibrationManager.LoadData();
string
positionFileName
=
CSVPositionReader
<
TSAVPosition
>.
getPositionFilePath
();
...
...
TSA-V/Frm
Weld
PointInfo.Designer.cs
→
TSA-V/FrmPointInfo.Designer.cs
查看文件 @
a7800ec
...
...
@@ -142,7 +142,7 @@
//
this
.
chbCheck
.
AutoSize
=
true
;
this
.
chbCheck
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbCheck
.
Location
=
new
System
.
Drawing
.
Point
(
1
09
,
141
);
this
.
chbCheck
.
Location
=
new
System
.
Drawing
.
Point
(
1
35
,
141
);
this
.
chbCheck
.
Name
=
"chbCheck"
;
this
.
chbCheck
.
Size
=
new
System
.
Drawing
.
Size
(
168
,
24
);
this
.
chbCheck
.
TabIndex
=
84
;
...
...
@@ -152,7 +152,7 @@
// txtWeldTemp
//
this
.
txtWeldTemp
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtWeldTemp
.
Location
=
new
System
.
Drawing
.
Point
(
185
,
139
);
this
.
txtWeldTemp
.
Location
=
new
System
.
Drawing
.
Point
(
211
,
139
);
this
.
txtWeldTemp
.
MaxLength
=
8
;
this
.
txtWeldTemp
.
Name
=
"txtWeldTemp"
;
this
.
txtWeldTemp
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
26
);
...
...
@@ -181,7 +181,7 @@
//
// label7
//
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
17
,
140
);
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
43
,
140
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
162
,
22
);
this
.
label7
.
TabIndex
=
80
;
...
...
@@ -203,9 +203,9 @@
// label3
//
this
.
label3
.
Enabled
=
false
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
72
,
100
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
59
,
100
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
31
,
22
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
74
,
22
);
this
.
label3
.
TabIndex
=
74
;
this
.
label3
.
Text
=
"X:"
;
this
.
label3
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -214,7 +214,7 @@
//
this
.
txtNum
.
Enabled
=
false
;
this
.
txtNum
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtNum
.
Location
=
new
System
.
Drawing
.
Point
(
1
09
,
24
);
this
.
txtNum
.
Location
=
new
System
.
Drawing
.
Point
(
1
35
,
24
);
this
.
txtNum
.
MaxLength
=
30
;
this
.
txtNum
.
Name
=
"txtNum"
;
this
.
txtNum
.
Size
=
new
System
.
Drawing
.
Size
(
219
,
26
);
...
...
@@ -223,7 +223,7 @@
// chbNeedSoldering
//
this
.
chbNeedSoldering
.
AutoSize
=
true
;
this
.
chbNeedSoldering
.
Location
=
new
System
.
Drawing
.
Point
(
289
,
144
);
this
.
chbNeedSoldering
.
Location
=
new
System
.
Drawing
.
Point
(
315
,
144
);
this
.
chbNeedSoldering
.
Name
=
"chbNeedSoldering"
;
this
.
chbNeedSoldering
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
21
);
this
.
chbNeedSoldering
.
TabIndex
=
78
;
...
...
@@ -234,7 +234,7 @@
// txtY
//
this
.
txtY
.
Enabled
=
false
;
this
.
txtY
.
Location
=
new
System
.
Drawing
.
Point
(
2
56
,
100
);
this
.
txtY
.
Location
=
new
System
.
Drawing
.
Point
(
2
82
,
100
);
this
.
txtY
.
MaxLength
=
20
;
this
.
txtY
.
Name
=
"txtY"
;
this
.
txtY
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
23
);
...
...
@@ -243,18 +243,18 @@
// label4
//
this
.
label4
.
Enabled
=
false
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
2
21
,
100
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
2
30
,
100
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
31
,
22
);
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
22
);
this
.
label4
.
TabIndex
=
76
;
this
.
label4
.
Text
=
"Y:"
;
this
.
label4
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// label2
//
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
26
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
26
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
85
,
22
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
22
);
this
.
label2
.
TabIndex
=
60
;
this
.
label2
.
Text
=
"编号:"
;
this
.
label2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
@@ -262,7 +262,7 @@
// txtName
//
this
.
txtName
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtName
.
Location
=
new
System
.
Drawing
.
Point
(
1
09
,
62
);
this
.
txtName
.
Location
=
new
System
.
Drawing
.
Point
(
1
35
,
62
);
this
.
txtName
.
MaxLength
=
30
;
this
.
txtName
.
Name
=
"txtName"
;
this
.
txtName
.
Size
=
new
System
.
Drawing
.
Size
(
219
,
26
);
...
...
@@ -271,7 +271,7 @@
// txtX
//
this
.
txtX
.
Enabled
=
false
;
this
.
txtX
.
Location
=
new
System
.
Drawing
.
Point
(
1
09
,
100
);
this
.
txtX
.
Location
=
new
System
.
Drawing
.
Point
(
1
35
,
100
);
this
.
txtX
.
MaxLength
=
20
;
this
.
txtX
.
Name
=
"txtX"
;
this
.
txtX
.
Size
=
new
System
.
Drawing
.
Size
(
89
,
23
);
...
...
@@ -279,9 +279,9 @@
//
// label1
//
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
19
,
64
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
64
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
85
,
22
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
128
,
22
);
this
.
label1
.
TabIndex
=
32
;
this
.
label1
.
Text
=
"名称:"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
...
...
TSA-V/Frm
Weld
PointInfo.cs
→
TSA-V/FrmPointInfo.cs
查看文件 @
a7800ec
...
...
@@ -110,11 +110,7 @@ namespace TSA_V
selPosIndex
=
index
;
break
;
}
}
//if (selPosIndex >= 0)
//{
// this.cmbPositionNumList.SelectedIndex = selPosIndex;
//}
}
//this.txtRobotX.Text = smpPointInfo.NodePositionX.ToString();
//txtRobotY.Text = smpPointInfo.NodePositionY.ToString();
xyMoveControl1
.
XValue
=
smtPointInfo
.
NodePositionX
;
...
...
@@ -136,7 +132,7 @@ namespace TSA_V
lblNotes
.
Text
=
""
;
if
(
boardInfo
!=
null
)
{
ComponetInfo
com
=
CSV
Reader
BomManager
.
GetCom
(
boardInfo
.
bomName
,
smtPointInfo
.
PartNum
);
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
boardInfo
.
bomName
,
smtPointInfo
.
PartNum
);
if
(
com
!=
null
)
{
lblNotes
.
Text
=
com
.
Notes
;
...
...
@@ -184,14 +180,14 @@ namespace TSA_V
string
name
=
FormUtil
.
getValue
(
txtName
);
if
(
name
.
Equals
(
""
))
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WriteName
,
"请输入
名称
!"
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WriteName
,
"请输入
物料编码
!"
));
txtName
.
Focus
();
return
false
;
}
smtPointInfo
.
PartNum
=
FormUtil
.
getValue
(
txtNum
);
if
(
smtPointInfo
.
PartNum
.
Equals
(
""
))
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WritePartNumber
,
"请输入
编
号!"
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
WritePartNumber
,
"请输入
位
号!"
));
txtNum
.
Focus
();
return
false
;
}
...
...
TSA-V/Frm
Weld
PointInfo.resx
→
TSA-V/FrmPointInfo.resx
查看文件 @
a7800ec
文件被删除
TSA-V/FrmPutCom.Designer.cs
查看文件 @
a7800ec
...
...
@@ -115,7 +115,7 @@
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
16
);
this
.
label4
.
TabIndex
=
289
;
this
.
label4
.
Text
=
"
编
号:"
;
this
.
label4
.
Text
=
"
位
号:"
;
this
.
label4
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btnCancel
...
...
@@ -174,7 +174,7 @@
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
16
);
this
.
label1
.
TabIndex
=
78
;
this
.
label1
.
Text
=
"
库位号
:"
;
this
.
label1
.
Text
=
"
料盘位置
:"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtNum
...
...
@@ -213,7 +213,7 @@
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
16
);
this
.
label2
.
TabIndex
=
73
;
this
.
label2
.
Text
=
"
名称
:"
;
this
.
label2
.
Text
=
"
物料编号
:"
;
this
.
label2
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// txtDes
...
...
TSA-V/FrmPutCom.cs
查看文件 @
a7800ec
...
...
@@ -110,7 +110,7 @@ namespace TSA_V
}
//lblEndInfo.Text = "已完成" + currIndex + "个";
//this.lblLeftInfo.Text = "剩余" + (comList.Count - 1 - currIndex) + "个";
LogUtil
.
info
(
"正在备料中:元器件库【"
+
bomName
+
"】
编号【"
+
currCom
.
PartNum
+
"】元器件名称【"
+
currCom
.
ComponentName
+
"】库位
号【"
+
currCom
.
PositionNum
+
"】"
);
LogUtil
.
info
(
"正在备料中:元器件库【"
+
bomName
+
"】
位号【"
+
currCom
.
PartNum
+
"】物料编号【"
+
currCom
.
ComponentName
+
"】料盘编
号【"
+
currCom
.
PositionNum
+
"】"
);
if
(
currIndex
.
Equals
(
0
))
{
btnPre
.
Enabled
=
false
;
...
...
@@ -128,7 +128,7 @@ namespace TSA_V
}
if
(
currPosition
==
null
)
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
CanotFindPosition
,
"未找到
库位
【{0}】的坐标"
,
currCom
.
PositionNum
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
CanotFindPosition
,
"未找到
物料编号
【{0}】的坐标"
,
currCom
.
PositionNum
));
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Runing
))
{
...
...
@@ -214,10 +214,10 @@ namespace TSA_V
if
(
obj
.
PositionNum
.
Equals
(
com
.
PositionNum
))
{
obj
.
ComCount
=
newCount
;
CSVReaderBomManager
.
SaveComponet
(
bomName
,
obj
);
}
}
CSVBomManager
.
SaveComponet
(
bomName
,
oldConList
);
}
private
void
FrmPutCom_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
...
...
TSA-V/Properties/Resource.en-US.resx
查看文件 @
a7800ec
...
...
@@ -187,7 +187,7 @@
<value>UNAVAILABLE</value>
</data>
<data name="FrmWork_label6_Text" xml:space="preserve">
<value>
PART
NUMBER</value>
<value>
TAG
NUMBER</value>
</data>
<data name="FrmWork_lblPartNum_Text" xml:space="preserve">
<value>UNAVAILABLE</value>
...
...
@@ -205,7 +205,7 @@
<value>UNAVAILABLE</value>
</data>
<data name="FrmWork_label4_Text" xml:space="preserve">
<value>POSITION</value>
<value>P
LATE P
OSITION</value>
</data>
<data name="FrmWork_label1_Text" xml:space="preserve">
<value>DESCRIPTION</value>
...
...
@@ -217,7 +217,7 @@
<value>NOTICE</value>
</data>
<data name="FrmWork_label3_Text" xml:space="preserve">
<value>
NAM
E</value>
<value>
MATERIAL COD
E</value>
</data>
<data name="FrmWork_lblComName_Text" xml:space="preserve">
<value>UNAVAILABLE</value>
...
...
@@ -280,10 +280,10 @@
<value>COMPONENT INFO.</value>
</data>
<data name="FrmComponentList_label7_Text" xml:space="preserve">
<value>
PART
NUMBER</value>
<value>
TAG
NUMBER</value>
</data>
<data name="FrmComponentList_label6_Text" xml:space="preserve">
<value>POSITION</value>
<value>P
LATE P
OSITION</value>
</data>
<data name="FrmComponentList_label5_Text" xml:space="preserve">
<value>QUANTITY</value>
...
...
@@ -295,7 +295,7 @@
<value>DESCRIPTION</value>
</data>
<data name="FrmComponentList_label1_Text" xml:space="preserve">
<value>
NAM
E</value>
<value>
MATERIAL COD
E</value>
</data>
<data name="FrmComponentList_btnSave_Text" xml:space="preserve">
<value>SAVE</value>
...
...
@@ -319,7 +319,7 @@
<value>SAVE</value>
</data>
<data name="FrmPutCom_label4_Text" xml:space="preserve">
<value>
PART
NUMBER</value>
<value>
TAG
NUMBER</value>
</data>
<data name="FrmPutCom_btnCancel_Text" xml:space="preserve">
<value>END</value>
...
...
@@ -331,13 +331,13 @@
<value>NEXT</value>
</data>
<data name="FrmPutCom_label1_Text" xml:space="preserve">
<value>POSITION</value>
<value>P
LATE P
OSITION</value>
</data>
<data name="FrmPutCom_label3_Text" xml:space="preserve">
<value>QUANTITY</value>
</data>
<data name="FrmPutCom_label2_Text" xml:space="preserve">
<value>
NAM
E</value>
<value>
MATERIAL COD
E</value>
</data>
<data name="FrmAddCom_Text" xml:space="preserve">
<value>ADD NEW COMPONENT LIBRARY</value>
...
...
@@ -580,10 +580,10 @@
<value>Y:</value>
</data>
<data name="FrmPointInfo_label2_Text" xml:space="preserve">
<value>
NO
.</value>
<value>
TAG NUMBER
.</value>
</data>
<data name="FrmPointInfo_label1_Text" xml:space="preserve">
<value>
NAM
E</value>
<value>
MATERIAL COD
E</value>
</data>
<data name="FrmPointInfo_btnCancel_Text" xml:space="preserve">
<value> CANCLE</value>
...
...
@@ -890,10 +890,10 @@
<value>SELECT COMPONENT</value>
</data>
<data name="SelectCPosition" xml:space="preserve">
<value>SELECT POSITION</value>
<value>SELECT P
LATE P
OSITION</value>
</data>
<data name="WriteComName" xml:space="preserve">
<value>WRITE COMPONENT
NAM
E</value>
<value>WRITE COMPONENT
MATERIAL COD
E</value>
</data>
<data name="WriteComNum" xml:space="preserve">
<value>WRITE COMPONENT AMOUNT</value>
...
...
@@ -953,13 +953,13 @@
<value>COMPONENT 【{0}】AMOUNT CHANGE TO 【{1}】</value>
</data>
<data name="ChoiceComPosition" xml:space="preserve">
<value>SELECT COMPONENT POSITION</value>
<value>SELECT COMPONENT P
LATE P
OSITION</value>
</data>
<data name="WriteName" xml:space="preserve">
<value>WRITE
NAM
E</value>
<value>WRITE
MATERIAL COD
E</value>
</data>
<data name="WritePartNumber" xml:space="preserve">
<value>WRITE
PART
NUMBER</value>
<value>WRITE
TAG
NUMBER</value>
</data>
<data name="FrmAddBoard_label6_Text" xml:space="preserve">
<value>CODE:</value>
...
...
@@ -1430,7 +1430,7 @@
<value>DESCRIBE</value>
</data>
<data name="Col_Name" xml:space="preserve">
<value>
NAM
E</value>
<value>
MATERIAL COD
E</value>
</data>
<data name="Col_NCheck" xml:space="preserve">
<value>CHECK</value>
...
...
@@ -1439,13 +1439,13 @@
<value>NOTES</value>
</data>
<data name="Col_Num" xml:space="preserve">
<value>NUMBER</value>
<value>
TAG
NUMBER</value>
</data>
<data name="Col_NWeld" xml:space="preserve">
<value>WELD </value>
</data>
<data name="Col_Position" xml:space="preserve">
<value>POSITION</value>
<value>P
LATE P
OSITION</value>
</data>
<data name="Col_UpdateP" xml:space="preserve">
<value>UPDATE POSITION</value>
...
...
@@ -2263,6 +2263,9 @@
<data name="时间" xml:space="preserve">
<value>creat time</value>
</data>
<data name="位号" xml:space="preserve">
<value>tag number</value>
</data>
<data name="编号" xml:space="preserve">
<value>point no</value>
</data>
...
...
@@ -2412,4 +2415,5 @@
</data>
<data name = "FrmAddBoard_lblWidth_Text" xml:space = "preserve"> <value>Line width:</value> </data>
<data name = "FrmBoardSelect_chbWorkSingleStart_Text" xml:space = "preserve"> <value> Enable workspace detection to start working </value> </data>
<data name = "FrmPointInfo_lblName_Text" xml:space = "preserve"> <value> Projection words: </value> </data>
</root>
\ No newline at end of file
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
a7800ec
...
...
@@ -187,7 +187,7 @@
<value>暂无</value>
</data>
<data name="FrmWork_label6_Text" xml:space="preserve">
<value>
编
号:</value>
<value>
位
号:</value>
</data>
<data name="FrmWork_lblPartNum_Text" xml:space="preserve">
<value>暂无</value>
...
...
@@ -205,7 +205,7 @@
<value>暂无</value>
</data>
<data name="FrmWork_label4_Text" xml:space="preserve">
<value>位置:</value>
<value>
料盘
位置:</value>
</data>
<data name="FrmWork_label1_Text" xml:space="preserve">
<value>描述:</value>
...
...
@@ -217,7 +217,7 @@
<value>注意事项:</value>
</data>
<data name="FrmWork_label3_Text" xml:space="preserve">
<value>
名称
:</value>
<value>
物料编码
:</value>
</data>
<data name="FrmWork_lblComName_Text" xml:space="preserve">
<value>暂无</value>
...
...
@@ -280,10 +280,10 @@
<value>元器件基本信息</value>
</data>
<data name="FrmComponentList_label7_Text" xml:space="preserve">
<value>
编
号:</value>
<value>
位
号:</value>
</data>
<data name="FrmComponentList_label6_Text" xml:space="preserve">
<value>位置:</value>
<value>
料盘
位置:</value>
</data>
<data name="FrmComponentList_label5_Text" xml:space="preserve">
<value>数量:</value>
...
...
@@ -295,7 +295,7 @@
<value>描述:</value>
</data>
<data name="FrmComponentList_label1_Text" xml:space="preserve">
<value>
名称
:</value>
<value>
物料编码
:</value>
</data>
<data name="FrmComponentList_btnSave_Text" xml:space="preserve">
<value>保存</value>
...
...
@@ -319,7 +319,7 @@
<value>保存数量</value>
</data>
<data name="FrmPutCom_label4_Text" xml:space="preserve">
<value>
编
号:</value>
<value>
位
号:</value>
</data>
<data name="FrmPutCom_btnCancel_Text" xml:space="preserve">
<value>结束</value>
...
...
@@ -331,13 +331,13 @@
<value>上一个元器件</value>
</data>
<data name="FrmPutCom_label1_Text" xml:space="preserve">
<value>
库位号
:</value>
<value>
料盘位置
:</value>
</data>
<data name="FrmPutCom_label3_Text" xml:space="preserve">
<value>数量:</value>
</data>
<data name="FrmPutCom_label2_Text" xml:space="preserve">
<value>
名称
:</value>
<value>
料盘编码
:</value>
</data>
<data name="FrmAddCom_Text" xml:space="preserve">
<value>新增元器件库</value>
...
...
@@ -580,10 +580,10 @@
<value>Y:</value>
</data>
<data name="FrmPointInfo_label2_Text" xml:space="preserve">
<value>
编
号:</value>
<value>
位
号:</value>
</data>
<data name="FrmPointInfo_label1_Text" xml:space="preserve">
<value>
名称
:</value>
<value>
物料编码
:</value>
</data>
<data name="FrmPointInfo_btnCancel_Text" xml:space="preserve">
<value>取消</value>
...
...
@@ -889,10 +889,10 @@
<value>请选择元器件</value>
</data>
<data name="SelectCPosition" xml:space="preserve">
<value>请选择元器件位置</value>
<value>请选择元器件
料盘
位置</value>
</data>
<data name="WriteComName" xml:space="preserve">
<value>请输入元器件
名称
</value>
<value>请输入元器件
物料编码
</value>
</data>
<data name="WriteComNum" xml:space="preserve">
<value>请输入元器件数量</value>
...
...
@@ -952,13 +952,13 @@
<value>元器件【{0}】的数量已更新为【{1}】</value>
</data>
<data name="ChoiceComPosition" xml:space="preserve">
<value>请选择元器件所在位置</value>
<value>请选择元器件所在
料盘
位置</value>
</data>
<data name="WriteName" xml:space="preserve">
<value>请输入
名称
</value>
<value>请输入
物料编码
</value>
</data>
<data name="WritePartNumber" xml:space="preserve">
<value>请输入
编
号</value>
<value>请输入
位
号</value>
</data>
<data name="FrmMenu_btnMaintenance" xml:space="preserve">
<value>设备配置</value>
...
...
@@ -1384,7 +1384,7 @@
<value>描述</value>
</data>
<data name="Col_Name" xml:space="preserve">
<value>
名称
</value>
<value>
物料编码
</value>
</data>
<data name="Col_NCheck" xml:space="preserve">
<value>需检测</value>
...
...
@@ -1393,13 +1393,13 @@
<value>注意事项</value>
</data>
<data name="Col_Num" xml:space="preserve">
<value>
编
号</value>
<value>
位
号</value>
</data>
<data name="Col_NWeld" xml:space="preserve">
<value>需焊接</value>
</data>
<data name="Col_Position" xml:space="preserve">
<value>位置</value>
<value>
料盘
位置</value>
</data>
<data name="Col_UpdateP" xml:space="preserve">
<value>更新坐标</value>
...
...
@@ -2277,7 +2277,10 @@
<data name="时间" xml:space="preserve">
<value>时间</value>
</data>
<data name="编号" xml:space="preserve">
<data name="位号" xml:space="preserve">
<value>位号</value>
</data>
<data name="编号" xml:space="preserve">
<value>编号</value>
</data>
<data name="名称" xml:space="preserve">
...
...
@@ -2416,10 +2419,10 @@
<value> 新增元器件 </value>
</data>
<data name="WritePartName" xml:space="preserve">
<value>请输入元器件
编
号</value>
<value>请输入元器件
位
号</value>
</data>
<data name="PartNAExist" xml:space="preserve">
<value>元器件
编
号[{0}]已存在</value>
<value>元器件
位
号[{0}]已存在</value>
</data>
<data name="注意事项" xml:space="preserve">
<value>注意事项</value>
...
...
@@ -2427,4 +2430,5 @@
<data name = "FrmAddBoard_lblWidth_Text" xml:space = "preserve"> <value> 线体宽度: </value> </data>
<data name = "FrmBoardSelect_chbWorkSingleStart_Text" xml:space = "preserve"> <value> 启用工作区检测开始工作 </value> </data>
<data name = "FrmPointInfo_lblName_Text" xml:space = "preserve"> <value> 投影文字: </value> </data>
</root>
\ No newline at end of file
TSA-V/Smart-Workstation.csproj
查看文件 @
a7800ec
...
...
@@ -270,11 +270,11 @@
<Compile Include="workForm\FrmTSAV.Designer.cs">
<DependentUpon>FrmTSAV.cs</DependentUpon>
</Compile>
<Compile Include="Frm
Weld
PointInfo.cs">
<Compile Include="FrmPointInfo.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Frm
Weld
PointInfo.Designer.cs">
<DependentUpon>Frm
Weld
PointInfo.cs</DependentUpon>
<Compile Include="FrmPointInfo.Designer.cs">
<DependentUpon>FrmPointInfo.cs</DependentUpon>
</Compile>
<Compile Include="workForm\FrmWorkCount.cs">
<SubType>Form</SubType>
...
...
@@ -378,8 +378,8 @@
<EmbeddedResource Include="workForm\FrmTSAV.resx">
<DependentUpon>FrmTSAV.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Frm
Weld
PointInfo.resx">
<DependentUpon>Frm
Weld
PointInfo.cs</DependentUpon>
<EmbeddedResource Include="FrmPointInfo.resx">
<DependentUpon>FrmPointInfo.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="workForm\FrmWorkCount.resx">
<DependentUpon>FrmWorkCount.cs</DependentUpon>
...
...
TSA-V/workForm/FrmTSAV.cs
查看文件 @
a7800ec
...
...
@@ -522,7 +522,7 @@ namespace TSA_V
lblPositionNum
.
Text
=
smtPoint
.
PositionNum
;
lblPartNum
.
Text
=
smtPoint
.
PartNum
;
lblPointName
.
Text
=
smtPoint
.
pointName
;
ComponetInfo
com
=
CSV
Reader
BomManager
.
GetCom
(
BoardManager
.
CurrBoard
.
bomName
,
smtPoint
.
PartNum
);
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
BoardManager
.
CurrBoard
.
bomName
,
smtPoint
.
PartNum
);
TSAVPosition
position
=
null
;
if
(
com
!=
null
)
{
...
...
@@ -754,7 +754,7 @@ namespace TSA_V
}
FrmProjectorScreen
.
instance
.
ShowPoint
(
true
,
smtPoint
);
ComponetInfo
com
=
CSV
Reader
BomManager
.
GetCom
(
this
.
board
.
bomName
,
smtPoint
.
PartNum
);
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
this
.
board
.
bomName
,
smtPoint
.
PartNum
);
TSAVPosition
position
=
null
;
if
(
com
!=
null
)
{
...
...
@@ -842,7 +842,7 @@ namespace TSA_V
string
comName
=
lblComName
.
Text
;
int
count
=
FormUtil
.
GetIntValue
(
txtCount
);
string
bomName
=
TSAVBean
.
Work
.
currBoard
.
bomName
;
if
(
CSV
Reader
BomManager
.
UpdateCount
(
bomName
,
comName
,
count
))
if
(
CSVBomManager
.
UpdateCount
(
bomName
,
comName
,
count
))
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
UpdateCNumOk
,
"元器件【{0}】的数量已更新为【{1}】"
,
comName
,
count
));
}
...
...
TSA-V/记录.txt
查看文件 @
a7800ec
...
...
@@ -101,4 +101,11 @@ SmartWorkstation.exe.config文件需要增加参数:
1. 增加配置,此配置值为1时,板子到位后侧挡气缸先前进,底部气缸再上升。
需要再 SmartWorkstation.exe.config配置文件增加如下一行配置 :
<add key ="SideCylinderMoveFirst" value ="1"/>
2.导入元器件库时,不同料配置同库位,增加提示确认。
\ No newline at end of file
2.导入元器件库时,不同料配置同库位,增加提示确认。
20210812:
元器件库字段修改,解析方式修改 :
编号改为位号
名称改为物料编码
位置改为料盘位置。
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论