Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.Sample.ImageUploader.V4.5
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.Sample.ImageUploader.V4.5
Commits
3c4b1291
Commit
3c4b1291
authored
Jun 27, 2024
by
Neo Turing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加二维码展示,用于手机端扫描后上传图片
parent
fcda55ca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
14 deletions
+43
-14
FrmMain.Designer.cs
Src/FrmMain.Designer.cs
+0
-0
FrmMain.cs
Src/FrmMain.cs
+29
-5
Kivii.Client.Sample.ImageUploader.V4.5.csproj
Src/Kivii.Client.Sample.ImageUploader.V4.5.csproj
+9
-6
packages.config
Src/packages.config
+5
-3
No files found.
Src/FrmMain.Designer.cs
View file @
3c4b1291
This diff is collapsed.
Click to expand it.
Src/FrmMain.cs
View file @
3c4b1291
...
...
@@ -26,6 +26,7 @@ using Kivii.Canon;
using
Kivii.Controls
;
using
PictureBox
=
System
.
Windows
.
Forms
.
PictureBox
;
using
Image
=
System
.
Drawing
.
Image
;
using
Kivii.Barcode
;
namespace
Kivii.Sample.ImageUploader
{
...
...
@@ -110,6 +111,21 @@ namespace Kivii.Sample.ImageUploader
//rtbMessage.ScrollToCaret();
}
private
void
outputMessage
(
Bitmap
bitmap
)
{
if
(
this
.
InvokeRequired
)
{
this
.
Invoke
(
new
Action
(()
=>
outputMessage
(
bitmap
)));
return
;
}
Clipboard
.
Clear
();
//清空剪贴板
Clipboard
.
SetImage
(
bitmap
);
//将Bitmap类对象写入剪贴板
rtbMessage
.
Paste
();
Clipboard
.
Clear
();
//清空剪贴板
}
private
void
initFormCtlEnable
(
bool
notLogin
=
true
)
{
if
(
this
.
InvokeRequired
)
...
...
@@ -186,14 +202,22 @@ namespace Kivii.Sample.ImageUploader
outputMessage
(
msg
);
}
//lbCurrentReportId.Text = currentReport.ReportId;
//lbCurrentSampleName.Text = currentReport.SampleName;
//lbCurrentBrand.Text = currentReport.SampleBrand;
//lbCurrentBatchNumber.Text = currentReport.SampleBatchNumber;
//lbCurrentSampleQuantity.Text = currentReport.SampleQuantityUnit;
var
code
=
generateQRCode
(
currentReport
.
ReportId
);
outputMessage
(
code
);
}
}
private
Bitmap
generateQRCode
(
string
qrCode
)
{
if
(
qrCode
.
IsNullOrEmpty
())
return
null
;
BarcodeWriter
barcode
=
new
BarcodeWriter
();
barcode
.
Format
=
BarcodeFormat
.
QR_CODE
;
barcode
.
Options
.
Width
=
150
;
barcode
.
Options
.
Height
=
150
;
var
code
=
barcode
.
Write
(
qrCode
);
return
code
;
}
private
void
ImageRotateFlip
(
RotateFlipType
flipType
=
RotateFlipType
.
RotateNoneFlipNone
)
{
if
(
currentPhoto
==
null
)
return
;
...
...
Src/Kivii.Client.Sample.ImageUploader.V4.5.csproj
View file @
3c4b1291
...
...
@@ -46,11 +46,14 @@
<ApplicationIcon>
Camera.ico
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"Kivii.
Common.V4.5, Version=5.6.2024.52
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.
Common.5.6.2024.5200\lib\net45\Kivii.Common
.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.
Barcode.V4.5, Version=5.6.2023.30
00, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.
Barcode.5.6.2023.3000\lib\net45\Kivii.Barcode
.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Core.V4.5, Version=5.6.2024.5200, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Core.5.6.2024.5200\lib\net45\Kivii.Core.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Common.V4.5, Version=5.6.2024.6200, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Common.5.6.2024.6200\lib\net45\Kivii.Common.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Core.V4.5, Version=5.6.2024.6200, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Core.5.6.2024.6200\lib\net45\Kivii.Core.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Imaging.V4.0, Version=5.6.2021.3000, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Imaging.5.6.2021.3000\lib\net\Kivii.Imaging.V4.0.dll
</HintPath>
...
...
@@ -58,8 +61,8 @@
<Reference
Include=
"Kivii.Linq.Sqlite.V4.5, Version=5.6.2023.3000, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Linq.Sqlite.5.6.2023.3000\lib\net45\Kivii.Linq.Sqlite.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"Kivii.Linq.V4.5, Version=5.6.2024.
5
200, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Linq.5.6.2024.
5
200\lib\net45\Kivii.Linq.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Linq.V4.5, Version=5.6.2024.
6
200, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Linq.5.6.2024.
6
200\lib\net45\Kivii.Linq.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
...
...
Src/packages.config
View file @
3c4b1291
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2024.5200"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.2024.5200"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Barcode"
version
=
"5.6.2023.3000"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Common"
version
=
"5.6.2024.6200"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Core"
version
=
"5.6.2024.6200"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Imaging"
version
=
"5.6.2021.3000"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.2024.
5
200"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.2024.
6
200"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Linq.Sqlite"
version
=
"5.6.2023.3000"
targetFramework
=
"net45"
/>
</
packages
>
\ No newline at end of file
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