Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 82710d36
由
刘韬
编写于
2021-09-28 16:26:48 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
修复翻译, 优化双盘测试逻辑, 添加点位快速点动调试
1 个父辈
b5402997
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
585 行增加
和
22 行删除
source/ACSingleStore/ACSingleStore.csproj
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/ACSingleStore/Properties/AssemblyInfo.cs
source/ACSingleStore/resource/language.resource
source/ACSingleStore/useControl/AxisTipControl.cs
source/ACSingleStore/useControl/AxisTipControl.designer.cs
source/ACSingleStore/useControl/AxisTipControl.resx
source/ACSingleStore/useControl/uc_boxdebug.cs
source/Common/Setting_Init.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/LoadCVSLibrary/CSVAttribute.cs
source/ACSingleStore/ACSingleStore.csproj
查看文件 @
82710d3
...
...
@@ -84,6 +84,12 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="useControl\AxisTipControl.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="useControl\AxisTipControl.designer.cs">
<DependentUpon>AxisTipControl.cs</DependentUpon>
</Compile>
<Compile Include="FormManager.cs" />
<Compile Include="FrmInOutStore.cs">
<SubType>Form</SubType>
...
...
@@ -161,6 +167,9 @@
<Compile Include="useControl\uc_boxdebug.Designer.cs">
<DependentUpon>uc_boxdebug.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="useControl\AxisTipControl.resx">
<DependentUpon>AxisTipControl.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmInOutStore.resx">
<DependentUpon>FrmInOutStore.cs</DependentUpon>
</EmbeddedResource>
...
...
source/ACSingleStore/App.config
查看文件 @
82710d3
...
...
@@ -73,7 +73,7 @@
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
</
logger
>
<
logger
name
=
"ResourcesLog"
additivity
=
"false"
>
<
level
value
=
"
Info
"
/>
<
level
value
=
"
All
"
/>
<
appender
-
ref
ref
=
"ResourcesLog"
/>
</
logger
>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
82710d3
...
...
@@ -149,6 +149,7 @@ namespace OnlineStore.ACSingleStore
this
.
开启
DEBUGToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator12
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
清理日志
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
chbTH
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
tabControl2
.
SuspendLayout
();
this
.
tabPage4
.
SuspendLayout
();
...
...
@@ -448,7 +449,7 @@ namespace OnlineStore.ACSingleStore
//
this
.
chbBuzzer
.
AutoSize
=
true
;
this
.
chbBuzzer
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
715
,
3
3
);
this
.
chbBuzzer
.
Location
=
new
System
.
Drawing
.
Point
(
715
,
3
7
);
this
.
chbBuzzer
.
Name
=
"chbBuzzer"
;
this
.
chbBuzzer
.
Size
=
new
System
.
Drawing
.
Size
(
98
,
24
);
this
.
chbBuzzer
.
TabIndex
=
271
;
...
...
@@ -460,7 +461,7 @@ namespace OnlineStore.ACSingleStore
//
this
.
chbAuto
.
AutoSize
=
true
;
this
.
chbAuto
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbAuto
.
Location
=
new
System
.
Drawing
.
Point
(
715
,
54
);
this
.
chbAuto
.
Location
=
new
System
.
Drawing
.
Point
(
715
,
85
);
this
.
chbAuto
.
Name
=
"chbAuto"
;
this
.
chbAuto
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbAuto
.
TabIndex
=
270
;
...
...
@@ -559,6 +560,7 @@ namespace OnlineStore.ACSingleStore
//
this
.
groupBox3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox3
.
Controls
.
Add
(
this
.
chbTH
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
chbAuto
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
chbIsDebug
);
this
.
groupBox3
.
Controls
.
Add
(
this
.
lblWarnMsg
);
...
...
@@ -1584,6 +1586,18 @@ namespace OnlineStore.ACSingleStore
this
.
清理日志
ToolStripMenuItem
.
Text
=
"清理日志"
;
this
.
清理日志
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
清理日志
ToolStripMenuItem_Click
);
//
// chbTH
//
this
.
chbTH
.
AutoSize
=
true
;
this
.
chbTH
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
chbTH
.
Location
=
new
System
.
Drawing
.
Point
(
715
,
61
);
this
.
chbTH
.
Name
=
"chbTH"
;
this
.
chbTH
.
Size
=
new
System
.
Drawing
.
Size
(
112
,
24
);
this
.
chbTH
.
TabIndex
=
270
;
this
.
chbTH
.
Text
=
"启用气压报警"
;
this
.
chbTH
.
UseVisualStyleBackColor
=
true
;
this
.
chbTH
.
CheckedChanged
+=
new
System
.
EventHandler
(
this
.
chbTH_CheckedChanged
);
//
// FrmStoreBox
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
...
@@ -1758,6 +1772,7 @@ namespace OnlineStore.ACSingleStore
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox2
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
private
System
.
Windows
.
Forms
.
TabPage
tabPage9
;
private
System
.
Windows
.
Forms
.
CheckBox
chbTH
;
}
}
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
82710d3
...
...
@@ -61,7 +61,15 @@ namespace OnlineStore.ACSingleStore
pictureBox1
.
Image
=
e
;
},
sender
,
e
);
}
void
setAxisPopup
(
Control
c
,
Control
title
,
ConfigMoveAxis
configMoveAxis
)
{
c
.
Tag
=
"A"
;
c
.
Click
+=
(
cc
,
e
)
=>
{
AxisTipControl
axisTipControl
=
new
AxisTipControl
();
axisTipControl
.
ShowTips
((
Control
)
cc
,
title
.
Text
,
configMoveAxis
.
GetAxisValue
(),
configMoveAxis
.
TargetSpeed
);
};
}
private
void
InitStoreValue
()
{
this
.
store
=
StoreManager
.
InitStore
();
...
...
@@ -82,7 +90,6 @@ namespace OnlineStore.ACSingleStore
txtUpDownP7
.
Text
=
store
.
Config
.
UpDownAxis_DoorOBPosition_P7
.
ToString
();
txtUpDownP8
.
Text
=
store
.
Config
.
UpDownAxis_DoorIBPosition_P8
.
ToString
();
//txtInOutP2.Text = store.Config.InOutAxis_DoorPosition_P2.ToString();
txtUpDownP1
.
Text
=
store
.
Config
.
UpDownAxis_DoorOPosition_P1
.
ToString
();
if
(
store
.
Config
.
StoreDOList
.
ContainsKey
(
IO_Type
.
Device_Led
))
{
...
...
@@ -95,7 +102,13 @@ namespace OnlineStore.ACSingleStore
btnCloseDLed
.
Visible
=
false
;
}
timer1
.
Enabled
=
true
;
setAxisPopup
(
txtUpDownP1
,
btnUpDownP1
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtUpDownP7
,
btnUpDownP7
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtUpDownP8
,
btnUpDownP8
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtUpDownP2
,
btnUpDownP2
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtMiddleP1
,
btnMiddleP1
,
store
.
Config
.
Middle_Axis
);
setAxisPopup
(
txtInOutP1
,
btnInOutP1
,
store
.
Config
.
InOut_Axis
);
setAxisPopup
(
txtComP1
,
btnComP1
,
store
.
Config
.
Comp_Axis
);
}
#
endregion
...
...
@@ -156,6 +169,7 @@ namespace OnlineStore.ACSingleStore
notifyIcon1
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
this
.
chbBuzzer
.
Checked
=
store
.
UseBuzzer
;
this
.
chbTH
.
Checked
=
store
.
UseAirBlow
;
axisMoveControl1
.
LoadData
(
store
);
chbIsDebug
.
Checked
=
store
.
IsDebug
;
LoadOk
=
true
;
...
...
@@ -1057,5 +1071,25 @@ namespace OnlineStore.ACSingleStore
{
}
private
void
chbTH_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
if
(!
LoadOk
)
{
return
;
}
if
(
chbTH
.
Checked
)
{
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
UseAirBlow
,
1
);
store
.
UseAirBlow
=
true
;
LogUtil
.
info
(
"勾选:启用吹气报警"
);
}
else
{
ConfigAppSettings
.
SaveValue
(
Setting_Init
.
UseAirBlow
,
0
);
store
.
UseAirBlow
=
true
;
LogUtil
.
info
(
"勾选:禁用吹气报警"
);
}
}
}
}
source/ACSingleStore/Properties/AssemblyInfo.cs
查看文件 @
82710d3
...
...
@@ -9,7 +9,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore
1867400252238f69b2112335df02ff81d7b153e0
")]
[assembly: AssemblyProduct("SO951-HC-ACSingleStore
b5402997f9624bacbce062625e2a992850a17872
")]
[assembly: AssemblyCopyright("Copyright ? 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
...
...
source/ACSingleStore/resource/language.resource
查看文件 @
82710d3
...
...
@@ -330,4 +330,12 @@ FrmStoreBox_label52_Text,规划位置:,Planning location:,計画位置
FrmStoreBox_label50_Text,规划模式:,Planning mode:,計画モード
FrmStoreBox_linkLabel1_Text,复制,Copy,コピー
FrmStoreBox_btnDelMove_Text,点动- ,Jogging-,クリック‐
FrmStoreBox_btnAddMove_Text,点动+ ,Jogging+,クリック
\ No newline at end of file
FrmStoreBox_btnAddMove_Text,点动+ ,Jogging+,クリック
AxisTipControl_btn_cancel_Text,取消,Back,戻る
AxisTipControl_btn_ok_Text,确定,Confirm,OK
AxisTipControl_btnDelMove_Text,点动- ,Jogging-,クリック‐
AxisTipControl_btnAddMove_Text,点动+ ,Jogging+,クリック
AxisTipControl_label_position_Text,当前位置:,Actual position:,リアルタイムの位置。
AxisTipControl_label_speed_Text,点动速度:,Inching speed,タップスピード
\ No newline at end of file
source/ACSingleStore/useControl/AxisTipControl.cs
0 → 100644
查看文件 @
82710d3
using
HuichuanLibrary
;
using
OnlineStore.ACSingleStore
;
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
using
AxisManager
=
OnlineStore
.
DeviceLibrary
.
ACServerManager
;
public
partial
class
AxisTipControl
:
FrmBase
{
public
AxisTipControl
()
{
InitializeComponent
();
this
.
Deactivate
+=
AxisTipControl_Deactivate
;
this
.
LostFocus
+=
AxisTipControl_LostFocus
;
this
.
TopMost
=
true
;
}
private
void
AxisTipControl_LostFocus
(
object
sender
,
EventArgs
e
)
{
//this.Close();
}
private
void
AxisTipControl_Deactivate
(
object
sender
,
EventArgs
e
)
{
this
.
Close
();
}
short
SlvAddr
;
string
PortName
;
int
targetSpeed
;
static
Control
c
;
public
void
ShowTips
(
Control
_c
,
string
title
,
short
axisid
,
int
_targetSpeed
)
{
if
(
_c
.
Tag
==
null
)
return
;
if
(
c
!=
null
&&
c
.
Name
==
_c
.
Name
)
return
;
Text
=
title
;
/*var cp = c.PointToScreen(new Point(0, 0));
var cc = this.Parent.PointToClient(cp);
cc.Y += c.Height;
this.Location = cc;
*/
c
=
_c
;
SlvAddr
=
axisid
;
PortName
=
c
.
Name
;
targetSpeed
=
_targetSpeed
;
comjSpeed
.
Items
.
Clear
();
for
(
int
i
=
1
;
i
<=
10
;
i
++)
{
comjSpeed
.
Items
.
Add
(
targetSpeed
*
i
/
10
);
}
comjSpeed
.
SelectedIndex
=
4
;
//【2】读取轴状态,如果读取出错将关闭此定时器
AxisSts
sts
=
HCBoardManager
.
GetAxisSts
(
SlvAddr
);
if
(
sts
.
ServoOn
<
0
)
{
showToolTip
(
"伺服尚未使能"
,
c
);
//return;
}
if
(
sts
.
ALM
!=
0
||
sts
.
WARN
!=
0
||
sts
.
EMG
!=
0
)
{
showToolTip
(
"伺服警报状态中"
,
c
);
//return;
}
readPosition
();
this
.
Show
();
LanguageProcess
();
}
void
showToolTip
(
string
txt
,
Control
control
)
{
var
m_ToolTip
=
new
ToolTip
();
m_ToolTip
.
ToolTipIcon
=
ToolTipIcon
.
Warning
;
m_ToolTip
.
ToolTipTitle
=
"无法操作"
;
m_ToolTip
.
AutoPopDelay
=
0
;
m_ToolTip
.
AutomaticDelay
=
0
;
m_ToolTip
.
InitialDelay
=
0
;
m_ToolTip
.
ShowAlways
=
true
;
m_ToolTip
.
Show
(
txt
,
control
);
Task
.
Run
(()
=>
{
Task
.
Delay
(
5000
).
Wait
();
m_ToolTip
.
Dispose
();
});
}
private
void
AxisMove
(
int
speed
)
{
LogUtil
.
info
(
"【"
+
PortName
+
"_"
+
SlvAddr
+
"】点动: 速度:"
+
speed
);
AxisManager
.
SpeedMove
(
PortName
,
SlvAddr
,
speed
);
}
private
void
btnAddMove_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(!
CanMove
(
sender
))
{
return
;
}
if
(
btnAddMove
.
BackColor
.
Equals
(
Color
.
White
))
{
int
speed
=
Convert
.
ToInt32
(
comjSpeed
.
Text
);
if
(
speed
<=
0
)
{
MessageBox
.
Show
(
"提示"
,
"请先输入正确的速度"
);
return
;
}
btnAddMove
.
BackColor
=
Color
.
Green
;
AxisMove
(
speed
);
}
}
private
void
btnAddMove_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
if
(
btnAddMove
.
BackColor
==
Color
.
Green
)
{
btnAddMove
.
BackColor
=
Color
.
White
;
AxisManager
.
SuddenStop
(
PortName
,
SlvAddr
);
readPosition
();
}
}
void
readPosition
()
{
textBox_pos
.
Text
=
AxisManager
.
GetActualtPosition
(
PortName
,
SlvAddr
).
ToString
();
}
private
void
btnDelMove_MouseDown
(
object
sender
,
MouseEventArgs
e
)
{
if
(!
CanMove
(
sender
))
{
return
;
}
if
(
btnDelMove
.
BackColor
.
Equals
(
Color
.
White
))
{
int
speed
=
Convert
.
ToInt32
(
comjSpeed
.
Text
);
if
(
speed
<=
0
)
{
MessageBox
.
Show
(
"提示"
,
"请先输入正确的速度"
);
return
;
}
btnDelMove
.
BackColor
=
Color
.
Green
;
AxisMove
(-
speed
);
}
}
private
void
btnDelMove_MouseUp
(
object
sender
,
MouseEventArgs
e
)
{
if
(
btnDelMove
.
BackColor
==
Color
.
Green
)
{
btnDelMove
.
BackColor
=
Color
.
White
;
AxisManager
.
SuddenStop
(
PortName
,
SlvAddr
);
readPosition
();
}
}
bool
CanMove
(
object
sender
)
{
AxisSts
sts
=
HCBoardManager
.
GetAxisSts
(
SlvAddr
);
if
(
sts
.
ServoOn
<
0
)
{
showToolTip
(
"伺服尚未使能"
,
(
Control
)
sender
);
return
false
;
}
if
(
sts
.
ALM
!=
0
||
sts
.
WARN
!=
0
||
sts
.
EMG
!=
0
)
{
showToolTip
(
"伺服警报状态中"
,
(
Control
)
sender
);
return
false
;
}
return
true
;
}
private
void
btn_cancel_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Close
();
//c.Select();
//c.Focus();
}
private
void
btn_ok_Click
(
object
sender
,
EventArgs
e
)
{
c
.
Text
=
textBox_pos
.
Text
;
this
.
Close
();
}
}
source/ACSingleStore/useControl/AxisTipControl.designer.cs
0 → 100644
查看文件 @
82710d3
partial
class
AxisTipControl
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private
void
InitializeComponent
()
{
this
.
comjSpeed
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btnDelMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnAddMove
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label_speed
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
textBox_pos
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
label_position
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btn_ok
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_cancel
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
SuspendLayout
();
//
// comjSpeed
//
this
.
comjSpeed
.
DropDownStyle
=
System
.
Windows
.
Forms
.
ComboBoxStyle
.
DropDownList
;
this
.
comjSpeed
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
comjSpeed
.
FormattingEnabled
=
true
;
this
.
comjSpeed
.
Location
=
new
System
.
Drawing
.
Point
(
155
,
8
);
this
.
comjSpeed
.
Name
=
"comjSpeed"
;
this
.
comjSpeed
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
28
);
this
.
comjSpeed
.
TabIndex
=
339
;
//
// btnDelMove
//
this
.
btnDelMove
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnDelMove
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnDelMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnDelMove
.
Location
=
new
System
.
Drawing
.
Point
(
155
,
42
);
this
.
btnDelMove
.
Name
=
"btnDelMove"
;
this
.
btnDelMove
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
btnDelMove
.
TabIndex
=
338
;
this
.
btnDelMove
.
Text
=
"点动-"
;
this
.
btnDelMove
.
UseVisualStyleBackColor
=
false
;
this
.
btnDelMove
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnDelMove_MouseDown
);
this
.
btnDelMove
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnDelMove_MouseUp
);
//
// btnAddMove
//
this
.
btnAddMove
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnAddMove
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnAddMove
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnAddMove
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
42
);
this
.
btnAddMove
.
Name
=
"btnAddMove"
;
this
.
btnAddMove
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
45
);
this
.
btnAddMove
.
TabIndex
=
337
;
this
.
btnAddMove
.
Text
=
"点动+"
;
this
.
btnAddMove
.
UseVisualStyleBackColor
=
false
;
this
.
btnAddMove
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnAddMove_MouseDown
);
this
.
btnAddMove
.
MouseUp
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
btnAddMove_MouseUp
);
//
// label_speed
//
this
.
label_speed
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
12
);
this
.
label_speed
.
Name
=
"label_speed"
;
this
.
label_speed
.
Size
=
new
System
.
Drawing
.
Size
(
111
,
19
);
this
.
label_speed
.
TabIndex
=
336
;
this
.
label_speed
.
Text
=
"点动速度:"
;
this
.
label_speed
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// textBox_pos
//
this
.
textBox_pos
.
Location
=
new
System
.
Drawing
.
Point
(
155
,
94
);
this
.
textBox_pos
.
Name
=
"textBox_pos"
;
this
.
textBox_pos
.
Size
=
new
System
.
Drawing
.
Size
(
116
,
23
);
this
.
textBox_pos
.
TabIndex
=
340
;
//
// label_position
//
this
.
label_position
.
Location
=
new
System
.
Drawing
.
Point
(
38
,
94
);
this
.
label_position
.
Name
=
"label_position"
;
this
.
label_position
.
Size
=
new
System
.
Drawing
.
Size
(
111
,
20
);
this
.
label_position
.
TabIndex
=
336
;
this
.
label_position
.
Text
=
"当前位置:"
;
this
.
label_position
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
//
// btn_ok
//
this
.
btn_ok
.
Location
=
new
System
.
Drawing
.
Point
(
181
,
123
);
this
.
btn_ok
.
Name
=
"btn_ok"
;
this
.
btn_ok
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
33
);
this
.
btn_ok
.
TabIndex
=
341
;
this
.
btn_ok
.
Text
=
"确定"
;
this
.
btn_ok
.
UseVisualStyleBackColor
=
true
;
this
.
btn_ok
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_ok_Click
);
//
// btn_cancel
//
this
.
btn_cancel
.
Location
=
new
System
.
Drawing
.
Point
(
16
,
123
);
this
.
btn_cancel
.
Name
=
"btn_cancel"
;
this
.
btn_cancel
.
Size
=
new
System
.
Drawing
.
Size
(
90
,
33
);
this
.
btn_cancel
.
TabIndex
=
341
;
this
.
btn_cancel
.
Text
=
"取消"
;
this
.
btn_cancel
.
UseVisualStyleBackColor
=
true
;
this
.
btn_cancel
.
Click
+=
new
System
.
EventHandler
(
this
.
btn_cancel_Click
);
//
// AxisTipControl
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
293
,
166
);
this
.
Controls
.
Add
(
this
.
btn_cancel
);
this
.
Controls
.
Add
(
this
.
btn_ok
);
this
.
Controls
.
Add
(
this
.
textBox_pos
);
this
.
Controls
.
Add
(
this
.
comjSpeed
);
this
.
Controls
.
Add
(
this
.
btnDelMove
);
this
.
Controls
.
Add
(
this
.
btnAddMove
);
this
.
Controls
.
Add
(
this
.
label_position
);
this
.
Controls
.
Add
(
this
.
label_speed
);
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedToolWindow
;
this
.
MaximizeBox
=
false
;
this
.
MinimizeBox
=
false
;
this
.
Name
=
"AxisTipControl"
;
this
.
ShowIcon
=
false
;
this
.
ShowInTaskbar
=
false
;
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
#
endregion
private
System
.
Windows
.
Forms
.
ComboBox
comjSpeed
;
private
System
.
Windows
.
Forms
.
Button
btnDelMove
;
private
System
.
Windows
.
Forms
.
Button
btnAddMove
;
private
System
.
Windows
.
Forms
.
Label
label_speed
;
private
System
.
Windows
.
Forms
.
TextBox
textBox_pos
;
private
System
.
Windows
.
Forms
.
Label
label_position
;
private
System
.
Windows
.
Forms
.
Button
btn_ok
;
private
System
.
Windows
.
Forms
.
Button
btn_cancel
;
}
source/ACSingleStore/useControl/AxisTipControl.resx
0 → 100644
查看文件 @
82710d3
<?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>
</root>
\ No newline at end of file
source/ACSingleStore/useControl/uc_boxdebug.cs
查看文件 @
82710d3
...
...
@@ -12,6 +12,7 @@ using System.IO;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
...
...
@@ -37,8 +38,9 @@ namespace OnlineStore.ACSingleStore.useControl
public
uc_boxdebug
()
{
InitializeComponent
();
}
public
void
Init
(
AC_SA_BoxBean
store
)
{
this
.
store
=
this
.
store
=
store
;
...
...
@@ -51,6 +53,16 @@ namespace OnlineStore.ACSingleStore.useControl
FillBoxPos
();
store
.
InOutEndProcessEvent
+=
Store_InOutEndProcessEvent
;
timer1
.
Enabled
=
true
;
setAxisPopup
(
txtUpDownP3
,
btnUpDownP3
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtUpDownP4
,
btnUpDownP4
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtUpDownP5
,
btnUpDownP5
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtUpDownP6
,
btnUpDownP6
,
store
.
Config
.
UpDown_Axis
);
setAxisPopup
(
txtMiddleP2
,
btnMiddleP2
,
store
.
Config
.
Middle_Axis
);
setAxisPopup
(
txtInOutP3
,
btnInOutP3
,
store
.
Config
.
InOut_Axis
);
setAxisPopup
(
txtInOutP2
,
btnInOutP2
,
store
.
Config
.
InOut_Axis
);
setAxisPopup
(
txtComP2
,
btnComP2
,
store
.
Config
.
Comp_Axis
);
setAxisPopup
(
txtComP3
,
btnComP3
,
store
.
Config
.
Comp_Axis
);
return
;
}
...
...
@@ -98,13 +110,14 @@ namespace OnlineStore.ACSingleStore.useControl
int
PosCompare
(
string
a
,
string
b
)
{
string
[]
pa
=
a
.
Split
(
'_'
);
string
[]
pb
=
b
.
Split
(
'_'
);
if
(
pa
[
2
].
Length
==
1
)
pa
[
2
]
+=
"A"
;
if
(
pb
[
2
].
Length
==
1
)
pb
[
2
]
+=
"A"
;
var
isa
=
pa
[
1
]
+
(
pa
[
2
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pa
[
2
][
0
]
+
pa
[
3
].
PadLeft
(
2
,
'0'
);
var
isb
=
pb
[
1
]
+
(
pb
[
2
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pb
[
2
][
0
]
+
pb
[
3
].
PadLeft
(
2
,
'0'
);
if
(
int
.
TryParse
(
pa
[
1
],
out
_
))
pa
[
1
]
+=
"A"
;
if
(
int
.
TryParse
(
pb
[
1
],
out
_
))
pb
[
1
]
+=
"A"
;
var
isa
=
Regex
.
Replace
(
pa
[
1
],
@"[^\d]*"
,
""
)
+
(
pa
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pa
[
2
][
0
]
+
pa
[
3
].
PadLeft
(
2
,
'0'
);
var
isb
=
Regex
.
Replace
(
pb
[
1
],
@"[^\d]*"
,
""
)
+
(
pb
[
1
][
1
].
Equals
(
'A'
)
?
"1"
:
"2"
)
+
pb
[
2
][
0
]
+
pb
[
3
].
PadLeft
(
2
,
'0'
);
if
(
int
.
Parse
(
isa
)
==
int
.
Parse
(
isb
))
return
0
;
else
if
(
int
.
Parse
(
isa
)
>
int
.
Parse
(
isb
))
...
...
@@ -160,7 +173,7 @@ namespace OnlineStore.ACSingleStore.useControl
//store.PositionNumList.Reverse();
string
[]
posstr
=
store
.
PositionNumList
[
store
.
PositionNumList
.
Count
-
1
].
Split
(
'_'
);
int
colcount
=
int
.
Parse
(
posstr
[
1
])+
1
;
int
colcount
=
int
.
Parse
(
Regex
.
Replace
(
posstr
[
1
],
@"[^\d]*"
,
""
))
+
1
;
for
(
int
i
=
0
;
i
<
colcount
;
i
++)
{
dataGridView1
.
Columns
.
Add
(
"Col"
+
i
+
"_A"
,
"Col"
+
i
+
"_A"
);
...
...
@@ -182,7 +195,7 @@ namespace OnlineStore.ACSingleStore.useControl
int
ci
=
store
.
PositionNumList
.
Count
-
1
-
i
;
string
posname
=
store
.
PositionNumList
[
ci
];
string
[]
_posstr
=
posname
.
Split
(
'_'
);
int
col
=
int
.
Parse
(
_posstr
[
1
]
);
int
col
=
int
.
Parse
(
Regex
.
Replace
(
_posstr
[
1
],
@"[^\d]*"
,
""
)
);
string
ab
=
"A"
;
if
(
_posstr
[
2
].
Length
>
1
)
ab
=
_posstr
[
2
][
1
].
ToString
();
...
...
@@ -226,6 +239,7 @@ namespace OnlineStore.ACSingleStore.useControl
if
(
dataGridView1
.
SelectedCells
.
Count
>
0
)
setData
(
dataGridView1
.
SelectedCells
[
0
].
Tag
.
ToString
());
dataGridView1
.
Rows
.
RemoveAt
(
dataGridView1
.
Rows
.
Count
-
1
);
setData
(
store
.
PositionNumList
.
Last
());
}
void
setData
(
string
posid
)
{
ACStorePosition
ktkPosition
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
posid
);
...
...
@@ -360,9 +374,17 @@ namespace OnlineStore.ACSingleStore.useControl
}
MyMessage
.
Show
(
"叉子不在待机位,请先将叉子退回待机位("
+
InOutDefaultPosition
+
")"
,
"警告(叉子在待机位时,才能移动升降轴和旋转轴) "
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Exclamation
);
return
false
;
}
}
void
setAxisPopup
(
Control
c
,
Control
title
,
ConfigMoveAxis
configMoveAxis
)
{
c
.
Tag
=
"A"
;
c
.
Click
+=
(
cc
,
e
)
=>
{
AxisTipControl
axisTipControl
=
new
AxisTipControl
();
axisTipControl
.
ShowTips
((
Control
)
cc
,
title
.
Text
,
configMoveAxis
.
GetAxisValue
(),
configMoveAxis
.
TargetSpeed
);
};
}
private
void
btnUpDownP3_Click
(
object
sender
,
EventArgs
e
)
{
if
(
InOutIsIsP1
())
...
...
source/Common/Setting_Init.cs
查看文件 @
82710d3
...
...
@@ -105,5 +105,6 @@ namespace OnlineStore.Common
public
static
string
MaxScanCount
=
"MaxScanCount"
;
public
static
string
QRCodeCount
=
"MaxScanCount"
;
public
static
string
DoorOpenAirBlow
=
"DoorOpenAirBlow"
;
public
static
string
UseAirBlow
=
"UseAirBlow"
;
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
82710d3
...
...
@@ -117,7 +117,6 @@
<Name>LoadCSVLibrary</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<None Include="packages.config" />
<None Include="StoreConfig\AC\linePositions.csv">
...
...
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
82710d3
...
...
@@ -44,6 +44,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary>
public
bool
IsHasCompress_Axis
=
true
;
public
bool
UseBuzzer
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseBuzzer
).
Equals
(
1
);
public
bool
UseAirBlow
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
UseAirBlow
).
Equals
(
1
);
public
int
MaxScanCount
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
MaxScanCount
);
public
int
CurrScanCount
=
1
;
//public ScanSocket scanSocket = new ScanSocket();
...
...
@@ -761,6 +762,12 @@ namespace OnlineStore.DeviceLibrary
private
IO_VALUE
preAirValue
=
IO_VALUE
.
HIGH
;
private
void
AirCheckProcess
()
{
if
(!
UseAirBlow
)
{
isNoAirCheck
=
false
;
return
;
}
IO_VALUE
currAirValue
=
IOManager
.
IOValue
(
IO_Type
.
Airpressure_Check
);
if
(
isInSuddenDown
)
{
...
...
source/LoadCVSLibrary/CSVAttribute.cs
查看文件 @
82710d3
...
...
@@ -21,7 +21,5 @@ namespace OnlineStore.LoadCSVLibrary
get
{
return
fieldName
;
}
set
{
fieldName
=
value
;
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论