Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.SampleInbounds.V4.0
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Client.SampleInbounds.V4.0
Commits
9503216c
Commit
9503216c
authored
May 31, 2023
by
任天宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
1d63e746
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
12 deletions
+24
-12
.gitignore
.gitignore
+1
-0
FrmMain.Designer.cs
Src/FrmMain.Designer.cs
+0
-0
FrmMain.cs
Src/FrmMain.cs
+23
-12
No files found.
.gitignore
View file @
9503216c
...
...
@@ -7,3 +7,4 @@
/packages
/.vs
/Src/bin/Debug
/Src/obj/Release
Src/FrmMain.Designer.cs
View file @
9503216c
This diff is collapsed.
Click to expand it.
Src/FrmMain.cs
View file @
9503216c
...
...
@@ -225,10 +225,6 @@ namespace Kivii.Client.SampleInbounds
_currentTotalEpcs
.
Add
(
epc
);
samplePreAssigning
(
null
,
epc
);
}
this
.
Invoke
(
new
Action
(
delegate
{
outputMessage
(
$"共扫描到:
{
_currentTotalEpcs
.
Count
}
个Rfid。"
);
}));
break
;
case
0x74
:
ReaderExtension
.
ProcessSetWorkAntenna
(
msgTran
,
reader
,
currentInventoryBuffer
,
currentSetting
,
m_bInventory
);
...
...
@@ -378,17 +374,17 @@ namespace Kivii.Client.SampleInbounds
btnClearCurrentPackage
.
Enabled
=
_currentPackage
!=
null
;
//cbSetCurrentPackageNode.Enabled = _currentPackage.Status == (int)PackageStatus.Empty || _currentPackage.Status == (int)PackageStatus.Full;
//btnScanRfid.Enabled = _currentPackage.Status == (int)PackageStatus.Full;
btnSampleAssign
.
Enabled
=
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Full
;
btnSampleAssign
.
Enabled
=
_currentPackage
.
Status
!=
(
int
)
PackageStatus
.
Inbound
;
//tbScanSample.Enabled = _currentPackage.Status == (int)PackageStatus.Full;
//tbScanSample.Text = "";
if
(
_currentPackage
.
Status
!=
(
int
)
PackageStatus
.
Empty
)
{
querySampleInPackaged
();
}
if
(
_currentPackage
.
Status
!=
(
int
)
PackageStatus
.
Full
)
if
(
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Inbound
)
{
lbCurrentPackageStatus
.
Text
=
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Inbound
?
"当前箱子已入库"
:
"当前箱子无样品
"
;
outputMessage
(
$"当前箱子为
{(
_currentPackage
.
Status
==
(
int
)
PackageStatus
.
Inbound
?
"已入库"
:
"空闲"
)}
状态,无法继续操作!"
);
lbCurrentPackageStatus
.
Text
=
"当前箱子已入库
"
;
outputMessage
(
$"当前箱子为
已入库
状态,无法继续操作!"
);
return
;
}
Thread
.
Sleep
(
200
);
...
...
@@ -456,6 +452,8 @@ namespace Kivii.Client.SampleInbounds
this
.
Invoke
(
new
Action
(
delegate
{
dgvSamples
.
DataSource
=
null
;
lbPackageSamplesCount
.
Text
=
"0"
;
lbPackageSampleMissCount
.
Text
=
"0"
;
}));
var
request
=
new
SampleQuery2
();
request
.
PackageKvid
=
_currentPackage
.
Kvid
;
...
...
@@ -486,6 +484,8 @@ namespace Kivii.Client.SampleInbounds
{
if
(
index
!=
-
1
)
cbSetCurrentPackageOwner
.
SelectedIndex
=
index
;
dgvSamples
.
DataSource
=
_currentPackageSamples
;
lbPackageSamplesCount
.
Text
=
_currentPackageSamples
.
Count
.
ToString
();
lbPackageSampleMissCount
.
Text
=
_currentPackageSamples
.
Where
(
o
=>
!
o
.
IsMatched
).
Count
().
ToString
();
}));
outputMessage
(
$"成功查询到箱号:
{
_currentPackage
.
Name
}
中
{
_currentPackageSamples
.
Count
}
件样品!"
);
});
...
...
@@ -530,6 +530,8 @@ namespace Kivii.Client.SampleInbounds
this
.
Invoke
(
new
Action
(
delegate
{
dgvRfidSamples
.
DataSource
=
null
;
lbScanSamplesCount
.
Text
=
"0"
;
lbScanSampleMoreCount
.
Text
=
"0"
;
}));
if
(
_currentScanSamples
==
null
)
_currentScanSamples
=
new
List
<
Sample
>();
if
(!
_currentPackageSamples
.
IsNullOrEmpty
())
...
...
@@ -549,15 +551,20 @@ namespace Kivii.Client.SampleInbounds
this
.
Invoke
(
new
Action
(
delegate
{
dgvSamples
.
DataSource
=
_currentPackageSamples
;
lbPackageSamplesCount
.
Text
=
_currentPackageSamples
.
Count
.
ToString
();
lbPackageSampleMissCount
.
Text
=
_currentPackageSamples
.
Where
(
o
=>
!
o
.
IsMatched
).
Count
().
ToString
();
}));
}
if
(!
_currentScanSamples
.
Exists
(
o
=>
o
.
Kvid
==
record
.
Kvid
))
{
_currentScanSamples
.
Add
(
record
);
outputMessage
(
$"扫描结果增加:报告号[
{
record
.
BizId
}
]"
);
}
this
.
Invoke
(
new
Action
(
delegate
{
dgvRfidSamples
.
DataSource
=
_currentScanSamples
;
lbScanSamplesCount
.
Text
=
_currentScanSamples
.
Count
.
ToString
();
lbScanSampleMoreCount
.
Text
=
_currentScanSamples
.
Where
(
o
=>
!
o
.
IsMatched
).
Count
().
ToString
();
}));
//sampleAssigning(record);
}
...
...
@@ -793,6 +800,10 @@ namespace Kivii.Client.SampleInbounds
btnClearCurrentPackage
.
Enabled
=
false
;
//btnScanRfid.Enabled = false;
btnSampleAssign
.
Enabled
=
false
;
lbPackageSamplesCount
.
Text
=
"0"
;
lbPackageSampleMissCount
.
Text
=
"0"
;
lbScanSamplesCount
.
Text
=
"0"
;
lbScanSampleMoreCount
.
Text
=
"0"
;
//tbScanSample.Enabled = false;
//tbScanSample.Text = "";
lbCurrentPackageStatus
.
Text
=
""
;
...
...
@@ -824,17 +835,17 @@ namespace Kivii.Client.SampleInbounds
private
void
dgvRfidSamples_RowPostPaint
(
object
sender
,
DataGridViewRowPostPaintEventArgs
e
)
{
dgvSamples
.
TopLeftHeaderCell
.
Value
=
"序号"
;
dgv
Rfid
Samples
.
TopLeftHeaderCell
.
Value
=
"序号"
;
//自动编号,与数据无关
Rectangle
rectangle
=
new
Rectangle
(
e
.
RowBounds
.
Location
.
X
,
e
.
RowBounds
.
Location
.
Y
,
dgvSamples
.
RowHeadersWidth
-
4
,
dgv
Rfid
Samples
.
RowHeadersWidth
-
4
,
e
.
RowBounds
.
Height
);
TextRenderer
.
DrawText
(
e
.
Graphics
,
(
e
.
RowIndex
+
1
).
ToString
(),
dgvSamples
.
RowHeadersDefaultCellStyle
.
Font
,
dgv
Rfid
Samples
.
RowHeadersDefaultCellStyle
.
Font
,
rectangle
,
dgvSamples
.
RowHeadersDefaultCellStyle
.
ForeColor
,
dgv
Rfid
Samples
.
RowHeadersDefaultCellStyle
.
ForeColor
,
TextFormatFlags
.
VerticalCenter
|
TextFormatFlags
.
Right
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment