Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 64e1a1b2
由
LN
编写于
2021-05-27 15:36:09 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
禁用启用功能bug修改
1 个父辈
82f0140c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
107 行增加
和
114 行删除
DeviceLibrary/bean/BoardInfo.cs
DeviceLibrary/csvLoad/CSVReaderManager.cs
DeviceLibrary/manager/WorkInfo.cs
DeviceLibrary/mes/DeviceStatus.cs
DeviceLibrary/mes/MesUtil.cs
TSA-V/FrmBoardInfo.Designer.cs
TSA-V/FrmBoardInfo.cs
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.zh-CN.resx
TSA-V/ResourceCulture.cs
TSA-V/workForm/FrmBoardSelect.cs
TSA-V/workForm/FrmTSAV.cs
TSA-V/workForm/PointDisplay.cs
DeviceLibrary/bean/BoardInfo.cs
查看文件 @
64e1a1b
...
@@ -54,6 +54,13 @@ namespace TSA_V.DeviceLibrary
...
@@ -54,6 +54,13 @@ namespace TSA_V.DeviceLibrary
/// </summary>
/// </summary>
public
List
<
SMTPointInfo
>
smtList
{
get
;
set
;
}
public
List
<
SMTPointInfo
>
smtList
{
get
;
set
;
}
public
List
<
SMTPointInfo
>
GetSmtList
()
{
List
<
SMTPointInfo
>
needWorkSmtList
=
(
from
m
in
smtList
where
m
.
Disable
.
Equals
(
false
)
select
m
).
ToList
<
SMTPointInfo
>();
return
needWorkSmtList
;
}
/// <summary>
/// <summary>
/// 基准点坐标X
/// 基准点坐标X
/// </summary>
/// </summary>
...
@@ -119,20 +126,20 @@ namespace TSA_V.DeviceLibrary
...
@@ -119,20 +126,20 @@ namespace TSA_V.DeviceLibrary
","
+
ResourceControl
.
GetString
(
ResourceControl
.
Width
,
"宽度"
)
+
":"
+
boardWidth
+
","
+
ResourceControl
.
GetString
(
ResourceControl
.
Width
,
"宽度"
)
+
":"
+
boardWidth
+
","
+
ResourceControl
.
GetString
(
ResourceControl
.
LineWidth
,
"线体宽度"
)
+
":"
+
LineWidth
+
","
+
ResourceControl
.
GetString
(
ResourceControl
.
LineWidth
,
"线体宽度"
)
+
":"
+
LineWidth
+
","
+
ResourceControl
.
GetString
(
ResourceControl
.
InfoCount
,
"组件数量"
)
+
","
+
ResourceControl
.
GetString
(
ResourceControl
.
InfoCount
,
"组件数量"
)
+
":"
+
smtList
.
Count
;
":"
+
GetSmtList
()
.
Count
;
//return "电路板名称:" + boardName + ",长度:" + boardLength + ",宽度:" + boardWidth + ",组装信息数量:" + pointList.Count;
//return "电路板名称:" + boardName + ",长度:" + boardLength + ",宽度:" + boardWidth + ",组装信息数量:" + pointList.Count;
}
}
public
List
<
SMTPointInfo
>
GetSolderingSMTList
()
//
public List<SMTPointInfo> GetSolderingSMTList()
{
//
{
List
<
SMTPointInfo
>
newList
=
(
from
m
in
smtList
where
m
.
NeedSoldering
.
Equals
(
true
)
select
m
).
ToList
<
SMTPointInfo
>();
//
List<SMTPointInfo> newList = (from m in smtList where m.NeedSoldering.Equals(true) select m).ToList<SMTPointInfo>();
return
newList
;
//
return newList;
}
//
}
public
List
<
SMTPointInfo
>
GetCheckSMTList
()
//
public List<SMTPointInfo> GetCheckSMTList()
{
//
{
List
<
SMTPointInfo
>
newList
=
(
from
m
in
smtList
where
m
.
NeedCheck
.
Equals
(
true
)
select
m
).
ToList
<
SMTPointInfo
>();
//
List<SMTPointInfo> newList = (from m in smtList where m.NeedCheck.Equals(true) select m).ToList<SMTPointInfo>();
return
newList
;
//
return newList;
}
//
}
public
string
GetAoiFileName
()
public
string
GetAoiFileName
()
{
{
...
...
DeviceLibrary/csvLoad/CSVReaderManager.cs
查看文件 @
64e1a1b
...
@@ -457,7 +457,8 @@ namespace TSA_V.LoadCSVLibrary
...
@@ -457,7 +457,8 @@ namespace TSA_V.LoadCSVLibrary
}
}
Dictionary
<
string
,
int
>
useCount
=
new
Dictionary
<
string
,
int
>();
Dictionary
<
string
,
int
>
useCount
=
new
Dictionary
<
string
,
int
>();
int
index
=
0
;
int
index
=
0
;
foreach
(
SMTPointInfo
smt
in
currBoard
.
smtList
)
List
<
SMTPointInfo
>
list
=
currBoard
.
GetSmtList
();
foreach
(
SMTPointInfo
smt
in
list
)
{
{
if
(
index
>
maxIndex
)
if
(
index
>
maxIndex
)
{
{
...
...
DeviceLibrary/manager/WorkInfo.cs
查看文件 @
64e1a1b
...
@@ -34,8 +34,9 @@ namespace TSA_V.DeviceLibrary
...
@@ -34,8 +34,9 @@ namespace TSA_V.DeviceLibrary
public
DateTime
endWorkTime
=
DateTime
.
Now
;
public
DateTime
endWorkTime
=
DateTime
.
Now
;
public
DateTime
LastSetpTime
=
DateTime
.
Now
;
public
DateTime
LastSetpTime
=
DateTime
.
Now
;
public
uint
PreNodeId
=
0
;
public
uint
PreNodeId
=
0
;
public
List
<
SMTPointInfo
>
needSoldSmtList
=
new
List
<
SMTPointInfo
>();
//public List<SMTPointInfo> needSoldSmtList = new List<SMTPointInfo>();
public
List
<
SMTPointInfo
>
needCheckSmtList
=
new
List
<
SMTPointInfo
>();
//public List<SMTPointInfo> needCheckSmtList = new List<SMTPointInfo>();
public
List
<
SMTPointInfo
>
needWorkSmtList
=
new
List
<
SMTPointInfo
>();
//开始工作后共工作了几块电路板
//开始工作后共工作了几块电路板
public
int
BoardCount
=
0
;
public
int
BoardCount
=
0
;
public
DateTime
beginWorkTime
=
DateTime
.
Now
;
public
DateTime
beginWorkTime
=
DateTime
.
Now
;
...
@@ -49,8 +50,9 @@ namespace TSA_V.DeviceLibrary
...
@@ -49,8 +50,9 @@ namespace TSA_V.DeviceLibrary
LogUtil
.
info
(
"开始程序【"
+
boardInfo
.
boardName
+
"】的插件"
);
LogUtil
.
info
(
"开始程序【"
+
boardInfo
.
boardName
+
"】的插件"
);
// StatusClient.instance.SendNew(Color.Green, "开始组装【" + boardInfo.boardName + "】" );
// StatusClient.instance.SendNew(Color.Green, "开始组装【" + boardInfo.boardName + "】" );
currBoard
=
boardInfo
;
currBoard
=
boardInfo
;
needSoldSmtList
=
(
from
m
in
currBoard
.
smtList
where
m
.
NeedSoldering
.
Equals
(
true
)
select
m
).
ToList
<
SMTPointInfo
>();
//needSoldSmtList = (from m in currBoard.smtList where m.NeedSoldering.Equals(true) select m).ToList<SMTPointInfo>();
needCheckSmtList
=
(
from
m
in
currBoard
.
smtList
where
m
.
NeedCheck
.
Equals
(
true
)
select
m
).
ToList
<
SMTPointInfo
>();
//needCheckSmtList = (from m in currBoard.smtList where m.NeedCheck.Equals(true) select m).ToList<SMTPointInfo>();
needWorkSmtList
=
currBoard
.
GetSmtList
();
currIndex
=
-
1
;
currIndex
=
-
1
;
//IsShowSoldering = false;
//IsShowSoldering = false;
IsShowAOI
=
false
;
IsShowAOI
=
false
;
...
@@ -66,19 +68,20 @@ namespace TSA_V.DeviceLibrary
...
@@ -66,19 +68,20 @@ namespace TSA_V.DeviceLibrary
{
{
return
new
List
<
SMTPointInfo
>();
return
new
List
<
SMTPointInfo
>();
}
}
if
(
WorkType
.
Equals
(
1
))
//if (WorkType.Equals(1))
{
//{
return
currBoard
.
smtList
;
// return currBoard.smtList;
}
//}
else
if
(
WorkType
.
Equals
(
2
))
//else if (WorkType.Equals(2))
{
//{
return
needSoldSmtList
;
// return needSoldSmtList;
}
//}
else
if
(
WorkType
.
Equals
(
3
))
//else if (WorkType.Equals(3))
{
//{
return
needCheckSmtList
;
// return needCheckSmtList;
}
//}
return
new
List
<
SMTPointInfo
>();
//return new List<SMTPointInfo>();
return
needWorkSmtList
;
}
}
public
void
StopWork
()
public
void
StopWork
()
{
{
...
...
DeviceLibrary/mes/DeviceStatus.cs
查看文件 @
64e1a1b
...
@@ -73,7 +73,8 @@ namespace TSA_V.DeviceLibrary
...
@@ -73,7 +73,8 @@ namespace TSA_V.DeviceLibrary
if
(
maxIndex
>
0
)
if
(
maxIndex
>
0
)
{
{
int
index
=
0
;
int
index
=
0
;
foreach
(
SMTPointInfo
sm
in
board
.
smtList
)
List
<
SMTPointInfo
>
list
=
board
.
GetSmtList
();
foreach
(
SMTPointInfo
sm
in
list
)
{
{
if
(
maxIndex
>
0
&&
index
>
maxIndex
)
if
(
maxIndex
>
0
&&
index
>
maxIndex
)
{
{
...
...
DeviceLibrary/mes/MesUtil.cs
查看文件 @
64e1a1b
...
@@ -183,7 +183,7 @@ namespace TSA_V.DeviceLibrary
...
@@ -183,7 +183,7 @@ namespace TSA_V.DeviceLibrary
public
static
DeviceStatus
GetTestStatus
(
BoardInfo
board
,
string
pcbcode
=
""
)
public
static
DeviceStatus
GetTestStatus
(
BoardInfo
board
,
string
pcbcode
=
""
)
{
{
DeviceStatus
deviceStatus
=
new
DeviceStatus
();
DeviceStatus
deviceStatus
=
new
DeviceStatus
();
OpInfo
op
=
OpInfo
.
GetOpInfo
(
board
,
board
.
smtList
.
Count
);
OpInfo
op
=
OpInfo
.
GetOpInfo
(
board
,
board
.
GetSmtList
()
.
Count
);
deviceStatus
.
CurrStatus
=
3
;
deviceStatus
.
CurrStatus
=
3
;
//op.ProName = board.boardName;
//op.ProName = board.boardName;
...
...
TSA-V/FrmBoardInfo.Designer.cs
查看文件 @
64e1a1b
此文件的差异被折叠,
点击展开。
TSA-V/FrmBoardInfo.cs
查看文件 @
64e1a1b
...
@@ -132,7 +132,7 @@ namespace TSA_V
...
@@ -132,7 +132,7 @@ namespace TSA_V
this
.
Column_Up
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Up
,
"上升"
);
this
.
Column_Up
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Up
,
"上升"
);
this
.
Column_Down
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Down
,
"下降"
);
this
.
Column_Down
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Down
,
"下降"
);
this
.
Column_CheckOK
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Check
,
"校准点"
);
this
.
Column_CheckOK
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Check
,
"校准点"
);
this
.
Column_disable
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_
Check
,
"禁用"
);
this
.
Column_disable
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_
Disable
,
"禁用"
);
}
}
private
void
FrmBoardInfo_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmBoardInfo_Load
(
object
sender
,
EventArgs
e
)
{
{
...
...
TSA-V/Properties/Resource.en-US.resx
查看文件 @
64e1a1b
...
@@ -2353,6 +2353,13 @@
...
@@ -2353,6 +2353,13 @@
<data name="禁用" xml:space="preserve">
<data name="禁用" xml:space="preserve">
<value>Disabled</value>
<value>Disabled</value>
</data>
</data>
<data name = "FrmBoardInfo_llblAllUSel_Text" xml:space = "preserve"> <value> Disable all </value> </data>
<data name="FrmBoardInfo_llblAllUSel_Text" xml:space="preserve">
<data name = "FrmBoardInfo_llblAllSel_Text" xml:space = "preserve"> <value> To enable all </value> </data>
<value> Disable all </value>
</data>
<data name="FrmBoardInfo_llblAllSel_Text" xml:space="preserve">
<value> To enable all </value>
</data>
<data name="ItemText_Disable" xml:space="preserve">
<value>Disable</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
64e1a1b
...
@@ -2367,6 +2367,13 @@
...
@@ -2367,6 +2367,13 @@
<data name="禁用" xml:space="preserve">
<data name="禁用" xml:space="preserve">
<value>禁用</value>
<value>禁用</value>
</data>
</data>
<data name = "FrmBoardInfo_llblAllUSel_Text" xml:space = "preserve"> <value> 全部禁用 </value> </data>
<data name="FrmBoardInfo_llblAllUSel_Text" xml:space="preserve">
<data name = "FrmBoardInfo_llblAllSel_Text" xml:space = "preserve"> <value> 全部启用 </value> </data>
<value> 全部禁用 </value>
</data>
<data name="FrmBoardInfo_llblAllSel_Text" xml:space="preserve">
<value> 全部启用 </value>
</data>
<data name="ItemText_Disable" xml:space="preserve">
<value>禁用</value>
</data>
</root>
</root>
\ No newline at end of file
\ No newline at end of file
TSA-V/ResourceCulture.cs
查看文件 @
64e1a1b
...
@@ -600,6 +600,10 @@ namespace TSA_V
...
@@ -600,6 +600,10 @@ namespace TSA_V
/// </summary>
/// </summary>
public
static
string
ItemText_Check
=
"ItemText_Check"
;
public
static
string
ItemText_Check
=
"ItemText_Check"
;
/// <summary>
/// <summary>
/// 禁用
/// </summary>
public
static
string
ItemText_Disable
=
"ItemText_Disable"
;
/// <summary>
/// 编号
/// 编号
/// </summary>
/// </summary>
public
static
string
Col_Num
=
"Col_Num"
;
public
static
string
Col_Num
=
"Col_Num"
;
...
...
TSA-V/workForm/FrmBoardSelect.cs
查看文件 @
64e1a1b
...
@@ -68,7 +68,7 @@ namespace TSA_V
...
@@ -68,7 +68,7 @@ namespace TSA_V
this
.
lblBoardMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
192
)))));
this
.
lblBoardMsg
.
ForeColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
0
)))),
((
int
)(((
byte
)(
192
)))),
((
int
)(((
byte
)(
192
)))));
BoardManager
.
CurrBoard
=
board
;
BoardManager
.
CurrBoard
=
board
;
LogUtil
.
info
(
"切换到新板子:"
+
board
.
boardName
);
LogUtil
.
info
(
"切换到新板子:"
+
board
.
boardName
);
FrmProjectorScreen
.
instance
.
ShowPoint
(
false
,
board
.
smtList
.
ToArray
());
FrmProjectorScreen
.
instance
.
ShowPoint
(
false
,
board
.
GetSmtList
()
.
ToArray
());
}
}
}
}
}
}
...
@@ -165,31 +165,31 @@ namespace TSA_V
...
@@ -165,31 +165,31 @@ namespace TSA_V
LogUtil
.
info
(
"选择程序,是否流水线过板="
+
TSAVBean
.
OnlyGuoBan
);
LogUtil
.
info
(
"选择程序,是否流水线过板="
+
TSAVBean
.
OnlyGuoBan
);
if
(
WorkType
.
Equals
(
1
))
if
(
WorkType
.
Equals
(
1
))
{
{
if
(
BoardManager
.
CurrBoard
.
smtList
.
Count
<=
0
)
if
(
BoardManager
.
CurrBoard
.
GetSmtList
()
.
Count
<=
0
)
{
{
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
CanotFindInfo
,
"电路板【{0}】没有组装信息,请选择其他程序!"
,
BoardManager
.
CurrBoard
.
boardName
));
MessageBox
.
Show
(
ResourceCulture
.
GetString
(
ResourceCulture
.
CanotFindInfo
,
"电路板【{0}】没有组装信息,请选择其他程序!"
,
BoardManager
.
CurrBoard
.
boardName
));
return
false
;
return
false
;
}
}
return
true
;
return
true
;
}
}
else
if
(
WorkType
.
Equals
(
2
))
//
else if (WorkType.Equals(2))
{
//
{
if
(
BoardManager
.
CurrBoard
.
GetSolderingSMTList
().
Count
<=
0
)
//
if (BoardManager.CurrBoard.GetSolderingSMTList().Count <= 0)
{
//
{
MessageBox
.
Show
(
"电路板【"
+
BoardManager
.
CurrBoard
.
boardName
+
"】没有配置焊接信息,请选择其他程序!"
);
//
MessageBox.Show("电路板【" + BoardManager.CurrBoard.boardName + "】没有配置焊接信息,请选择其他程序!");
return
false
;
//
return false;
}
//
}
return
true
;
//
return true;
}
//
}
else
if
(
WorkType
.
Equals
(
3
))
//
else if (WorkType.Equals(3))
{
//
{
if
(
BoardManager
.
CurrBoard
.
GetCheckSMTList
().
Count
<=
0
)
//
if (BoardManager.CurrBoard.GetCheckSMTList().Count <= 0)
{
//
{
MessageBox
.
Show
(
"电路板【"
+
BoardManager
.
CurrBoard
.
boardName
+
"】没有配置检测信息,请选择其他程序!"
);
//
MessageBox.Show("电路板【" + BoardManager.CurrBoard.boardName + "】没有配置检测信息,请选择其他程序!");
return
false
;
//
return false;
}
//
}
return
true
;
//
return true;
}
//
}
}
}
return
false
;
return
false
;
}
}
...
...
TSA-V/workForm/FrmTSAV.cs
查看文件 @
64e1a1b
...
@@ -27,23 +27,25 @@ namespace TSA_V
...
@@ -27,23 +27,25 @@ namespace TSA_V
private
bool
isInitOk
=
false
;
private
bool
isInitOk
=
false
;
private
BoardInfo
board
=
BoardManager
.
CurrBoard
;
private
BoardInfo
board
=
BoardManager
.
CurrBoard
;
private
PointDisplay
display
=
new
PointDisplay
();
private
PointDisplay
display
=
new
PointDisplay
();
private
List
<
SMTPointInfo
>
workSmtList
=
new
List
<
SMTPointInfo
>();
private
void
FrmWelding_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmWelding_Load
(
object
sender
,
EventArgs
e
)
{
{
btnCamera
.
Visible
=
TSAVBean
.
IsNeedAOI
;
btnCamera
.
Visible
=
TSAVBean
.
IsNeedAOI
;
TSAVBean
.
Work
.
WorkType
=
1
;
TSAVBean
.
Work
.
WorkType
=
1
;
LanguageProcess
();
LanguageProcess
();
BoardInfo
board
=
BoardManager
.
CurrBoard
;
BoardInfo
board
=
BoardManager
.
CurrBoard
;
if
(
board
!=
null
)
if
(
board
!=
null
)
{
{
this
.
Text
=
"Smart Workstation:"
+
board
.
boardName
;
this
.
Text
=
"Smart Workstation:"
+
board
.
boardName
;
workSmtList
=
board
.
GetSmtList
();
preIndex
=
-
1
;
preIndex
=
-
1
;
smtPoint
=
new
SMTPointInfo
();
smtPoint
=
new
SMTPointInfo
();
timerShowForm
.
Stop
();
timerShowForm
.
Stop
();
if
(
board
.
s
mtList
.
Count
>
0
)
if
(
workS
mtList
.
Count
>
0
)
{
{
smtPoint
=
board
.
s
mtList
[
0
];
smtPoint
=
workS
mtList
[
0
];
}
}
ShowMsg
();
ShowMsg
();
...
@@ -191,7 +193,7 @@ namespace TSA_V
...
@@ -191,7 +193,7 @@ namespace TSA_V
private
Bitmap
bitmap
=
null
;
private
Bitmap
bitmap
=
null
;
private
void
loadPictureBoxSize
(
BoardInfo
board
)
private
void
loadPictureBoxSize
(
BoardInfo
board
)
{
{
display
.
LoadWorkFromPoint
(
board
,
smtPoint
);
display
.
LoadWorkFromPoint
(
board
,
smtPoint
,
true
);
updatePicPointSize
(
picBoard
.
Width
,
picBoard
.
Height
);
updatePicPointSize
(
picBoard
.
Width
,
picBoard
.
Height
);
pointXMap
=
display
.
pointXMap
;
pointXMap
=
display
.
pointXMap
;
pointYMap
=
display
.
pointYMap
;
pointYMap
=
display
.
pointYMap
;
...
@@ -639,7 +641,7 @@ namespace TSA_V
...
@@ -639,7 +641,7 @@ namespace TSA_V
}
}
int
leftCount
=
board
.
s
mtList
.
Count
-
1
-
preIndex
;
int
leftCount
=
workS
mtList
.
Count
-
1
-
preIndex
;
if
(
preIndex
.
Equals
(
0
))
if
(
preIndex
.
Equals
(
0
))
{
{
lblLast
.
Visible
=
false
;
lblLast
.
Visible
=
false
;
...
@@ -704,7 +706,7 @@ namespace TSA_V
...
@@ -704,7 +706,7 @@ namespace TSA_V
private
void
PreOrNext
(
bool
isNext
)
private
void
PreOrNext
(
bool
isNext
)
{
{
if
(
board
!=
null
&&
board
.
s
mtList
.
Count
>
0
)
if
(
board
!=
null
&&
workS
mtList
.
Count
>
0
)
{
{
if
(
isNext
)
if
(
isNext
)
{
{
...
@@ -721,20 +723,20 @@ namespace TSA_V
...
@@ -721,20 +723,20 @@ namespace TSA_V
if
(
preIndex
<
0
)
if
(
preIndex
<
0
)
{
{
preIndex
=
board
.
s
mtList
.
Count
-
1
;
preIndex
=
workS
mtList
.
Count
-
1
;
}
}
}
}
if
(
board
.
s
mtList
.
Count
<=
preIndex
)
if
(
workS
mtList
.
Count
<=
preIndex
)
{
{
ShowAOI
();
ShowAOI
();
preIndex
=
0
;
preIndex
=
0
;
}
}
else
if
(
preIndex
<
0
)
else
if
(
preIndex
<
0
)
{
{
preIndex
=
board
.
s
mtList
.
Count
-
1
;
preIndex
=
workS
mtList
.
Count
-
1
;
}
}
smtPoint
=
board
.
s
mtList
[
preIndex
];
smtPoint
=
workS
mtList
[
preIndex
];
ShowMsg
();
ShowMsg
();
if
(
pointXMap
.
ContainsKey
(
smtPoint
.
pointNum
))
if
(
pointXMap
.
ContainsKey
(
smtPoint
.
pointNum
))
{
{
...
@@ -771,7 +773,7 @@ namespace TSA_V
...
@@ -771,7 +773,7 @@ namespace TSA_V
{
{
lblPositionNum
.
Text
=
position
.
PositionNum
;
lblPositionNum
.
Text
=
position
.
PositionNum
;
}
}
int
leftCount
=
board
.
s
mtList
.
Count
-
1
-
preIndex
;
int
leftCount
=
workS
mtList
.
Count
-
1
-
preIndex
;
if
(
preIndex
.
Equals
(
0
))
if
(
preIndex
.
Equals
(
0
))
{
{
lblLast
.
Visible
=
false
;
lblLast
.
Visible
=
false
;
...
...
TSA-V/workForm/PointDisplay.cs
查看文件 @
64e1a1b
...
@@ -141,7 +141,7 @@ namespace TSA_V
...
@@ -141,7 +141,7 @@ namespace TSA_V
public
Dictionary
<
int
,
double
>
pointXMap
=
new
Dictionary
<
int
,
double
>();
public
Dictionary
<
int
,
double
>
pointXMap
=
new
Dictionary
<
int
,
double
>();
public
Dictionary
<
int
,
double
>
pointYMap
=
new
Dictionary
<
int
,
double
>();
public
Dictionary
<
int
,
double
>
pointYMap
=
new
Dictionary
<
int
,
double
>();
public
void
LoadWorkFromPoint
(
BoardInfo
board
,
SMTPointInfo
smtPoint
)
public
void
LoadWorkFromPoint
(
BoardInfo
board
,
SMTPointInfo
smtPoint
,
bool
isOnlyWork
=
true
)
{
{
if
(
picBoard
==
null
)
if
(
picBoard
==
null
)
{
{
...
@@ -175,7 +175,12 @@ namespace TSA_V
...
@@ -175,7 +175,12 @@ namespace TSA_V
int
index
=
0
;
int
index
=
0
;
pointXMap
=
new
Dictionary
<
int
,
double
>();
pointXMap
=
new
Dictionary
<
int
,
double
>();
pointYMap
=
new
Dictionary
<
int
,
double
>();
pointYMap
=
new
Dictionary
<
int
,
double
>();
foreach
(
SMTPointInfo
weld
in
board
.
smtList
)
List
<
SMTPointInfo
>
list
=
board
.
smtList
;
if
(
isOnlyWork
)
{
list
=
board
.
GetSmtList
();
}
foreach
(
SMTPointInfo
weld
in
list
)
{
{
float
x
=
(
float
)
Math
.
Abs
(
weld
.
PositionX
)
*
picBoard
.
Width
/
Width
;
float
x
=
(
float
)
Math
.
Abs
(
weld
.
PositionX
)
*
picBoard
.
Width
/
Width
;
float
y
=
(
float
)
Math
.
Abs
(
weld
.
PositionY
)
*
picBoard
.
Width
/
Width
;
float
y
=
(
float
)
Math
.
Abs
(
weld
.
PositionY
)
*
picBoard
.
Width
/
Width
;
...
@@ -220,51 +225,7 @@ namespace TSA_V
...
@@ -220,51 +225,7 @@ namespace TSA_V
{
{
LogUtil
.
error
(
"画图出错:"
+
ex
.
ToString
());
LogUtil
.
error
(
"画图出错:"
+
ex
.
ToString
());
}
}
}
}
//private void PicBoardBlowUp()
//{
// this.picBoard.SizeMode = PictureBoxSizeMode.Zoom;
// if (this.picBoard.Width > 5000 || this.picBoard.Height > 5000)
// {
// //不能继续放大
// return;
// }
// float w = this.picBoard.Width * 1.2f; //每次放大 20%
// float h = this.picBoard.Height * 1.2f;
// CurrBeiLu = CurrBeiLu * 1.2f;
// this.picBoard.Size = Size.Ceiling(new SizeF(w, h));
// picBoard.Invalidate();
//}
//private void PicBoardShrink()
//{
// this.picBoard.SizeMode = PictureBoxSizeMode.Zoom;
// if (this.picBoard.Width < panBoard.Width && this.picBoard.Height < panBoard.Height)
// {
// //不能继续缩小
// return;
// }
// float w = this.picBoard.Width * 0.8f; //每次縮小 20%
// float h = this.picBoard.Height * 0.8f;
// this.picBoard.Size = Size.Ceiling(new SizeF(w, h));
// CurrBeiLu = CurrBeiLu * 0.8f;
//}
//void picBoard_MouseWheel(object sender, MouseEventArgs e)
//{
// //向前
// if (e.Delta > 0)
// {
// PicBoardBlowUp();
// LoadPoint(Width, Height, PointList);
// }
// //向后
// else if (e.Delta < 0)
// {
// PicBoardShrink();
// LoadPoint(Width, Height, PointList);
// }
//}
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论