Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO491-DUOStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e35141b7
由
刘韬
编写于
2021-06-01 15:57:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
调试通过
1 个父辈
2fc1e625
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
34 个修改的文件
包含
686 行增加
和
181 行删除
source/Common/CodeResourceControl.cs
source/Common/Common.csproj
source/Common/Setting_Init.cs
source/Common/bean/Bean.cs
source/Common/util/HttpHelper.cs
source/Common/util/LogUtil.cs
source/DUOStore/App.config
source/DUOStore/FrmBox.Designer.cs
source/DUOStore/FrmBox.cs
source/DUOStore/FrmIOStatus.Designer.cs
source/DUOStore/FrmIOStatus.cs
source/DUOStore/FrmPwd.cs
source/DUOStore/FrmStore.Designer.cs
source/DUOStore/FrmStore.cs
source/DUOStore/Program.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/StoreConfig/StoreConfig.csv
source/DeviceLibrary/device/halcon/CodeManager.cs
source/DeviceLibrary/duoStore/BoxBean.cs
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
source/DeviceLibrary/duoStore/BoxBean_Shelf.cs
source/DeviceLibrary/duoStore/DUOStoreBean.cs
source/DeviceLibrary/duoStore/DUOStoreBean_LineRunMonitor.cs
source/DeviceLibrary/duoStore/DUOStoreBean_Partial.cs
source/DeviceLibrary/duoStore/EquipBase.cs
source/DeviceLibrary/duoStore/HumitureBean.cs
source/DeviceLibrary/duoStore/StoreManager.cs
source/DeviceLibrary/store/AutoInoutInfo.cs
source/DeviceLibrary/store/InOutParam.cs
source/DeviceLibrary/store/KTK_Store.cs
source/DeviceLibrary/store/StoreStep.cs
source/LoadCVSLibrary/position/CSVPositionReader.cs
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
source/Common/CodeResourceControl.cs
0 → 100644
查看文件 @
e35141b
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Windows.Forms
;
using
System.Windows.Forms.Layout
;
namespace
OnlineStore
{
public
class
CodeResourceControl
{
public
static
readonly
ILog
LOG
=
LogManager
.
GetLogger
(
"LngResource"
);
//public delegate string GetStrDelegate(string id, string defaultStr);
//public static event GetStrDelegate GetStrEvent;
//public delegate string GetStringDelegate(string id, string defaultStr, params object[] param);
//public static event GetStringDelegate GetStringEvent;
public
static
bool
OpenResourceLog
=
false
;
public
static
string
China
=
"zh-CN"
;
public
static
string
English
=
"en-US"
;
//private static Dictionary<string, string> chineseMap = new Dictionary<string, string>();
//private static Dictionary<string, string> englishMap = new Dictionary<string, string>();
private
static
Dictionary
<
string
,
Dictionary
<
string
,
string
>>
LangMap
=
new
Dictionary
<
string
,
Dictionary
<
string
,
string
>>();
public
delegate
string
GetLanguageDelegate
();
public
static
event
GetLanguageDelegate
GetLanguageEvent
;
public
delegate
void
RefreshLanguageDelegate
();
public
static
event
RefreshLanguageDelegate
RefreshLanguageEvent
;
public
static
string
GetLanguage
()
{
if
(
GetLanguageEvent
==
null
)
{
return
China
;
}
string
result
=
GetLanguageEvent
?.
Invoke
();
if
(
result
==
null
)
{
return
""
;
}
return
result
;
}
private
static
string
spiltStr
=
"_"
;
private
static
string
Text
=
"Text"
;
public
static
string
GetTextIdStr
(
string
class
Name
,
string
controlName
)
{
return
class
Name
+
spiltStr
+
controlName
+
spiltStr
+
Text
;
}
public
static
string
GetTextIdStr
(
string
class
Name
)
{
return
class
Name
+
spiltStr
+
Text
;
}
public
static
string
GetString
(
string
id
,
string
defaultStr
)
{
string
strCurLanguage
=
defaultStr
;
var
haslang
=
getLangRes
(
CurrLanguage
);
if
(!
haslang
)
{
return
strCurLanguage
;
}
try
{
LangMap
[
CurrLanguage
].
TryGetValue
(
id
,
out
strCurLanguage
);
if
((
strCurLanguage
==
null
||
strCurLanguage
.
Equals
(
""
))
&&
(!
defaultStr
.
Equals
(
""
)))
{
strCurLanguage
=
defaultStr
;
NoIdLog
(
id
,
defaultStr
);
}
}
catch
(
Exception
ex
)
{
if
(
defaultStr
.
Equals
(
""
))
{
}
else
{
strCurLanguage
=
"No id:["
+
id
+
"], please add."
;
strCurLanguage
=
defaultStr
;
NoIdLog
(
id
,
defaultStr
);
}
}
if
(
strCurLanguage
==
null
)
{
strCurLanguage
=
""
;
}
return
strCurLanguage
;
}
public
static
string
GetString
(
string
id
,
string
defaultStr
,
params
object
[]
param
)
{
string
strCurLanguage
=
GetString
(
id
,
defaultStr
);
return
String
.
Format
(
strCurLanguage
,
param
);
}
private
static
void
NoIdLog
(
string
id
,
string
defaultStr
)
{
if
(
OpenResourceLog
)
{
if
(!
LangMap
[
"zh-CN"
].
ContainsKey
(
id
)
&&
checkInterid
(
id
))
LOG
.
Info
(
"No Res id:"
+
id
+
"#"
+
defaultStr
);
}
}
private
static
bool
checkInterid
(
string
id
)
{
string
[]
interstring
=
new
string
[]
{
"_txt"
,
"_lbl"
};
var
x
=
from
a
in
interstring
where
id
.
IndexOf
(
a
)
>
-
1
select
a
;
return
x
.
Count
()
==
0
;
}
static
CodeResourceControl
()
{
}
private
static
bool
getLangRes
(
string
lang
)
{
if
(!
LangMap
.
ContainsKey
(
lang
))
{
string
path
=
Application
.
StartupPath
+
@"\resources\"+lang+"
.
txt
";
if
(!
File
.
Exists
(
path
))
{
return
false
;
}
string
[]
lines
=
File
.
ReadAllLines
(
path
);
var
map
=
new
Dictionary
<
string
,
string
>();
foreach
(
string
line
in
lines
)
{
string
[]
array
=
line
.
Split
(
'#'
);
if
(
array
.
Length
>=
3
)
{
string
key
=
array
[
0
];
string
chinese
=
array
[
1
];
string
english
=
array
[
2
];
if
(
map
.
ContainsKey
(
key
))
{
map
.
Remove
(
key
);
}
map
.
Add
(
key
,
english
);
}
}
LangMap
.
Add
(
lang
,
map
);
return
true
;
}
return
true
;
}
public
static
string
CurrLanguage
=
""
;
public
static
void
LanguageProcess
(
ContainerControl
cc
,
string
class
Name
)
{
if
(
CurrLanguage
.
Equals
(
CodeResourceControl
.
GetLanguage
()))
{
//return;
}
//string className = cc.ClassName;
CurrLanguage
=
CodeResourceControl
.
GetLanguage
();
string
name
=
CodeResourceControl
.
GetString
(
CodeResourceControl
.
GetTextIdStr
(
class
Name
),
cc
.
Text
);
if
(!
name
.
Equals
(
""
))
{
cc
.
Text
=
name
;
}
PreControlLanaguage
(
cc
,
class
Name
);
RefreshLanguageEvent
?.
Invoke
();
}
private
static
void
PreControlLanaguage
(
Control
partentControl
,
string
class
Name
)
{
//string className = this.ClassName;
Con_GetTxt
(
partentControl
,
out
string
title
);
string
newStr
=
GetString
(
GetTextIdStr
(
class
Name
,
partentControl
.
Name
),
title
);
if
(!
newStr
.
Equals
(
""
))
{
Con_SetTxt
(
partentControl
,
newStr
.
Replace
(
"\\n"
,
"\n"
));
}
foreach
(
Control
con
in
partentControl
.
Controls
)
{
string
txt
=
""
;
bool
haslang
=
false
;
if
(
con
.
Tag
!=
null
&&
con
.
Tag
.
ToString
()
==
"not"
)
{
continue
;
}
if
(
Con_GetTxt
(
con
,
out
txt
))
{
newStr
=
GetString
(
GetTextIdStr
(
class
Name
,
con
.
Name
),
txt
);
if
(!
newStr
.
Equals
(
""
))
{
Con_SetTxt
(
con
,
newStr
.
Replace
(
"\\n"
,
"\n"
));
//haslang = true;
}
}
if
(
con
.
Tag
!=
null
&&
con
.
Tag
.
ToString
()
==
"nochiled"
)
{
continue
;
}
if
(
con
.
Controls
.
Count
>
0
&&
!
haslang
)
{
PreControlLanaguage
(
con
,
class
Name
+
"_"
+
con
.
Name
);
}
//Console.WriteLine(con is IList<Component>);
//Console.WriteLine(con is IList<Component>);
}
}
public
static
void
ProcessListItem
<
T
>(
T
con
,
string
ClassName
)
where
T
:
ToolStripItemCollection
{
for
(
int
i
=
0
;
i
<
con
.
Count
;
i
++)
{
if
(
con
[
i
].
Tag
!=
null
&&
con
[
i
].
Tag
.
ToString
()
==
"not"
)
{
continue
;
}
string
txt
=
con
[
i
].
Text
;
string
newStr
=
GetString
(
GetTextIdStr
(
ClassName
,
con
[
i
].
Name
),
txt
);
if
(!
newStr
.
Equals
(
""
))
{
con
[
i
].
Text
=
newStr
.
Replace
(
"\\n"
,
"\n"
);
//haslang = true;
}
if
(
con
[
i
]
is
ToolStripMenuItem
)
{
var
tt
=
((
ToolStripMenuItem
)
con
[
i
]);
ProcessListItem
(
tt
.
DropDownItems
,
tt
.
Name
);
}
}
}
static
bool
Con_GetTxt
(
Control
con
,
out
string
txt
)
{
txt
=
""
;
if
(
con
is
Label
||
con
is
Button
||
con
is
RadioButton
||
con
is
CheckBox
)
{
txt
=
con
.
Text
;
return
true
;
}
string
methodname
=
getMethodname
(
con
);
var
t
=
con
.
GetType
();
var
p
=
t
.
GetProperty
(
methodname
);
if
(
p
!=
null
)
{
txt
=
p
.
GetValue
(
con
,
null
).
ToString
();
return
true
;
}
return
false
;
}
static
void
Con_SetTxt
(
Control
con
,
string
txt
)
{
if
(
con
is
Label
||
con
is
Button
||
con
is
RadioButton
||
con
is
CheckBox
)
{
con
.
Text
=
txt
;
return
;
}
string
methodname
=
getMethodname
(
con
);
var
t
=
con
.
GetType
();
var
p
=
t
.
GetProperty
(
methodname
);
if
(
p
==
null
)
return
;
else
p
.
SetValue
(
con
,
txt
,
null
);
}
static
string
getMethodname
(
Control
con
)
{
string
methodname
=
"Text"
;
//if (con is UCBtnExt) methodname = "BtnText";
//if (con is UCTextBoxEx) methodname = "InputText";
//if (con is UCCheckBox) methodname = "TextValue";
//if (con is UCPanelTitle || con is FrmWithTitle) methodname = "Title";
//if (con is Form) methodname = "Title";
return
methodname
;
}
}
}
source/Common/Common.csproj
查看文件 @
e35141b
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="bean\Bean.cs" />
<Compile Include="bean\Bean.cs" />
<Compile Include="CodeResourceControl.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Setting_Init.cs" />
<Compile Include="Setting_Init.cs" />
<Compile Include="util\AcSerialBean.cs" />
<Compile Include="util\AcSerialBean.cs" />
...
...
source/Common/Setting_Init.cs
查看文件 @
e35141b
...
@@ -98,6 +98,7 @@ namespace OnlineStore.Common
...
@@ -98,6 +98,7 @@ namespace OnlineStore.Common
public
static
string
CurrShelfNum
=
"CurrShelfNum"
;
public
static
string
CurrShelfNum
=
"CurrShelfNum"
;
public
static
string
CurrShelfType
=
"CurrShelfType"
;
public
static
string
CurrShelfType
=
"CurrShelfType"
;
public
static
string
code_block_size_list
=
"code_block_size_list"
;
public
static
string
yuscan
=
"yuscan"
;
}
}
}
}
source/Common/bean/Bean.cs
查看文件 @
e35141b
...
@@ -236,5 +236,6 @@ namespace OnlineStore.Common
...
@@ -236,5 +236,6 @@ namespace OnlineStore.Common
/// 真实料架号,可能为空
/// 真实料架号,可能为空
/// </summary>
/// </summary>
public
static
string
realRfid
=
"realRfid"
;
public
static
string
realRfid
=
"realRfid"
;
public
static
string
singleOut
=
"singleOut"
;
}
}
}
}
source/Common/util/HttpHelper.cs
查看文件 @
e35141b
此文件的差异被折叠,
点击展开。
source/Common/util/LogUtil.cs
查看文件 @
e35141b
...
@@ -196,6 +196,7 @@ namespace OnlineStore.Common
...
@@ -196,6 +196,7 @@ namespace OnlineStore.Common
{
{
info
(
LOGGER
,
msg
);
info
(
LOGGER
,
msg
);
}
}
[
System
.
Runtime
.
InteropServices
.
DllImport
(
"kernel32.dll"
,
CharSet
=
System
.
Runtime
.
InteropServices
.
CharSet
.
Auto
)]
public
static
extern
void
OutputDebugString
(
string
message
);
}
}
}
}
source/DUOStore/App.config
查看文件 @
e35141b
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
<!--出库等待料盘拿走的时间,秒-->
<!--出库等待料盘拿走的时间,秒-->
<
add
key
=
"OutStoreWaitSeconds"
value
=
"1"
/>
<
add
key
=
"OutStoreWaitSeconds"
value
=
"1"
/>
<!--温控器类型,
0
=壁挂王字壳温湿度变送器,
1
=妙昕温湿度记录仪-->
<!--温控器类型,
0
=壁挂王字壳温湿度变送器,
1
=妙昕温湿度记录仪-->
<
add
key
=
"HumitureControllerType"
value
=
"0"
/>
<
add
key
=
"HumitureControllerType"
value
=
"0"
/>
<
add
key
=
"Default_Language"
value
=
"zh-CN"
/>
<
add
key
=
"UseBuzzer"
value
=
"0"
/>
<
add
key
=
"UseBuzzer"
value
=
"0"
/>
<!--
IO
模块是否主动上传-->
<!--
IO
模块是否主动上传-->
<
add
key
=
"AIOAutoUpload"
value
=
"0"
/>
<
add
key
=
"AIOAutoUpload"
value
=
"0"
/>
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
<
add
key
=
"CurrShelfNum"
value
=
"-1"
/>
<
add
key
=
"CurrShelfNum"
value
=
"-1"
/>
<!--当前料架信息-料架类型,
0
=空料架,
1
=入库料架,
2
=出库料架-->
<!--当前料架信息-料架类型,
0
=空料架,
1
=入库料架,
2
=出库料架-->
<
add
key
=
"CurrShelfType"
value
=
"-1"
/>
<
add
key
=
"CurrShelfType"
value
=
"-1"
/>
<
add
key
=
"Code_Block_Size_List"
value
=
"17,19"
/>
</
appSettings
>
</
appSettings
>
<
log4net
>
<
log4net
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
<
appender
name
=
"RollingLogFileAppender"
type
=
"log4net.Appender.RollingFileAppender"
>
...
@@ -77,6 +78,16 @@
...
@@ -77,6 +78,16 @@
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
layout
>
</
appender
>
</
appender
>
<
appender
name
=
"LngResource"
type
=
"log4net.Appender.RollingFileAppender"
>
<
file
value
=
"logs/LngResource.log"
/>
<
param
name
=
"Encoding"
value
=
"UTF-8"
/>
<
appendToFile
value
=
"true"
/>
<
rollingStyle
value
=
"Date"
/>
<
datePattern
value
=
"yyyy-MM-dd"
/>
<
layout
type
=
"log4net.Layout.PatternLayout"
>
<
conversionPattern
value
=
"[%date][%t]%-5p %m%n"
/>
</
layout
>
</
appender
>
<
logger
name
=
"RollingLogFileAppender"
>
<
logger
name
=
"RollingLogFileAppender"
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
@@ -85,6 +96,10 @@
...
@@ -85,6 +96,10 @@
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"AIOBOX"
/>
<
appender
-
ref
ref
=
"AIOBOX"
/>
</
logger
>
</
logger
>
<
logger
name
=
"LngResource"
>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"LngResource"
/>
</
logger
>
<!--<
root
>
<!--<
root
>
<
level
value
=
"Info"
/>
<
level
value
=
"Info"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
<
appender
-
ref
ref
=
"RollingLogFileAppender"
/>
...
...
source/DUOStore/FrmBox.Designer.cs
查看文件 @
e35141b
此文件的差异被折叠,
点击展开。
source/DUOStore/FrmBox.cs
查看文件 @
e35141b
...
@@ -22,6 +22,7 @@ using UserFromControl;
...
@@ -22,6 +22,7 @@ using UserFromControl;
namespace
OnlineStore.DUOStore
namespace
OnlineStore.DUOStore
{
{
using
crc
=
CodeResourceControl
;
public
partial
class
FrmBox
:
FrmBase
public
partial
class
FrmBox
:
FrmBase
{
{
...
@@ -125,18 +126,18 @@ namespace OnlineStore.DUOStore
...
@@ -125,18 +126,18 @@ namespace OnlineStore.DUOStore
lblMoveInfo
.
Text
=
BoxBean
.
GetMoveStr
();
lblMoveInfo
.
Text
=
BoxBean
.
GetMoveStr
();
if
(
BoxBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
))
if
(
BoxBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
InStore
))
{
{
lblMoveEquipInfo
.
Text
=
"入库:"
+
BoxBean
.
MoveInfo
.
MoveParam
.
ToStr
();
lblMoveEquipInfo
.
Text
=
crc
.
GetString
(
"instore"
,
"入库:"
)
+
BoxBean
.
MoveInfo
.
MoveParam
.
ToStr
();
}
}
else
if
(
BoxBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
))
else
if
(
BoxBean
.
MoveInfo
.
MoveType
.
Equals
(
MoveType
.
OutStore
))
{
{
lblMoveEquipInfo
.
Text
=
"出库:"
+
BoxBean
.
MoveInfo
.
MoveParam
.
ToStr
();
lblMoveEquipInfo
.
Text
=
crc
.
GetString
(
"outstore"
,
"出库:"
)
+
BoxBean
.
MoveInfo
.
MoveParam
.
ToStr
();
}
}
else
else
{
{
lblMoveEquipInfo
.
Text
=
""
;
lblMoveEquipInfo
.
Text
=
""
;
// lblMoveEquipInfo.Text = "";
// lblMoveEquipInfo.Text = "";
}
}
lblCanOut
.
Text
=
StoreManager
.
Store
.
CanOut
()
?
"可出库"
:
"不可出库"
;
lblCanOut
.
Text
=
StoreManager
.
Store
.
CanOut
()
?
crc
.
GetString
(
"can_outstore"
,
"可出库"
)
:
crc
.
GetString
(
"cant_outstore"
,
"不可出库"
)
;
//ReadPosistion();
//ReadPosistion();
if
(
BoxBean
.
runStatus
>
StoreRunStatus
.
Wait
)
if
(
BoxBean
.
runStatus
>
StoreRunStatus
.
Wait
)
{
{
...
@@ -179,9 +180,9 @@ namespace OnlineStore.DUOStore
...
@@ -179,9 +180,9 @@ namespace OnlineStore.DUOStore
{
{
string
msg
=
BoxBean
.
AutoInout
.
autoMsg
;
string
msg
=
BoxBean
.
AutoInout
.
autoMsg
;
lblMsg
.
Text
=
msg
;
lblMsg
.
Text
=
msg
;
if
(
btnStartAuTo
.
Text
.
Equals
(
"开始自动出入库"
))
if
(
btnStartAuTo
.
Text
.
Equals
(
crc
.
GetString
(
"start_autoinout"
,
"开始自动出入库"
)
))
{
{
btnStartAuTo
.
Text
=
"停止自动出入库"
;
btnStartAuTo
.
Text
=
crc
.
GetString
(
"stop_autoinout"
,
"停止自动出入库"
)
;
}
}
try
try
{
{
...
@@ -198,17 +199,17 @@ namespace OnlineStore.DUOStore
...
@@ -198,17 +199,17 @@ namespace OnlineStore.DUOStore
else
else
{
{
// lblMsg.Text = "没有开启自动出入库";
// lblMsg.Text = "没有开启自动出入库";
if
(
btnStartAuTo
.
Text
.
Equals
(
"停止自动出入库"
))
if
(
btnStartAuTo
.
Text
.
Equals
(
crc
.
GetString
(
"stop_autoinout"
,
"停止自动出入库"
)
))
{
{
btnStartAuTo
.
Text
=
"开始自动出入库"
;
btnStartAuTo
.
Text
=
crc
.
GetString
(
"start_autoinout"
,
"开始自动出入库"
)
;
}
}
}
}
}
}
else
else
{
{
lblThisSta
.
Text
=
"等待启动"
;
lblThisSta
.
Text
=
crc
.
GetString
(
"wait_start"
,
"等待启动"
)
;
// lblWarnMsg.Text = "";
// lblWarnMsg.Text = "";
btnStartAuTo
.
Text
=
"开始自动出入库"
;
btnStartAuTo
.
Text
=
crc
.
GetString
(
"start_autoinout"
,
"开始自动出入库"
)
;
}
}
}
}
...
@@ -218,12 +219,12 @@ namespace OnlineStore.DUOStore
...
@@ -218,12 +219,12 @@ namespace OnlineStore.DUOStore
{
{
string
selectPositionNum
=
cmbPosition
.
Text
;
string
selectPositionNum
=
cmbPosition
.
Text
;
LineMoveP
ktk
=
LoadPostion
();
LineMoveP
ktk
=
LoadPostion
();
InOutParam
param
=
new
InOutParam
(
MoveType
.
OutStore
,
""
,
selectPositionNum
,
ktk
);
InOutParam
param
=
new
InOutParam
(
MoveType
.
OutStore
,
"
#test#
"
,
selectPositionNum
,
ktk
);
BoxBean
.
StartOutStoreMove
(
param
);
BoxBean
.
StartOutStoreMove
(
param
);
}
}
else
else
{
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"start_store_first"
,
"请先启动料仓!"
)
);
}
}
}
}
...
@@ -233,11 +234,11 @@ namespace OnlineStore.DUOStore
...
@@ -233,11 +234,11 @@ namespace OnlineStore.DUOStore
{
{
string
selectPositionNum
=
cmbPosition
.
Text
;
string
selectPositionNum
=
cmbPosition
.
Text
;
LineMoveP
ktk
=
LoadPostion
();
LineMoveP
ktk
=
LoadPostion
();
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
MoveType
.
InStore
,
""
,
selectPositionNum
,
ktk
));
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
MoveType
.
InStore
,
"
#test#
"
,
selectPositionNum
,
ktk
));
}
}
else
else
{
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"start_store_first"
,
"请先启动料仓!"
)
);
}
}
}
}
...
@@ -285,7 +286,7 @@ namespace OnlineStore.DUOStore
...
@@ -285,7 +286,7 @@ namespace OnlineStore.DUOStore
txtMiddleP2
.
Text
=
acPosition
.
MiddleAxis_P2
.
ToString
();
txtMiddleP2
.
Text
=
acPosition
.
MiddleAxis_P2
.
ToString
();
int
comP2
=
BoxBean
.
Config
.
GetComP2
(
acPosition
.
BagHigh
);
int
comP2
=
BoxBean
.
Config
.
GetComP2
(
acPosition
.
BagHigh
);
txtComP2
.
Text
=
comP2
.
ToString
();
txtComP2
.
Text
=
comP2
.
ToString
();
lblSize
.
Text
=
"尺寸
:"
+
acPosition
.
BagWidth
+
"*"
+
acPosition
.
BagHigh
;
lblSize
.
Text
=
crc
.
GetString
(
"size"
,
"尺寸"
)+
"
:"
+
acPosition
.
BagWidth
+
"*"
+
acPosition
.
BagHigh
;
}
}
}
}
...
@@ -316,7 +317,7 @@ namespace OnlineStore.DUOStore
...
@@ -316,7 +317,7 @@ namespace OnlineStore.DUOStore
bool
result
=
CSVPositionReader
<
ACBoxPosition
>.
SavePostion
(
positionConfigFile
,
acPosition
);
bool
result
=
CSVPositionReader
<
ACBoxPosition
>.
SavePostion
(
positionConfigFile
,
acPosition
);
if
(!
result
)
if
(!
result
)
{
{
MessageBox
.
Show
(
"库位【"
+
selectPositionNum
+
"】保存失败!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"pos_save_fail"
,
"库位【{0}】保存失败!"
,
selectPositionNum
)
);
}
}
//料仓固定位置保存
//料仓固定位置保存
bool
needUpdate
=
false
;
bool
needUpdate
=
false
;
...
@@ -420,7 +421,7 @@ namespace OnlineStore.DUOStore
...
@@ -420,7 +421,7 @@ namespace OnlineStore.DUOStore
{
{
return
true
;
return
true
;
}
}
MessageBox
.
Show
(
"叉子不在待机位,请先将叉子退回待机位("
+
InOutDefaultPosition
+
")"
,
"警告(叉子在待机位时,才能移动升降轴和旋转轴) "
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Exclamation
);
MessageBox
.
Show
(
crc
.
GetString
(
"fixture_not_onpos_msg"
,
"叉子不在待机位,请先将叉子退回待机位({0})"
,
InOutDefaultPosition
),
crc
.
GetString
(
"fixture_not_onpos_title"
,
"警告(叉子在待机位时,才能移动升降轴和旋转轴)"
)
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Exclamation
);
return
false
;
return
false
;
}
}
...
@@ -532,7 +533,7 @@ namespace OnlineStore.DUOStore
...
@@ -532,7 +533,7 @@ namespace OnlineStore.DUOStore
if
(
BoxBean
.
AutoInout
.
autoNext
)
if
(
BoxBean
.
AutoInout
.
autoNext
)
{
{
BoxBean
.
AutoInout
.
StopAuto
();
BoxBean
.
AutoInout
.
StopAuto
();
btnStartAuTo
.
Text
=
"开始自动出入库"
;
btnStartAuTo
.
Text
=
crc
.
GetString
(
"start_autoinout"
,
"开始自动出入库"
)
;
}
}
else
else
{
{
...
@@ -549,13 +550,13 @@ namespace OnlineStore.DUOStore
...
@@ -549,13 +550,13 @@ namespace OnlineStore.DUOStore
//BoxBean.StartOutStoreMove(new InOutStoreParam("", poText));
//BoxBean.StartOutStoreMove(new InOutStoreParam("", poText));
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
MoveType
.
InStore
,
""
,
poText
));
BoxBean
.
StartInStoreMove
(
new
InOutParam
(
MoveType
.
InStore
,
""
,
poText
));
btnStartAuTo
.
Text
=
"停止自动出入库"
;
btnStartAuTo
.
Text
=
crc
.
GetString
(
"stop_autoinout"
,
"停止自动出入库"
)
;
}
}
}
}
}
}
else
else
{
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"start_store_first"
,
"请先启动料仓!"
)
);
}
}
}
}
private
void
btnAxisP_Click
(
object
sender
,
EventArgs
e
)
private
void
btnAxisP_Click
(
object
sender
,
EventArgs
e
)
...
@@ -587,7 +588,7 @@ namespace OnlineStore.DUOStore
...
@@ -587,7 +588,7 @@ namespace OnlineStore.DUOStore
}
}
else
else
{
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"start_store_first"
,
"请先启动料仓!"
)
);
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -605,7 +606,7 @@ namespace OnlineStore.DUOStore
...
@@ -605,7 +606,7 @@ namespace OnlineStore.DUOStore
}
}
else
else
{
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"start_store_first"
,
"请先启动料仓!"
)
);
}
}
}
}
...
@@ -686,7 +687,7 @@ namespace OnlineStore.DUOStore
...
@@ -686,7 +687,7 @@ namespace OnlineStore.DUOStore
{
{
if
(!
BoxBean
.
IsDebug
)
if
(!
BoxBean
.
IsDebug
)
{
{
DialogResult
result
=
MessageBox
.
Show
(
"是否切换到调试状态?"
,
"是否确认切换"
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
,
MessageBoxDefaultButton
.
Button1
);
DialogResult
result
=
MessageBox
.
Show
(
crc
.
GetString
(
"switch_to_debug_msg"
,
"是否切换到调试状态?"
),
crc
.
GetString
(
"switch_to_debug_title"
,
"是否确认切换"
)
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
,
MessageBoxDefaultButton
.
Button1
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
{
BoxBean
.
IsDebug
=
true
;
BoxBean
.
IsDebug
=
true
;
...
@@ -701,7 +702,7 @@ namespace OnlineStore.DUOStore
...
@@ -701,7 +702,7 @@ namespace OnlineStore.DUOStore
{
{
if
(
BoxBean
.
IsDebug
)
if
(
BoxBean
.
IsDebug
)
{
{
DialogResult
result
=
MessageBox
.
Show
(
"是否切换到正常工作状态?"
,
"是否确认切换"
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
,
MessageBoxDefaultButton
.
Button1
);
DialogResult
result
=
MessageBox
.
Show
(
crc
.
GetString
(
"switch_to_normal_msg"
,
"是否切换到正常工作状态?"
),
crc
.
GetString
(
"switch_to_debug_title"
,
"是否确认切换"
)
,
MessageBoxButtons
.
YesNo
,
MessageBoxIcon
.
Question
,
MessageBoxDefaultButton
.
Button1
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
{
BoxBean
.
IsDebug
=
false
;
BoxBean
.
IsDebug
=
false
;
...
@@ -747,7 +748,7 @@ namespace OnlineStore.DUOStore
...
@@ -747,7 +748,7 @@ namespace OnlineStore.DUOStore
foreach
(
ConfigIO
ioValue
in
BoxBean
.
Config
.
DIList
.
Values
)
foreach
(
ConfigIO
ioValue
in
BoxBean
.
Config
.
DIList
.
Values
)
{
{
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
28
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
28
));
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
ioValue
.
Explain
,
ioValue
.
ProName
);
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
crc
.
GetString
(
ioValue
.
ProName
,
ioValue
.
Explain
)
,
ioValue
.
ProName
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
control
,
0
,
roleindex
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
control
,
0
,
roleindex
);
roleindex
++;
roleindex
++;
DIControlList
.
Add
(
ioValue
.
ProName
,
control
);
DIControlList
.
Add
(
ioValue
.
ProName
,
control
);
...
@@ -759,7 +760,7 @@ namespace OnlineStore.DUOStore
...
@@ -759,7 +760,7 @@ namespace OnlineStore.DUOStore
foreach
(
ConfigIO
ioValue
in
BoxBean
.
Config
.
DOList
.
Values
)
foreach
(
ConfigIO
ioValue
in
BoxBean
.
Config
.
DOList
.
Values
)
{
{
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
28
));
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
28
));
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
ioValue
.
Explain
,
ioValue
.
ProName
);
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
crc
.
GetString
(
ioValue
.
ProName
,
ioValue
.
Explain
)
,
ioValue
.
ProName
);
this
.
tableLayoutPanel2
.
Controls
.
Add
(
control
,
0
,
roleindex
);
this
.
tableLayoutPanel2
.
Controls
.
Add
(
control
,
0
,
roleindex
);
roleindex
++;
roleindex
++;
DOControlList
.
Add
(
ioValue
.
ProName
,
control
);
DOControlList
.
Add
(
ioValue
.
ProName
,
control
);
...
@@ -815,7 +816,7 @@ namespace OnlineStore.DUOStore
...
@@ -815,7 +816,7 @@ namespace OnlineStore.DUOStore
}
}
else
else
{
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"start_store_first"
,
"请先启动料仓!"
)
);
}
}
}
}
...
@@ -830,7 +831,7 @@ namespace OnlineStore.DUOStore
...
@@ -830,7 +831,7 @@ namespace OnlineStore.DUOStore
}
}
else
else
{
{
MessageBox
.
Show
(
"请先启动料仓!"
);
MessageBox
.
Show
(
crc
.
GetString
(
"start_store_first"
,
"请先启动料仓!"
)
);
}
}
}
}
...
...
source/DUOStore/FrmIOStatus.Designer.cs
查看文件 @
e35141b
...
@@ -348,6 +348,7 @@
...
@@ -348,6 +348,7 @@
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
255
,
614
);
this
.
groupBox4
.
Size
=
new
System
.
Drawing
.
Size
(
255
,
614
);
this
.
groupBox4
.
TabIndex
=
104
;
this
.
groupBox4
.
TabIndex
=
104
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
TabStop
=
false
;
this
.
groupBox4
.
Tag
=
"nochiled"
;
this
.
groupBox4
.
Text
=
"DO列表"
;
this
.
groupBox4
.
Text
=
"DO列表"
;
//
//
// tableLayoutPanel2
// tableLayoutPanel2
...
@@ -376,6 +377,7 @@
...
@@ -376,6 +377,7 @@
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
255
,
614
);
this
.
groupBox3
.
Size
=
new
System
.
Drawing
.
Size
(
255
,
614
);
this
.
groupBox3
.
TabIndex
=
103
;
this
.
groupBox3
.
TabIndex
=
103
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Tag
=
"nochiled"
;
this
.
groupBox3
.
Text
=
"DI列表"
;
this
.
groupBox3
.
Text
=
"DI列表"
;
//
//
// tableLayoutPanel1
// tableLayoutPanel1
...
...
source/DUOStore/FrmIOStatus.cs
查看文件 @
e35141b
...
@@ -20,6 +20,7 @@ using System.Threading.Tasks;
...
@@ -20,6 +20,7 @@ using System.Threading.Tasks;
namespace
OnlineStore.DUOStore
namespace
OnlineStore.DUOStore
{
{
using
crc
=
CodeResourceControl
;
public
partial
class
FrmIOStatus
:
FrmBase
public
partial
class
FrmIOStatus
:
FrmBase
{
{
private
int
StoreId
=
1
;
private
int
StoreId
=
1
;
...
@@ -47,7 +48,7 @@ namespace OnlineStore.DUOStore
...
@@ -47,7 +48,7 @@ namespace OnlineStore.DUOStore
//if (ioValue.SubType.Equals(0))
//if (ioValue.SubType.Equals(0))
{
{
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
26
));
this
.
tableLayoutPanel1
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
26
));
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
ioValue
.
Explain
,
ioValue
.
ProName
);
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
crc
.
GetString
(
ioValue
.
ProName
,
ioValue
.
Explain
)
,
ioValue
.
ProName
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
control
,
0
,
roleindex
);
this
.
tableLayoutPanel1
.
Controls
.
Add
(
control
,
0
,
roleindex
);
roleindex
++;
roleindex
++;
...
@@ -63,7 +64,7 @@ namespace OnlineStore.DUOStore
...
@@ -63,7 +64,7 @@ namespace OnlineStore.DUOStore
//if (ioValue.SubType.Equals(0))
//if (ioValue.SubType.Equals(0))
{
{
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
28
));
this
.
tableLayoutPanel2
.
RowStyles
.
Add
(
new
RowStyle
(
SizeType
.
Absolute
,
28
));
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
ioValue
.
Explain
,
ioValue
.
ProName
);
IOTextControl
control
=
new
IOTextControl
(
ioValue
.
ElectricalDefinition
+
"_"
+
crc
.
GetString
(
ioValue
.
ProName
,
ioValue
.
Explain
)
,
ioValue
.
ProName
);
control
.
Click
+=
Control_Click
;
control
.
Click
+=
Control_Click
;
this
.
tableLayoutPanel2
.
Controls
.
Add
(
control
,
0
,
roleindex
);
this
.
tableLayoutPanel2
.
Controls
.
Add
(
control
,
0
,
roleindex
);
roleindex
++;
roleindex
++;
...
@@ -338,13 +339,13 @@ namespace OnlineStore.DUOStore
...
@@ -338,13 +339,13 @@ namespace OnlineStore.DUOStore
private
void
btnLineRun_Click
(
object
sender
,
EventArgs
e
)
private
void
btnLineRun_Click
(
object
sender
,
EventArgs
e
)
{
{
StoreManager
.
Store
.
LineRun
(
null
);
StoreManager
.
Store
.
LineRun
(
null
,
"手动运行"
);
}
}
private
void
btnLineStop_Click
(
object
sender
,
EventArgs
e
)
private
void
btnLineStop_Click
(
object
sender
,
EventArgs
e
)
{
{
StoreManager
.
Store
.
LineStop
(
null
);
StoreManager
.
Store
.
LineStop
(
null
,
"手动停止"
);
}
}
private
void
groupBox1_Enter
(
object
sender
,
EventArgs
e
)
private
void
groupBox1_Enter
(
object
sender
,
EventArgs
e
)
...
...
source/DUOStore/FrmPwd.cs
查看文件 @
e35141b
...
@@ -26,6 +26,7 @@ namespace OnlineStore.DUOStore
...
@@ -26,6 +26,7 @@ namespace OnlineStore.DUOStore
private
void
FrmPwd_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmPwd_Load
(
object
sender
,
EventArgs
e
)
{
{
this
.
DialogResult
=
DialogResult
.
None
;
this
.
DialogResult
=
DialogResult
.
None
;
CodeResourceControl
.
LanguageProcess
(
this
,
this
.
GetType
().
Name
);
}
}
private
void
btnNext_Click
(
object
sender
,
EventArgs
e
)
private
void
btnNext_Click
(
object
sender
,
EventArgs
e
)
...
...
source/DUOStore/FrmStore.Designer.cs
查看文件 @
e35141b
...
@@ -66,13 +66,15 @@
...
@@ -66,13 +66,15 @@
this
.
toolStripSeparator9
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator9
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
帮助
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
帮助
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
版本号
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
版本号
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
语言
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
中文
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
英语
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
notifyIcon1
=
new
System
.
Windows
.
Forms
.
NotifyIcon
(
this
.
components
);
this
.
contextMenuStrip1
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
this
.
contextMenuStrip1
=
new
System
.
Windows
.
Forms
.
ContextMenuStrip
(
this
.
components
);
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
显示
ToolStripMenuItem
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripSeparator8
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripSeparator8
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
tabPage1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
...
@@ -114,7 +116,6 @@
...
@@ -114,7 +116,6 @@
//
//
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
panel1
.
Controls
.
Add
(
this
.
button1
);
this
.
panel1
.
Controls
.
Add
(
this
.
chbInstoreEnd
);
this
.
panel1
.
Controls
.
Add
(
this
.
chbInstoreEnd
);
this
.
panel1
.
Controls
.
Add
(
this
.
chkDebug
);
this
.
panel1
.
Controls
.
Add
(
this
.
chkDebug
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblMoveInfo
);
this
.
panel1
.
Controls
.
Add
(
this
.
lblMoveInfo
);
...
@@ -271,6 +272,7 @@
...
@@ -271,6 +272,7 @@
this
.
logBox
.
Name
=
"logBox"
;
this
.
logBox
.
Name
=
"logBox"
;
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
1098
,
500
);
this
.
logBox
.
Size
=
new
System
.
Drawing
.
Size
(
1098
,
500
);
this
.
logBox
.
TabIndex
=
106
;
this
.
logBox
.
TabIndex
=
106
;
this
.
logBox
.
Tag
=
"not"
;
this
.
logBox
.
Text
=
""
;
this
.
logBox
.
Text
=
""
;
this
.
logBox
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
logBox_VisibleChanged
);
this
.
logBox
.
VisibleChanged
+=
new
System
.
EventHandler
(
this
.
logBox_VisibleChanged
);
//
//
...
@@ -294,7 +296,8 @@
...
@@ -294,7 +296,8 @@
this
.
menuStrip1
.
Items
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
menuStrip1
.
Items
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
操作
ToolStripMenuItem
,
this
.
操作
ToolStripMenuItem
,
this
.
设置
TToolStripMenuItem
,
this
.
设置
TToolStripMenuItem
,
this
.
帮助
ToolStripMenuItem
});
this
.
帮助
ToolStripMenuItem
,
this
.
语言
ToolStripMenuItem
});
this
.
menuStrip1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
menuStrip1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
menuStrip1
.
Name
=
"menuStrip1"
;
this
.
menuStrip1
.
Name
=
"menuStrip1"
;
this
.
menuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
1308
,
29
);
this
.
menuStrip1
.
Size
=
new
System
.
Drawing
.
Size
(
1308
,
29
);
...
@@ -387,38 +390,38 @@
...
@@ -387,38 +390,38 @@
// toolStripMenuItem2
// toolStripMenuItem2
//
//
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Name
=
"toolStripMenuItem2"
;
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
60
,
26
);
this
.
toolStripMenuItem2
.
Size
=
new
System
.
Drawing
.
Size
(
1
92
,
26
);
this
.
toolStripMenuItem2
.
Text
=
"启用调试"
;
this
.
toolStripMenuItem2
.
Text
=
"启用调试"
;
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
this
.
toolStripMenuItem2
.
Click
+=
new
System
.
EventHandler
(
this
.
toolStripMenuItem2_Click
);
//
//
// toolStripSeparator6
// toolStripSeparator6
//
//
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Name
=
"toolStripSeparator6"
;
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
1
57
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
1
89
,
6
);
//
//
// 二维码学习ToolStripMenuItem
// 二维码学习ToolStripMenuItem
//
//
this
.
二维码学习
ToolStripMenuItem
.
Name
=
"二维码学习ToolStripMenuItem"
;
this
.
二维码学习
ToolStripMenuItem
.
Name
=
"二维码学习ToolStripMenuItem"
;
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
60
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
92
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Text
=
"二维码
学习
"
;
this
.
二维码学习
ToolStripMenuItem
.
Text
=
"二维码
识别测试
"
;
this
.
二维码学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
this
.
二维码学习
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
二维码学习
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator7
// toolStripSeparator7
//
//
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Name
=
"toolStripSeparator7"
;
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
1
57
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
1
89
,
6
);
//
//
// 扫码测试ToolStripMenuItem
// 扫码测试ToolStripMenuItem
//
//
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Name
=
"扫码测试ToolStripMenuItem"
;
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
60
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
92
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Text
=
"扫码测试"
;
this
.
扫码测试
ToolStripMenuItem
.
Text
=
"扫码测试"
;
this
.
扫码测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码测试
ToolStripMenuItem_Click
);
this
.
扫码测试
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
扫码测试
ToolStripMenuItem_Click
);
//
//
// toolStripSeparator9
// toolStripSeparator9
//
//
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Name
=
"toolStripSeparator9"
;
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
1
57
,
6
);
this
.
toolStripSeparator9
.
Size
=
new
System
.
Drawing
.
Size
(
1
89
,
6
);
//
//
// 帮助ToolStripMenuItem
// 帮助ToolStripMenuItem
//
//
...
@@ -435,6 +438,31 @@
...
@@ -435,6 +438,31 @@
this
.
版本号
ToolStripMenuItem
.
Text
=
"关于软件"
;
this
.
版本号
ToolStripMenuItem
.
Text
=
"关于软件"
;
this
.
版本号
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
版本号
ToolStripMenuItem_Click
);
this
.
版本号
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
版本号
ToolStripMenuItem_Click
);
//
//
// 语言ToolStripMenuItem
//
this
.
语言
ToolStripMenuItem
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
中文
ToolStripMenuItem
,
this
.
英语
ToolStripMenuItem
});
this
.
语言
ToolStripMenuItem
.
Name
=
"语言ToolStripMenuItem"
;
this
.
语言
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
54
,
25
);
this
.
语言
ToolStripMenuItem
.
Text
=
"语言"
;
//
// 中文ToolStripMenuItem
//
this
.
中文
ToolStripMenuItem
.
Name
=
"中文ToolStripMenuItem"
;
this
.
中文
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
中文
ToolStripMenuItem
.
Tag
=
"not"
;
this
.
中文
ToolStripMenuItem
.
Text
=
"中文"
;
this
.
中文
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
中文
ToolStripMenuItem_Click
);
//
// 英语ToolStripMenuItem
//
this
.
英语
ToolStripMenuItem
.
Name
=
"英语ToolStripMenuItem"
;
this
.
英语
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
26
);
this
.
英语
ToolStripMenuItem
.
Tag
=
"not"
;
this
.
英语
ToolStripMenuItem
.
Text
=
"English"
;
this
.
英语
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
英语
ToolStripMenuItem_Click
);
//
// notifyIcon1
// notifyIcon1
//
//
this
.
notifyIcon1
.
ContextMenuStrip
=
this
.
contextMenuStrip1
;
this
.
notifyIcon1
.
ContextMenuStrip
=
this
.
contextMenuStrip1
;
...
@@ -477,19 +505,6 @@
...
@@ -477,19 +505,6 @@
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
//
// button1
//
this
.
button1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)));
this
.
button1
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
490
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
105
,
35
);
this
.
button1
.
TabIndex
=
272
;
this
.
button1
.
Text
=
"测试"
;
this
.
button1
.
UseVisualStyleBackColor
=
false
;
this
.
button1
.
Click
+=
new
System
.
EventHandler
(
this
.
button1_Click
);
//
// FrmStore
// FrmStore
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
@@ -566,7 +581,9 @@
...
@@ -566,7 +581,9 @@
private
System
.
Windows
.
Forms
.
Label
lblMoveInfo
;
private
System
.
Windows
.
Forms
.
Label
lblMoveInfo
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
Panel
panel1
;
private
System
.
Windows
.
Forms
.
CheckBox
chbInstoreEnd
;
private
System
.
Windows
.
Forms
.
CheckBox
chbInstoreEnd
;
private
System
.
Windows
.
Forms
.
Button
button1
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
语言
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
中文
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
英语
ToolStripMenuItem
;
}
}
}
}
source/DUOStore/FrmStore.cs
查看文件 @
e35141b
...
@@ -20,6 +20,7 @@ using UserFromControl;
...
@@ -20,6 +20,7 @@ using UserFromControl;
namespace
OnlineStore.DUOStore
namespace
OnlineStore.DUOStore
{
{
using
crc
=
CodeResourceControl
;
internal
partial
class
FrmStore
:
Form
internal
partial
class
FrmStore
:
Form
{
{
public
static
DUOStoreBean
store
=
null
;
public
static
DUOStoreBean
store
=
null
;
...
@@ -34,8 +35,23 @@ namespace OnlineStore.DUOStore
...
@@ -34,8 +35,23 @@ namespace OnlineStore.DUOStore
startTimer
.
Enabled
=
false
;
startTimer
.
Enabled
=
false
;
startTimer
.
AutoReset
=
false
;
startTimer
.
AutoReset
=
false
;
Control
.
CheckForIllegalCrossThreadCalls
=
false
;
Control
.
CheckForIllegalCrossThreadCalls
=
false
;
this
.
Shown
+=
FrmStore_Shown
;
CodeResourceControl
.
GetLanguageEvent
+=
CodeResourceControl_GetLanguageEvent
;
}
}
private
string
CodeResourceControl_GetLanguageEvent
()
{
return
ConfigAppSettings
.
GetValue
(
"Default_Language"
);
}
private
void
FrmStore_Shown
(
object
sender
,
EventArgs
e
)
{
//return;
crc
.
LanguageProcess
(
this
,
this
.
GetType
().
Name
);
crc
.
ProcessListItem
<
ToolStripItemCollection
>(
contextMenuStrip1
.
Items
,
"contextMenuStrip1"
);
crc
.
ProcessListItem
<
ToolStripItemCollection
>(
menuStrip1
.
Items
,
"toolStripMenuItem1"
);
}
private
void
FrmMain_Load
(
object
sender
,
EventArgs
e
)
private
void
FrmMain_Load
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -52,10 +68,10 @@ namespace OnlineStore.DUOStore
...
@@ -52,10 +68,10 @@ namespace OnlineStore.DUOStore
{
{
FrmBox
frm
=
new
FrmBox
();
FrmBox
frm
=
new
FrmBox
();
frm
.
BoxBean
=
box
;
frm
.
BoxBean
=
box
;
AddForm
(
box
.
Name
,
frm
);
AddForm
(
box
.
Name
,
frm
,
box
.
Name
.
Trim
()
);
}
}
AddForm
(
" 取料提升机构 "
,
new
FrmAxisMove
());
AddForm
(
" 取料提升机构 "
,
new
FrmAxisMove
()
,
"store"
);
AddForm
(
" IO状态查看 "
,
new
FrmIOStatus
());
AddForm
(
" IO状态查看 "
,
new
FrmIOStatus
()
,
"io"
);
chbAutoRun
.
Checked
=
store
.
UseBuzzer
;
chbAutoRun
.
Checked
=
store
.
UseBuzzer
;
this
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
this
.
Text
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
App_Title
);
...
@@ -64,6 +80,9 @@ namespace OnlineStore.DUOStore
...
@@ -64,6 +80,9 @@ namespace OnlineStore.DUOStore
chbInstoreEnd
.
Checked
=
store
.
InstoreEndSendShelf
;
chbInstoreEnd
.
Checked
=
store
.
InstoreEndSendShelf
;
chbOutstoreEnd
.
Checked
=
store
.
OutstoreEndSendShelf
;
chbOutstoreEnd
.
Checked
=
store
.
OutstoreEndSendShelf
;
LoadOk
=
true
;
LoadOk
=
true
;
logBox
.
Visible
=
false
;
btnClearLog
.
Visible
=
false
;
btnCopyLog
.
Visible
=
false
;
LogUtil
.
logBox
=
this
.
logBox
;
LogUtil
.
logBox
=
this
.
logBox
;
this
.
timer1
.
Start
();
this
.
timer1
.
Start
();
}
}
...
@@ -74,10 +93,11 @@ namespace OnlineStore.DUOStore
...
@@ -74,10 +93,11 @@ namespace OnlineStore.DUOStore
}
}
}
}
private
void
AddForm
(
string
text
,
Form
form
)
private
void
AddForm
(
string
text
,
Form
form
,
string
name
)
{
{
text
=
text
.
PadLeft
(
12
,
' '
);
text
=
text
.
PadLeft
(
12
,
' '
);
TabPage
lineTabPage
=
new
TabPage
(
text
);
TabPage
lineTabPage
=
new
TabPage
(
text
);
lineTabPage
.
Name
=
name
;
lineTabPage
.
AutoScroll
=
true
;
lineTabPage
.
AutoScroll
=
true
;
// lineTabPage.Tag = lineBean;
// lineTabPage.Tag = lineBean;
Panel
linePan
=
new
Panel
();
Panel
linePan
=
new
Panel
();
...
@@ -99,11 +119,11 @@ namespace OnlineStore.DUOStore
...
@@ -99,11 +119,11 @@ namespace OnlineStore.DUOStore
private
void
LoadListView
()
private
void
LoadListView
()
{
{
this
.
listView1
.
Columns
.
Clear
();
this
.
listView1
.
Columns
.
Clear
();
AddHealder
(
"名称"
,
90
);
AddHealder
(
crc
.
GetString
(
"table_name"
,
"名称"
)
,
90
);
AddHealder
(
"启用"
,
50
);
AddHealder
(
crc
.
GetString
(
"table_enable"
,
"启用"
)
,
50
);
AddHealder
(
"报警"
,
130
);
AddHealder
(
crc
.
GetString
(
"table_alarm"
,
"报警"
)
,
130
);
AddHealder
(
"状态"
,
110
);
AddHealder
(
crc
.
GetString
(
"table_state"
,
"状态"
)
,
110
);
AddHealder
(
"料盘信息"
,
listView1
.
Size
.
Width
-
110
-
130
-
50
-
90
-
10
);
AddHealder
(
crc
.
GetString
(
"table_reelinfo"
,
"料盘信息"
)
,
listView1
.
Size
.
Width
-
110
-
130
-
50
-
90
-
10
);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
AddRow
(
store
,
false
);
AddRow
(
store
,
false
);
...
@@ -247,7 +267,7 @@ namespace OnlineStore.DUOStore
...
@@ -247,7 +267,7 @@ namespace OnlineStore.DUOStore
private
void
ExitApp
()
private
void
ExitApp
()
{
{
DialogResult
result
=
MessageBox
.
Show
(
"是否确定退出DUO料仓客户端?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
DialogResult
result
=
MessageBox
.
Show
(
crc
.
GetString
(
"confirm_exit_app_msg"
,
"是否确定退出DUO料仓客户端?"
),
crc
.
GetString
(
"confirm_exit_app_title"
,
"提示"
)
,
MessageBoxButtons
.
YesNo
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
{
//如果料仓还在运行状态,先关闭料仓
//如果料仓还在运行状态,先关闭料仓
...
@@ -308,7 +328,7 @@ namespace OnlineStore.DUOStore
...
@@ -308,7 +328,7 @@ namespace OnlineStore.DUOStore
{
{
if
(
store
.
runStatus
!=
StoreRunStatus
.
Wait
)
if
(
store
.
runStatus
!=
StoreRunStatus
.
Wait
)
{
{
MessageBox
.
Show
(
store
.
Name
+
"当前状态:"
+
store
.
runStatus
+
",不能启动!"
);
MessageBox
.
Show
(
store
.
Name
+
crc
.
GetString
(
"current_state_is_cant_start"
,
"当前状态:{0},不能启动!"
,
store
.
runStatus
)
);
return
;
return
;
}
}
LogUtil
.
info
(
"开始启动"
);
LogUtil
.
info
(
"开始启动"
);
...
@@ -374,7 +394,7 @@ namespace OnlineStore.DUOStore
...
@@ -374,7 +394,7 @@ namespace OnlineStore.DUOStore
{
{
if
(
store
.
runStatus
.
Equals
(
StoreRunStatus
.
Wait
))
if
(
store
.
runStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
{
MessageBox
.
Show
(
store
.
Name
+
"DUO料仓未启动,不需要停止"
);
MessageBox
.
Show
(
store
.
Name
+
crc
.
GetString
(
"duostore_is_not_running_cant_stop"
,
"DUO料仓未启动,不需要停止"
)
);
return
;
return
;
}
}
if
(
store
!=
null
)
if
(
store
!=
null
)
...
@@ -389,7 +409,7 @@ namespace OnlineStore.DUOStore
...
@@ -389,7 +409,7 @@ namespace OnlineStore.DUOStore
{
{
if
(
store
.
runStatus
.
Equals
(
StoreRunStatus
.
Wait
))
if
(
store
.
runStatus
.
Equals
(
StoreRunStatus
.
Wait
))
{
{
MessageBox
.
Show
(
store
.
Name
+
"DUO料仓未启动,无法复位"
);
MessageBox
.
Show
(
store
.
Name
+
crc
.
GetString
(
"duostore_is_not_running_cant_reset"
,
"DUO料仓未启动,无法复位"
)
);
return
;
return
;
}
}
store
.
Reset
();
store
.
Reset
();
...
@@ -463,18 +483,18 @@ namespace OnlineStore.DUOStore
...
@@ -463,18 +483,18 @@ namespace OnlineStore.DUOStore
string
type
=
""
;
string
type
=
""
;
if
(
store
.
CurrShelfType
.
Equals
(
0
))
if
(
store
.
CurrShelfType
.
Equals
(
0
))
{
{
type
=
"空料架"
;
type
=
crc
.
GetString
(
"empty_shelf"
,
"空料架"
);
}
}
else
if
(
store
.
CurrShelfType
.
Equals
(
1
))
else
if
(
store
.
CurrShelfType
.
Equals
(
1
))
{
{
type
=
"入库料架"
;
type
=
crc
.
GetString
(
"instore_shelf"
,
"入库料架"
)
;
}
}
else
if
(
store
.
CurrShelfType
.
Equals
(
2
))
else
if
(
store
.
CurrShelfType
.
Equals
(
2
))
{
{
type
=
"出库料架"
;
type
=
crc
.
GetString
(
"outstore_shelf"
,
"出库料架"
)
;
}
}
lblShelf
.
Text
=
"当前"
+
type
+
":"
+
store
.
CurrShelfNum
;
lblShelf
.
Text
=
crc
.
GetString
(
"current_shelf"
,
"当前"
)
+
type
+
":"
+
store
.
CurrShelfNum
;
string
msg
=
""
;
string
msg
=
""
;
foreach
(
BoxBean
box
in
store
.
BoxMap
.
Values
)
foreach
(
BoxBean
box
in
store
.
BoxMap
.
Values
)
{
{
...
@@ -484,6 +504,8 @@ namespace OnlineStore.DUOStore
...
@@ -484,6 +504,8 @@ namespace OnlineStore.DUOStore
msg
+=
box
.
Name
+
":"
+
s
+
"\r"
;
msg
+=
box
.
Name
+
":"
+
s
+
"\r"
;
}
}
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
store
.
WarnMsg
))
msg
+=
store
.
Name
+
":"
+
store
.
WarnMsg
+
"\r"
;
UpdateListBox
();
UpdateListBox
();
lblWarnMsg
.
Text
=
msg
;
lblWarnMsg
.
Text
=
msg
;
LogM
();
LogM
();
...
@@ -536,6 +558,7 @@ namespace OnlineStore.DUOStore
...
@@ -536,6 +558,7 @@ namespace OnlineStore.DUOStore
{
{
FrmAbout
about
=
new
FrmAbout
();
FrmAbout
about
=
new
FrmAbout
();
about
.
ShowDialog
();
about
.
ShowDialog
();
crc
.
LanguageProcess
(
about
,
about
.
GetType
().
Name
);
}
}
private
void
二维码学习
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
private
void
二维码学习
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
...
@@ -545,7 +568,8 @@ namespace OnlineStore.DUOStore
...
@@ -545,7 +568,8 @@ namespace OnlineStore.DUOStore
Camera
.
_cam
.
CloseAll
();
Camera
.
_cam
.
CloseAll
();
}
}
CodeLibrary
.
FrmCodeDecode
frm
=
new
CodeLibrary
.
FrmCodeDecode
();
CodeLibrary
.
FrmCodeDecode
frm
=
new
CodeLibrary
.
FrmCodeDecode
();
frm
.
ShowDialog
();
frm
.
Show
();
crc
.
LanguageProcess
(
frm
,
frm
.
GetType
().
Name
);
}
}
...
@@ -561,7 +585,7 @@ namespace OnlineStore.DUOStore
...
@@ -561,7 +585,7 @@ namespace OnlineStore.DUOStore
private
void
toolStripMenuItem2_Click
(
object
sender
,
EventArgs
e
)
private
void
toolStripMenuItem2_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
toolStripMenuItem2
.
Text
.
Equals
(
"启用调试"
))
if
(
toolStripMenuItem2
.
Text
.
Equals
(
crc
.
GetString
(
"设置TToolStripMenuItem_toolStripMenuItem2_Text"
,
"启用调试"
)
))
{
{
DebugOpen
(
true
);
DebugOpen
(
true
);
}
}
...
@@ -603,11 +627,11 @@ namespace OnlineStore.DUOStore
...
@@ -603,11 +627,11 @@ namespace OnlineStore.DUOStore
if
(
isopen
)
if
(
isopen
)
{
{
toolStripMenuItem2
.
Text
=
"禁用调试"
;
toolStripMenuItem2
.
Text
=
crc
.
GetString
(
"menu_disable_debug"
,
"启用调试"
)
;
}
}
else
else
{
{
toolStripMenuItem2
.
Text
=
"启用调试"
;
toolStripMenuItem2
.
Text
=
crc
.
GetString
(
"设置TToolStripMenuItem_toolStripMenuItem2_Text"
,
"启用调试"
)
;
}
}
}
}
...
@@ -669,13 +693,13 @@ namespace OnlineStore.DUOStore
...
@@ -669,13 +693,13 @@ namespace OnlineStore.DUOStore
{
{
result
+=
s
+
"\r\n"
;
result
+=
s
+
"\r\n"
;
}
}
MessageBox
.
Show
(
"扫到二维码
:"
+
result
);
MessageBox
.
Show
(
crc
.
GetString
(
"has_scan_qecode"
,
"扫到二维码"
)+
"
:"
+
result
);
LogUtil
.
info
(
"扫到二维码:"
+
result
);
LogUtil
.
info
(
"扫到二维码:"
+
result
);
}
}
else
else
{
{
MessageBox
.
Show
(
"未扫到二维码"
);
MessageBox
.
Show
(
crc
.
GetString
(
"hasnot_scan_qecode"
,
"未扫到二维码"
)
);
}
}
}
}
...
@@ -710,12 +734,6 @@ namespace OnlineStore.DUOStore
...
@@ -710,12 +734,6 @@ namespace OnlineStore.DUOStore
}
}
private
async
void
button1_Click
(
object
sender
,
EventArgs
e
)
{
int
contentLength
=
await
AccessTheWebAsync
();
this
.
logBox
.
Text
+=
$
"\r\nLength of the downloaded string: {contentLength}.\r\n"
;
}
async
Task
<
int
>
AccessTheWebAsync
()
async
Task
<
int
>
AccessTheWebAsync
()
{
{
// You need to add a reference to System.Net.Http to declare client.
// You need to add a reference to System.Net.Http to declare client.
...
@@ -745,5 +763,17 @@ namespace OnlineStore.DUOStore
...
@@ -745,5 +763,17 @@ namespace OnlineStore.DUOStore
Console
.
WriteLine
(
"Working ... .... "
);
Console
.
WriteLine
(
"Working ... .... "
);
this
.
logBox
.
Text
+=
$
"\r\nWorking ... .... .\r\n"
;
this
.
logBox
.
Text
+=
$
"\r\nWorking ... .... .\r\n"
;
}
}
private
void
英语
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
ConfigAppSettings
.
SaveValue
(
"Default_Language"
,
"en-US"
);
FrmStore_Shown
(
this
,
EventArgs
.
Empty
);
}
private
void
中文
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
ConfigAppSettings
.
SaveValue
(
"Default_Language"
,
"zh-CN"
);
FrmStore_Shown
(
this
,
EventArgs
.
Empty
);
}
}
}
}
}
source/DUOStore/Program.cs
查看文件 @
e35141b
...
@@ -14,6 +14,8 @@ namespace OnlineStore.DUOStore
...
@@ -14,6 +14,8 @@ namespace OnlineStore.DUOStore
{
{
static
class
Program
static
class
Program
{
{
#
region
方法四:使用的
Win32
函数的声明
#
region
方法四:使用的
Win32
函数的声明
/// <summary>
/// <summary>
...
@@ -53,10 +55,12 @@ namespace OnlineStore.DUOStore
...
@@ -53,10 +55,12 @@ namespace OnlineStore.DUOStore
[
STAThread
]
[
STAThread
]
static
void
Main
(
string
[]
Args
)
static
void
Main
(
string
[]
Args
)
{
{
//string path = @"http://localhost:4090/rest/api/v1/station/status";
//string path = @"http://localhost:4090/rest/api/v1/station/status";
//HttpHelper.PostOperation(path, new Operation());
//HttpHelper.PostOperation(path, new Operation());
//var a = DeviceLibrary.InOutParam.GetPosStoreId("4#AC3_17_3_22");
Application
.
ThreadException
+=
new
System
.
Threading
.
ThreadExceptionEventHandler
(
Application_ThreadException
);
Application
.
ThreadException
+=
new
System
.
Threading
.
ThreadExceptionEventHandler
(
Application_ThreadException
);
AppDomain
.
CurrentDomain
.
UnhandledException
+=
new
UnhandledExceptionEventHandler
(
CurrentDomain_UnhandledException
);
AppDomain
.
CurrentDomain
.
UnhandledException
+=
new
UnhandledExceptionEventHandler
(
CurrentDomain_UnhandledException
);
// 因为方法三只能是最小化的窗体显示出来,如果隐藏到托盘中则不能把运行的程序显示出来
// 因为方法三只能是最小化的窗体显示出来,如果隐藏到托盘中则不能把运行的程序显示出来
...
@@ -94,6 +98,9 @@ namespace OnlineStore.DUOStore
...
@@ -94,6 +98,9 @@ namespace OnlineStore.DUOStore
}
}
}
}
}
}
Environment
.
CurrentDirectory
=
Application
.
StartupPath
;
CodeResourceControl
.
OpenResourceLog
=
true
;
CodeResourceControl
.
CurrLanguage
=
CodeResourceControl
.
China
;
if
(!
isShow
)
if
(!
isShow
)
{
{
XmlConfigurator
.
Configure
();
XmlConfigurator
.
Configure
();
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
e35141b
...
@@ -74,6 +74,7 @@
...
@@ -74,6 +74,7 @@
<Compile Include="duoStore\BoxBean.cs" />
<Compile Include="duoStore\BoxBean.cs" />
<Compile Include="duoStore\BoxBean_Partial.cs" />
<Compile Include="duoStore\BoxBean_Partial.cs" />
<Compile Include="duoStore\BoxBean_Shelf.cs" />
<Compile Include="duoStore\BoxBean_Shelf.cs" />
<Compile Include="duoStore\DUOStoreBean_LineRunMonitor.cs" />
<Compile Include="duoStore\DUOStoreBean_Partial.cs" />
<Compile Include="duoStore\DUOStoreBean_Partial.cs" />
<Compile Include="duoStore\EquipBase.cs" />
<Compile Include="duoStore\EquipBase.cs" />
<Compile Include="duoStore\HoisterCylinder.cs" />
<Compile Include="duoStore\HoisterCylinder.cs" />
...
...
source/DeviceLibrary/StoreConfig/StoreConfig.csv
查看文件 @
e35141b
...
@@ -59,8 +59,8 @@ DI,2,右侧出料口安全光栅,OutDoor_SafeSignal,10,PRO_AIO_IP_2,X31,,,,,,,,,,
...
@@ -59,8 +59,8 @@ DI,2,右侧出料口安全光栅,OutDoor_SafeSignal,10,PRO_AIO_IP_2,X31,,,,,,,,,,
DI,2,右侧暂存区料盘检测,InDoor_Check,11,PRO_AIO_IP_2,X32,,,,,,,,,,
DI,2,右侧暂存区料盘检测,InDoor_Check,11,PRO_AIO_IP_2,X32,,,,,,,,,,
DI,2,右侧出料口门上升/打开端,OutDoor_Up,12,PRO_AIO_IP_2,X33,,,,,,,,,,
DI,2,右侧出料口门上升/打开端,OutDoor_Up,12,PRO_AIO_IP_2,X33,,,,,,,,,,
DI,2,右侧出料口门下降/关闭端,OutDoor_Down,13,PRO_AIO_IP_2,X34,,,,,,,,,,
DI,2,右侧出料口门下降/关闭端,OutDoor_Down,13,PRO_AIO_IP_2,X34,,,,,,,,,,
DI,2,右侧料叉料盘检测,
OutDoor_Check,15
,PRO_AIO_IP_2,X35,,,,,,,,,,
DI,2,右侧料叉料盘检测,
Fixture_Check,14
,PRO_AIO_IP_2,X35,,,,,,,,,,
DI,2,右侧出料口料盘检测,
Fixture_Check,14
,PRO_AIO_IP_2,X36,,,,,,,,,,
DI,2,右侧出料口料盘检测,
OutDoor_Check,15
,PRO_AIO_IP_2,X36,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,2,右侧料仓伺服ON,Axis_Run,0,PRO_AIO_IP_2,Y21,,,,,,,,,,
DO,2,右侧料仓伺服ON,Axis_Run,0,PRO_AIO_IP_2,Y21,,,,,,,,,,
DO,0,取料机构伺服ON,MoveAxis_Run,1,PRO_AIO_IP_2,Y22,,,,,,,,,,
DO,0,取料机构伺服ON,MoveAxis_Run,1,PRO_AIO_IP_2,Y22,,,,,,,,,,
...
@@ -139,5 +139,5 @@ PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,,,,,,
...
@@ -139,5 +139,5 @@ PRO,,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,是否调试状态(1=调试,0=正常),IsDebug,1,,,,,,,,,,,,
PRO,0,是否调试状态(1=调试,0=正常),IsDebug,1,,,,,,,,,,,,
PRO,,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,,
PRO,,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,,
PRO,,所有料仓的CID(用#号分隔),All_CIDs,duo-1,duo-2,,,,,,,,,,,
,
PRO,,所有料仓的CID(用#号分隔),All_CIDs,duo-1,duo-2,,,,,,,,,,,
PRO,,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00E45255378)#,,,,,,,,,,,,
PRO,,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00E45255378)#,,,,,,,,,,,,
source/DeviceLibrary/device/halcon/CodeManager.cs
查看文件 @
e35141b
...
@@ -17,16 +17,34 @@ namespace OnlineStore.DeviceLibrary
...
@@ -17,16 +17,34 @@ namespace OnlineStore.DeviceLibrary
public
static
List
<
string
>
codeTypeList
=
new
List
<
string
>();
public
static
List
<
string
>
codeTypeList
=
new
List
<
string
>();
//public static List<string> balserNameList = new List<string>();
//public static List<string> balserNameList = new List<string>();
public
static
List
<
string
>
hikNameList
=
new
List
<
string
>();
public
static
List
<
string
>
hikNameList
=
new
List
<
string
>();
public
static
List
<
int
>
Code_Block_Size_List
=
new
List
<
int
>();
private
static
char
spiltChar
=
'#'
;
private
static
char
spiltChar
=
'#'
;
/// <summary>
/// <summary>
/// 初始化摄像机名称和二维码类型
/// 初始化摄像机名称和二维码类型
/// </summary>
/// </summary>
public
static
void
LoadConfig
()
public
static
void
LoadConfig
()
{
{
HDLogUtil
.
LogName
=
"RollingLogFileAppender"
;
string
code_block_size_list
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
code_block_size_list
);
var
cl
=
code_block_size_list
.
Split
(
','
);
foreach
(
string
s
in
cl
)
{
int
i
;
if
(
int
.
TryParse
(
s
,
out
i
))
{
Code_Block_Size_List
.
Add
(
i
);
}
}
if
(
Code_Block_Size_List
.
Count
==
0
)
Code_Block_Size_List
.
Add
(
19
);
LogUtil
.
info
(
"加载到配置二维码块尺寸:"
+
string
.
Join
(
","
,
Code_Block_Size_List
));
string
codeStr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CodeType
);
string
codeStr
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
CodeType
);
codeTypeList
=
new
List
<
string
>();
codeTypeList
=
new
List
<
string
>();
HDLogUtil
.
LogName
=
"RollingLogFileAppender"
;
try
try
{
{
string
[]
codeArray
=
codeStr
.
Split
(
spiltChar
);
string
[]
codeArray
=
codeStr
.
Split
(
spiltChar
);
...
@@ -141,23 +159,28 @@ namespace OnlineStore.DeviceLibrary
...
@@ -141,23 +159,28 @@ namespace OnlineStore.DeviceLibrary
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
List
<
CodeInfo
>
cc
=
new
List
<
CodeInfo
>();
string
r
=
""
;
string
r
=
""
;
foreach
(
int
codesize
in
Code_Block_Size_List
)
{
//if (codeList.Count > 0)
// break;
List
<
CodeInfo
>
tlci
=
EyemDecode
.
Decoder
(
ref
bmp
,
null
,
15
);
List
<
CodeInfo
>
tlci
=
EyemDecode
.
Decoder
(
ref
bmp
,
null
,
codesize
);
foreach
(
CodeInfo
code
in
tlci
)
foreach
(
CodeInfo
code
in
tlci
)
{
LogUtil
.
info
(
" 【"
+
cameraName
+
"】[eyemDecode]"
+
code
.
CodeType
+
"(X: "
+
code
.
X
+
",Y: "
+
code
.
Y
+
") "
+
code
.
CodeStr
);
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
);
lock
(
codeList
)
{
{
if
(!
codeList
.
Contains
(
str
))
LogUtil
.
info
(
" 【"
+
cameraName
+
$
"】[eyemDecode blocksize:{codesize}]"
+
code
.
CodeType
+
"(X: "
+
code
.
X
+
",Y: "
+
code
.
Y
+
") "
+
code
.
CodeStr
);
string
str
=
CodeManager
.
ReplaceCode
(
code
.
CodeStr
);
lock
(
codeList
)
{
{
codeList
.
Add
(
str
);
if
(!
codeList
.
Contains
(
str
))
r
=
r
+
"##"
+
str
;
{
codeList
.
Add
(
str
);
r
=
r
+
"##"
+
str
;
}
}
}
}
}
}
}
/*
foreach
(
string
codeType
in
codeTypeList
)
foreach
(
string
codeType
in
codeTypeList
)
{
{
//判断是否是一维码
//判断是否是一维码
...
@@ -179,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -179,7 +202,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
}
}
*/
if
(
String
.
IsNullOrEmpty
(
r
))
if
(
String
.
IsNullOrEmpty
(
r
))
{
{
SaveImageToFile
(
deviceName
,
cameraName
,
bmp
);
SaveImageToFile
(
deviceName
,
cameraName
,
bmp
);
...
...
source/DeviceLibrary/duoStore/BoxBean.cs
查看文件 @
e35141b
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/duoStore/BoxBean_Partial.cs
查看文件 @
e35141b
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/duoStore/BoxBean_Shelf.cs
查看文件 @
e35141b
...
@@ -240,6 +240,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -240,6 +240,9 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
logName
+
" 成功"
);
LogUtil
.
info
(
logName
+
" 成功"
);
return
true
;
return
true
;
}
}
else
{
LogUtil
.
info
(
logName
+
"发送:【"
+
JsonHelper
.
SerializeObject
(
operation
)
+
"】,服务器返回:"
+
JsonHelper
.
SerializeObject
(
resultOperation
));
}
break
;
break
;
}
}
}
}
...
@@ -264,6 +267,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -264,6 +267,7 @@ namespace OnlineStore.DeviceLibrary
string
[]
plateHArray
=
data
[
ParamDefine
.
plateH
].
Split
(
splitChar
);
string
[]
plateHArray
=
data
[
ParamDefine
.
plateH
].
Split
(
splitChar
);
bool
urgentReel
=
FormUtil
.
GetBoolData
(
data
,
ParamDefine
.
urgentReel
);
bool
urgentReel
=
FormUtil
.
GetBoolData
(
data
,
ParamDefine
.
urgentReel
);
bool
singleOut
=
FormUtil
.
GetBoolData
(
data
,
ParamDefine
.
singleOut
);
//bool cutReel = FormUtil.GetBoolData(data, ParamDefine.cutReel);
//bool cutReel = FormUtil.GetBoolData(data, ParamDefine.cutReel);
//bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel);
//bool smallReel = FormUtil.GetBoolData(data, ParamDefine.smallReel);
//string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : "";
//string rfid = data.ContainsKey(ParamDefine.rfid) ? data[ParamDefine.rfid] : "";
...
@@ -287,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -287,7 +291,7 @@ namespace OnlineStore.DeviceLibrary
index
++;
index
++;
int
plateW
=
Convert
.
ToInt32
(
plateWArray
[
index
]);
int
plateW
=
Convert
.
ToInt32
(
plateWArray
[
index
]);
int
plateH
=
Convert
.
ToInt32
(
plateHArray
[
index
]);
int
plateH
=
Convert
.
ToInt32
(
plateHArray
[
index
]);
InOutParam
inoutParam
=
new
InOutParam
(
MoveType
.
OutStore
,
barcode
,
posId
,
plateW
,
plateH
,
(
urgentReel
?
1
:
0
));
InOutParam
inoutParam
=
new
InOutParam
(
MoveType
.
OutStore
,
barcode
,
posId
,
plateW
,
plateH
,
(
(
urgentReel
||
singleOut
)
?
1
:
0
));
//根据发送的posId获取位置列表
//根据发送的posId获取位置列表
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
posId
);
...
...
source/DeviceLibrary/duoStore/DUOStoreBean.cs
查看文件 @
e35141b
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/duoStore/DUOStoreBean_LineRunMonitor.cs
0 → 100644
查看文件 @
e35141b
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Timers
;
namespace
OnlineStore.DeviceLibrary
{
partial
class
DUOStoreBean
{
Timer
lineTimer
=
null
;
Dictionary
<
string
,
DateTime
>
linrunlist
=
new
Dictionary
<
string
,
DateTime
>();
void
LineInit
()
{
if
(
lineTimer
==
null
)
{
lineTimer
=
new
Timer
(
300
);
lineTimer
.
Elapsed
+=
LineTimer_Elapsed
;
lineTimer
.
Start
();
GC
.
KeepAlive
(
lineTimer
);
}
}
private
void
LineTimer_Elapsed
(
object
sender
,
ElapsedEventArgs
e
)
{
lock
(
linrunlist
)
{
if
(
canStopLine
(
out
_
)
&&
IOValue
(
IO_Type
.
Line_Run
).
Equals
(
IO_VALUE
.
HIGH
))
{
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
LOW
);
LogUtil
.
info
(
Name
+
$
" 线体管理器 停止线体."
);
}
}
}
/// <summary>
/// 控制线体运转
/// </summary>
/// <param name="id">需求方标识</param>
/// <param name="seconds">秒数</param>
void
LineRun
(
string
id
,
int
seconds
,
string
parentname
=
""
)
{
LineInit
();
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
HIGH
);
lock
(
linrunlist
)
{
IOMove
(
IO_Type
.
Line_Run
,
IO_VALUE
.
HIGH
);
if
(!
string
.
IsNullOrEmpty
(
id
)
&&
seconds
>
0
)
{
if
(
linrunlist
.
ContainsKey
(
id
))
linrunlist
[
id
]
=
DateTime
.
Now
.
AddSeconds
(
seconds
);
else
{
linrunlist
.
Add
(
id
,
DateTime
.
Now
.
AddSeconds
(
seconds
));
}
LogUtil
.
info
(
Name
+
$
" 线体管理器 {id},{parentname} 请求链条运行 {seconds}秒."
);
}
}
}
void
LineStop
(
string
id
=
""
,
string
parentname
=
""
)
{
lock
(
linrunlist
)
{
if
(!
string
.
IsNullOrEmpty
(
id
))
{
if
(
linrunlist
.
ContainsKey
(
id
))
linrunlist
.
Remove
(
id
);
LogUtil
.
info
(
Name
+
$
" 线体管理器 {id},{parentname} 请求立刻停止线体."
);
}
}
if
(!
canStopLine
(
out
string
msg
))
LogUtil
.
info
(
Name
+
$
" {msg}"
);
// IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
}
bool
canStopLine
(
out
string
msg
)
{
msg
=
""
;
bool
canStop
=
true
;
lock
(
linrunlist
)
{
foreach
(
var
x
in
linrunlist
.
ToList
())
{
if
(
x
.
Value
>
DateTime
.
Now
)
{
canStop
=
false
;
msg
=
Name
+
$
" 线体管理器 {x.Key} 不允许停止线体 需求停止时间 {x.Value.ToString()}."
;
//LogUtil.info(Name + $" {x.Key} 不允许停止线体 需求停止时间 {x.Value.ToString()}.");
}
else
{
LogUtil
.
info
(
Name
+
$
" 线体管理器 {x.Key} 请求时间已过期,删除."
);
linrunlist
.
Remove
(
x
.
Key
);
}
}
}
return
canStop
;
}
}
}
source/DeviceLibrary/duoStore/DUOStoreBean_Partial.cs
查看文件 @
e35141b
此文件的差异被折叠,
点击展开。
source/DeviceLibrary/duoStore/EquipBase.cs
查看文件 @
e35141b
...
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
...
@@ -10,6 +10,7 @@ using System.Threading.Tasks;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
using
crc
=
CodeResourceControl
;
public
abstract
class
EquipBase
:
KTK_Store
public
abstract
class
EquipBase
:
KTK_Store
{
{
internal
int
logType
=
1000
;
internal
int
logType
=
1000
;
...
@@ -155,7 +156,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -155,7 +156,8 @@ namespace OnlineStore.DeviceLibrary
//}
//}
if
(
value
==
1
)
if
(
value
==
1
)
{
{
WarnMsg
=
Name
+
" 运动轴"
+
axisInfo
.
Config
.
Explain
+
"报警"
;
//WarnMsg = Name + " 运动轴" + axisInfo.Config.Explain + "报警";
WarnMsg
=
Name
+
" "
+
crc
.
GetString
(
"axis_alarm"
,
"运动轴{0}报警"
,
axisInfo
.
Config
.
Explain
);
Alarm
(
AlarmType
.
AxisAlarm
,
GetAlarmCodeByAxis
(
axisInfo
.
Config
).
ToString
(),
WarnMsg
,
MoveType
.
None
);
Alarm
(
AlarmType
.
AxisAlarm
,
GetAlarmCodeByAxis
(
axisInfo
.
Config
).
ToString
(),
WarnMsg
,
MoveType
.
None
);
isInAlarm
=
true
;
isInAlarm
=
true
;
}
}
...
@@ -240,7 +242,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -240,7 +242,8 @@ namespace OnlineStore.DeviceLibrary
else
if
(
span
.
TotalMilliseconds
>
timeOutMs
&&
NoAlarm
())
else
if
(
span
.
TotalMilliseconds
>
timeOutMs
&&
NoAlarm
())
{
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
;
//WarnMsg = Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "] 等待(" + io.DisplayStr + "=" + wait.IoValue + ") 超时";
WarnMsg
=
crc
.
GetString
(
"WarnMsg_io_timeout"
,
"{0}[{1}][2]等待{3}={4}超时"
,
Name
,
MoveInfo
.
MoveType
,
MoveInfo
.
MoveStep
,
io
.
DisplayStr
,
wait
.
IoValue
);
Alarm
(
AlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
MoveInfo
.
MoveType
);
Alarm
(
AlarmType
.
IoSingleTimeOut
,
io
.
ElectricalDefinition
,
WarnMsg
,
MoveInfo
.
MoveType
);
LogUtil
.
error
(
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
logType
+
14
);
LogUtil
.
error
(
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"] 等待("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
logType
+
14
);
if
(!
MoveInfo
.
OneWaitCanEndStep
)
if
(!
MoveInfo
.
OneWaitCanEndStep
)
...
@@ -282,8 +285,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -282,8 +285,8 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
span
.
TotalSeconds
>
MoveInfo
.
TimeOutSeconds
)
else
if
(
span
.
TotalSeconds
>
MoveInfo
.
TimeOutSeconds
)
{
{
WarnMsg
=
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待"
+
NotOkMsg
//WarnMsg = Name + "[" + MoveInfo.MoveType + "][" + MoveInfo.MoveStep + "]等待" + NotOkMsg + "超时[" + Math.Round(span.TotalSeconds, 1) + "]秒";
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
crc
.
GetString
(
"WarnMsg_timeout"
,
"{0}[{1}][2]等待{3}超时[{4}]秒"
,
Name
,
MoveInfo
.
MoveType
,
MoveInfo
.
MoveStep
,
NotOkMsg
,
Math
.
Round
(
span
.
TotalSeconds
,
1
))
;
int
second
=
10
;
int
second
=
10
;
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
second
=
(
int
)(
MoveInfo
.
TimeOutSeconds
/
span
.
TotalSeconds
)
*
10
;
...
@@ -309,9 +312,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -309,9 +312,9 @@ namespace OnlineStore.DeviceLibrary
public
string
GetMoveStr
()
public
string
GetMoveStr
()
{
{
string
msg
=
""
;
string
msg
=
""
;
msg
+=
"状态
: "
+
runStatus
+
" "
+
storeStatus
+
"\n"
;
msg
+=
crc
.
GetString
(
"table_state"
,
"状态"
)+
"
: "
+
runStatus
+
" "
+
storeStatus
+
"\n"
;
// msg += "lineS: " + storeStatus + "\n";
// msg += "lineS: " + storeStatus + "\n";
msg
+=
"报警
: "
+
alarmType
+
"\n"
;
msg
+=
crc
.
GetString
(
"table_alarm"
,
"报警"
)+
"
: "
+
alarmType
+
"\n"
;
msg
+=
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
SLog
+
"\n"
;
msg
+=
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
SLog
+
"\n"
;
return
msg
;
return
msg
;
}
}
...
...
source/DeviceLibrary/duoStore/HumitureBean.cs
查看文件 @
e35141b
...
@@ -82,7 +82,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -82,7 +82,9 @@ namespace OnlineStore.DeviceLibrary
{
{
humidity
=
param
.
Humidity
;
humidity
=
param
.
Humidity
;
temp
=
param
.
Temperate
;
temp
=
param
.
Temperate
;
LastData
=
param
;
currTempStr
=
Name
+
(
"湿度:"
+
humidity
.
ToString
()
+
",温度:"
+
temp
);
currTempStr
=
Name
+
(
"湿度:"
+
humidity
.
ToString
()
+
",温度:"
+
temp
);
LogUtil
.
OutputDebugString
(
currTempStr
);
}
}
//double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList());
//double currMaxHumidity = HumitureServer.GetMaxHumidity(Config.GetTempAddrList());
double
currMaxHumidity
=
param
.
Humidity
;
double
currMaxHumidity
=
param
.
Humidity
;
...
...
source/DeviceLibrary/duoStore/StoreManager.cs
查看文件 @
e35141b
...
@@ -21,6 +21,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -21,6 +21,7 @@ namespace OnlineStore.DeviceLibrary
public
static
Dictionary
<
int
,
BaseConfig
>
AllConfigMap
=
null
;
public
static
Dictionary
<
int
,
BaseConfig
>
AllConfigMap
=
null
;
private
static
bool
isInit
=
false
;
private
static
bool
isInit
=
false
;
public
static
bool
IsConnectServer
=
!
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
).
Equals
(
""
);
public
static
bool
IsConnectServer
=
!
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
).
Equals
(
""
);
public
StoreManager
()
public
StoreManager
()
{
{
}
}
...
@@ -218,42 +219,39 @@ namespace OnlineStore.DeviceLibrary
...
@@ -218,42 +219,39 @@ namespace OnlineStore.DeviceLibrary
p
.
UpDown_P2
=
box
.
Config
.
UpDownAxis_P2
;
p
.
UpDown_P2
=
box
.
Config
.
UpDownAxis_P2
;
// p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7;
// p.UpDown_P7 = box.Config.UpDownAxis_DoorOBPosition_P7;
if
(
param
.
TargetPosition
==
1
)
{
p
.
ComPress_P2
=
box
.
Config
.
GetComP2
(
param
.
PlateH
);
p
.
ComPress_P3
=
box
.
Config
.
CompAxis_P3
;
}
else
{
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
param
.
PosID
);
if
(
position
==
null
)
{
if
(
movetype
.
Equals
(
MoveType
.
InStore
)
&&
param
.
TargetPosition
.
Equals
(
1
))
{
return
true
;
}
LogUtil
.
error
(
box
.
Name
+
"GetPositon["
+
param
.
PosID
+
"]=null,没有库位不能执行出入库"
);
return
false
;
}
p
.
ComPress_P2
=
box
.
Config
.
GetComP2
(
param
.
PlateH
);
p
.
ComPress_P3
=
box
.
Config
.
CompAxis_P3
;
if
(
param
.
PlateH
<=
0
)
ACBoxPosition
position
=
CSVPositionReader
<
ACBoxPosition
>.
GetPositon
(
param
.
PosID
);
{
if
(
position
==
null
)
param
.
PlateH
=
position
.
BagHigh
;
{
}
if
(
movetype
.
Equals
(
MoveType
.
InStore
)
&&
param
.
TargetPosition
.
Equals
(
1
))
if
(
param
.
PlateW
<=
0
)
{
{
param
.
PlateW
=
position
.
BagWidth
;
param
.
MoveP
=
p
;
return
true
;
}
}
p
.
ComPress_P2
=
box
.
Config
.
GetComP2
(
position
.
BagHigh
);
LogUtil
.
error
(
box
.
Name
+
"GetPositon["
+
param
.
PosID
+
"]=null,没有库位不能执行出入库"
);
p
.
ComPress_P3
=
box
.
Config
.
CompAxis_P3
;
return
false
;
p
.
InOut_P3
=
position
.
InoutAxis_P3
;
}
p
.
Middle_P2
=
position
.
MiddleAxis_P2
;
if
(
param
.
PlateH
<=
0
)
p
.
UpDown_P3
=
position
.
UpdownAxis_IH_P3
;
{
p
.
UpDown_P4
=
position
.
UpdownAxis_IL_P4
;
param
.
PlateH
=
position
.
BagHigh
;
p
.
UpDown_P5
=
position
.
UpdownAxis_OH_P5
;
p
.
UpDown_P6
=
position
.
UpdownAxis_OL_P6
;
}
}
if
(
param
.
PlateW
<=
0
)
{
param
.
PlateW
=
position
.
BagWidth
;
}
//p.ComPress_P3 = position.ComAxis_P3;
p
.
InOut_P3
=
position
.
InoutAxis_P3
;
p
.
Middle_P2
=
position
.
MiddleAxis_P2
;
p
.
UpDown_P3
=
position
.
UpdownAxis_IH_P3
;
p
.
UpDown_P4
=
position
.
UpdownAxis_IL_P4
;
p
.
UpDown_P5
=
position
.
UpdownAxis_OH_P5
;
p
.
UpDown_P6
=
position
.
UpdownAxis_OL_P6
;
param
.
MoveP
=
p
;
param
.
MoveP
=
p
;
...
@@ -323,7 +321,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -323,7 +321,7 @@ namespace OnlineStore.DeviceLibrary
// 取消任务地址: /cancelPutInTask //参数: barcode
// 取消任务地址: /cancelPutInTask //参数: barcode
private
static
string
Addr_cancelPutInTask
=
"/
rest/api/qisda/devic
e/cancelPutInTask"
;
private
static
string
Addr_cancelPutInTask
=
"/
service/stor
e/cancelPutInTask"
;
public
static
string
cancelPutInTask
(
string
deviceName
,
string
barcode
)
public
static
string
cancelPutInTask
(
string
deviceName
,
string
barcode
)
{
{
string
msg
=
""
;
string
msg
=
""
;
...
@@ -384,7 +382,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -384,7 +382,8 @@ namespace OnlineStore.DeviceLibrary
string
cids
=
""
;
string
cids
=
""
;
foreach
(
int
k
in
Store
.
BoxMap
.
Keys
)
foreach
(
int
k
in
Store
.
BoxMap
.
Keys
)
{
{
if
(
Store
.
BoxMap
[
k
].
runStatus
>
StoreRunStatus
.
Wait
&&
Store
.
BoxMap
[
k
].
IOValue
(
IO_Type
.
InDoor_Check
).
Equals
(
IO_VALUE
.
LOW
))
//if (Store.BoxMap[k].runStatus > StoreRunStatus.Wait && Store.BoxMap[k].IOValue(IO_Type.InDoor_Check).Equals(IO_VALUE.LOW))
if
(!
Store
.
BoxMap
[
k
].
IsDebug
&&
!
Store
.
BoxMap
[
k
].
Disabled
&&
Store
.
BoxMap
[
k
].
runStatus
>
StoreRunStatus
.
Wait
)
{
{
cids
+=
Store
.
BoxMap
[
k
].
CID
+
","
;
cids
+=
Store
.
BoxMap
[
k
].
CID
+
","
;
}
}
...
...
source/DeviceLibrary/store/AutoInoutInfo.cs
查看文件 @
e35141b
...
@@ -55,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -55,7 +55,7 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(
storeMoveType
.
Equals
(
MoveType
.
InStore
))
if
(
storeMoveType
.
Equals
(
MoveType
.
InStore
))
{
{
int
newIndex
=
positionIndex
-
Jiange
;
int
newIndex
=
positionIndex
;
if
(
newIndex
<
0
)
if
(
newIndex
<
0
)
{
{
if
(
startIndex
>=
0
&&
startIndex
<
boxBean
.
PositionNumList
.
Count
)
if
(
startIndex
>=
0
&&
startIndex
<
boxBean
.
PositionNumList
.
Count
)
...
@@ -92,7 +92,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -92,7 +92,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
storeMoveType
.
Equals
(
MoveType
.
OutStore
))
else
if
(
storeMoveType
.
Equals
(
MoveType
.
OutStore
))
{
{
int
newIndex
=
positionIndex
;
int
newIndex
=
positionIndex
-
Jiange
;
if
(
newIndex
<
0
)
if
(
newIndex
<
0
)
{
{
if
(
startIndex
>=
0
&&
startIndex
<
boxBean
.
PositionNumList
.
Count
)
if
(
startIndex
>=
0
&&
startIndex
<
boxBean
.
PositionNumList
.
Count
)
...
...
source/DeviceLibrary/store/InOutParam.cs
查看文件 @
e35141b
...
@@ -12,6 +12,7 @@ using System.Text;
...
@@ -12,6 +12,7 @@ using System.Text;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
using
crc
=
CodeResourceControl
;
public
class
InOutParam
public
class
InOutParam
{
{
/// <summary>
/// <summary>
...
@@ -112,11 +113,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -112,11 +113,15 @@ namespace OnlineStore.DeviceLibrary
string
[]
arr
=
posId
.
Split
(
'#'
);
string
[]
arr
=
posId
.
Split
(
'#'
);
if
(
arr
.
Length
>=
2
)
if
(
arr
.
Length
>=
2
)
{
{
return
int
.
Parse
(
arr
[
0
]);
var
p
=
int
.
Parse
(
arr
[
1
].
Substring
(
2
,
1
));
}
switch
(
p
)
{
else
case
3
:
{
return
1
;
return
int
.
Parse
(
posId
.
Substring
(
2
,
2
));
case
4
:
return
2
;
default
:
return
p
;
}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -130,23 +135,23 @@ namespace OnlineStore.DeviceLibrary
...
@@ -130,23 +135,23 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(
InStoreNg
)
if
(
InStoreNg
)
{
{
return
" 入库失败
[BOX_"
+
TargetBox
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
return
crc
.
GetString
(
"instore_fail"
,
" 入库失败"
)+
"
[BOX_"
+
TargetBox
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
}
}
else
else
{
{
if
(
moveType
.
Equals
(
MoveType
.
InStore
))
if
(
moveType
.
Equals
(
MoveType
.
InStore
))
{
{
return
" 入库
["
+
PosID
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
return
crc
.
GetString
(
"instore"
,
" 入库"
)+
"
["
+
PosID
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
}
}
else
else
{
{
if
(
TargetPosition
.
Equals
(
1
))
if
(
TargetPosition
.
Equals
(
0
))
{
{
return
" 批量出库
["
+
PosID
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
return
crc
.
GetString
(
"batch_outstore"
,
" 批量出库"
)+
"
["
+
PosID
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
}
}
else
else
{
{
return
" 单盘出库
["
+
PosID
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
return
crc
.
GetString
(
"single_outstore"
,
" 单盘出库"
)+
"
["
+
PosID
+
"] ["
+
WareCode
+
"], ["
+
PlateW
+
"x"
+
PlateH
+
"] "
;
}
}
}
}
}
}
...
...
source/DeviceLibrary/store/KTK_Store.cs
查看文件 @
e35141b
using
DeviceLib
;
using
CodeLibrary
;
using
DeviceLib
;
using
log4net
;
using
log4net
;
using
OnlineStore.Common
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
OnlineStore.LoadCSVLibrary
;
...
@@ -12,6 +13,7 @@ using System.Threading.Tasks;
...
@@ -12,6 +13,7 @@ using System.Threading.Tasks;
namespace
OnlineStore.DeviceLibrary
namespace
OnlineStore.DeviceLibrary
{
{
using
crc
=
CodeResourceControl
;
/// <summary>
/// <summary>
/// 康泰克单台自动料仓
/// 康泰克单台自动料仓
/// </summary>
/// </summary>
...
@@ -243,7 +245,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -243,7 +245,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 开始出库运动
/// 开始出库运动
/// </summary>
/// </summary>
public
abstract
bool
StartOutStoreMove
(
InOutParam
param
);
public
abstract
bool
StartOutStoreMove
(
InOutParam
param
,
bool
shelfisready
=
false
);
protected
abstract
void
OutStoreProcess
();
protected
abstract
void
OutStoreProcess
();
#
endregion
#
endregion
...
@@ -259,24 +261,24 @@ namespace OnlineStore.DeviceLibrary
...
@@ -259,24 +261,24 @@ namespace OnlineStore.DeviceLibrary
public
string
GetRunStr
()
public
string
GetRunStr
()
{
{
string
sta
=
"运行中"
;
string
sta
=
crc
.
GetString
(
"state_running"
,
"运行中"
)
;
string
aa
=
""
;
string
aa
=
""
;
switch
(
runStatus
)
switch
(
runStatus
)
{
{
case
StoreRunStatus
.
Busy
:
case
StoreRunStatus
.
Busy
:
sta
=
"忙碌"
;
sta
=
crc
.
GetString
(
"state_busy"
,
"忙碌"
)
;
break
;
break
;
case
StoreRunStatus
.
HomeMoving
:
case
StoreRunStatus
.
HomeMoving
:
sta
=
"原点返回"
;
sta
=
crc
.
GetString
(
"state_homereset"
,
"原点返回"
)
;
break
;
break
;
case
StoreRunStatus
.
Reset
:
case
StoreRunStatus
.
Reset
:
sta
=
"重置"
;
sta
=
crc
.
GetString
(
"state_reset"
,
"重置"
)
;
break
;
break
;
case
StoreRunStatus
.
Runing
:
case
StoreRunStatus
.
Runing
:
sta
=
"运行中"
;
sta
=
crc
.
GetString
(
"state_running"
,
"运行中"
)
;
break
;
break
;
case
StoreRunStatus
.
Wait
:
case
StoreRunStatus
.
Wait
:
sta
=
"等待启动"
;
sta
=
crc
.
GetString
(
"state_waitforstart"
,
"等待启动"
)
;
break
;
break
;
}
}
if
(
runStatus
>
StoreRunStatus
.
Wait
)
if
(
runStatus
>
StoreRunStatus
.
Wait
)
...
@@ -285,37 +287,37 @@ namespace OnlineStore.DeviceLibrary
...
@@ -285,37 +287,37 @@ namespace OnlineStore.DeviceLibrary
switch
(
storeStatus
)
switch
(
storeStatus
)
{
{
case
StoreStatus
.
Debugging
:
case
StoreStatus
.
Debugging
:
aa
=
"设备调试中"
;
aa
=
crc
.
GetString
(
"state_device_debug"
,
"设备调试中"
)
;
break
;
break
;
case
StoreStatus
.
InStoreEnd
:
case
StoreStatus
.
InStoreEnd
:
aa
=
"料盘入仓位完成"
;
aa
=
crc
.
GetString
(
"state_inpos_finish"
,
"料盘入仓位完成"
)
;
break
;
break
;
case
StoreStatus
.
InStoreExecute
:
case
StoreStatus
.
InStoreExecute
:
aa
=
"入库执行中"
;
aa
=
crc
.
GetString
(
"state_instore_process"
,
"入库执行中"
)
;
break
;
break
;
case
StoreStatus
.
InTrouble
:
case
StoreStatus
.
InTrouble
:
aa
=
"故障中"
;
aa
=
crc
.
GetString
(
"state_device_fail"
,
"故障中"
)
;
break
;
break
;
case
StoreStatus
.
OutStoreBoxEnd
:
case
StoreStatus
.
OutStoreBoxEnd
:
aa
=
"料盘出仓位完成"
;
aa
=
crc
.
GetString
(
"state_outpos_finish"
,
"料盘出仓位完成"
)
;
break
;
break
;
case
StoreStatus
.
OutStoreExecute
:
case
StoreStatus
.
OutStoreExecute
:
aa
=
"出库执行中"
;
aa
=
crc
.
GetString
(
"state_outstore_process"
,
"出库执行中"
)
;
break
;
break
;
case
StoreStatus
.
StoreOnline
:
case
StoreStatus
.
StoreOnline
:
aa
=
"设备联机"
;
aa
=
crc
.
GetString
(
"state_device_online"
,
"设备联机"
)
;
break
;
break
;
case
StoreStatus
.
SuddenStop
:
case
StoreStatus
.
SuddenStop
:
aa
=
"急停中"
;
aa
=
crc
.
GetString
(
"state_scramming"
,
"急停中"
)
;
break
;
break
;
case
StoreStatus
.
OutMoveExecute
:
case
StoreStatus
.
OutMoveExecute
:
aa
=
"出库完成"
;
aa
=
crc
.
GetString
(
"state_outstore_finish"
,
"出库完成"
)
;
break
;
break
;
case
StoreStatus
.
InStoreFaild
:
case
StoreStatus
.
InStoreFaild
:
aa
=
"入库失败("
+
WarnMsg
+
")"
;
aa
=
crc
.
GetString
(
"state_inpos_fail_with_reason"
,
"入库失败({0})"
,
WarnMsg
)
;
break
;
break
;
case
StoreStatus
.
OutStoreFaild
:
case
StoreStatus
.
OutStoreFaild
:
aa
=
"出库失败("
+
WarnMsg
+
")"
;
aa
=
crc
.
GetString
(
"state_outpos_fail_with_reason"
,
"出库失败({0})"
,
WarnMsg
)
;
break
;
break
;
}
}
if
(!
aa
.
Equals
(
""
))
if
(!
aa
.
Equals
(
""
))
...
...
source/DeviceLibrary/store/StoreStep.cs
查看文件 @
e35141b
...
@@ -427,7 +427,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -427,7 +427,8 @@ namespace OnlineStore.DeviceLibrary
/// 料盘移栽:获取库位号完成,升降轴到料门口高点,旋转轴到料仓门口
/// 料盘移栽:获取库位号完成,升降轴到料门口高点,旋转轴到料仓门口
/// </summary>
/// </summary>
LI_22_ToBoxDoor
,
LI_22_ToBoxDoor
,
LI_22a_ToBoxDoor
,
LI_22b_ToBoxDoor
,
/// <summary>
/// <summary>
/// 料盘移栽: 升降轴到料门口低点,开始预扫码
/// 料盘移栽: 升降轴到料门口低点,开始预扫码
/// </summary>
/// </summary>
...
@@ -602,6 +603,12 @@ namespace OnlineStore.DeviceLibrary
...
@@ -602,6 +603,12 @@ namespace OnlineStore.DeviceLibrary
///送出料架, 流水线停止转动,
///送出料架, 流水线停止转动,
/// </summary>
/// </summary>
LO_37_LineStop
,
LO_37_LineStop
,
BOX_H03_OtherAxisHome_wait
,
BOX_H03_SendOut_01
,
BOX_H03_SendOut_02
,
BOX_H03_SendOut_03
,
BOX_H03_SendOut_04
,
BOX_H03_SendOut_05
,
#
endregion
#
endregion
...
...
source/LoadCVSLibrary/position/CSVPositionReader.cs
查看文件 @
e35141b
...
@@ -198,7 +198,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -198,7 +198,7 @@ namespace OnlineStore.LoadCSVLibrary
}
}
else
else
{
{
if
(
array
.
Length
=
=
titleIndex
.
Count
)
if
(
array
.
Length
>
=
titleIndex
.
Count
)
{
{
if
(
csvIndex
<
0
)
if
(
csvIndex
<
0
)
{
{
...
...
source/LoadCVSLibrary/storeConfig/CSVConfigReader.cs
查看文件 @
e35141b
...
@@ -8,6 +8,7 @@ using System.Text;
...
@@ -8,6 +8,7 @@ using System.Text;
namespace
OnlineStore.LoadCSVLibrary
namespace
OnlineStore.LoadCSVLibrary
{
{
using
crc
=
CodeResourceControl
;
public
class
CSVConfigReader
:
CSVReaderBase
public
class
CSVConfigReader
:
CSVReaderBase
{
{
private
static
Dictionary
<
Type
,
Dictionary
<
string
,
string
>>
allItemProTitleMap
=
null
;
private
static
Dictionary
<
Type
,
Dictionary
<
string
,
string
>>
allItemProTitleMap
=
null
;
...
@@ -111,6 +112,10 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -111,6 +112,10 @@ namespace OnlineStore.LoadCSVLibrary
}
}
else
else
{
{
if
(
proName
==
"Explain"
&&
(
array
[
0
]==
"AXIS"
||
array
[
0
]
==
"DI"
||
array
[
0
]
==
"DO"
))
{
value
=
crc
.
GetString
(
array
[
3
],
value
);
}
prop
.
SetValue
(
bllIns
,
Convert
.
ChangeType
(
value
,
prop
.
PropertyType
),
null
);
//赋值****在这里需要考虑类型问题
prop
.
SetValue
(
bllIns
,
Convert
.
ChangeType
(
value
,
prop
.
PropertyType
),
null
);
//赋值****在这里需要考虑类型问题
}
}
}
}
...
...
source/LoadCVSLibrary/storeConfig/ConfigItemBase.cs
查看文件 @
e35141b
...
@@ -8,6 +8,7 @@ using System.Text;
...
@@ -8,6 +8,7 @@ using System.Text;
namespace
OnlineStore.LoadCSVLibrary
namespace
OnlineStore.LoadCSVLibrary
{
{
using
crc
=
CodeResourceControl
;
public
class
ConfigBase
public
class
ConfigBase
{
{
/// <summary>
/// <summary>
...
@@ -168,7 +169,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -168,7 +169,7 @@ namespace OnlineStore.LoadCSVLibrary
io
.
ElectricalDefinition
=
this
.
ElectricalDefinition
;
io
.
ElectricalDefinition
=
this
.
ElectricalDefinition
;
io
.
ProType
=
this
.
ProType
;
io
.
ProType
=
this
.
ProType
;
io
.
SubType
=
this
.
SubType
;
io
.
SubType
=
this
.
SubType
;
io
.
Explain
=
this
.
Explain
;
io
.
Explain
=
crc
.
GetString
(
ProName
,
Explain
)
;
io
.
ProValue
=
this
.
ProValue
;
io
.
ProValue
=
this
.
ProValue
;
io
.
ProName
=
this
.
ProName
+
suffix
;
io
.
ProName
=
this
.
ProName
+
suffix
;
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论