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
27cd70f7
Commit
27cd70f7
authored
Jul 03, 2024
by
Neo Turing
Browse files
Options
Browse Files
Download
Plain Diff
合并
parents
3c4b1291
e745315e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
25 deletions
+24
-25
FrmMain.cs
Src/FrmMain.cs
+16
-15
Kivii.Client.Sample.ImageUploader.V4.5.csproj
Src/Kivii.Client.Sample.ImageUploader.V4.5.csproj
+2
-5
AssemblyInfo.cs
Src/Properties/AssemblyInfo.cs
+2
-2
Requests.cs
Src/Requests.cs
+2
-1
packages.config
Src/packages.config
+2
-2
No files found.
Src/FrmMain.cs
View file @
27cd70f7
...
...
@@ -231,7 +231,7 @@ namespace Kivii.Sample.ImageUploader
deleteSnapshot
(
photo
);
}
currentPhoto
.
Image
.
RotateFlip
(
flipType
);
var
editedPhoto
=
new
DbFile
(
currentPhoto
.
Image
,
currentPhoto
.
Name
);
var
editedPhoto
=
new
DbFile
(
currentPhoto
.
Image
,
currentPhoto
.
Name
,
currentPhoto
.
Tags
);
addSnapshot
(
editedPhoto
,
index
);
showSnapshot
(
editedPhoto
);
...
...
@@ -600,7 +600,7 @@ namespace Kivii.Sample.ImageUploader
currentReport
=
new
Report
();
currentReport
.
ReportId
=
reportId
;
currentReport
.
SampleName
=
"无
样品报告
模式"
;
currentReport
.
SampleName
=
"无
报告样品
模式"
;
currentReport
.
SampleModel
=
"此模式下上传的图片可在公共图片库中查看"
;
}
else
...
...
@@ -823,12 +823,12 @@ namespace Kivii.Sample.ImageUploader
{
reportId
=
currentReport
.
ReportId
;
}
if
(!
reportId
.
IsNullOrEmpty
())
{
picName
=
reportId
+
"_"
;
}
picName
+
=
DateTime
.
Now
.
ToString
(
"mmssfff"
);
var
photo
=
new
DbFile
(
bitmap
,
picName
);
//
if (!reportId.IsNullOrEmpty())
//
{
//
picName = reportId + "_";
//
}
picName
=
DateTime
.
Now
.
ToString
(
"mmssfff"
);
var
photo
=
new
DbFile
(
bitmap
,
picName
,
reportId
);
addSnapshot
(
photo
);
Thread
.
Sleep
(
50
);
showSnapshot
(
photo
);
...
...
@@ -933,6 +933,7 @@ namespace Kivii.Sample.ImageUploader
if
(
currentReport
==
null
)
return
;
var
count
=
photos
.
Count
;
if
(
count
==
0
)
return
;
var
tags
=
currentReport
.
ReportId
;
btnUpload
.
Enabled
=
false
;
var
path
=
Path
.
Combine
(
KiviiContext
.
GetTemporaryFilePath
(
"Kivii"
),
"Client"
,
"Caches"
,
"Uploader"
,
"Images"
);
if
(!
Directory
.
Exists
(
path
))
Directory
.
CreateDirectory
(
path
);
...
...
@@ -951,7 +952,7 @@ namespace Kivii.Sample.ImageUploader
request
.
OwnerKvid
=
currentReport
.
SampleKvid
;
request
.
FolderPath
=
"/Samples/Images"
;
request
.
FolderType
=
"Jst.Lims.Entities.Sample"
;
request
.
Tags
=
"底页图片"
;
request
.
Tags
=
photo
.
Tags
.
IsNullOrEmpty
()
?
tags
:
photo
.
Tags
;
try
{
var
response
=
_client
.
PostFileWithRequest
<
FileResponse
>(
new
FileInfo
(
filename
),
request
);
...
...
@@ -1023,7 +1024,7 @@ namespace Kivii.Sample.ImageUploader
if
(
index
<=
-
1
)
index
=
0
;
deleteSnapshot
(
photo
);
}
var
editedPhoto
=
new
DbFile
(
backgroundImage
,
currentPhoto
.
Name
);
var
editedPhoto
=
new
DbFile
(
backgroundImage
,
currentPhoto
.
Name
,
currentPhoto
.
Tags
);
addSnapshot
(
editedPhoto
,
index
);
showSnapshot
(
editedPhoto
);
...
...
@@ -1069,12 +1070,12 @@ namespace Kivii.Sample.ImageUploader
{
reportId
=
currentReport
.
ReportId
;
}
if
(!
reportId
.
IsNullOrEmpty
())
{
picName
=
reportId
+
"_"
+
picName
;
}
//
if (!reportId.IsNullOrEmpty())
//
{
//
picName = reportId + "_" + picName;
//
}
//picName += DateTime.Now.ToString("mmssfff");
var
photo
=
new
DbFile
(
bitmap
,
picName
);
var
photo
=
new
DbFile
(
bitmap
,
picName
,
reportId
);
addSnapshot
(
photo
);
Thread
.
Sleep
(
50
);
showSnapshot
(
photo
);
...
...
Src/Kivii.Client.Sample.ImageUploader.V4.5.csproj
View file @
27cd70f7
...
...
@@ -46,9 +46,6 @@
<ApplicationIcon>
Camera.ico
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"Kivii.Barcode.V4.5, Version=5.6.2023.3000, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Barcode.5.6.2023.3000\lib\net45\Kivii.Barcode.V4.5.dll
</HintPath>
</Reference>
<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>
...
...
@@ -61,8 +58,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.62
0
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Linq.5.6.2024.62
0
0\lib\net45\Kivii.Linq.V4.5.dll
</HintPath>
<Reference
Include=
"Kivii.Linq.V4.5, Version=5.6.2024.62
9
0, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\..\packages\Kivii.Linq.5.6.2024.62
9
0\lib\net45\Kivii.Linq.V4.5.dll
</HintPath>
</Reference>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Core"
/>
...
...
Src/Properties/AssemblyInfo.cs
View file @
27cd70f7
...
...
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.6
25
0")]
[assembly: AssemblyFileVersion("5.4.2024.6
25
0")]
[assembly: AssemblyVersion("5.4.2024.6
30
0")]
[assembly: AssemblyFileVersion("5.4.2024.6
30
0")]
Src/Requests.cs
View file @
27cd70f7
...
...
@@ -54,10 +54,11 @@ namespace Kivii.Sample.ImageUploader
public
Bitmap
Image
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
DbFile
(
Bitmap
image
,
string
name
)
public
DbFile
(
Bitmap
image
,
string
name
,
string
tags
)
{
Image
=
image
;
Name
=
name
;
Tags
=
tags
;
}
public
string
Extension
{
get
;
set
;
}
...
...
Src/packages.config
View file @
27cd70f7
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
packages
>
<
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.62
0
0"
targetFramework
=
"net45"
/>
<
package
id
=
"Kivii.Linq"
version
=
"5.6.2024.62
9
0"
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