Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit c12788e5
由
LN
编写于
2024-02-01 09:23:43 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加全开全关测试按钮。
1 个父辈
30aca5c0
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
157 行增加
和
68 行删除
DeviceLibrary/deviceLibrary/ledLabel/LabelInfo.cs
DeviceLibrary/deviceLibrary/ledLabel/LedLabelController.cs
DeviceLibrary/manager/WorkInfo.cs
TSA-V/FrmComponentList.Designer.cs
TSA-V/FrmComponentList.cs
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.ru-RU.resx
TSA-V/Properties/Resource.zh-CN.resx
TSA-V/Smart-Workstation.csproj
DeviceLibrary/deviceLibrary/ledLabel/LabelInfo.cs
查看文件 @
c12788e
...
...
@@ -55,7 +55,6 @@ namespace TSA_V.DeviceLibrary
map
.
Add
(
"des"
,
des
);
map
.
Add
(
"notes"
,
notes
);
map
.
Add
(
"styleid"
,
47
);
//string ledrgb = openLed ? "ff00" : "0";
map
.
Add
(
"边框"
,
""
);
map
.
Add
(
"边框1"
,
""
);
map
.
Add
(
"边框2"
,
""
);
...
...
@@ -67,6 +66,8 @@ namespace TSA_V.DeviceLibrary
map
.
Add
(
"边框8"
,
""
);
map
.
Add
(
"边框9"
,
""
);
map
.
Add
(
"mac"
,
mac
);
string
ledrgb
=
openLed
?
"ff00"
:
"0"
;
map
.
Add
(
"ledrgb"
,
ledrgb
);
return
map
;
}
// {
...
...
DeviceLibrary/deviceLibrary/ledLabel/LedLabelController.cs
查看文件 @
c12788e
...
...
@@ -40,7 +40,7 @@ namespace TSA_V.DeviceLibrary
Post
(
url
,
json
,(
open
?
"打开所有"
:
"关闭所有"
));
}
}
public
static
LabelInfo
GetLabel
(
TSAVPosition
position
,
ComponetInfo
com
,
bool
opendLed
=
false
)
public
static
LabelInfo
GetLabel
(
TSAVPosition
position
,
ComponetInfo
com
,
bool
opendLed
)
{
if
(
com
==
null
)
{
...
...
@@ -124,7 +124,7 @@ namespace TSA_V.DeviceLibrary
dic
.
Add
(
"mac"
,
label
.
mac
.
Trim
());
dic
.
Add
(
"mappingtype"
,
"868"
);
dic
.
Add
(
"styleid"
,
47
);
dic
.
Add
(
"ledrgb"
,
"ff00"
);
//
dic.Add("ledrgb", "ff00");
dic
.
Add
(
"ledstate"
,
"0"
);
dic
.
Add
(
"outtime"
,
"0"
);
...
...
DeviceLibrary/manager/WorkInfo.cs
查看文件 @
c12788e
...
...
@@ -342,7 +342,7 @@ namespace TSA_V.DeviceLibrary
var
smtPoint
=
TSAVBean
.
Work
.
currPoint
;
ComponetInfo
com
=
CSVBomManager
.
GetCom
(
BoardManager
.
CurrBoard
.
bomName
,
smtPoint
);
LabelInfo
label
=
LedLabelController
.
GetLabel
(
position
,
com
,
true
);
LedLabelController
.
OpenLed
(
label
.
ip
,
label
.
mac
);
//
LedLabelController.OpenLed(label.ip, label.mac);
LedLabelController
.
UpdateScreen
(
label
);
PreLabel
=
label
;
//string count=null;
...
...
TSA-V/FrmComponentList.Designer.cs
查看文件 @
c12788e
...
...
@@ -37,6 +37,9 @@
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cmbList
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
groupInfo
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
linkCloseAll
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
linkOpenAll
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
linkUpdate
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
linkLabel2
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
linkLabel1
=
new
System
.
Windows
.
Forms
.
LinkLabel
();
this
.
txtId
=
new
System
.
Windows
.
Forms
.
TextBox
();
...
...
@@ -169,6 +172,9 @@
//
this
.
groupInfo
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupInfo
.
Controls
.
Add
(
this
.
linkCloseAll
);
this
.
groupInfo
.
Controls
.
Add
(
this
.
linkOpenAll
);
this
.
groupInfo
.
Controls
.
Add
(
this
.
linkUpdate
);
this
.
groupInfo
.
Controls
.
Add
(
this
.
linkLabel2
);
this
.
groupInfo
.
Controls
.
Add
(
this
.
linkLabel1
);
this
.
groupInfo
.
Controls
.
Add
(
this
.
txtId
);
...
...
@@ -193,26 +199,64 @@
this
.
groupInfo
.
TabStop
=
false
;
this
.
groupInfo
.
Text
=
"元器件基本信息"
;
//
// linkCloseAll
//
this
.
linkCloseAll
.
AutoSize
=
true
;
this
.
linkCloseAll
.
Location
=
new
System
.
Drawing
.
Point
(
85
,
349
);
this
.
linkCloseAll
.
Name
=
"linkCloseAll"
;
this
.
linkCloseAll
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
17
);
this
.
linkCloseAll
.
TabIndex
=
82
;
this
.
linkCloseAll
.
TabStop
=
true
;
this
.
linkCloseAll
.
Text
=
"全关"
;
this
.
linkCloseAll
.
Visible
=
false
;
this
.
linkCloseAll
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkLabel5_LinkClicked
);
//
// linkOpenAll
//
this
.
linkOpenAll
.
AutoSize
=
true
;
this
.
linkOpenAll
.
Location
=
new
System
.
Drawing
.
Point
(
23
,
349
);
this
.
linkOpenAll
.
Name
=
"linkOpenAll"
;
this
.
linkOpenAll
.
Size
=
new
System
.
Drawing
.
Size
(
32
,
17
);
this
.
linkOpenAll
.
TabIndex
=
81
;
this
.
linkOpenAll
.
TabStop
=
true
;
this
.
linkOpenAll
.
Text
=
"全开"
;
this
.
linkOpenAll
.
Visible
=
false
;
this
.
linkOpenAll
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkLabel4_LinkClicked
);
//
// linkUpdate
//
this
.
linkUpdate
.
AutoSize
=
true
;
this
.
linkUpdate
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
349
);
this
.
linkUpdate
.
Name
=
"linkUpdate"
;
this
.
linkUpdate
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
linkUpdate
.
TabIndex
=
80
;
this
.
linkUpdate
.
TabStop
=
true
;
this
.
linkUpdate
.
Text
=
"显示测试"
;
this
.
linkUpdate
.
Visible
=
false
;
this
.
linkUpdate
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkLabel3_LinkClicked
);
//
// linkLabel2
//
this
.
linkLabel2
.
AutoSize
=
true
;
this
.
linkLabel2
.
Location
=
new
System
.
Drawing
.
Point
(
3
05
,
308
);
this
.
linkLabel2
.
Location
=
new
System
.
Drawing
.
Point
(
3
19
,
349
);
this
.
linkLabel2
.
Name
=
"linkLabel2"
;
this
.
linkLabel2
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
linkLabel2
.
TabIndex
=
79
;
this
.
linkLabel2
.
TabStop
=
true
;
this
.
linkLabel2
.
Text
=
"关灯测试"
;
this
.
linkLabel2
.
Visible
=
false
;
this
.
linkLabel2
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkLabel2_LinkClicked
);
//
// linkLabel1
//
this
.
linkLabel1
.
AutoSize
=
true
;
this
.
linkLabel1
.
Location
=
new
System
.
Drawing
.
Point
(
2
43
,
308
);
this
.
linkLabel1
.
Location
=
new
System
.
Drawing
.
Point
(
2
33
,
349
);
this
.
linkLabel1
.
Name
=
"linkLabel1"
;
this
.
linkLabel1
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
linkLabel1
.
TabIndex
=
78
;
this
.
linkLabel1
.
TabStop
=
true
;
this
.
linkLabel1
.
Text
=
"亮灯测试"
;
this
.
linkLabel1
.
Visible
=
false
;
this
.
linkLabel1
.
LinkClicked
+=
new
System
.
Windows
.
Forms
.
LinkLabelLinkClickedEventHandler
(
this
.
linkLabel1_LinkClicked
);
//
// txtId
...
...
@@ -230,7 +274,7 @@
//
this
.
btnNewCom
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNewCom
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnNewCom
.
Location
=
new
System
.
Drawing
.
Point
(
108
,
3
70
);
this
.
btnNewCom
.
Location
=
new
System
.
Drawing
.
Point
(
108
,
3
93
);
this
.
btnNewCom
.
Name
=
"btnNewCom"
;
this
.
btnNewCom
.
Size
=
new
System
.
Drawing
.
Size
(
130
,
45
);
this
.
btnNewCom
.
TabIndex
=
76
;
...
...
@@ -358,7 +402,7 @@
//
this
.
btnSave
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnSave
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnSave
.
Location
=
new
System
.
Drawing
.
Point
(
246
,
3
70
);
this
.
btnSave
.
Location
=
new
System
.
Drawing
.
Point
(
246
,
3
93
);
this
.
btnSave
.
Name
=
"btnSave"
;
this
.
btnSave
.
Size
=
new
System
.
Drawing
.
Size
(
130
,
45
);
this
.
btnSave
.
TabIndex
=
4
;
...
...
@@ -567,5 +611,8 @@
private
System
.
Windows
.
Forms
.
LinkLabel
linkLabel1
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkLabel2
;
private
System
.
Windows
.
Forms
.
Button
btnExport
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkUpdate
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkCloseAll
;
private
System
.
Windows
.
Forms
.
LinkLabel
linkOpenAll
;
}
}
\ No newline at end of file
TSA-V/FrmComponentList.cs
查看文件 @
c12788e
...
...
@@ -347,51 +347,59 @@ namespace TSA_V
private
ComponetInfo
selCom
=
null
;
private
void
showDetail
(
int
rowIndex
)
{
DataGridViewRow
row
=
dgvList
.
Rows
[
rowIndex
];
ComponetInfo
obj
=
getRowPointInfo
(
row
);
if
(
obj
==
null
)
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ChoiceCom
,
"请选择元器件!"
));
return
;
}
selCom
=
obj
;
IsNew
=
false
;
txtPartNum
.
Tag
=
obj
;
txtName
.
Text
=
obj
.
PN
;
txtDes
.
Text
=
obj
.
ComponentDes
;
txtCount
.
Text
=
obj
.
ComCount
.
ToString
();
txtPartNum
.
Text
=
obj
.
TagNo
;
txtNotes
.
Text
=
obj
.
Notes
;
if
(
txtPartNum
.
Text
==
""
)
{
txtPartNum
.
Enabled
=
true
;
}
else
{
txtPartNum
.
Enabled
=
false
;
}
btnNewCom
.
Visible
=
true
;
txtId
.
Text
=
obj
.
Id
.
ToString
();
//txtPosition.Text = obj.PositionNum;
int
selPosIndex
=
-
1
;
int
index
=
-
1
;
string
[]
posNum
=
CSVBomManager
.
GetPositionNum
(
obj
.
PositionNum
);
foreach
(
TSAVPosition
p
in
allPosition
)
try
{
index
++;
if
(
p
.
PositionNum
.
Equals
(
posNum
[
0
]))
DataGridViewRow
row
=
dgvList
.
Rows
[
rowIndex
];
ComponetInfo
obj
=
getRowPointInfo
(
row
);
if
(
obj
==
null
)
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
ChoiceCom
,
"请选择元器件!"
));
return
;
}
selCom
=
obj
;
IsNew
=
false
;
txtPartNum
.
Tag
=
obj
;
txtName
.
Text
=
obj
.
PN
;
txtDes
.
Text
=
obj
.
ComponentDes
;
txtCount
.
Text
=
obj
.
ComCount
.
ToString
();
txtPartNum
.
Text
=
obj
.
TagNo
;
txtNotes
.
Text
=
obj
.
Notes
;
if
(
txtPartNum
.
Text
==
""
)
{
txtPartNum
.
Enabled
=
true
;
}
else
{
txtPartNum
.
Enabled
=
false
;
}
btnNewCom
.
Visible
=
true
;
txtId
.
Text
=
obj
.
Id
.
ToString
();
//txtPosition.Text = obj.PositionNum;
int
selPosIndex
=
-
1
;
int
index
=
-
1
;
string
[]
posNum
=
CSVBomManager
.
GetPositionNum
(
obj
.
PositionNum
);
foreach
(
TSAVPosition
p
in
allPosition
)
{
selPosIndex
=
index
;
break
;
index
++;
if
(
p
.
PositionNum
.
Equals
(
posNum
[
0
]))
{
selPosIndex
=
index
;
break
;
}
}
if
(
selPosIndex
>=
0
&&
this
.
cmbPositionNumList
.
Items
.
Count
>
0
)
{
this
.
cmbPositionNumList
.
SelectedIndex
=
selPosIndex
;
}
groupInfo
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ComInfo
,
"元器件【{ 0}】的基本信息"
,
obj
.
TagNo
+
" "
+
obj
.
PN
);
}
if
(
selPosIndex
>=
0
&&
this
.
cmbPositionNumList
.
Items
.
Count
>
0
)
catch
(
Exception
ex
)
{
this
.
cmbPositionNumList
.
SelectedIndex
=
selPosIndex
;
LogUtil
.
error
(
"出错:"
+
ex
.
ToString
())
;
}
groupInfo
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ComInfo
,
"元器件【{ 0}】的基本信息"
,
obj
.
TagNo
+
" "
+
obj
.
PN
);
}
private
void
DeleteCom
(
int
rowIndex
)
{
...
...
@@ -582,49 +590,50 @@ namespace TSA_V
TSAVPosition
position
=
CSVPositionReader
<
TSAVPosition
>.
GetPositonByNum
(
pNum
);
if
(
position
!=
null
&&
position
.
PositionType
.
Equals
(
2
))
{
linkLabel1
.
Visible
=
true
;
linkLabel2
.
Visible
=
true
;
LinkVisible
(
true
);
}
else
{
linkLabel1
.
Visible
=
false
;
linkLabel2
.
Visible
=
false
;
LinkVisible
(
false
);
}
}
private
void
LinkVisible
(
bool
show
)
{
linkLabel1
.
Visible
=
show
;
linkLabel2
.
Visible
=
show
;
linkCloseAll
.
Visible
=
show
;
linkOpenAll
.
Visible
=
show
;
linkUpdate
.
Visible
=
show
;
}
private
LabelInfo
PreLabel
=
null
;
private
void
CloseLed
()
private
void
CloseLed
(
string
pPnum
)
{
if
(
PreLabel
!=
null
)
{
LedLabelController
.
CloseLed
(
PreLabel
.
ip
,
PreLabel
.
mac
);
PreLabel
=
null
;
if
(
pPnum
!=
""
&&
PreLabel
.
pos
!=
pPnum
)
{
LedLabelController
.
CloseLed
(
PreLabel
.
ip
,
PreLabel
.
mac
);
PreLabel
=
null
;
}
}
}
private
void
linkLabel1_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
CloseLed
();
string
pNum
=
cmbPositionNumList
.
Text
;
CloseLed
(
pNum
);
TSAVPosition
position
=
CSVPositionReader
<
TSAVPosition
>.
GetPositonByNum
(
pNum
);
if
(
position
!=
null
&&
position
.
PositionType
.
Equals
(
2
))
{
LedLabelController
.
OpenLed
(
position
.
DeviceIP
,
position
.
Leds
);
PreLabel
=
LedLabelController
.
GetLabel
(
position
,
selCom
,
true
);
LedLabelController
.
UpdateScreen
(
PreLabel
);
//ScanRequestLabel.RequestPost(position, txtCount.Text, txtPartNum.Text, txtDes.Text, out _);
LedLabelController
.
OpenLed
(
position
.
DeviceIP
,
position
.
Leds
);
//LedLabelController.UpdateScreen(PreLabel);
}
}
private
void
linkLabel2_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
CloseLed
();
//if (pairs.Count != 0)
//{
// ScanRequestLabel.Turnoffthelights(pairs);
// pairs.Clear();
//}
CloseLed
(
""
);
}
private
void
btnExport_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -691,5 +700,27 @@ namespace TSA_V
return
line
.
ToArray
();
}
private
void
linkLabel3_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
string
pNum
=
cmbPositionNumList
.
Text
;
CloseLed
(
pNum
);
TSAVPosition
position
=
CSVPositionReader
<
TSAVPosition
>.
GetPositonByNum
(
pNum
);
if
(
position
!=
null
&&
position
.
PositionType
.
Equals
(
2
))
{
PreLabel
=
LedLabelController
.
GetLabel
(
position
,
selCom
,
true
);
LedLabelController
.
UpdateScreen
(
PreLabel
);
}
}
private
void
linkLabel4_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
LedLabelController
.
OpenAll
();
}
private
void
linkLabel5_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
LedLabelController
.
CloseAll
();
}
}
}
TSA-V/Properties/Resource.en-US.resx
查看文件 @
c12788e
...
...
@@ -2623,4 +2623,7 @@
<data name="FrmComponentList_btnExport_Text" xml:space="preserve">
<value>Export</value>
</data>
<data name = "FrmComponentList_linkCloseAll_Text" xml:space = "preserve"> <value> Close All </value> </data>
<data name = "FrmComponentList_linkOpenAll_Text" xml:space = "preserve"> <value> Open All </value> </data>
<data name = "FrmComponentList_linkUpdate_Text" xml:space = "preserve"> <value> Display Test </value> </data>
</root>
\ No newline at end of file
TSA-V/Properties/Resource.ru-RU.resx
查看文件 @
c12788e
...
...
@@ -2595,4 +2595,8 @@
<value>关灯测试</value>
</data>
<data name = "FrmComponentList_btnExport_Text" xml:space = "preserve"> <value> EXPORT </value> </data>
<data name = "FrmComponentList_linkCloseAll_Text" xml:space = "preserve"> <value> 全关 </value> </data>
<data name = "FrmComponentList_linkOpenAll_Text" xml:space = "preserve"> <value> 全开 </value> </data>
<data name = "FrmComponentList_linkUpdate_Text" xml:space = "preserve"> <value> 显示测试 </value> </data>
</root>
\ No newline at end of file
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
c12788e
...
...
@@ -2622,4 +2622,7 @@
<data name="FrmComponentList_btnExport_Text" xml:space="preserve">
<value> 导出 </value>
</data>
<data name = "FrmComponentList_linkCloseAll_Text" xml:space = "preserve"> <value> 全关 </value> </data>
<data name = "FrmComponentList_linkOpenAll_Text" xml:space = "preserve"> <value> 全开 </value> </data>
<data name = "FrmComponentList_linkUpdate_Text" xml:space = "preserve"> <value> 显示测试 </value> </data>
</root>
\ No newline at end of file
TSA-V/Smart-Workstation.csproj
查看文件 @
c12788e
...
...
@@ -9,7 +9,7 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TSA_V</RootNamespace>
<AssemblyName>N
eo Station
</AssemblyName>
<AssemblyName>N
W_Client
</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论