Commit 27cd70f7 by Neo Turing

合并

parents 3c4b1291 e745315e
...@@ -231,7 +231,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -231,7 +231,7 @@ namespace Kivii.Sample.ImageUploader
deleteSnapshot(photo); deleteSnapshot(photo);
} }
currentPhoto.Image.RotateFlip(flipType); 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); addSnapshot(editedPhoto, index);
showSnapshot(editedPhoto); showSnapshot(editedPhoto);
...@@ -600,7 +600,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -600,7 +600,7 @@ namespace Kivii.Sample.ImageUploader
currentReport = new Report(); currentReport = new Report();
currentReport.ReportId = reportId; currentReport.ReportId = reportId;
currentReport.SampleName = "无样品报告模式"; currentReport.SampleName = "无报告样品模式";
currentReport.SampleModel = "此模式下上传的图片可在公共图片库中查看"; currentReport.SampleModel = "此模式下上传的图片可在公共图片库中查看";
} }
else else
...@@ -823,12 +823,12 @@ namespace Kivii.Sample.ImageUploader ...@@ -823,12 +823,12 @@ namespace Kivii.Sample.ImageUploader
{ {
reportId = currentReport.ReportId; reportId = currentReport.ReportId;
} }
if (!reportId.IsNullOrEmpty()) //if (!reportId.IsNullOrEmpty())
{ //{
picName = reportId + "_"; // picName = reportId + "_";
} //}
picName += DateTime.Now.ToString("mmssfff"); picName = DateTime.Now.ToString("mmssfff");
var photo = new DbFile(bitmap, picName); var photo = new DbFile(bitmap, picName,reportId);
addSnapshot(photo); addSnapshot(photo);
Thread.Sleep(50); Thread.Sleep(50);
showSnapshot(photo); showSnapshot(photo);
...@@ -933,6 +933,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -933,6 +933,7 @@ namespace Kivii.Sample.ImageUploader
if (currentReport == null) return; if (currentReport == null) return;
var count = photos.Count; var count = photos.Count;
if (count == 0) return; if (count == 0) return;
var tags = currentReport.ReportId;
btnUpload.Enabled = false; btnUpload.Enabled = false;
var path = Path.Combine(KiviiContext.GetTemporaryFilePath("Kivii"), "Client", "Caches", "Uploader", "Images"); var path = Path.Combine(KiviiContext.GetTemporaryFilePath("Kivii"), "Client", "Caches", "Uploader", "Images");
if (!Directory.Exists(path)) Directory.CreateDirectory(path); if (!Directory.Exists(path)) Directory.CreateDirectory(path);
...@@ -951,7 +952,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -951,7 +952,7 @@ namespace Kivii.Sample.ImageUploader
request.OwnerKvid = currentReport.SampleKvid; request.OwnerKvid = currentReport.SampleKvid;
request.FolderPath = "/Samples/Images"; request.FolderPath = "/Samples/Images";
request.FolderType = "Jst.Lims.Entities.Sample"; request.FolderType = "Jst.Lims.Entities.Sample";
request.Tags = "底页图片"; request.Tags = photo.Tags.IsNullOrEmpty() ? tags : photo.Tags;
try try
{ {
var response = _client.PostFileWithRequest<FileResponse>(new FileInfo(filename), request); var response = _client.PostFileWithRequest<FileResponse>(new FileInfo(filename), request);
...@@ -1023,7 +1024,7 @@ namespace Kivii.Sample.ImageUploader ...@@ -1023,7 +1024,7 @@ namespace Kivii.Sample.ImageUploader
if (index <= -1) index = 0; if (index <= -1) index = 0;
deleteSnapshot(photo); deleteSnapshot(photo);
} }
var editedPhoto = new DbFile(backgroundImage, currentPhoto.Name); var editedPhoto = new DbFile(backgroundImage, currentPhoto.Name,currentPhoto.Tags);
addSnapshot(editedPhoto, index); addSnapshot(editedPhoto, index);
showSnapshot(editedPhoto); showSnapshot(editedPhoto);
...@@ -1069,12 +1070,12 @@ namespace Kivii.Sample.ImageUploader ...@@ -1069,12 +1070,12 @@ namespace Kivii.Sample.ImageUploader
{ {
reportId = currentReport.ReportId; reportId = currentReport.ReportId;
} }
if (!reportId.IsNullOrEmpty()) //if (!reportId.IsNullOrEmpty())
{ //{
picName = reportId + "_" + picName; // picName = reportId + "_" + picName;
} //}
//picName += DateTime.Now.ToString("mmssfff"); //picName += DateTime.Now.ToString("mmssfff");
var photo = new DbFile(bitmap, picName); var photo = new DbFile(bitmap, picName,reportId);
addSnapshot(photo); addSnapshot(photo);
Thread.Sleep(50); Thread.Sleep(50);
showSnapshot(photo); showSnapshot(photo);
......
...@@ -46,9 +46,6 @@ ...@@ -46,9 +46,6 @@
<ApplicationIcon>Camera.ico</ApplicationIcon> <ApplicationIcon>Camera.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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"> <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> <HintPath>..\..\packages\Kivii.Common.5.6.2024.6200\lib\net45\Kivii.Common.V4.5.dll</HintPath>
</Reference> </Reference>
...@@ -61,8 +58,8 @@ ...@@ -61,8 +58,8 @@
<Reference Include="Kivii.Linq.Sqlite.V4.5, Version=5.6.2023.3000, Culture=neutral, processorArchitecture=MSIL"> <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> <HintPath>..\..\packages\Kivii.Linq.Sqlite.5.6.2023.3000\lib\net45\Kivii.Linq.Sqlite.V4.5.dll</HintPath>
</Reference> </Reference>
<Reference Include="Kivii.Linq.V4.5, Version=5.6.2024.6200, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Kivii.Linq.V4.5, Version=5.6.2024.6290, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Linq.5.6.2024.6200\lib\net45\Kivii.Linq.V4.5.dll</HintPath> <HintPath>..\..\packages\Kivii.Linq.5.6.2024.6290\lib\net45\Kivii.Linq.V4.5.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices; ...@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示: //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2024.6250")] [assembly: AssemblyVersion("5.4.2024.6300")]
[assembly: AssemblyFileVersion("5.4.2024.6250")] [assembly: AssemblyFileVersion("5.4.2024.6300")]
...@@ -54,10 +54,11 @@ namespace Kivii.Sample.ImageUploader ...@@ -54,10 +54,11 @@ namespace Kivii.Sample.ImageUploader
public Bitmap Image { get; set; } public Bitmap Image { get; set; }
public string Name { get; set; } public string Name { get; set; }
public DbFile(Bitmap image, string name) public DbFile(Bitmap image, string name,string tags)
{ {
Image = image; Image = image;
Name = name; Name = name;
Tags = tags;
} }
public string Extension { get; set; } public string Extension { get; set; }
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <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.Common" version="5.6.2024.6200" targetFramework="net45" />
<package id="Kivii.Core" 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.Imaging" version="5.6.2021.3000" targetFramework="net45" />
<package id="Kivii.Linq" version="5.6.2024.6200" targetFramework="net45" /> <package id="Kivii.Linq" version="5.6.2024.6290" targetFramework="net45" />
<package id="Kivii.Linq.Sqlite" version="5.6.2023.3000" targetFramework="net45" /> <package id="Kivii.Linq.Sqlite" version="5.6.2023.3000" targetFramework="net45" />
</packages> </packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment