Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 84cea5df
由
LN
编写于
2021-05-18 11:07:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
点位增加启用禁用功能
1 个父辈
71ebee91
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
172 行增加
和
84 行删除
DeviceLibrary/bean/BoardInfo.cs
TSA-V/FrmBoardInfo.Designer.cs
TSA-V/FrmBoardInfo.cs
TSA-V/FrmBoardInfo.resx
TSA-V/Properties/Resource.en-US.resx
TSA-V/Properties/Resource.zh-CN.resx
DeviceLibrary/bean/BoardInfo.cs
查看文件 @
84cea5d
...
...
@@ -257,5 +257,9 @@ namespace TSA_V.DeviceLibrary
public
int
PenWidth
=
2
;
public
string
ShowText
=
""
;
/// <summary>
/// 是否禁用,默认0
/// </summary>
public
bool
Disable
=
false
;
}
}
TSA-V/FrmBoardInfo.Designer.cs
查看文件 @
84cea5d
此文件的差异被折叠,
点击展开。
TSA-V/FrmBoardInfo.cs
查看文件 @
84cea5d
...
...
@@ -92,15 +92,7 @@ namespace TSA_V
}
TSAVBean
.
IsCanStepMove
=
true
;
timer1
.
Start
();
if
(
IOManager
.
ShuddenOK
().
Equals
(
false
))
{
// MessageBox.Show("急停未开!");
lblMsg
.
Text
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceInSuddenStop
,
"急停未开"
);
}
else
{
lblMsg
.
Text
=
""
;
}
isFinishLoad
=
true
;
}
private
void
LanguagePro
()
...
...
@@ -140,6 +132,7 @@ namespace TSA_V
this
.
Column_Up
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Up
,
"上升"
);
this
.
Column_Down
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Down
,
"下降"
);
this
.
Column_CheckOK
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Check
,
"校准点"
);
this
.
Column_disable
.
HeaderText
=
ResourceCulture
.
GetString
(
ResourceCulture
.
ItemText_Check
,
"禁用"
);
}
private
void
FrmBoardInfo_Load
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -150,6 +143,19 @@ namespace TSA_V
lblAoi
.
Visible
=
TSAVBean
.
IsNeedAOI
;
cmbAOIFile
.
Visible
=
TSAVBean
.
IsNeedAOI
;
btnConfigAOI
.
Visible
=
TSAVBean
.
IsNeedAOI
;
int
count
=
dgvList
.
Columns
.
Count
;
for
(
int
i
=
0
;
i
<
count
;
i
++)
{
if
(
i
.
Equals
(
Column_disable
.
Index
))
{
dgvList
.
Columns
[
i
].
ReadOnly
=
false
;
}
else
{
dgvList
.
Columns
[
i
].
ReadOnly
=
true
;
}
}
}
protected
override
bool
ProcessCmdKey
(
ref
Message
msg
,
Keys
keyData
)
{
...
...
@@ -271,6 +277,7 @@ namespace TSA_V
view
.
Cells
[
Column_PointSizeY
.
Index
].
Value
=
point
.
PointSizeY
;
view
.
Cells
[
Column_PenWidth
.
Index
].
Value
=
point
.
PenWidth
;
view
.
Cells
[
Column_ShowText
.
Index
].
Value
=
point
.
ShowText
;
view
.
Cells
[
Column_disable
.
Index
].
Value
=
point
.
Disable
;
if
(
point
.
CheckOK
)
{
view
.
DefaultCellStyle
.
ForeColor
=
Color
.
Red
;
...
...
@@ -290,34 +297,34 @@ namespace TSA_V
IsProcess
=
true
;
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Wait
))
{
string
msg
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceNotOkMsg
,
"设备未连接"
);
if
(!
lblMsg
.
Text
.
Equals
(
msg
))
{
lblMsg
.
Text
=
msg
;
btnGoHome
.
Enabled
=
false
;
}
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Reset
))
{
string
msg
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceInGohome
,
"设备正在原点返回中"
);
if
(!
lblMsg
.
Text
.
Equals
(
msg
))
{
lblMsg
.
Text
=
msg
;
btnGoHome
.
Enabled
=
true
;
}
}
else
if
(
TSAVBean
.
Status
.
Equals
(
TSAVStatus
.
Runing
))
{
string
msg
=
ResourceCulture
.
GetString
(
ResourceCulture
.
DeviceInWork
,
"设备工作中"
);
if
(!
lblMsg
.
Text
.
Equals
(
msg
))
{
lblMsg
.
Text
=
msg
;
btnGoHome
.
Enabled
=
true
;
}
//
if (TSAVBean.Status.Equals(TSAVStatus.Wait))
//
{
//
string msg = ResourceCulture.GetString(ResourceCulture.DeviceNotOkMsg, "设备未连接");
//
if (!lblMsg.Text.Equals(msg))
//
{
//
lblMsg.Text = msg;
//
btnGoHome.Enabled = false;
//
}
//
}
//
else if (TSAVBean.Status.Equals(TSAVStatus.Reset))
//
{
//
string msg = ResourceCulture.GetString(ResourceCulture.DeviceInGohome, "设备正在原点返回中");
//
if (!lblMsg.Text.Equals(msg))
//
{
//
lblMsg.Text = msg;
//
btnGoHome.Enabled = true;
//
}
//
}
//
else if (TSAVBean.Status.Equals(TSAVStatus.Runing))
//
{
//
string msg = ResourceCulture.GetString(ResourceCulture.DeviceInWork, "设备工作中");
//
if (!lblMsg.Text.Equals(msg))
//
{
//
lblMsg.Text = msg;
//
btnGoHome.Enabled = true;
//
}
}
//
}
IsProcess
=
false
;
}
...
...
@@ -486,13 +493,8 @@ namespace TSA_V
board
.
boardName
=
FormUtil
.
getValue
(
txtBoardName
);
board
.
boardLength
=
FormUtil
.
GetIntValue
(
txtBoardW
);
board
.
boardWidth
=
FormUtil
.
GetIntValue
(
txtBoardL
);
board
.
LineWidth
=
FormUtil
.
GetIntValue
(
txtLineWidth
);
//board.originX = orgXValue;
//board.originY = orgYValue;
board
.
boardCode
=
FormUtil
.
getValue
(
txtCode
);
//board.originX = FormUtil.GetIntValue(txtOriginX);
//board.originY = FormUtil.GetIntValue(txtOriginY);
board
.
LineWidth
=
FormUtil
.
GetIntValue
(
txtLineWidth
);
board
.
boardCode
=
FormUtil
.
getValue
(
txtCode
);
board
.
orgType
=
orgType
;
board
.
AOIProName
=
cmbAOIFile
.
Text
;
...
...
@@ -649,6 +651,7 @@ namespace TSA_V
point
.
PointType
=
Convert
.
ToInt32
(
row
.
Cells
[
this
.
Column_PointType
.
Name
].
Value
.
ToString
());
point
.
PenWidth
=
Convert
.
ToInt32
(
row
.
Cells
[
this
.
Column_PenWidth
.
Name
].
Value
.
ToString
());
point
.
ShowText
=
(
row
.
Cells
[
this
.
Column_ShowText
.
Name
].
Value
.
ToString
());
point
.
Disable
=
Convert
.
ToBoolean
(
row
.
Cells
[
this
.
Column_disable
.
Name
].
Value
.
ToString
());
}
catch
(
Exception
ex
)
{
...
...
@@ -1050,17 +1053,7 @@ namespace TSA_V
btnSetBasePoint_Click
(
null
,
null
);
}
private
void
btnGoHome_Click_1
(
object
sender
,
EventArgs
e
)
{
btnGoHome
.
Enabled
=
false
;
if
(
TSAVBean
.
Status
>
TSAVStatus
.
Wait
)
{
TSAVBean
.
StartReset
();
}
btnGoHome
.
Enabled
=
true
;
}
private
DateTime
preProTime
=
DateTime
.
Now
;
private
void
picBoard_MouseMove
(
object
sender
,
MouseEventArgs
e
)
...
...
@@ -1312,5 +1305,23 @@ namespace TSA_V
{
btnOpenFile_Click
(
null
,
null
);
}
private
void
llblAllSel_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
int
cout
=
dgvList
.
Rows
.
Count
;
for
(
int
i
=
0
;
i
<
cout
;
i
++)
{
dgvList
.
Rows
[
i
].
Cells
[
this
.
Column_disable
.
Name
].
Value
=
false
;
}
}
private
void
llblAllUSel_LinkClicked
(
object
sender
,
LinkLabelLinkClickedEventArgs
e
)
{
int
cout
=
dgvList
.
Rows
.
Count
;
for
(
int
i
=
0
;
i
<
cout
;
i
++)
{
dgvList
.
Rows
[
i
].
Cells
[
this
.
Column_disable
.
Name
].
Value
=
true
;
}
}
}
}
TSA-V/FrmBoardInfo.resx
查看文件 @
84cea5d
...
...
@@ -207,6 +207,9 @@
<metadata name="Column_ShowText.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_disable.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_getPosition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
...
...
TSA-V/Properties/Resource.en-US.resx
查看文件 @
84cea5d
...
...
@@ -2272,34 +2272,87 @@
<data name="用户名或密码错误" xml:space="preserve">
<value>Incorrect user name or password</value>
</data>
<data name = "添加用户失败" xml:space = "preserve"> <value> Failed to add user </value> </data>
<data name = "退出" xml:space = "preserve"> <value> exit </value> </data>
<data name = "增加" xml:space = "preserve"> <value> add </value> </data>
<data name = "修改" xml:space = "preserve"> <value> modify </value> </data>
<data name = "删除" xml:space = "preserve"> <value> delete </value> </data>
<data name = "用户名" xml:space = "preserve"> <value> username </value> </data>
<data name = "密码" xml:space = "preserve"> <value> password </value> </data>
<data name = "权限" xml:space = "preserve"> <value> Permission </value> </data>
<data name = "用户管理" xml:space = "preserve"> <value> user management </value> </data>
<data name = "确认删除用户" xml:space = "preserve"> <value> Confirm to delete user </value> </data>
<data name = "用户删除成功" xml:space = "preserve"> <value> User deleted successfully </value> </data>
<data name = "用户删除失败" xml:space = "preserve"> <value> Failed to delete user </value> </data>
<data name = "确定修改用户信息" xml:space = "preserve"> <value> Confirm to modify user information </value> </data>
<data name = "用户修改成功" xml:space = "preserve"> <value> Modify user successfully </value> </data>
<data name = "用户修改失败" xml:space = "preserve"> <value> Failed to modify user </value> </data>
<data name = "添加用户成功" xml:space = "preserve"> <value> Added user successfully </value> </data>
<data name = "FrmDeviceConfig_lblCode_Text" xml:space = "preserve"> <value> Barcode: </value> </data>
<data name = "FrmPusicanTest_llblClearp_Text" xml:space = "preserve"> <value> Zero position </value> </data>
<data name="添加用户失败" xml:space="preserve">
<value> Failed to add user </value>
</data>
<data name="退出" xml:space="preserve">
<value> exit </value>
</data>
<data name="增加" xml:space="preserve">
<value> add </value>
</data>
<data name="修改" xml:space="preserve">
<value> modify </value>
</data>
<data name="删除" xml:space="preserve">
<value> delete </value>
</data>
<data name="用户名" xml:space="preserve">
<value> username </value>
</data>
<data name="密码" xml:space="preserve">
<value> password </value>
</data>
<data name="权限" xml:space="preserve">
<value> Permission </value>
</data>
<data name="用户管理" xml:space="preserve">
<value> user management </value>
</data>
<data name="确认删除用户" xml:space="preserve">
<value> Confirm to delete user </value>
</data>
<data name="用户删除成功" xml:space="preserve">
<value> User deleted successfully </value>
</data>
<data name="用户删除失败" xml:space="preserve">
<value> Failed to delete user </value>
</data>
<data name="确定修改用户信息" xml:space="preserve">
<value> Confirm to modify user information </value>
</data>
<data name="用户修改成功" xml:space="preserve">
<value> Modify user successfully </value>
</data>
<data name="用户修改失败" xml:space="preserve">
<value> Failed to modify user </value>
</data>
<data name="添加用户成功" xml:space="preserve">
<value> Added user successfully </value>
</data>
<data name="FrmDeviceConfig_lblCode_Text" xml:space="preserve">
<value> Barcode: </value>
</data>
<data name="FrmPusicanTest_llblClearp_Text" xml:space="preserve">
<value> Zero position </value>
</data>
<data name="LineWidth" xml:space="preserve">
<value>Line body width</value>
</data>
<data name="WriteLineWidth" xml:space="preserve">
<value>Please enter the line width</value>
</data>
<data name = "FrmBoardSelect_btnChangeW_Text" xml:space = "preserve"> <value> Adjust the line width </value> </data>
<data name = "FrmAddBoard_label9_Text" xml:space = "preserve"> <value> mm </value> </data>
<data name = "FrmAddBoard_lblName_Text" xml:space = "preserve"> <value> Projection words: </value> </data>
<data name = "FrmBoardInfo_lblLineW_Text" xml:space = "preserve"> <value> Line body width: </value> </data>
<data name = "FrmBoardInfo_lbllinews_Text" xml:space = "preserve"> <value> mm </value> </data>
<data name = "FrmChangeWidth_btnHomeM_Text" xml:space = "preserve"> <value> The origin back </value> </data>
<data name="FrmBoardSelect_btnChangeW_Text" xml:space="preserve">
<value> Adjust the line width </value>
</data>
<data name="FrmAddBoard_label9_Text" xml:space="preserve">
<value> mm </value>
</data>
<data name="FrmAddBoard_lblName_Text" xml:space="preserve">
<value> Projection words: </value>
</data>
<data name="FrmBoardInfo_lblLineW_Text" xml:space="preserve">
<value> Line body width: </value>
</data>
<data name="FrmBoardInfo_lbllinews_Text" xml:space="preserve">
<value> mm </value>
</data>
<data name="FrmChangeWidth_btnHomeM_Text" xml:space="preserve">
<value> The origin back </value>
</data>
<data name="禁用" xml:space="preserve">
<value>Disabled</value>
</data>
<data name = "FrmBoardInfo_llblAllUSel_Text" xml:space = "preserve"> <value> Disable all </value> </data>
<data name = "FrmBoardInfo_llblAllSel_Text" xml:space = "preserve"> <value> To enable all </value> </data>
</root>
\ No newline at end of file
TSA-V/Properties/Resource.zh-CN.resx
查看文件 @
84cea5d
...
...
@@ -2346,10 +2346,27 @@
<data name="WriteLineWidth" xml:space="preserve">
<value>请输入线体宽度</value>
</data>
<data name = "FrmBoardSelect_btnChangeW_Text" xml:space = "preserve"> <value> 调宽 </value> </data>
<data name = "FrmAddBoard_label9_Text" xml:space = "preserve"> <value> mm </value> </data>
<data name = "FrmAddBoard_lblName_Text" xml:space = "preserve"> <value> 投影文字: </value> </data>
<data name = "FrmBoardInfo_lblLineW_Text" xml:space = "preserve"> <value> 线体宽度: </value> </data>
<data name = "FrmBoardInfo_lbllinews_Text" xml:space = "preserve"> <value> mm </value> </data>
<data name = "FrmChangeWidth_btnHomeM_Text" xml:space = "preserve"> <value> 原点返回 </value> </data>
<data name="FrmBoardSelect_btnChangeW_Text" xml:space="preserve">
<value> 调宽 </value>
</data>
<data name="FrmAddBoard_label9_Text" xml:space="preserve">
<value> mm </value>
</data>
<data name="FrmAddBoard_lblName_Text" xml:space="preserve">
<value> 投影文字: </value>
</data>
<data name="FrmBoardInfo_lblLineW_Text" xml:space="preserve">
<value> 线体宽度: </value>
</data>
<data name="FrmBoardInfo_lbllinews_Text" xml:space="preserve">
<value> mm </value>
</data>
<data name="FrmChangeWidth_btnHomeM_Text" xml:space="preserve">
<value> 原点返回 </value>
</data>
<data name="禁用" xml:space="preserve">
<value>禁用</value>
</data>
<data name = "FrmBoardInfo_llblAllUSel_Text" xml:space = "preserve"> <value> 全部禁用 </value> </data>
<data name = "FrmBoardInfo_llblAllSel_Text" xml:space = "preserve"> <value> 全部启用 </value> </data>
</root>
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论