Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.SamplePackages.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.SamplePackages.V4.0
Commits
a0616726
Commit
a0616726
authored
May 25, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
195dfe53
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
108 additions
and
58 deletions
+108
-58
Configs.cs
Src/Configs.cs
+4
-1
Kivii.Rfid.D500.V4.0.dll
Src/Content/Kivii.Rfid.D500.V4.0.dll
+0
-0
FrmMain.Designer.cs
Src/FrmMain.Designer.cs
+57
-56
FrmMain.cs
Src/FrmMain.cs
+0
-0
Kivii.Client.SamplePackages.V4.0.csproj
Src/Kivii.Client.SamplePackages.V4.0.csproj
+8
-1
Program.cs
Src/Program.cs
+17
-0
RestfulRequests.cs
Src/Requests/RestfulRequests.cs
+22
-0
No files found.
Src/Configs.cs
View file @
a0616726
...
...
@@ -13,6 +13,9 @@ namespace Kivii.Client.SamplePackages
public
const
string
RouteLocationQuery
=
"/Restful/Kivii.Samples.Entities.Location/Query"
;
public
const
string
RouteSampleQuery
=
"/Restful/Kivii.Samples.Entities.Sample/Query"
;
public
const
string
RouteSamplePrePackaging
=
"/Restful/Kivii.Samples.Entities.Sample/PrePackaging"
;
public
const
string
RouteSamplePackaging
=
"/Restful/Kivii.Samples.Entities.Sample/Packaging"
;
public
const
string
RouteSampleUnPackaging
=
"/Restful/Kivii.Samples.Entities.Sample/UnPackaging"
;
}
}
Src/Content/Kivii.Rfid.D500.V4.0.dll
0 → 100644
View file @
a0616726
File added
Src/FrmMain.Designer.cs
View file @
a0616726
...
...
@@ -51,15 +51,15 @@
this
.
tbxUserName
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
plToolBar
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
gbTools
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnClearCurrentPackage
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnScanRfid
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cbSetCurrentPackageNode
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
lbSetPackageNode
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbSetPackage
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tbSetCurrentPackage
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
plMain
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
gbMain
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lbSetPackageNode
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cbSetCurrentPackageNode
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btnScanRfid
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
dgvSamples
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
btnClearCurrentPackage
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
SampleAction
=
new
System
.
Windows
.
Forms
.
DataGridViewButtonColumn
();
this
.
SampleBizId
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
SampleOwnerName
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
...
...
@@ -312,6 +312,57 @@
this
.
gbTools
.
TabStop
=
false
;
this
.
gbTools
.
Text
=
"操作台"
;
//
// btnClearCurrentPackage
//
this
.
btnClearCurrentPackage
.
Location
=
new
System
.
Drawing
.
Point
(
130
,
37
);
this
.
btnClearCurrentPackage
.
Name
=
"btnClearCurrentPackage"
;
this
.
btnClearCurrentPackage
.
Size
=
new
System
.
Drawing
.
Size
(
103
,
23
);
this
.
btnClearCurrentPackage
.
TabIndex
=
77
;
this
.
btnClearCurrentPackage
.
Text
=
"重设"
;
this
.
btnClearCurrentPackage
.
UseVisualStyleBackColor
=
true
;
this
.
btnClearCurrentPackage
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClearCurrentPackage_Click
);
//
// btnScanRfid
//
this
.
btnScanRfid
.
BackColor
=
System
.
Drawing
.
Color
.
PapayaWhip
;
this
.
btnScanRfid
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Right
;
this
.
btnScanRfid
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
this
.
btnScanRfid
.
ForeColor
=
System
.
Drawing
.
Color
.
Chocolate
;
this
.
btnScanRfid
.
Location
=
new
System
.
Drawing
.
Point
(
664
,
17
);
this
.
btnScanRfid
.
Name
=
"btnScanRfid"
;
this
.
btnScanRfid
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
105
);
this
.
btnScanRfid
.
TabIndex
=
76
;
this
.
btnScanRfid
.
Text
=
"开始扫描"
;
this
.
btnScanRfid
.
UseVisualStyleBackColor
=
false
;
this
.
btnScanRfid
.
Click
+=
new
System
.
EventHandler
(
this
.
btnScanRfid_Click
);
//
// cbSetCurrentPackageNode
//
this
.
cbSetCurrentPackageNode
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
20F
);
this
.
cbSetCurrentPackageNode
.
FormattingEnabled
=
true
;
this
.
cbSetCurrentPackageNode
.
Items
.
AddRange
(
new
object
[]
{
"1号袋"
,
"2号袋"
,
"3号袋"
,
"4号袋"
,
"5号袋"
,
"6号袋"
});
this
.
cbSetCurrentPackageNode
.
Location
=
new
System
.
Drawing
.
Point
(
239
,
63
);
this
.
cbSetCurrentPackageNode
.
Name
=
"cbSetCurrentPackageNode"
;
this
.
cbSetCurrentPackageNode
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
35
);
this
.
cbSetCurrentPackageNode
.
TabIndex
=
30
;
this
.
cbSetCurrentPackageNode
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
cbSetCurrentPackageNode_TextChanged
);
//
// lbSetPackageNode
//
this
.
lbSetPackageNode
.
AutoSize
=
true
;
this
.
lbSetPackageNode
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
18F
);
this
.
lbSetPackageNode
.
Location
=
new
System
.
Drawing
.
Point
(
235
,
36
);
this
.
lbSetPackageNode
.
Name
=
"lbSetPackageNode"
;
this
.
lbSetPackageNode
.
Size
=
new
System
.
Drawing
.
Size
(
118
,
24
);
this
.
lbSetPackageNode
.
TabIndex
=
28
;
this
.
lbSetPackageNode
.
Text
=
"袋子选择:"
;
//
// lbSetPackage
//
this
.
lbSetPackage
.
AutoSize
=
true
;
...
...
@@ -352,46 +403,6 @@
this
.
gbMain
.
TabStop
=
false
;
this
.
gbMain
.
Text
=
"入箱列表"
;
//
// lbSetPackageNode
//
this
.
lbSetPackageNode
.
AutoSize
=
true
;
this
.
lbSetPackageNode
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
18F
);
this
.
lbSetPackageNode
.
Location
=
new
System
.
Drawing
.
Point
(
235
,
36
);
this
.
lbSetPackageNode
.
Name
=
"lbSetPackageNode"
;
this
.
lbSetPackageNode
.
Size
=
new
System
.
Drawing
.
Size
(
118
,
24
);
this
.
lbSetPackageNode
.
TabIndex
=
28
;
this
.
lbSetPackageNode
.
Text
=
"袋子选择:"
;
//
// cbSetCurrentPackageNode
//
this
.
cbSetCurrentPackageNode
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
20F
);
this
.
cbSetCurrentPackageNode
.
FormattingEnabled
=
true
;
this
.
cbSetCurrentPackageNode
.
Items
.
AddRange
(
new
object
[]
{
"1号袋"
,
"2号袋"
,
"3号袋"
,
"4号袋"
,
"5号袋"
,
"6号袋"
});
this
.
cbSetCurrentPackageNode
.
Location
=
new
System
.
Drawing
.
Point
(
239
,
63
);
this
.
cbSetCurrentPackageNode
.
Name
=
"cbSetCurrentPackageNode"
;
this
.
cbSetCurrentPackageNode
.
Size
=
new
System
.
Drawing
.
Size
(
180
,
35
);
this
.
cbSetCurrentPackageNode
.
TabIndex
=
30
;
this
.
cbSetCurrentPackageNode
.
TextChanged
+=
new
System
.
EventHandler
(
this
.
cbSetCurrentPackageNode_TextChanged
);
//
// btnScanRfid
//
this
.
btnScanRfid
.
BackColor
=
System
.
Drawing
.
Color
.
PapayaWhip
;
this
.
btnScanRfid
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Right
;
this
.
btnScanRfid
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
25F
,
System
.
Drawing
.
FontStyle
.
Bold
);
this
.
btnScanRfid
.
ForeColor
=
System
.
Drawing
.
Color
.
Chocolate
;
this
.
btnScanRfid
.
Location
=
new
System
.
Drawing
.
Point
(
664
,
17
);
this
.
btnScanRfid
.
Name
=
"btnScanRfid"
;
this
.
btnScanRfid
.
Size
=
new
System
.
Drawing
.
Size
(
126
,
105
);
this
.
btnScanRfid
.
TabIndex
=
76
;
this
.
btnScanRfid
.
Text
=
"开始扫描"
;
this
.
btnScanRfid
.
UseVisualStyleBackColor
=
false
;
//
// dgvSamples
//
this
.
dgvSamples
.
AllowUserToAddRows
=
false
;
...
...
@@ -413,18 +424,9 @@
this
.
dgvSamples
.
RowTemplate
.
Height
=
23
;
this
.
dgvSamples
.
Size
=
new
System
.
Drawing
.
Size
(
787
,
449
);
this
.
dgvSamples
.
TabIndex
=
0
;
this
.
dgvSamples
.
CellContentClick
+=
new
System
.
Windows
.
Forms
.
DataGridViewCellEventHandler
(
this
.
dgvSamples_CellContentClick
);
this
.
dgvSamples
.
RowPostPaint
+=
new
System
.
Windows
.
Forms
.
DataGridViewRowPostPaintEventHandler
(
this
.
dgvSamples_RowPostPaint
);
//
// btnClearCurrentPackage
//
this
.
btnClearCurrentPackage
.
Location
=
new
System
.
Drawing
.
Point
(
130
,
37
);
this
.
btnClearCurrentPackage
.
Name
=
"btnClearCurrentPackage"
;
this
.
btnClearCurrentPackage
.
Size
=
new
System
.
Drawing
.
Size
(
103
,
23
);
this
.
btnClearCurrentPackage
.
TabIndex
=
77
;
this
.
btnClearCurrentPackage
.
Text
=
"重设"
;
this
.
btnClearCurrentPackage
.
UseVisualStyleBackColor
=
true
;
this
.
btnClearCurrentPackage
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClearCurrentPackage_Click
);
//
// SampleAction
//
dataGridViewCellStyle1
.
Alignment
=
System
.
Windows
.
Forms
.
DataGridViewContentAlignment
.
MiddleCenter
;
...
...
@@ -459,13 +461,12 @@
//
// SampleName
//
this
.
SampleName
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewAutoSizeColumnMode
.
None
;
this
.
SampleName
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewAutoSizeColumnMode
.
Fill
;
this
.
SampleName
.
DataPropertyName
=
"Name"
;
this
.
SampleName
.
HeaderText
=
"样品名称"
;
this
.
SampleName
.
MinimumWidth
=
120
;
this
.
SampleName
.
Name
=
"SampleName"
;
this
.
SampleName
.
ReadOnly
=
true
;
this
.
SampleName
.
Width
=
120
;
//
// SampleDealTime
//
...
...
Src/FrmMain.cs
View file @
a0616726
This diff is collapsed.
Click to expand it.
Src/Kivii.Client.SamplePackages.V4.0.csproj
View file @
a0616726
...
...
@@ -13,7 +13,7 @@
<Deterministic>
true
</Deterministic>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<PlatformTarget>
AnyCPU
</PlatformTarget>
<PlatformTarget>
x86
</PlatformTarget>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
...
...
@@ -44,6 +44,9 @@
<Reference
Include=
"Kivii.Linq.V4.0, Version=5.6.2023.4200, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\packages\Kivii.Linq.5.6.2023.4200\lib\net40\Kivii.Linq.V4.0.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Rfid.D500.V4.0"
>
<HintPath>
Content\Kivii.Rfid.D500.V4.0.dll
</HintPath>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
<Reference
Include=
"System.Xml.Linq"
/>
...
...
@@ -93,5 +96,8 @@
</Compile>
<None
Include=
"Resources\批量读卡器文档.zip"
/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource
Include=
"Content\Kivii.Rfid.D500.V4.0.dll"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
</Project>
\ No newline at end of file
Src/Program.cs
View file @
a0616726
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading
;
using
System.Windows.Forms
;
namespace
Kivii.Client.SamplePackages
{
internal
static
class
Program
{
#
region
设置单进程,开机启动
private
static
Mutex
_mutex
=
null
;
private
static
bool
isProgramExisted
()
{
bool
rtns
=
false
;
_mutex
=
new
Mutex
(
true
,
"Kivii.Rfid.D500.V4.0.dll"
,
out
rtns
);
//mutex.Dispose();
return
!
rtns
;
}
#
endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[
STAThread
]
static
void
Main
()
{
if
(
isProgramExisted
())
{
MessageBox
.
Show
(
$"读卡器被占用正在被使用。"
,
"通讯冲突"
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
,
MessageBoxDefaultButton
.
Button1
,
MessageBoxOptions
.
DefaultDesktopOnly
);
Application
.
Exit
();
return
;
}
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
Application
.
Run
(
new
FrmMain
());
...
...
Src/Requests/RestfulRequests.cs
View file @
a0616726
...
...
@@ -27,4 +27,26 @@ namespace Kivii.Samples.Transforms
{
public
Guid
PackageKvid
{
get
;
set
;
}
}
[
Route
(
Configs
.
RouteSamplePrePackaging
)]
public
class
SamplePrePackaging
:
IReturn
<
RestfulExecutionResponse
<
Sample
>>
{
public
string
Tid
{
get
;
set
;
}
public
Guid
OwnerKvid
{
get
;
set
;
}
//要打包的样品的所属信息
}
[
Route
(
Configs
.
RouteSamplePackaging
)]
public
class
SamplePackaging
:
IReturn
<
RestfulExecutionResponse
<
Sample
>>
{
public
Guid
Kvid
{
get
;
set
;
}
//要流转样品信息
public
Location
Location
{
get
;
set
;
}
//地点位置信息,只需要InternalCode
public
Sample
Package
{
get
;
set
;
}
//指定包裹信息,Package.PackageName可传入包裹的区域信息,例如包裹A0001中的1号袋子
}
[
Route
(
Configs
.
RouteSampleUnPackaging
)]
public
class
SampleUnPackaging
:
IReturn
<
RestfulExecutionResponse
<
Sample
>>
{
public
Guid
Kvid
{
get
;
set
;
}
//要流转样品信息
public
Location
Location
{
get
;
set
;
}
//地点位置信息,只需要InternalCode
}
}
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