Commit 1f1501be 贾鹏旭

1

2 个父辈 7f3a73ca 4ec07436
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<HintPath>..\..\..\..\IDHIKCamera\bin\Debug\MvCameraControl.Net.dll</HintPath> <HintPath>..\..\..\..\IDHIKCamera\bin\Debug\MvCameraControl.Net.dll</HintPath>
</Reference> </Reference>
<Reference Include="MvCodeReaderSDK.Net"> <Reference Include="MvCodeReaderSDK.Net">
<HintPath>..\..\..\..\IDHIKCamera\bin\Debug\MvCodeReaderSDK.Net.dll</HintPath> <HintPath>..\SharedDll\MvCodeReaderSDK.Net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
......
...@@ -122,6 +122,7 @@ namespace BLL ...@@ -122,6 +122,7 @@ namespace BLL
{ {
cameraVision.Open(); cameraVision.Open();
result = cameraVision.GetImage(); result = cameraVision.GetImage();
barcodeInfos = Camera.GetBarCode(result[0]);
cameraVision.Close(); cameraVision.Close();
} }
return result; return result;
......
...@@ -311,6 +311,8 @@ namespace BLL ...@@ -311,6 +311,8 @@ namespace BLL
/// </summary> /// </summary>
[MyConfigComment("软件后台运行")] [MyConfigComment("软件后台运行")]
public static MyConfig<bool> Backgrounder; public static MyConfig<bool> Backgrounder;
[MyConfigComment("是否http替换条码内容")]
public static MyConfig<bool> isReplaceData;
[MyConfigComment("数据源类型")] [MyConfigComment("数据源类型")]
public static MyConfig<string> DataSource_Type; public static MyConfig<string> DataSource_Type;
......
...@@ -262,6 +262,10 @@ namespace BLL ...@@ -262,6 +262,10 @@ namespace BLL
currentExtension.Update(); currentExtension.Update();
} }
public Dictionary<string, string> ReplaceData(Dictionary<string,string> dic)
{
return General.ReplaceData(dic);
}
private void LoadRow(object row) private void LoadRow(object row)
{ {
object[] cols = (object[])row; object[] cols = (object[])row;
......
...@@ -158,7 +158,8 @@ namespace BLL ...@@ -158,7 +158,8 @@ namespace BLL
errmsg = ""; errmsg = "";
if (!string.IsNullOrEmpty(config.HttpReelID)) if (!string.IsNullOrEmpty(config.HttpReelID))
{ {
if (!GetHttpReelID(key, out errmsg)) Dictionary<string, object> pairs = new Dictionary<string, object>();
if (!GetHttpReelID(key, out errmsg,out pairs))
{ {
LogNet.log.Error("GetHttpReelID:" + errmsg); LogNet.log.Error("GetHttpReelID:" + errmsg);
return false; return false;
...@@ -289,14 +290,20 @@ namespace BLL ...@@ -289,14 +290,20 @@ namespace BLL
else else
lastkey.Add(extensions[i].Key, extensions[i].Control.Text); lastkey.Add(extensions[i].Key, extensions[i].Control.Text);
} }
//var keys =new List<string>(lastkey.Keys);
Printing?.Invoke(lastkey); Printing?.Invoke(lastkey);
SaveRetrospect?.Invoke(lastkey);
} }
private bool GetHttpReelID(Dictionary<string, string> key, out string errmsg) /// <summary>
///
/// </summary>
/// <param name="key"></param>
/// <param name="errmsg"></param>
/// <param name="dic">返回请求后,替换完成的键值对</param>
/// <returns></returns>
private bool GetHttpReelID(Dictionary<string, string> key, out string errmsg,out Dictionary<string,object> dic)
{ {
errmsg = ""; errmsg = "";
dic = null;
string url = config.HttpReelID; string url = config.HttpReelID;
string json = Http.PostJson(url, null, key); string json = Http.PostJson(url, null, key);
if (json == "") if (json == "")
...@@ -308,7 +315,7 @@ namespace BLL ...@@ -308,7 +315,7 @@ namespace BLL
return false; return false;
} }
JavaScriptSerializer serializer = new(); JavaScriptSerializer serializer = new();
Dictionary<string, object> dic; //Dictionary<string, object> dic;
try try
{ {
dic = (Dictionary<string, object>)serializer.DeserializeObject(json); dic = (Dictionary<string, object>)serializer.DeserializeObject(json);
...@@ -552,17 +559,25 @@ namespace BLL ...@@ -552,17 +559,25 @@ namespace BLL
{ {
if (extensions != null && !extensions[0].Control.InvokeRequired) if (extensions != null && !extensions[0].Control.InvokeRequired)
{ {
//自动打印and模板匹配成功,只负责打印标签
if (config.AutoPrint && match) if (config.AutoPrint && match)
{ {
//if (CanPrint())
PrintLabel(null, EventArgs.Empty); PrintLabel(null, EventArgs.Empty);
} }
} }
else //进行追溯配置保存
SaveRetrospect?.Invoke(key);
}
public Dictionary<string, string> ReplaceData(Dictionary<string, string> key)
{
string err = null;
Dictionary<string, object> dic=new Dictionary<string, object>();
if (!GetHttpReelID(key, out err, out dic))
{ {
//PrintLabel(null, EventArgs.Empty); return key;
} }
SaveRetrospect?.Invoke(key); return dic?.ToDictionary(a=>a.Key,a=>a.Value.ToString());
} }
} }
} }
......
...@@ -18,7 +18,6 @@ namespace BLL ...@@ -18,7 +18,6 @@ namespace BLL
public class KaiFa : IExtension public class KaiFa : IExtension
{ {
public event IExtension.PrintDelegate Printing; public event IExtension.PrintDelegate Printing;
public event IExtension.PrintDelegate SaveRetrospect; public event IExtension.PrintDelegate SaveRetrospect;
private Config config; private Config config;
private int reelID = 0; private int reelID = 0;
...@@ -51,6 +50,7 @@ namespace BLL ...@@ -51,6 +50,7 @@ namespace BLL
this.extensions = extensions; this.extensions = extensions;
ReadReelID(); ReadReelID();
} }
static bool mesResult = false; static bool mesResult = false;
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch,out string errmsg) public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch,out string errmsg)
{ {
...@@ -101,9 +101,6 @@ namespace BLL ...@@ -101,9 +101,6 @@ namespace BLL
{ {
} }
private bool CanPrint() private bool CanPrint()
{ {
int index = extensions.FindIndex(match => match.Control.Name == "TxtPart"); int index = extensions.FindIndex(match => match.Control.Name == "TxtPart");
...@@ -327,7 +324,5 @@ namespace BLL ...@@ -327,7 +324,5 @@ namespace BLL
//业务数据 //业务数据
public object Data { get; set; } public object Data { get; set; }
} }
} }
} }
...@@ -154,7 +154,10 @@ namespace BLL ...@@ -154,7 +154,10 @@ namespace BLL
if (Config.Func_EnabledOCR) if (Config.Func_EnabledOCR)
{ {
//保存需要识别ocr的区域 //保存需要识别ocr的区域
CurrntBitmap?.Save(@"ocr.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); //CurrntBitmap?.Save(@"ocr.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
string currentDirectory = System.Windows.Forms.Application.StartupPath;
string filePath = System.IO.Path.Combine(currentDirectory, "ocr.jpg");
CurrntBitmap?.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);
regOcrCodes = OcrRecognize("..\\ocr.jpg"); regOcrCodes = OcrRecognize("..\\ocr.jpg");
LogNet.log.Info($"OCR 识别结果:{regOcrCodes}"); LogNet.log.Info($"OCR 识别结果:{regOcrCodes}");
} }
...@@ -206,8 +209,6 @@ namespace BLL ...@@ -206,8 +209,6 @@ namespace BLL
return false; return false;
} }
private MaterialTemplate LoadFile(string filePath, string imgPath) private MaterialTemplate LoadFile(string filePath, string imgPath)
{ {
MaterialTemplate temp = new(); MaterialTemplate temp = new();
...@@ -752,20 +753,6 @@ namespace BLL ...@@ -752,20 +753,6 @@ namespace BLL
return key; return key;
} }
//==================================== //====================================
public int FindPrimaryCode(List<MaterialCode> code) public int FindPrimaryCode(List<MaterialCode> code)
{ {
//bool find = false; //bool find = false;
...@@ -898,13 +885,10 @@ namespace BLL ...@@ -898,13 +885,10 @@ namespace BLL
//} //}
/// <summary> /// <summary>
/// 物料模板名称 /// 物料模板名称
/// </summary> /// </summary>
/// <summary> /// <summary>
/// 物料模板总数 /// 物料模板总数
/// </summary> /// </summary>
...@@ -1031,16 +1015,6 @@ namespace BLL ...@@ -1031,16 +1015,6 @@ namespace BLL
// } // }
//} //}
/// <summary> /// <summary>
/// 另存为 /// 另存为
/// </summary> /// </summary>
...@@ -1153,11 +1127,5 @@ namespace BLL ...@@ -1153,11 +1127,5 @@ namespace BLL
// temp.Image.Save(temp.ImagePath, System.Drawing.Imaging.ImageFormat.Jpeg); // temp.Image.Save(temp.ImagePath, System.Drawing.Imaging.ImageFormat.Jpeg);
//} //}
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using System; using BLL;
using Model; using Model;
using System.Threading; using System;
using System.Windows.Forms;
using BLL;
using System.Diagnostics; using System.Diagnostics;
using System.IO; using System.IO;
using System.Threading;
using System.Windows.Forms;
namespace SmartScan namespace SmartScan
{ {
......
...@@ -259,7 +259,7 @@ namespace SmartScan ...@@ -259,7 +259,7 @@ namespace SmartScan
BLLCommon.extension.LoadPanel(PnlExtension, BLLCommon.macroKey); BLLCommon.extension.LoadPanel(PnlExtension, BLLCommon.macroKey);
//语言 //语言
CboLanguage.Items.AddRange(Language.Name); CboLanguage.Items.AddRange(Language.Name.ToArray());
CboLanguage.SelectedText = BLLCommon.config.Language; CboLanguage.SelectedText = BLLCommon.config.Language;
BLLCommon.AutoGenRules = AutoGenRule.LoadFile(); BLLCommon.AutoGenRules = AutoGenRule.LoadFile();
if (BLLCommon.config.OpenMaximize) Maximize(); if (BLLCommon.config.OpenMaximize) Maximize();
...@@ -324,6 +324,7 @@ namespace SmartScan ...@@ -324,6 +324,7 @@ namespace SmartScan
BLLCommon.config.Language = CboLanguage.Text; BLLCommon.config.Language = CboLanguage.Text;
BLLCommon.config.Save(); BLLCommon.config.Save();
changeBtnStartText(); changeBtnStartText();
Language.SetLanguage(this);
} }
} }
void changeBtnStartText() void changeBtnStartText()
......
...@@ -279,6 +279,10 @@ namespace SmartScan ...@@ -279,6 +279,10 @@ namespace SmartScan
{ {
value = pairs[item].ToString(); value = pairs[item].ToString();
} }
if (value.StartsWith("<OCR>"))
{
value = value.Replace("<OCR>", "");
}
value = value.Replace("\"\"", "\"\"\"\""); value = value.Replace("\"\"", "\"\"\"\"");
lines.Add("\""+value+"\""); lines.Add("\""+value+"\"");
} }
......
...@@ -74,7 +74,7 @@ namespace SmartScan ...@@ -74,7 +74,7 @@ namespace SmartScan
//语言 //语言
CboLanguage.Items.Clear(); CboLanguage.Items.Clear();
CboLanguage.Items.AddRange(Language.Name); CboLanguage.Items.AddRange(Language.Name.ToArray());
CboLanguage.SelectedText = BLLCommon.config.Language; CboLanguage.SelectedText = BLLCommon.config.Language;
} }
......
...@@ -286,6 +286,7 @@ namespace SmartScan ...@@ -286,6 +286,7 @@ namespace SmartScan
private bool MatchingTemplate() private bool MatchingTemplate()
{ {
LogNet.log.Info("Work MatchingTemplate"); LogNet.log.Info("Work MatchingTemplate");
//没有条码也继续进行模板匹配
//if (workCodeInfo.Count == 0) return false; //if (workCodeInfo.Count == 0) return false;
originalCodeText = Camera.GetBarCodeText(workCodeInfo); originalCodeText = Camera.GetBarCodeText(workCodeInfo);
...@@ -346,8 +347,5 @@ namespace SmartScan ...@@ -346,8 +347,5 @@ namespace SmartScan
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog(); new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
} }
} }
} }
} }
...@@ -64,6 +64,7 @@ namespace SmartScan ...@@ -64,6 +64,7 @@ namespace SmartScan
private string[] FormatCode() private string[] FormatCode()
{ {
List<string> item = new(); List<string> item = new();
for (int i = 0; i < mateCopy[mateIndex].Code.Count; i++) for (int i = 0; i < mateCopy[mateIndex].Code.Count; i++)
{ {
item.Add(FormatCode(i)); item.Add(FormatCode(i));
...@@ -227,6 +228,7 @@ namespace SmartScan ...@@ -227,6 +228,7 @@ namespace SmartScan
mateCopy[mateIndex].ImagePath = ""; mateCopy[mateIndex].ImagePath = "";
mateCopy[mateIndex].Image = bmp; mateCopy[mateIndex].Image = bmp;
ImgShow.Image = bmp; ImgShow.Image = bmp;
iscamp = true;
} }
private void BtnLocalImage_Click(object sender, EventArgs e) private void BtnLocalImage_Click(object sender, EventArgs e)
...@@ -243,8 +245,9 @@ namespace SmartScan ...@@ -243,8 +245,9 @@ namespace SmartScan
mateCopy[mateIndex].ImagePath = ""; mateCopy[mateIndex].ImagePath = "";
mateCopy[mateIndex].Image = bmp; mateCopy[mateIndex].Image = bmp;
ImgShow.Image = bmp; ImgShow.Image = bmp;
iscamp = false;
} }
public bool iscamp = true;
private void BtnScanCode_Click(object sender, EventArgs e) private void BtnScanCode_Click(object sender, EventArgs e)
{ {
if (mateIndex == -1) return; if (mateIndex == -1) return;
...@@ -256,7 +259,8 @@ namespace SmartScan ...@@ -256,7 +259,8 @@ namespace SmartScan
return; return;
} }
List<BarcodeInfo> info = null; List<BarcodeInfo> info = null;
if (Camera.useIDCamera)
if (iscamp&&Camera.useIDCamera)
{ {
Bitmap[] result = Camera.CaptureAndGetCode(out info); Bitmap[] result = Camera.CaptureAndGetCode(out info);
if (result.Length == 0) return; if (result.Length == 0) return;
...@@ -270,6 +274,7 @@ namespace SmartScan ...@@ -270,6 +274,7 @@ namespace SmartScan
info = Camera.GetBarCode(bmp); info = Camera.GetBarCode(bmp);
} }
//info = Camera.GetBarCode(bmp);
LstCode.Items.Clear(); LstCode.Items.Clear();
ImgShow.CodeCenterClear(); ImgShow.CodeCenterClear();
mateCopy[mateIndex].Match.Clear(); mateCopy[mateIndex].Match.Clear();
...@@ -458,8 +463,17 @@ namespace SmartScan ...@@ -458,8 +463,17 @@ namespace SmartScan
if (bmp == null) return; if (bmp == null) return;
LstCode.Items.Clear(); LstCode.Items.Clear();
//保存需要识别ocr的区域 //保存需要识别ocr的区域
bmp?.Save(@"ocrt.jpg", System.Drawing.Imaging.ImageFormat.Jpeg); //bmp?.Save(@"ocrt.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
string currentDirectory = System.Windows.Forms.Application.StartupPath;
string filePath = System.IO.Path.Combine(currentDirectory, "ocrt.jpg");
bmp?.Save(filePath, System.Drawing.Imaging.ImageFormat.Jpeg);
string[] regOcrCodes = PaddleOCRHelper.StartTest("..\\ocrt.jpg").Split(';'); string[] regOcrCodes = PaddleOCRHelper.StartTest("..\\ocrt.jpg").Split(';');
var entity= mateCopy[mateIndex].Code.Where(a => a.CodeType.Equals(Setting_Str.OCR)).ToList();
foreach (var item in entity)
{
mateCopy[mateIndex].Code.Remove(item);
}
int startidx = BLLCommon.mateMaxCodeID + 1; int startidx = BLLCommon.mateMaxCodeID + 1;
foreach (var ocr in regOcrCodes) foreach (var ocr in regOcrCodes)
{ {
......
...@@ -89,8 +89,9 @@ ...@@ -89,8 +89,9 @@
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="MaterialSkin"> <Reference Include="MaterialSkin, Version=2.3.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>D:\贾鹏旭_项目文件\Gilocation\Gilocation.Entrance\bin\Debug\MaterialSkin.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>D:\Desktop\项目\ns100\NS100\SharedDll\MaterialSkin.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
...@@ -355,6 +356,12 @@ ...@@ -355,6 +356,12 @@
<DependentUpon>UsrCodeExtractList.cs</DependentUpon> <DependentUpon>UsrCodeExtractList.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="app.manifest" /> <None Include="app.manifest" />
<None Include="Language\en-US.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Language\zh-CN.lngres">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="log4net.config"> <None Include="log4net.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -399,12 +406,6 @@ ...@@ -399,12 +406,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="App.ico" /> <Content Include="App.ico" />
<Content Include="Language\en-US.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Language\zh-CN.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Resources\copy.png" /> <None Include="Resources\copy.png" />
<None Include="Resources\validate.png" /> <None Include="Resources\validate.png" />
<None Include="Resources\filter.png" /> <None Include="Resources\filter.png" />
......
...@@ -82,6 +82,15 @@ namespace SmartScan ...@@ -82,6 +82,15 @@ namespace SmartScan
LogNet.log.Info("Work scan is done"); LogNet.log.Info("Work scan is done");
List<KeyValuePair<string, string>> result = new List<KeyValuePair<string, string>>(); List<KeyValuePair<string, string>> result = new List<KeyValuePair<string, string>>();
#region 判断是否需要请求http替换数据
if (BLL.Config.isReplaceData)
{
Dictionary<string, string> keyValues = new Dictionary<string, string>();
workCodeKeyword= BLLCommon.extension.ReplaceData(workCodeKeyword);
}
#endregion
foreach (var wc in workCodeKeyword) foreach (var wc in workCodeKeyword)
{ {
result.Add(new KeyValuePair<string, string>(wc.Key, wc.Value)); result.Add(new KeyValuePair<string, string>(wc.Key, wc.Value));
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup> </startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.15.0" newVersion="2.0.15.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>
...@@ -80,6 +80,7 @@ namespace paddleOCR ...@@ -80,6 +80,7 @@ namespace paddleOCR
int flag; int flag;
log.Info($"准备读取图像:{imgPath}"); log.Info($"准备读取图像:{imgPath}");
flag = VisionAPI.eyemImageRead(imgPath, -1, out image); flag = VisionAPI.eyemImageRead(imgPath, -1, out image);
log.Info($"图像通道为:{image.iChannels}");
log.Info($"读取图像:{imgPath},rtnCode={flag}"); log.Info($"读取图像:{imgPath},rtnCode={flag}");
///实例分割 ///实例分割
/// ///
...@@ -295,9 +296,9 @@ namespace paddleOCR ...@@ -295,9 +296,9 @@ namespace paddleOCR
EyemImage image = new EyemImage(); EyemImage image = new EyemImage();
EyemImage tpDstImg = new EyemImage(); EyemImage tpDstImg = new EyemImage();
int flag; int flag;
log.Info($"OCRHandleRewrite:OCRHandleRewrite:准备读取图像:{imgPath}"); log.Info($"OCRHandleRewrite:准备读取图像:{imgPath}");
flag = VisionAPI.eyemImageRead(imgPath, -1, out image); flag = VisionAPI.eyemImageRead(imgPath, -1, out image);
log.Info($"OCRHandleRewrite:读取图像:{imgPath},rtnCode={flag}"); log.Info($"OCRHandleRewrite:读取图像:{imgPath},rtnCode={flag},通道数为{image.iChannels}");
///实例分割 ///实例分割
{ {
RotateBox container = new RotateBox(); RotateBox container = new RotateBox();
...@@ -431,7 +432,7 @@ namespace paddleOCR ...@@ -431,7 +432,7 @@ namespace paddleOCR
string[] strs = stringLists.ToArray(); string[] strs = stringLists.ToArray();
foreach (string str in strs) foreach (string str in strs)
{ {
if (string.IsNullOrEmpty(str)) continue; if (string.IsNullOrWhiteSpace(str)) continue;
result += str + ";"; result += str + ";";
} }
if (result.EndsWith(";")) if (result.EndsWith(";"))
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="log4net" version="2.0.15" targetFramework="net472" /> <package id="log4net" version="2.0.15" targetFramework="net472" />
<package id="PaddleOCRSharp" version="2.3.0" targetFramework="net472" requireReinstallation="true" /> <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net48" />
<package id="PaddleOCRSharp" version="2.3.0" targetFramework="net48" />
</packages> </packages>
\ No newline at end of file \ No newline at end of file
...@@ -15,6 +15,21 @@ ...@@ -15,6 +15,21 @@
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
...@@ -79,12 +94,11 @@ ...@@ -79,12 +94,11 @@
<Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.15.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.15\lib\net45\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<HintPath>..\SmartScan\bin\Debug\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="PaddleOCRSharp, Version=2.3.0.0, Culture=neutral, processorArchitecture=AMD64"> <Reference Include="PaddleOCRSharp, Version=2.3.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\PaddleOCRSharp.2.3.0\lib\net472\PaddleOCRSharp.dll</HintPath> <HintPath>..\packages\PaddleOCRSharp.2.3.0\lib\net48\PaddleOCRSharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="System"> <Reference Include="System">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll</HintPath> <HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll</HintPath>
...@@ -159,11 +173,23 @@ ...@@ -159,11 +173,23 @@
<Name>Model</Name> <Name>Model</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.8 %28x86 和 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets" Condition="Exists('..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets')" /> <Import Project="..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets" Condition="Exists('..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets'))" /> <Error Condition="!Exists('..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PaddleOCRSharp.2.3.0\build\PaddleOCRSharp.targets'))" />
</Target> </Target>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!