Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 70984a35
由
LN
编写于
2024-03-27 17:14:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
上传的数据可排序和删除
1 个父辈
d297a789
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
584 行增加
和
11 行删除
TSA-V/App.config
TSA-V/FrmMenu.cs
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.zh-CN.resx
TSA-V/Smart-Workstation.csproj
TSA-V/frmBoard/FrmAddBoard.Designer.cs
TSA-V/frmBoard/FrmAddBoard.cs
TSA-V/frmBoard/FrmBoardInfo.cs
TSA-V/frmBoard/FrmBomUpload.cs
TSA-V/frmBoard/FrmBomViewer.Designer.cs
TSA-V/frmBoard/FrmBomViewer.cs
TSA-V/frmBoard/FrmBomViewer.resx
TSA-V/记录.txt
TSA-V/App.config
查看文件 @
70984a3
...
...
@@ -181,7 +181,7 @@
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Runtime.CompilerServices.Unsafe"
publicKeyToken
=
"b03f5f7f11d50a3a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-
5.0.0.0"
newVersion
=
"5
.0.0.0"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-
6.0.0.0"
newVersion
=
"6
.0.0.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Memory"
publicKeyToken
=
"cc7b13ffcd2ddd51"
culture
=
"neutral"
/>
...
...
@@ -195,6 +195,10 @@
<
assemblyIdentity
name
=
"System.Buffers"
publicKeyToken
=
"cc7b13ffcd2ddd51"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-4.0.3.0"
newVersion
=
"4.0.3.0"
/>
</
dependentAssembly
>
<
dependentAssembly
>
<
assemblyIdentity
name
=
"System.Text.Encoding.CodePages"
publicKeyToken
=
"b03f5f7f11d50a3a"
culture
=
"neutral"
/>
<
bindingRedirect
oldVersion
=
"0.0.0.0-8.0.0.0"
newVersion
=
"8.0.0.0"
/>
</
dependentAssembly
>
</
assemblyBinding
>
<!--<
assemblyBinding
xmlns
=
"urn:schemas-microsoft-com:asm.v1"
>
<
dependentAssembly
>
...
...
TSA-V/FrmMenu.cs
查看文件 @
70984a3
...
...
@@ -118,7 +118,7 @@ namespace TSA_V
string
time
=
GetVersion
(
true
);
System
.
Reflection
.
AssemblyName
assemblyName
=
System
.
Reflection
.
Assembly
.
GetExecutingAssembly
().
GetName
();
lblVersion
.
Text
=
"V"
+
assemblyName
.
Version
.
ToString
();
lblVersion
.
Text
=
"V
4
.0"
;
lblVersion
.
Text
=
"V
5
.0"
;
//lblVersion.Text = "V" + assemblyName.Version.ToString() + "(" + time + ")";
LblUserName
.
Text
=
FormManager
.
UserInfo
.
Name
+
"/"
+
FormManager
.
UserInfo
.
Limit
;
...
...
TSA-V/Properties/Resource.en-US.resx
查看文件 @
70984a3
...
...
@@ -2660,9 +2660,9 @@
<data name = "Type_None" xml:space = "preserve"> <value> None </value> </data>
<data name = "FrmPointInfo_lblPolarities_Text" xml:space = "preserve"> <value> Polarity </value> </data>
<data name = "FrmAddBoard_linkDataViewer_Text" xml:space = "preserve"> <value> Data Preview </value> </data>
<data name = "FrmAddBoard_linkBomUpload_Text" xml:space = "preserve"> <value>
BOM
sheet upload </value> </data>
<data name = "FrmAddBoard_linkBomUpload_Text" xml:space = "preserve"> <value>
data
sheet upload </value> </data>
<data name = "FrmAddBoard_lblPolarities_Text" xml:space = "preserve"> <value> polarities </value> </data>
<data name = "FrmBomUpload_Text" xml:space = "preserve"> <value>
BOM
sheet upload </value> </data>
<data name = "FrmBomUpload_Text" xml:space = "preserve"> <value>
data
sheet upload </value> </data>
<data name = "FrmBomUpload_groupBox3_Text" xml:space = "preserve"> <value> Other settings </value> </data>
<data name = "FrmBomUpload_chbAutoPos_Text" xml:space = "preserve"> <value> Automatic consolidation of libraries </value> </data>
<data name = "FrmBomUpload_label3_Text" xml:space = "preserve"> <value> Default number of components: </value> </data>
...
...
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
70984a3
...
...
@@ -2659,9 +2659,9 @@
<data name = "Type_None" xml:space = "preserve"> <value> 无 </value> </data>
<data name = "FrmPointInfo_lblPolarities_Text" xml:space = "preserve"> <value> 极性 </value> </data>
<data name = "FrmAddBoard_linkDataViewer_Text" xml:space = "preserve"> <value> 数据预览 </value> </data>
<data name = "FrmAddBoard_linkBomUpload_Text" xml:space = "preserve"> <value>
BOM
表上传 </value> </data>
<data name = "FrmAddBoard_linkBomUpload_Text" xml:space = "preserve"> <value>
数据
表上传 </value> </data>
<data name = "FrmAddBoard_lblPolarities_Text" xml:space = "preserve"> <value> 极性 </value> </data>
<data name = "FrmBomUpload_Text" xml:space = "preserve"> <value>
BOM
表上传 </value> </data>
<data name = "FrmBomUpload_Text" xml:space = "preserve"> <value>
数据
表上传 </value> </data>
<data name = "FrmBomUpload_groupBox3_Text" xml:space = "preserve"> <value> 其他设置 </value> </data>
<data name = "FrmBomUpload_chbAutoPos_Text" xml:space = "preserve"> <value> 同物料自动合并库位 </value> </data>
<data name = "FrmBomUpload_label3_Text" xml:space = "preserve"> <value> 元器件默认数量: </value> </data>
...
...
TSA-V/Smart-Workstation.csproj
查看文件 @
70984a3
...
...
@@ -194,6 +194,12 @@
<Compile Include="frmBoard\FrmCalibrate.Designer.cs">
<DependentUpon>FrmCalibrate.cs</DependentUpon>
</Compile>
<Compile Include="frmBoard\FrmBomViewer.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmBoard\FrmBomViewer.Designer.cs">
<DependentUpon>FrmBomViewer.cs</DependentUpon>
</Compile>
<Compile Include="frmBoard\FrmListViewer.cs">
<SubType>Form</SubType>
</Compile>
...
...
@@ -442,6 +448,9 @@
<EmbeddedResource Include="frmBoard\FrmCalibrate.resx">
<DependentUpon>FrmCalibrate.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmBoard\FrmBomViewer.resx">
<DependentUpon>FrmBomViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmBoard\FrmListViewer.resx">
<DependentUpon>FrmListViewer.cs</DependentUpon>
</EmbeddedResource>
...
...
TSA-V/frmBoard/FrmAddBoard.Designer.cs
查看文件 @
70984a3
...
...
@@ -375,10 +375,10 @@
this
.
linkBomUpload
.
AutoSize
=
true
;
this
.
linkBomUpload
.
Location
=
new
System
.
Drawing
.
Point
(
148
,
122
);
this
.
linkBomUpload
.
Name
=
"linkBomUpload"
;
this
.
linkBomUpload
.
Size
=
new
System
.
Drawing
.
Size
(
74
,
17
);
this
.
linkBomUpload
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
linkBomUpload
.
TabIndex
=
302
;
this
.
linkBomUpload
.
TabStop
=
true
;
this
.
linkBomUpload
.
Text
=
"
BOM
表上传"
;
this
.
linkBomUpload
.
Text
=
"
数据
表上传"
;
this
.
linkBomUpload
.
Visible
=
false
;
this
.
linkBomUpload
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkBomUpload_LinkClicked
);
//
...
...
TSA-V/frmBoard/FrmAddBoard.cs
查看文件 @
70984a3
...
...
@@ -472,7 +472,7 @@ namespace TSA_V
bool
proResult
=
ProcessComData
(
uploadPointList
);
if
(
proResult
)
{
Frm
ListViewer
<
ComponetInfo
>
frmViewer
=
new
FrmListViewer
<
ComponetInfo
>
(
uploadPointList
);
Frm
BomViewer
frmViewer
=
new
FrmBomViewer
(
uploadPointList
);
DialogResult
sureresult
=
frmViewer
.
ShowDialog
();
if
(
sureresult
.
Equals
(
DialogResult
.
Cancel
))
{
...
...
@@ -672,7 +672,7 @@ namespace TSA_V
{
if
(
uploadPointList
.
Count
>
0
)
{
Frm
ListViewer
<
ComponetInfo
>
frmViewer
=
new
FrmListViewer
<
ComponetInfo
>
(
uploadPointList
);
Frm
BomViewer
frmViewer
=
new
FrmBomViewer
(
uploadPointList
);
DialogResult
sureresult
=
frmViewer
.
ShowDialog
();
if
(
sureresult
.
Equals
(
DialogResult
.
Cancel
))
{
...
...
TSA-V/frmBoard/FrmBoardInfo.cs
查看文件 @
70984a3
...
...
@@ -860,6 +860,13 @@ namespace TSA_V
int
index
=
dgvList
.
FirstDisplayedScrollingRowIndex
;
DataGridViewRow
row
=
dgvList
.
Rows
[
rowIndex
];
SMTPointInfo
smtInfo
=
getRowPointInfo
(
row
);
panBoard
.
AutoScrollPosition
=
new
Point
((
int
)(
smtInfo
.
PositionX
*
display
.
imageXiShu
-
panBoard
.
Width
/
2
),(
int
)
(
smtInfo
.
PositionY
*
display
.
imageXiShu
-
panBoard
.
Height
/
2
));
// panBoard.AutoScrollPosition = new Point((int)picBoard.Width, (int)picBoard.Height);
if
(
isFinishLoad
&&
this
.
txtBoardW
.
Text
.
Trim
()
!=
""
&&
this
.
txtBoardL
.
Text
.
Trim
()
!=
""
)
{
loadPictureBoxSize
();
}
if
(
smtInfo
==
null
)
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
NoZZh
,
"未找到组装信息信息!"
));
...
...
@@ -1532,6 +1539,9 @@ namespace TSA_V
private
void
btnCalibrate_Click
(
object
sender
,
EventArgs
e
)
{
FrmCalibrate
frm
=
new
FrmCalibrate
(
updateBoardInfo
);
DialogResult
dialog
=
frm
.
ShowDialog
();
if
(
dialog
.
Equals
(
DialogResult
.
OK
))
...
...
TSA-V/frmBoard/FrmBomUpload.cs
查看文件 @
70984a3
...
...
@@ -334,7 +334,7 @@ namespace TSA_V.frmBoard
LogUtil
.
error
(
"出错:"
+
ex
.
ToString
());
}
}
Frm
ListViewer
<
ComponetInfo
>
frmViewer
=
new
FrmListViewer
<
ComponetInfo
>
(
componetInfos
);
Frm
BomViewer
frmViewer
=
new
FrmBomViewer
(
componetInfos
);
DialogResult
sureresult
=
frmViewer
.
ShowDialog
();
if
(
sureresult
.
Equals
(
DialogResult
.
Cancel
))
{
...
...
TSA-V/frmBoard/FrmBomViewer.Designer.cs
0 → 100644
查看文件 @
70984a3
namespace
TSA_V
{
partial
class
FrmBomViewer
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
dgvData
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
Column_ID
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_TagNo
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_PN
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_PositionNum
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_ComCount
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_PositionX
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_PositionY
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Notes
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_CompontentDes
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_del
=
new
System
.
Windows
.
Forms
.
DataGridViewLinkColumn
();
this
.
btnOK
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnCancel
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
panel1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dgvData
)).
BeginInit
();
this
.
SuspendLayout
();
//
// panel1
//
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panel1
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Zoom
;
this
.
panel1
.
Controls
.
Add
(
this
.
dgvData
);
this
.
panel1
.
Location
=
new
System
.
Drawing
.
Point
(
5
,
5
);
this
.
panel1
.
Name
=
"panel1"
;
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
995
,
562
);
this
.
panel1
.
TabIndex
=
0
;
//
// dgvData
//
this
.
dgvData
.
AllowUserToAddRows
=
false
;
this
.
dgvData
.
AllowUserToDeleteRows
=
false
;
this
.
dgvData
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
dgvData
.
Columns
.
AddRange
(
new
System
.
Windows
.
Forms
.
DataGridViewColumn
[]
{
this
.
Column_ID
,
this
.
Column_TagNo
,
this
.
Column_PN
,
this
.
Column_PositionNum
,
this
.
Column_ComCount
,
this
.
Column_PositionX
,
this
.
Column_PositionY
,
this
.
Column_Notes
,
this
.
Column_CompontentDes
,
this
.
Column_del
});
this
.
dgvData
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
dgvData
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
dgvData
.
MultiSelect
=
false
;
this
.
dgvData
.
Name
=
"dgvData"
;
this
.
dgvData
.
RowTemplate
.
Height
=
23
;
this
.
dgvData
.
SelectionMode
=
System
.
Windows
.
Forms
.
DataGridViewSelectionMode
.
FullRowSelect
;
this
.
dgvData
.
Size
=
new
System
.
Drawing
.
Size
(
995
,
562
);
this
.
dgvData
.
TabIndex
=
0
;
this
.
dgvData
.
CellContentClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
dgvData_CellContentClick
);
//
// Column_ID
//
this
.
Column_ID
.
DataPropertyName
=
"Id"
;
this
.
Column_ID
.
HeaderText
=
"ID"
;
this
.
Column_ID
.
Name
=
"Column_ID"
;
this
.
Column_ID
.
Visible
=
false
;
//
// Column_TagNo
//
this
.
Column_TagNo
.
HeaderText
=
"位号"
;
this
.
Column_TagNo
.
Name
=
"Column_TagNo"
;
//
// Column_PN
//
this
.
Column_PN
.
HeaderText
=
"物料编码"
;
this
.
Column_PN
.
Name
=
"Column_PN"
;
//
// Column_PositionNum
//
this
.
Column_PositionNum
.
HeaderText
=
"料盘位置"
;
this
.
Column_PositionNum
.
Name
=
"Column_PositionNum"
;
//
// Column_ComCount
//
this
.
Column_ComCount
.
HeaderText
=
"数量"
;
this
.
Column_ComCount
.
Name
=
"Column_ComCount"
;
//
// Column_PositionX
//
this
.
Column_PositionX
.
HeaderText
=
"X"
;
this
.
Column_PositionX
.
Name
=
"Column_PositionX"
;
//
// Column_PositionY
//
this
.
Column_PositionY
.
HeaderText
=
"Y"
;
this
.
Column_PositionY
.
Name
=
"Column_PositionY"
;
//
// Column_Notes
//
this
.
Column_Notes
.
HeaderText
=
"注意事项"
;
this
.
Column_Notes
.
Name
=
"Column_Notes"
;
//
// Column_CompontentDes
//
this
.
Column_CompontentDes
.
HeaderText
=
"描述"
;
this
.
Column_CompontentDes
.
Name
=
"Column_CompontentDes"
;
//
// Column_del
//
this
.
Column_del
.
HeaderText
=
"删除"
;
this
.
Column_del
.
Name
=
"Column_del"
;
this
.
Column_del
.
Text
=
"删除"
;
//
// btnOK
//
this
.
btnOK
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnOK
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOK
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOK
.
Location
=
new
System
.
Drawing
.
Point
(
749
,
577
);
this
.
btnOK
.
Name
=
"btnOK"
;
this
.
btnOK
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnOK
.
TabIndex
=
284
;
this
.
btnOK
.
Text
=
"确认"
;
this
.
btnOK
.
UseVisualStyleBackColor
=
true
;
this
.
btnOK
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOK_Click
);
//
// btnCancel
//
this
.
btnCancel
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnCancel
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnCancel
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnCancel
.
Location
=
new
System
.
Drawing
.
Point
(
875
,
577
);
this
.
btnCancel
.
Name
=
"btnCancel"
;
this
.
btnCancel
.
Size
=
new
System
.
Drawing
.
Size
(
120
,
45
);
this
.
btnCancel
.
TabIndex
=
285
;
this
.
btnCancel
.
Text
=
"取消"
;
this
.
btnCancel
.
UseVisualStyleBackColor
=
true
;
this
.
btnCancel
.
Click
+=
new
System
.
EventHandler
(
this
.
btnCancel_Click
);
//
// FrmBomViewer
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1007
,
634
);
this
.
Controls
.
Add
(
this
.
btnCancel
);
this
.
Controls
.
Add
(
this
.
btnOK
);
this
.
Controls
.
Add
(
this
.
panel1
);
this
.
MaximizeBox
=
true
;
this
.
MinimizeBox
=
true
;
this
.
Name
=
"FrmBomViewer"
;
this
.
Text
=
"图片预览"
;
this
.
TopMost
=
true
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmImageViewer_Load
);
this
.
panel1
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dgvData
)).
EndInit
();
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Button
btnOK
;
private
System
.
Windows
.
Forms
.
Button
btnCancel
;
private
System
.
Windows
.
Forms
.
DataGridView
dgvData
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_ID
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_TagNo
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_PN
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_PositionNum
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_ComCount
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_PositionX
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_PositionY
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Notes
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_CompontentDes
;
private
System
.
Windows
.
Forms
.
DataGridViewLinkColumn
Column_del
;
}
}
\ No newline at end of file
TSA-V/frmBoard/FrmBomViewer.cs
0 → 100644
查看文件 @
70984a3
using
log4net.Repository.Hierarchy
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Globalization
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
TSA_V.Common
;
using
TSA_V.DeviceLibrary
;
using
TSA_V.LoadCSVLibrary
;
namespace
TSA_V
{
public
partial
class
FrmBomViewer
:
FrmBase
{
public
List
<
ComponetInfo
>
dataList
=
new
List
<
ComponetInfo
>();
private
int
viewType
=
0
;
public
FrmBomViewer
(
List
<
ComponetInfo
>
dataList
,
int
viewType
=
0
)
{
InitializeComponent
();
this
.
dataList
=
dataList
;
this
.
viewType
=
viewType
;
}
private
void
FrmImageViewer_Load
(
object
sender
,
EventArgs
e
)
{
LoadData
();
this
.
WindowState
=
FormWindowState
.
Maximized
;
}
private
void
addData
(
ComponetInfo
obj
)
{
DataGridViewRow
row
=
new
DataGridViewRow
();
row
.
CreateCells
(
dgvData
);
row
.
Cells
[
0
].
Value
=
obj
.
Id
;
row
.
Cells
[
Column_TagNo
.
Index
].
Value
=
obj
.
TagNo
;
row
.
Cells
[
Column_PN
.
Index
].
Value
=
obj
.
PN
;
row
.
Cells
[
Column_PositionNum
.
Index
].
Value
=
obj
.
PositionNum
;
row
.
Cells
[
Column_ComCount
.
Index
].
Value
=
obj
.
ComCount
;
row
.
Cells
[
Column_PositionX
.
Index
].
Value
=
obj
.
PositionX
;
row
.
Cells
[
Column_PositionY
.
Index
].
Value
=
obj
.
PositionY
;
row
.
Cells
[
Column_Notes
.
Index
].
Value
=
obj
.
Notes
;
row
.
Cells
[
Column_CompontentDes
.
Index
].
Value
=
obj
.
ComponentDes
;
row
.
Cells
[
Column_del
.
Index
].
Value
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Delete
,
"删除"
);
dgvData
.
Rows
.
Add
(
row
);
}
private
void
LoadData
()
{
//dgvData.DataSource = dataList;
if
(
viewType
==
0
)
{
dgvData
.
Columns
[
0
].
Visible
=
false
;
dgvData
.
Columns
[
Column_TagNo
.
Index
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Num
,
"位号"
);
dgvData
.
Columns
[
Column_PN
.
Index
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"物料编码"
);
dgvData
.
Columns
[
Column_PositionNum
.
Index
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"料盘位置"
);
dgvData
.
Columns
[
Column_ComCount
.
Index
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Count
,
"数量"
);
dgvData
.
Columns
[
Column_PositionX
.
Index
].
HeaderText
=
"X"
;
dgvData
.
Columns
[
Column_PositionY
.
Index
].
HeaderText
=
"Y"
;
dgvData
.
Columns
[
Column_Notes
.
Index
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Notes
,
"注意事项"
);
dgvData
.
Columns
[
Column_CompontentDes
.
Index
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Del
,
"描述"
);
dgvData
.
Columns
[
Column_del
.
Index
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Delete
,
"删除"
);
dgvData
.
AllowUserToDeleteRows
=
true
;
dgvData
.
AllowUserToOrderColumns
=
true
;
for
(
int
i
=
0
;
i
<
dgvData
.
Columns
.
Count
;
i
++)
{
dgvData
.
Columns
[
i
].
SortMode
=
DataGridViewColumnSortMode
.
Automatic
;
}
foreach
(
ComponetInfo
obj
in
dataList
)
{
addData
(
obj
);
}
}
else
if
(
viewType
==
1
)
{
if
(
dgvData
.
Columns
.
Count
>=
6
)
{
dgvData
.
Columns
[
0
].
Visible
=
false
;
dgvData
.
Columns
[
1
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Num
,
"位号"
);
dgvData
.
Columns
[
2
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Name
,
"物料编码"
);
dgvData
.
Columns
[
3
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Position
,
"料盘位置"
);
dgvData
.
Columns
[
4
].
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
Col_Count
,
"数量"
);
dgvData
.
Columns
[
5
].
HeaderText
=
ResourceCulture
.
GetString
(
"Col_Count_N"
,
"修改后数量"
);
dgvData
.
Columns
[
1
].
ReadOnly
=
true
;
dgvData
.
Columns
[
2
].
ReadOnly
=
true
;
dgvData
.
Columns
[
3
].
ReadOnly
=
true
;
dgvData
.
Columns
[
4
].
ReadOnly
=
true
;
}
}
if
(
dataList
.
Count
<=
0
)
{
btnOK
.
Visible
=
false
;
btnCancel
.
Visible
=
true
;
}
this
.
Text
=
ResourceCulture
.
GetString
(
"FrmListViewer_Text"
,
"数据预览"
);
btnCancel
.
Text
=
ResourceCulture
.
GetString
(
"FrmListViewer_btnCancel_Text"
,
"取消"
);
btnOK
.
Text
=
ResourceCulture
.
GetString
(
"FrmListViewer_btnOK_Text"
,
"确定"
);
}
private
void
GetList
()
{
List
<
ComponetInfo
>
pointList
=
new
List
<
ComponetInfo
>();
foreach
(
DataGridViewRow
row
in
dgvData
.
Rows
)
{
if
(
row
!=
null
)
{
ComponetInfo
point
=
getRowPointInfo
(
row
);
if
(
point
!=
null
)
{
pointList
.
Add
(
point
);
}
}
}
this
.
dataList
=
new
List
<
ComponetInfo
>(
pointList
);
}
private
ComponetInfo
getRowPointInfo
(
DataGridViewRow
row
)
{
ComponetInfo
point
=
new
ComponetInfo
();
try
{
if
(
row
.
Cells
[
Column_TagNo
.
Name
].
Value
==
null
)
{
return
null
;
}
point
.
Id
=
Convert
.
ToInt32
(
row
.
Cells
[
Column_ID
.
Name
].
Value
.
ToString
());
point
.
PN
=
row
.
Cells
[
this
.
Column_PN
.
Name
].
Value
.
ToString
();
point
.
TagNo
=
row
.
Cells
[
this
.
Column_TagNo
.
Name
].
Value
.
ToString
();
point
.
PositionX
=
Math
.
Round
(
Convert
.
ToDouble
(
row
.
Cells
[
this
.
Column_PositionX
.
Name
].
Value
.
ToString
()),
3
);
point
.
PositionY
=
Math
.
Round
(
Convert
.
ToDouble
(
row
.
Cells
[
this
.
Column_PositionY
.
Name
].
Value
.
ToString
()),
3
);
point
.
PositionNum
=
row
.
Cells
[
this
.
Column_PositionNum
.
Name
].
Value
.
ToString
();
point
.
ComCount
=
row
.
Cells
[
this
.
Column_ComCount
.
Name
].
Value
.
ToString
();
point
.
ComponentDes
=
row
.
Cells
[
this
.
Column_CompontentDes
.
Name
].
Value
.
ToString
();
point
.
Notes
=
row
.
Cells
[
this
.
Column_Notes
.
Name
].
Value
.
ToString
();
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"保存数据出错:"
+
ex
.
ToString
());
return
null
;
}
return
point
;
}
private
void
btnOK_Click
(
object
sender
,
EventArgs
e
)
{
GetList
();
this
.
DialogResult
=
DialogResult
.
OK
;
this
.
Close
();
}
private
void
btnCancel_Click
(
object
sender
,
EventArgs
e
)
{
if
(
dataList
.
Count
<=
0
)
{
this
.
DialogResult
=
DialogResult
.
Cancel
;
this
.
Close
();
}
DialogResult
resul
=
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
"SureCancelData"
,
"确认取消数据上传?"
),
""
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
);
if
(
resul
==
DialogResult
.
Yes
)
{
this
.
DialogResult
=
DialogResult
.
Cancel
;
this
.
Close
();
}
}
private
void
dgvData_CellContentClick
(
object
sender
,
DataGridViewCellEventArgs
e
)
{
if
(
e
.
RowIndex
!=
-
1
&&
e
.
ColumnIndex
>=
0
)
{
string
name
=
this
.
dgvData
.
Columns
[
e
.
ColumnIndex
].
Name
;
if
(
name
.
Equals
(
this
.
Column_del
.
Name
))
{
if
(
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
SureDelete
,
"确认要删除该行数据吗?"
),
ResourceCulture
.
GetString
(
ResourceCulture
.
MsgTitle
,
"提示?"
),
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
Question
)
!=
DialogResult
.
OK
)
{
return
;
}
else
{
this
.
dgvData
.
Rows
.
RemoveAt
(
e
.
RowIndex
);
}
}
}
}
}
}
TSA-V/frmBoard/FrmBomViewer.resx
0 → 100644
查看文件 @
70984a3
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column_ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_TagNo.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PositionNum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_ComCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PositionX.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_PositionY.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Notes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_CompontentDes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_del.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
TSA-V/记录.txt
查看文件 @
70984a3
...
...
@@ -29,6 +29,7 @@
8.元器件库批量导入数量。
9.投影文字不能超出投影范围。
10.未修改过的点位使用上个点位的形状。
11.增加提示音。
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论