Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
ACSingleStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 316aad3f
由
LN
编写于
2019-08-01 09:14:49 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
扫码修改
1 个父辈
62e13569
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
50 行增加
和
49 行删除
dll/CodeLibrary.dll
source/ACSingleStore/App.config
source/ACSingleStore/FrmStoreBox.Designer.cs
source/ACSingleStore/FrmStoreBox.cs
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
source/DeviceLibrary/halcon/CodeManager.cs
dll/CodeLibrary.dll
查看文件 @
316aad3
此文件类型无法预览
source/ACSingleStore/App.config
查看文件 @
316aad3
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--出库等待料盘拿走的时间,秒-->
<!--出库等待料盘拿走的时间,秒-->
<
add
key
=
"OutStoreWaitSeconds"
value
=
"10"
/>
<
add
key
=
"OutStoreWaitSeconds"
value
=
"10"
/>
<!--压紧轴
对应
1
mm
的脉冲-->
<!--压紧轴
计量检测亮一次
的脉冲-->
<
add
key
=
"ComAxisChangeValue"
value
=
"2400"
/>
<
add
key
=
"ComAxisChangeValue"
value
=
"2400"
/>
<!--温控器类型,
0
=壁挂王字壳温湿度变送器,
1
=妙昕温湿度记录仪-->
<!--温控器类型,
0
=壁挂王字壳温湿度变送器,
1
=妙昕温湿度记录仪-->
<
add
key
=
"HumitureControllerType"
value
=
"1"
/>
<
add
key
=
"HumitureControllerType"
value
=
"1"
/>
...
...
source/ACSingleStore/FrmStoreBox.Designer.cs
查看文件 @
316aad3
...
@@ -2412,6 +2412,7 @@
...
@@ -2412,6 +2412,7 @@
this
.
groupCode
.
TabIndex
=
273
;
this
.
groupCode
.
TabIndex
=
273
;
this
.
groupCode
.
TabStop
=
false
;
this
.
groupCode
.
TabStop
=
false
;
this
.
groupCode
.
Text
=
"扫码测试"
;
this
.
groupCode
.
Text
=
"扫码测试"
;
this
.
groupCode
.
Visible
=
false
;
//
//
// txtCode
// txtCode
//
//
...
@@ -2464,7 +2465,7 @@
...
@@ -2464,7 +2465,7 @@
this
.
btnCodeTest
.
TabIndex
=
245
;
this
.
btnCodeTest
.
TabIndex
=
245
;
this
.
btnCodeTest
.
Text
=
"扫码测试"
;
this
.
btnCodeTest
.
Text
=
"扫码测试"
;
this
.
btnCodeTest
.
UseVisualStyleBackColor
=
true
;
this
.
btnCodeTest
.
UseVisualStyleBackColor
=
true
;
this
.
btnCodeTest
.
Click
+=
new
System
.
EventHandler
(
this
.
btnCodeTest_Click
);
//
this.btnCodeTest.Click += new System.EventHandler(this.btnCodeTest_Click);
//
//
// btnOpenFile
// btnOpenFile
//
//
...
@@ -2474,7 +2475,7 @@
...
@@ -2474,7 +2475,7 @@
this
.
btnOpenFile
.
TabIndex
=
244
;
this
.
btnOpenFile
.
TabIndex
=
244
;
this
.
btnOpenFile
.
Text
=
"打开本地图片"
;
this
.
btnOpenFile
.
Text
=
"打开本地图片"
;
this
.
btnOpenFile
.
UseVisualStyleBackColor
=
true
;
this
.
btnOpenFile
.
UseVisualStyleBackColor
=
true
;
this
.
btnOpenFile
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOpenFile_Click
);
//
this.btnOpenFile.Click += new System.EventHandler(this.btnOpenFile_Click);
//
//
// groupBox7
// groupBox7
//
//
...
...
source/ACSingleStore/FrmStoreBox.cs
查看文件 @
316aad3
...
@@ -1501,39 +1501,39 @@ namespace OnlineStore.ACSingleStore
...
@@ -1501,39 +1501,39 @@ namespace OnlineStore.ACSingleStore
store
.
KNDIOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
store
.
KNDIOMove
(
IO_Type
.
Door_Down
,
IO_VALUE
.
HIGH
);
}
}
private
void
btnOpenFile_Click
(
object
sender
,
EventArgs
e
)
//private void btnOpenFile_Click(object sender, EventArgs e)
{
//{
System
.
Windows
.
Forms
.
OpenFileDialog
openDialog
=
new
System
.
Windows
.
Forms
.
OpenFileDialog
();
// System.Windows.Forms.OpenFileDialog openDialog = new System.Windows.Forms.OpenFileDialog();
openDialog
.
Title
=
"打开本地图片"
;
// openDialog.Title = "打开本地图片";
openDialog
.
Filter
=
"All Supported Images (*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png)|*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png|Bitmaps (*.bmp;*.dib;*.rle)|*.bmp;*.dib;*.rle|Graphics Interchange Format (*.gif)|*.gif|Joint Photographic Experts (*.jpg)|*.jpg|Portable Network Graphics (*.png)|*.png|All Files (*.*)|*.*"
;
// openDialog.Filter = "All Supported Images (*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png)|*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png|Bitmaps (*.bmp;*.dib;*.rle)|*.bmp;*.dib;*.rle|Graphics Interchange Format (*.gif)|*.gif|Joint Photographic Experts (*.jpg)|*.jpg|Portable Network Graphics (*.png)|*.png|All Files (*.*)|*.*";
openDialog
.
DefaultExt
=
"png"
;
// openDialog.DefaultExt = "png";
//openDialog.DefaultExt = "png";
// //openDialog.DefaultExt = "png";
System
.
Windows
.
Forms
.
DialogResult
result
=
openDialog
.
ShowDialog
();
// System.Windows.Forms.DialogResult result = openDialog.ShowDialog();
if
(
result
==
System
.
Windows
.
Forms
.
DialogResult
.
Cancel
)
// if (result == System.Windows.Forms.DialogResult.Cancel)
{
// {
return
;
// return;
}
// }
string
fileName
=
openDialog
.
FileName
;
// string fileName = openDialog.FileName;
txtImage
.
Text
=
fileName
;
// txtImage.Text = fileName;
}
//}
private
void
btnCodeTest_Click
(
object
sender
,
EventArgs
e
)
{
txtCode
.
Text
=
""
;
string
fileName
=
txtImage
.
Text
.
ToString
();
if
(
File
.
Exists
(
fileName
))
//private void btnCodeTest_Click(object sender, EventArgs e)
{
//{
//读取图片内容
// txtCode.Text = "";
Bitmap
checkImg
=
(
Bitmap
)
Image
.
FromFile
(
fileName
).
Clone
();
// string fileName = txtImage.Text.ToString();
string
result
=
ZXingCodeHelper
.
DecodeQRCode
(
checkImg
);
txtCode
.
Text
=
result
;
// if (File.Exists(fileName))
}
// {
else
// //读取图片内容
{
// Bitmap checkImg = (Bitmap)Image.FromFile(fileName).Clone();
MessageBox
.
Show
(
"请先打开正确的图片!"
);
// List<string> results = ZXingCodeHelper.DecodeQRCodes(checkImg);
}
// txtCode.Text = result;
}
// }
// else
// {
// MessageBox.Show("请先打开正确的图片!");
// }
//}
}
}
}
}
source/DeviceLibrary/acSingleStore/AC_SA_BoxBean.cs
查看文件 @
316aad3
...
@@ -1511,13 +1511,20 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1511,13 +1511,20 @@ namespace OnlineStore.DeviceLibrary
foreach
(
string
str
in
codeList
)
foreach
(
string
str
in
codeList
)
{
{
string
code
=
str
;
string
code
=
str
;
if
(
str
.
ToUpper
().
StartsWith
(
"FA"
))
if
(
CodeManager
.
DeCodeType
.
Equals
(
1
))
{
{
code
=
"=1+0x0-
7x32"
+
"="
+
code
;
code
=
"=1+0x0-
"
+
GetSize
()
+
"x"
+
height
+
"="
+
CodeManager
.
GetBarcode
(
str
)
;
}
}
else
else
{
{
code
=
"=1+0x0-7x"
+
height
+
"="
+
code
;
if
(
str
.
ToUpper
().
StartsWith
(
"FA"
))
{
code
=
"=1+0x0-7x32"
+
"="
+
code
;
}
else
{
code
=
"=1+0x0-7x"
+
height
+
"="
+
code
;
}
}
}
message
=
message
+
code
+
spiltStr
;
message
=
message
+
code
+
spiltStr
;
}
}
...
@@ -1528,10 +1535,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1528,10 +1535,7 @@ namespace OnlineStore.DeviceLibrary
message
=
""
;
message
=
""
;
}
}
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
KNDIOMove
(
IO_Type
.
CameraLight_Power
,
IO_VALUE
.
LOW
);
if
(
CodeManager
.
DeCodeType
.
Equals
(
1
))
{
message
=
"=1+0x0-"
+
GetSize
()
+
"x"
+
height
+
"="
+
CodeManager
.
GetBarcode
(
message
);
}
onCodeReceived
(
message
);
onCodeReceived
(
message
);
}
}
...
...
source/DeviceLibrary/halcon/CodeManager.cs
查看文件 @
316aad3
...
@@ -194,12 +194,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -194,12 +194,8 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
string
result
=
CodeLibrary
.
ZXingCodeHelper
.
DecodeQRCode
(
bitmap
);
List
<
string
>
result
=
CodeLibrary
.
ZXingCodeHelper
.
DecodeQRCodes
(
bitmap
);
if
(!
String
.
IsNullOrEmpty
(
result
))
return
result
;
{
return
new
List
<
string
>()
{
result
};
}
}
}
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论