Commit 1fe12e83 张东亮

init

0 个父辈
正在显示 265 个修改的文件 包含 4896 行增加0 行删除
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F7499DE9-5665-49FD-BDB6-602B9AF98541}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BLL</RootNamespace>
<AssemblyName>BLL</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8398.28384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
</Reference>
<Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="ConfigHelper, Version=1.0.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.16.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.16.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference>
<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>
</Reference>
<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>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TcpKPIO">
<HintPath>..\..\..\DllLibrary\第三方\泥人科技-网络继电器\TcpKPIO.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.6\lib\net461\zxing.dll</HintPath>
</Reference>
<Reference Include="zxing.presentation, Version=0.16.6.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.6\lib\net461\zxing.presentation.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="ConvertBarcode.cs" />
<Compile Include="Extension.cs" />
<Compile Include="Extension\Item_Alcoelectro.cs" />
<Compile Include="Extension\EventGroup.cs" />
<Compile Include="Extension\Item_Inventec.cs" />
<Compile Include="Extension\Item_General.cs" />
<Compile Include="Extension\Item_NanRui.cs" />
<Compile Include="Extension\Item_KaiFa.cs" />
<Compile Include="Extension\Item_PanaCIM.cs" />
<Compile Include="ExtraFileData.cs" />
<Compile Include="IO\IOManage.cs" />
<Compile Include="IO\IO_Interface.cs" />
<Compile Include="IO\KND.cs" />
<Compile Include="IO\NiRenIO.cs" />
<Compile Include="MatchAnalysis.cs" />
<Compile Include="MonitorMouseKeyboard.cs" />
<Compile Include="NamedPipeClient.cs" />
<Compile Include="PaddleOCRHelper.cs" />
<Compile Include="PrinterHelper.cs" />
<Compile Include="PrintLabelEdit.cs" />
<Compile Include="MaterialEdit.cs" />
<Compile Include="PrintLabelShow.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Setting_Str.cs" />
<Compile Include="TextBlock.cs" />
<Compile Include="UsersLogin.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DAL\DAL.csproj">
<Project>{e28de77a-fc70-4be4-96ec-d0c1a7215a15}</Project>
<Name>DAL</Name>
</ProjectReference>
<ProjectReference Include="..\Model\Model.csproj">
<Project>{20e61a3d-bf87-4a99-9756-7fe13d2daa6e}</Project>
<Name>Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
此文件的差异被折叠, 点击展开。
using System;
using System.Collections.Generic;
using System.Drawing;
using Model;
namespace BLL
{
public static class ConvertBarcode
{
private static int width;
private static int height;
private static string text;
private static readonly ZXing.BarcodeWriter writer = new();
private static readonly Dictionary<PrintLabelFieldType, Func<Bitmap>> code = new()
{
{ PrintLabelFieldType.Text, Text },
{ PrintLabelFieldType.Code39, Code39 },
{ PrintLabelFieldType.Code93, Code93 },
{ PrintLabelFieldType.Code128, Code128 },
{ PrintLabelFieldType.DataMatrix, DATA_MATRIX },
{ PrintLabelFieldType.QRCode, QR_CODE },
{ PrintLabelFieldType.PDF417, PDF_417 }
};
public static Bitmap StrToCode(PrintLabelFieldType type, string s, SizeF size)
{
text = s;
width = Convert.ToInt32(size.Width);
height = Convert.ToInt32(size.Height);
return code[type].Invoke();
}
private static Bitmap Text()
{
return null;
}
private static Bitmap Code39()
{
try
{
ZXing.Common.EncodingOptions opt = new()
{
Width = width,
Height = height,
Margin = 2,
PureBarcode = true
};
writer.Options = opt;
writer.Format = ZXing.BarcodeFormat.CODE_39;
return writer.Write(text);
}
catch (Exception ex)
{
LogNet.log.Error("Code39", ex);
return null;
}
}
private static Bitmap Code93()
{
try
{
ZXing.Common.EncodingOptions opt = new()
{
Width = width,
Height = height,
Margin = 2,
PureBarcode = true
};
writer.Options = opt;
writer.Format = ZXing.BarcodeFormat.CODE_93;
return writer.Write(text);
}
catch (Exception ex)
{
LogNet.log.Error("Code93", ex);
return null;
}
}
private static Bitmap Code128()
{
try
{
ZXing.Common.EncodingOptions opt = new()
{
Width = width,
Height = height,
Margin = 2,
PureBarcode = true
};
writer.Options = opt;
writer.Format = ZXing.BarcodeFormat.CODE_128;
return writer.Write(text);
}
catch (Exception ex)
{
LogNet.log.Error("Code128", ex);
return null;
}
}
private static Bitmap DATA_MATRIX()
{
try
{
ZXing.Datamatrix.DatamatrixEncodingOptions opt = new()
{
Width = width,
Height = height,
Margin = 2,
PureBarcode = true
};
writer.Options = opt;
writer.Format = ZXing.BarcodeFormat.DATA_MATRIX;
return writer.Write(text);
}
catch (Exception ex)
{
LogNet.log.Error("DATA_MATRIX", ex);
return null;
}
}
private static Bitmap QR_CODE()
{
try
{
ZXing.QrCode.QrCodeEncodingOptions opt = new()
{
DisableECI = true,
CharacterSet = "UTF-8",
//Width = width,
//Height = height,
Width = 300,
Height = 300,
Margin = 1,
PureBarcode = true
};
writer.Options = opt;
writer.Format = ZXing.BarcodeFormat.QR_CODE;
return writer.Write(text);
}
catch (Exception ex)
{
LogNet.log.Error("QR_CODE", ex);
return null;
}
}
private static Bitmap PDF_417()
{
try
{
ZXing.PDF417.PDF417EncodingOptions opt = new()
{
DisableECI = true,
CharacterSet = "UTF-8",
Width = 100,
//Height = height,
Margin = 2,
PureBarcode = true
};
writer.Options = opt;
writer.Format = ZXing.BarcodeFormat.PDF_417;
return writer.Write(text);
}
catch (Exception ex)
{
LogNet.log.Error("PDF_417", ex);
return null;
}
}
}
}
此文件的差异被折叠, 点击展开。
//using Model;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//namespace ExtensionGroup
//{
// public class EventGroup
// {
// public event IExtension.PrintDelegate Printing;
// private readonly Dictionary<string, IExtension> extEvent;
// private readonly Alcoelectro alcoelectro = new();
// private readonly Inventec inventec = new();
// private readonly PanaCIM panaCIM = new();
// private readonly Item_NanRui nanRui = new();
// private readonly KaiFa kaiFa = new();
// public EventGroup()
// {
// extEvent = new()
// {
// { "Bwit", alcoelectro },
// { "Inventec", inventec },
// { "PanaCIM", panaCIM },
// { "NanRui", nanRui },
// { "KaiFa", kaiFa }
// };
// for (int i = 0; i < extEvent.Count; i++)
// extEvent.ElementAt(i).Value.Printing += Group_Printing;
// }
// public IExtension GetEventGroup(string name)
// {
// if (extEvent.ContainsKey(name))
// return extEvent[name];
// else
// return null;
// }
// private void Group_Printing(Dictionary<string, string> content)
// {
// Printing?.Invoke(content);
// }
// }
//}
using BLL;
using ClosedXML.Excel;
using Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class ExtraFileData
{
public static Dictionary<string, Dictionary<string, string>> AllData = new Dictionary<string, Dictionary<string, string>>();
public static List<string> Titles = new List<string>();
public static void Init() {
var ext = Path.GetExtension(Config.DataSource_String);
if (string.IsNullOrEmpty(ext))
{
return;
}
ext = ext.ToLower();
AllData.Clear();
if (ext == ".xlsx")
LoadXLSALlData();
else if (ext == ".csv")
LoadCSVALlData();
}
public static void LoadCSVALlData()
{
LogNet.log.Info("数据源:" + Config.DataSource_String);
if (!File.Exists(Config.DataSource_String))
{
return;
throw new FileNotFoundException(Config.DataSource_String);
}
Titles = ParseCSVFileTitle(Config.DataSource_String);
//Common.extraKey = titles;
string[] files;
if (Config.DataSource_Recursive)
{
var ext = Path.GetExtension(Config.DataSource_String);
var path = Path.GetDirectoryName(Config.DataSource_String);
files=Directory.GetFiles(path, "*" + ext);
}
else
{
files = new string[] { Config.DataSource_String };
}
foreach (var file in files)
{
LogNet.log.Info("数据源加载文件:"+file);
try
{
using var sm = new StreamReader(file, Encoding.GetEncoding(Config.DataSource_Encoding));
while (true)
{
var dataline = sm.ReadLine();
if (string.IsNullOrWhiteSpace(dataline))
break;
var datas = dataline.Split(',');
if (datas.Length < Titles.Count)
continue;
string keydata = "";
var rowdata = new Dictionary<string, string>();
for (int i = 0; i < Titles.Count; i++)
{
rowdata.Add(Titles[i], datas[i]);
if (Titles[i] == Config.DataSource_DataTitle)
{
keydata = datas[i];
}
}
if (!string.IsNullOrEmpty(keydata) && !AllData.ContainsKey(keydata))
AllData.Add(keydata, rowdata);
}
}
catch(Exception ex) {
LogNet.log.Info("数据源加载文件出错:" + ex.ToString());
}
}
//Common.extraData = AllData;
}
public static List<string> ParseCSVFileTitle(string filename)
{
if (!File.Exists(filename))
return new List<string>() ;
using var sm = new StreamReader(filename, Encoding.GetEncoding(Config.DataSource_Encoding.Val));
var titleline = sm.ReadLine();
var titles = new List<string>(titleline.Split(','));
return titles;
}
public static void LoadXLSALlData() {
if (!File.Exists(Config.DataSource_String)) {
return;
//throw new FileNotFoundException(Config.DataSource_String);
}
Titles = ParseXLSFileTitle(Config.DataSource_String);
//Common.extraKey = titles;
string[] files;
if (Config.DataSource_Recursive)
{
var ext = Path.GetExtension(Config.DataSource_String);
var path = Path.GetDirectoryName(Config.DataSource_String);
files = Directory.GetFiles(path, "*" + ext);
}
else
{
files = new string[] { Config.DataSource_String };
}
foreach (var file in files)
{
LogNet.log.Info("数据源加载文件:" + file);
try
{
XLWorkbook wb = new XLWorkbook(file);
IXLWorksheet ws = wb.Worksheet(1);
int emptyrow = 0;
int currow = 0;
while (emptyrow < 3)
{
string keydata = "";
var rowdata = new Dictionary<string, string>();
for (int i = 0; i < Titles.Count; i++)
{
var v = ws.Row(currow + 1).Cell(i + 1).Value.ToString().Trim();
rowdata.Add(Titles[i], v);
if (Titles[i] == Config.DataSource_DataTitle)
{
keydata = v;
if (string.IsNullOrWhiteSpace(v))
emptyrow++;
}
}
if (!string.IsNullOrEmpty(keydata) && !AllData.ContainsKey(keydata))
AllData.Add(keydata, rowdata);
if (string.IsNullOrEmpty(keydata))
emptyrow++;
currow++;
}
}
catch (Exception ex)
{
LogNet.log.Info("数据源加载文件出错:" + ex.ToString());
}
}
//Common.extraData = AllData;
}
public static List<string> ParseXLSFileTitle(string filename)
{
List<string> titles = new List<string>();
int emptycolcount = 0;
if (!File.Exists(filename))
return titles;
XLWorkbook wb = new XLWorkbook(filename);
IXLWorksheet ws = wb.Worksheet(1);
for (int i = 1; i < 50; i++)
{
var v = ws.Row(1).Cell(i).Value.ToString().Trim();
if (string.IsNullOrEmpty(v))
{
emptycolcount++;
if (emptycolcount > 3)
{
break;
}
}
if (!string.IsNullOrEmpty(v))
{
titles.Add(v);
}
}
return titles;
}
public static Encoding GetEncoding(string coding) {
try
{
return Encoding.GetEncoding(coding);
}
catch {
return Encoding.UTF8;
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class IOManage : IO_Interface
{
IO_Interface iom;
public IOManage(string ip,string iomodule="") {
if (string.IsNullOrWhiteSpace(iomodule))
iom = new KND_IO(ip);
else
iom = new NiRenIO(ip);
iom.DI_Changed_Event += Iom_DI_Changed_Event;
}
private void Iom_DI_Changed_Event(Status[] sta)
{
DI_Changed_Event?.Invoke(sta);
}
/// <summary>
/// 自动读取DI委托
/// </summary>
/// <param name="sta">状态</param>
public delegate void DI_Changed(Status[] sta);
public string IP { get=>iom.IP; set=>iom.IP=value; }
public bool IsConn { get => iom.IsConn;}
public int Port { get => iom.Port; set => iom.Port = value; }
public event DI_Changed DI_Changed_Event;
public void Close()
{
iom.Close();
}
public bool Connect()
{
return iom.Connect();
}
public bool ReadDI(Addr add, out Status sta)
{
return iom.ReadDI(add, out sta);
}
public bool ReadDO(Addr add, out Status sta)
{
return iom.ReadDO(add, out sta);
}
public bool WriteDO(int add, Status sta)
{
return iom.WriteDO(add, sta);
}
}
}
namespace BLL
{
public interface IO_Interface
{
//string ErrInfo { get; }
//string Gateway { get; set; }
string IP { get; set; }
bool IsConn { get; }
//string Mask { get; set; }
int Port { get; set; }
event IOManage.DI_Changed DI_Changed_Event;
void Close();
bool Connect();
//bool ReadDI(Addr add, int count, out Status[] sta);
bool ReadDI(Addr add, out Status sta);
bool ReadDO(Addr add, out Status sta);
//bool ReadDO(Addr add, uint count, out Status[] sta);
//Status ReverseStatus(Status sta);
//bool WriteDO(Addr add, Status sta);
//bool WriteDO(Addr add, Status[] sta);
bool WriteDO(int add, Status sta);
//bool WriteDO_Reverse(Addr add, ref Status sta);
}
}
\ No newline at end of file
此文件的差异被折叠, 点击展开。
using BLL;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
class NiRenIO: IO_Interface
{
const int IoCount = 8;
byte station = 1;
public string IP;
TcpClient tcpClient = new TcpClient();
Thread iomonitorThread;
ushort seq = 0;
/// <summary>
///
/// </summary>
/// <param name="changindex">变化的io列表</param>
/// <param name="sta">所有IO状态</param>
public delegate void IO_Changed(List<int> changindex, bool[] sta);
public event IO_Changed DI_Changed_Event_a;
public event IO_Changed DO_Changed_Event;
/// <summary>
/// 连接状态变化, 手动连接不触发
/// </summary>
public event EventHandler<bool> ConnectionState_Event;
public NiRenIO(string ip)
{
this.IP = ip;
//DOdata[0] = 0x00;
//DOdata[1] = 0x00;
iomonitorThread = new Thread(new ThreadStart(iomonitor));
}
public event IOManage.DI_Changed DI_Changed_Event;
~NiRenIO()
{
iomonitorrun = false;
Close();
}
bool systemrun = false;
/// <summary>
/// 打开IO
/// </summary>
/// <returns></returns>
public bool Open()
{
tcpClient.Dispose();
tcpClient = new TcpClient();
tcpClient.ReceiveTimeout = 50;
tcpClient.SendTimeout = 50;
lock (tcpClient)
{
try
{
var connectResult = tcpClient.ConnectAsync(IP, 12345);
if (connectResult.Wait(1000))
{
systemrun = true;
iomonitorrun = true;
iomonitorThread = new Thread(new ThreadStart(iomonitor));
iomonitorThread.Start();
ConnectionState_Event?.Invoke(this, true);
return true;
}
else
{
tcpClient.EndConnect(connectResult);
tcpClient.Close();
return false;
}
}
catch
{
return false;
}
}
}
/// <summary>
/// 关闭IO
/// </summary>
public void Close()
{
try
{
systemrun = false;
iomonitorrun = false;
if (tcpClient.Connected)
tcpClient.Close();
}
catch { }
}
/// <summary>
/// 连接状态
/// </summary>
public bool IsConn
{
get => iomonitorrun && systemrun;
}
string IO_Interface.IP { get; set; }
public int Port { get; set; }
bool iomonitorrun = false;
/// <summary>
/// 循环读全部IO
/// </summary>
void iomonitor()
{
iomonitorrun = true;
while (iomonitorrun && systemrun)
{
Thread.Sleep(3);
try
{
ReadDO();
}
catch (SocketException)
{
readerrtimes = 0;
if (tcpClient.Connected)
tcpClient.Close();
ConnectionState_Event?.Invoke(this, false);
iomonitorrun = false;
}
catch(Exception)
{
}
}
if (systemrun)
{
do
{
Thread.Sleep(1000);
} while (systemrun && !Open());
}
}
/// <summary>
/// 写io
/// </summary>
/// <param name="donum">地址</param>
/// <param name="state">On/Off</param>
/// <returns></returns>
public bool WriteDO(int donum, bool state)
{
const string CMD_WriteDI = "AT+STACH{0}={1}\r\n";
var CMDSEND = string.Format(CMD_WriteDI, donum + 1, state ? "1": "0");
Debug.WriteLine("CMDSEND:" + CMDSEND);
var sendbyte = Encoding.ASCII.GetBytes(CMDSEND);
lock (tcpClient)
{
try
{
tcpClient.Client.Send(sendbyte);
Thread.Sleep(2);
byte[] result = new byte[100];
var ulength = tcpClient.Client.Receive(result);
if (ulength > 0) {
var recive = Encoding.ASCII.GetString(result, 0, ulength);
Debug.WriteLine("recive:" + recive);
if (recive.StartsWith("OK"))
return true;
}
}
catch
{
return false;
}
}
return false;
}
/// <summary>
/// 所有DI状态
/// </summary>
public bool[] DIstate = new bool[IoCount];
/// <summary>
/// 所有DO状态
/// </summary>
public bool[] DOstate = new bool[IoCount];
bool[] lastDIstate = new bool[IoCount];
bool[] lastDOstate = new bool[IoCount];
int readerrtimes = 0;
/// <summary>
/// 读全部IO
/// </summary>
void ReadDO()
{
const string CMD_ReadDI = "AT+OCCH0=?\r\n";
const string CMD_ReadD0 = "AT+STACH0=?\r\n";
const string CMD_ReadALL = CMD_ReadDI + CMD_ReadD0;
var sendbyte = Encoding.ASCII.GetBytes(CMD_ReadALL);
Debug.WriteLine("CMD_ReadALL:"+ CMD_ReadALL);
var resultbuffer = new byte[2048];
int ulength = 0;
lock (tcpClient)
{
try
{
tcpClient.Client.Send(sendbyte);
Thread.Sleep(5);
ulength = tcpClient.Client.Receive(resultbuffer);
readerrtimes = 0;
}
catch (SocketException se)
{
readerrtimes++;
Thread.Sleep(100);
if (readerrtimes > 5)
{
Debug.WriteLine("Read IO Error");
throw se;
}
return;
}
}
if (ulength == 0) {
return;
}
var recive = Encoding.ASCII.GetString(resultbuffer, 0, ulength);
Debug.WriteLine("recive:"+ recive);
var datas = recive.Split(new char[] { '\r', '\n' });
/*
+STACH1:0,100000
+STACH2:0,100000
+OCCH1:0
+OCCH2:0
*/
foreach (var data in datas) {
if (!data.StartsWith("+"))
continue;
if (data.StartsWith("+STACH"))
{
var ds = data.Split(':');
var d = ds[0].Substring(6);
if (!int.TryParse(d, out int doindex))
continue;
doindex = doindex - 1;
var sta = ds[1].StartsWith("1") ? true : false;
DOstate[doindex] = sta;
}
else if (data.StartsWith("+OCCH"))
{
var ds = data.Split(':');
var d = ds[0].Substring(5);
if (!int.TryParse(d, out int doindex))
continue;
doindex = doindex - 1;
var sta = ds[1].StartsWith("1") ? true : false;
DIstate[doindex] = sta;
}
}
for (int i = 0; i < IoCount; i++)
{
List<int> dichgindex = new List<int>();
List<int> dochgindex = new List<int>();
if (lastDIstate[i] != DIstate[i])
{
dichgindex.Add(i);
lastDIstate[i] = DIstate[i];
}
if (lastDOstate[i] != DOstate[i])
{
dochgindex.Add(i);
lastDOstate[i] = DOstate[i];
}
if (dichgindex.Count > 0)
{
DI_Changed_Event_a?.BeginInvoke(dichgindex, DIstate, null, null);
var statuses =DIstate.Select(d => { return d ? Status.On : Status.Off; }).ToArray();
DI_Changed_Event?.BeginInvoke(statuses, null, null);
}
if (dochgindex.Count > 0)
DO_Changed_Event?.BeginInvoke(dochgindex, DOstate, null, null);
}
}
void seqadd()
{
seq++;
if (seq >= ushort.MaxValue - 10)
seq = 0;
}
public bool Connect()
{
return Open();
}
public bool ReadDI(Addr add, out Status sta)
{
sta = Status.Off;
try
{
int index = ((int)add) - 10200;
var onoff = DIstate[index];
sta = onoff? Status.On : Status.Off;
return true;
}
catch
{
return false;
}
}
public bool ReadDO(Addr add, out Status sta)
{
sta = DOstate[(int)add - 100]? Status.On : Status.Off;
return true;
}
public bool WriteDO(int add, Status sta)
{
for (int i = 0; i < 10; i++)
{
if (WriteDO(add, sta == Status.On))
{
return true;
}
Thread.Sleep(100);
}
return false;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TcpKPIO;
namespace BLL
{
public class NirenIO1 : IO_Interface
{
static int diCount = 2;
public event IOManage.DI_Changed DI_Changed_Event;
public string IP { get; set; }
public bool IsConn
{
get
{
var i= 0;
while (i < 5)
{
var isonline = KPIOServer.DeviceIsOnline(IP);
if (isonline)
return true;
i++;
Thread.Sleep(1000);
}
return false;
}
}
public int Port { get; set; }
public NirenIO(string ip)
{
IP = ip;
Port = 6000;
bool rtn = KPIOServer.StartServer(Port);
KPIOServer.DeviceDIChangeEvent += KPIOServer_DeviceDIChangeEvent;
KPIOServer.DeviceOnlineEvent += KPIOServer_DeviceOnlineEvent;
IOLogUtil.info($"开启IO模块:{rtn}");
}
private void KPIOServer_DeviceOnlineEvent(string ip)
{
IP = ip;
IOLogUtil.info($"IO模块:{IP}上线");
}
private void KPIOServer_DeviceDIChangeEvent(string ip, int[] diStatus)
{
Status[] statuses = new Status[diStatus.Length];
for (int i = 0; i < diStatus.Length; i++)
{
statuses[i] = diStatus[i] == 0 ? Status.On : Status.Off;
}
DI_Changed_Event?.Invoke(statuses);
}
public void Close()
{
KPIOServer.StopServer();
}
public bool Connect()
{
//throw new NotImplementedException();
return true;
}
public bool ReadDI(Addr add, out Status sta)
{
sta = Status.Off;
try
{
int index = ((int)add) - 10200;
var onoff = KPIOServer.GetDI(IP, index);
sta = onoff == 0 ? Status.Off : Status.On;
return true;
}
catch
{
return false;
}
}
public bool ReadDO(Addr add, out Status sta)
{
sta = KPIOServer.GetDO(IP, (int)add - 100) == 0 ? Status.Off : Status.On;
return true;
}
public bool WriteDO(int add, Status sta)
{
return KPIOServer.WriteDO(IP, add, sta== Status.On ?1:0);
}
}
}
using CameraVisionLib.Model;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class MatchAnalysis
{
public static void StartNewAnalysis(List<BarcodeInfo> code)
{
MatchTemplateList = new ();
}
static string CurrnetTemplateName="";
static BarcodeInfo CurrnetBarcode;
static public void SetTemplatename(string name) {
CurrnetTemplateName = name;
if (!MatchTemplateList.ContainsKey(CurrnetTemplateName))
{
MatchTemplateList.Add(CurrnetTemplateName, new TemplateCollection());
}
}
static public void SetBarcode(BarcodeInfo name)
{
CurrnetBarcode = name;
if (!MatchTemplateList[CurrnetTemplateName].BarcodeMatchs.ContainsKey(name.Text))
{
MatchTemplateList[CurrnetTemplateName].BarcodeMatchs.Add(name.Text, new BarcodeMatch(name));
MatchTemplateList[CurrnetTemplateName].barcodeInfos.Add(name);
}
}
public static void AddMatch(string matchKey, bool isMatch, int codeID, string colName,string matchDesc) {
Match match = new Match(matchKey, isMatch, codeID, colName,matchDesc);
var ms = MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections;
if (!ms.ContainsKey(matchKey))
ms.Add(matchKey,new MatchCollection());
ms[matchKey].Matchs.Add(match);
if (!MatchTemplateList[CurrnetTemplateName].MatchCollections.ContainsKey(matchKey))
{
MatchTemplateList[CurrnetTemplateName].MatchCollections.Add(matchKey, new MatchCollection());
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].barcodeInfo = CurrnetBarcode;
}
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].Matchs.Add(match);
}
public static void MatchResult(string matchKey, bool isMatch) {
if (!MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections.ContainsKey(matchKey))
return;
MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections[matchKey].isMatch = isMatch;
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey]=MatchTemplateList[CurrnetTemplateName].BarcodeMatchs[CurrnetBarcode.Text].MatchCollections[matchKey];
MatchTemplateList[CurrnetTemplateName].MatchCollections[matchKey].barcodeInfo = CurrnetBarcode;
}
public static void TemplateResult(bool isMatch) {
MatchTemplateList[CurrnetTemplateName].isMatch = isMatch;
}
static Dictionary<string, TemplateCollection> MatchTemplateList;
public static void ShowResult()
{
return;
foreach (var tp in MatchTemplateList) {
LogNet.log.Info($"开始解析模版:{tp.Key}");
foreach (var m in tp.Value.MatchCollections) {
LogNet.log.Info($"开始解析关键字:{m.Key}");
LogNet.log.Info($"匹配到关键字:{m.Key}");
string matchlist = m.Value.barcodeInfo.Text + "\t";
foreach (var item in m.Value.Matchs)
{
matchlist += $"{item.colName},{item.isMatch}\t";
}
LogNet.log.Info(matchlist);
}
}
}
public class TemplateCollection
{
public Dictionary<string, BarcodeMatch> BarcodeMatchs=new ();
public List<BarcodeInfo> barcodeInfos = new();
public Dictionary<string, MatchCollection> MatchCollections = new();
public bool isMatch;
}
public class MatchCollection
{
public string MatchKey;
public List<Match> Matchs = new ();
public BarcodeInfo barcodeInfo;
public bool isMatch;
public string result;
}
public class BarcodeMatch {
public BarcodeInfo barcode;
public Dictionary<string, MatchCollection> MatchCollections = new();
public bool isMatch=false;
public BarcodeMatch(BarcodeInfo barcode)
{
this.barcode = barcode;
}
}
public class Match {
public string matchKey;
public bool isMatch;
public int codeID;
public string colName;
public string matchDesc;
public Match(string matchKey, bool isMatch, int codeID, string colName,string matchDesc) {
this.matchKey = matchKey;
this.isMatch = isMatch;
this.codeID = codeID;
this.colName = colName;
this.matchDesc = matchDesc;
}
}
}
}
此文件的差异被折叠, 点击展开。
using System;
using System.Collections.Generic;
using System.Threading;
using System.Windows.Forms;
namespace BLL
{
public class MonitorMouseKeyboard : IMessageFilter
{
public event EventHandler Timeout;
private bool loop;
private DateTime startTime;
private readonly List<int> message = new() {
0x0100, //按下键盘某键
0x0101, //释放键盘某键
0x0200, //鼠标移动
0x0201, //按下鼠标左键
0x0202, //释放鼠标左键
0x0204, //按下鼠标右键
0x0205, //释放鼠标右键
0x0207, //按下鼠标中键
0x0208, //释放鼠标中键
0x020A //当鼠标滚轮转动时
};
public bool Pause { set; get; } = false;
public bool PreFilterMessage(ref Message m)
{
int msg = m.Msg;
int index = message.FindIndex(match => msg == match);
if (index > -1) startTime = DateTime.Now;
return false;
}
public void Start(int second)
{
loop = true;
startTime = DateTime.Now;
new Thread(new ParameterizedThreadStart(Counting)).Start(second);
}
public void Stop()
{
loop = false;
}
/// <summary>
/// 计时线程
/// </summary>
/// <param name="obj"></param>
private void Counting(object obj)
{
int ms = (int)obj * 1000;
while (loop)
{
Thread.Sleep(100);
if (Pause) continue;
if (!loop) break;
double mSec = (DateTime.Now - startTime).TotalMilliseconds;
if (mSec >= ms)
{
System.Threading.Tasks.Task.Run(() => Timeout?.Invoke(this, EventArgs.Empty));
loop = false;
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipes;
using System.Linq;
using System.Text;
using System.Threading;
/// <summary>
/// 客户端管道
/// </summary>
public class NamedPipeClient
{
private NamedPipeClientStream Client { get; set; }
public NamedPipeClient(string serverName, string serverHost)
{
Client = new NamedPipeClientStream(serverHost, serverName);
}
byte[] readBytes = new byte[1024*50];
public string Request(string outPutStr)
{
string inputStr = "";
try
{
this.Client.Connect(1000*5);
var b = Encoding.UTF8.GetBytes(outPutStr);
this.Client.Write(b, 0, b.Length);
this.Client.Flush();
Client.WaitForPipeDrain();
int readlen = Client.Read(readBytes, 0, readBytes.Length);
while (readlen > 0)
{
inputStr += Encoding.UTF8.GetString(readBytes, 0, readlen);
readlen = Client.Read(readBytes, 0, readBytes.Length);
}
}
catch { }
finally
{
if (Client.IsConnected)
Client.Close();
}
//this.Client.Dispose();
return inputStr;
}
}
using Model;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BLL
{
public class PaddleOCRHelper
{
static string baseUrl = ConfigHelper.Config.Get("PaddleServiceBase", "http://localhost:8090/paddle/getOcr");
/// <summary>
/// 开始检测
/// </summary>
/// <param name="pythonExePath">python解释器路径</param>
/// <param name="pythonFile">python文件</param>
/// <param name="imgPath">图像文件路径</param>
/// <returns></returns>
public static string StartTest(string imgPath)
{
string ocr = "";
if (!AppIsRun())
{
try
{
var paddle = "paddleOCR.exe";
Process process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = paddle;
process.StartInfo.WorkingDirectory = ".\\paddle";
process.Start();
}
catch (Exception ex)
{
LogNet.log.Error("打开paddleOCR失败", ex);
}
Thread.Sleep(3000);
}
if(AppIsRun())
{
ocr = StartCplusOcr(imgPath);
}
if (!AppIsRun())
{
try
{
var paddle = "paddleOCR.exe";
Process process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = paddle;
process.StartInfo.WorkingDirectory = ".\\paddle";
process.Start();
}
catch (Exception ex)
{
LogNet.log.Error("打开paddleOCR失败", ex);
}
}
return ocr;
}
[HandleProcessCorruptedStateExceptions]
static string StartCplusOcr(string imgPath)
{
string json=Http.Get($"{baseUrl}?ver=cplus&imgPath={imgPath}");
Result result= JsonConvert.DeserializeObject<Result>(json);
return result?.data??"";
}
static string StartPythonOcr(string imgPath)
{
if (!AppIsRun())
{
var onnxexe = ".\\paddle\\paddleOCR.exe";
Process.Start(onnxexe);
Thread.Sleep(2000);
}
string json = Http.Get($"{baseUrl}?ver=python&imgPath={imgPath}");
Result result = JsonConvert.DeserializeObject<Result>(json);
return result?.data ?? "";
}
static bool AppIsRun()
{
Process[] processes = Process.GetProcessesByName("paddleOCR");
if (processes.Length > 0)
{
return true;
}
LogNet.log.Info("paddleOCR 未在运行,启动程序");
return false;
}
public class Result
{
/// <summary>
/// 状态码,0为正常
/// </summary>
public int code { get; set; } = 0;
/// <summary>
/// 返回数据
/// </summary>
public string data { get; set; } = "";
/// <summary>
/// 提示信息
/// </summary>
public string msg { get; set; } = "ok";
/// <summary>
/// 版本
/// </summary>
public string ver { get; set; } = "";
}
}
}
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
using System;
using System.Runtime.InteropServices;
namespace BLL
{
public static class PrinterHelper
{
[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
private static extern bool OpenPrinter(string pPrinterName, out IntPtr hPrinter, IntPtr pDefault);
[DllImport("winspool.drv", SetLastError = true)]
private static extern bool ClosePrinter(IntPtr hPrinter);
[DllImport("winspool.drv", SetLastError = true)]
private static extern bool GetPrinter(IntPtr hPrinter, int dwLevel, IntPtr pPrinter, int cbBuf, out int pcbNeeded);
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
private struct PRINTER_INFO
{
public string pServerName;
public string pPrinterName;
public string pShareName;
public string pPortName;
public string pDriverName;
public string pComment;
public string pLocation;
public IntPtr pDevMode;
public string pSepFile;
public string pPrintProcessor;
public string pDatatype;
public string pParameters;
public IntPtr pSecurityDescriptor;
public uint Attributes;
public uint Priority;
public uint DefaultPriority;
public uint StartTime;
public uint UntilTime;
public uint Status;
public uint cJobs;
public uint AveragePPM;
}
public static string GetPrinterStatus(string PrinterName)
{
int intValue = GetPrinterStatusInt(PrinterName);
string strRet = intValue switch
{
0 => "准备就绪(Ready)",
0x00000200 => "忙(Busy)",
0x00400000 => "被打开(Printer Door Open)",
0x00000002 => "错误(Printer Error)",
0x00008000 => "初始化(Initializing)",
0x00000100 => "正在输入,输出(I/O Active)",
0x00000020 => "手工送纸(Manual Feed)",
0x00040000 => "无墨粉(No Toner)",
0x00001000 => "不可用(Not Available)",
0x00000080 => "脱机(Off Line)",
0x00200000 => "内存溢出(Out of Memory)",
0x00000800 => "输出口已满(Output Bin Full)",
0x00080000 => "当前页无法打印(Page Punt)",
0x00000008 => "塞纸(Paper Jam)",
0x00000010 => "打印纸用完(Paper Out)",
0x00000040 => "纸张问题(Page Problem)",
0x00000001 => "暂停(Paused)",
0x00000004 => "正在删除(Pending Deletion)",
0x00000400 => "正在打印(Printing)",
0x00004000 => "正在处理(Processing)",
0x00020000 => "墨粉不足(Toner Low)",
0x00100000 => "需要用户干预(User Intervention)",
0x20000000 => "等待(Waiting)",
0x00010000 => "热机中(Warming Up)",
_ => "未知状态(Unknown Status)",
};
return strRet;
}
private static int GetPrinterStatusInt(string PrinterName)
{
int result = 0;
bool rtn = OpenPrinter(PrinterName, out IntPtr hPrinter, IntPtr.Zero);
if (!rtn) return result;
GetPrinter(hPrinter, 2, IntPtr.Zero, 0, out int cbNeeded);
if (cbNeeded > 0)
{
IntPtr pAddr = Marshal.AllocHGlobal(cbNeeded);
rtn = GetPrinter(hPrinter, 2, pAddr, cbNeeded, out _);
if (rtn)
{
PRINTER_INFO info = (PRINTER_INFO)Marshal.PtrToStructure(pAddr, typeof(PRINTER_INFO));
result = Convert.ToInt32(info.Status);
}
Marshal.FreeHGlobal(pAddr);
}
ClosePrinter(hPrinter);
return result;
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("BLL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BLL")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("f7499de9-5665-49fd-bdb6-602b9af98541")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class Setting_Str
{
}
}
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public sealed class TextBlock
{
public List<Point> BoxPoints { get; set; }
public float BoxScore { get; set; }
public int AngleIndex { get; set; }
public float AngleScore { get; set; }
public float AngleTime { get; set; }
public string Text { get; set; }
public List<float> CharScores { get; set; }
public float CrnnTime { get; set; }
public float BlockTime { get; set; }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("├─TextBlock");
string textBox = $"│ ├──TextBox[score({BoxScore}),[x: {BoxPoints[0].X}, y: {BoxPoints[0].Y}], [x: {BoxPoints[1].X}, y: {BoxPoints[1].Y}], [x: {BoxPoints[2].X}, y: {BoxPoints[2].Y}], [x: {BoxPoints[3].X}, y: {BoxPoints[3].Y}]]";
sb.AppendLine(textBox);
string header = AngleIndex >= 0 ? "Angle" : "AngleDisabled";
string angle = $"│ ├──{header}[Index({AngleIndex}), Score({AngleScore}), Time({AngleTime}ms)]";
sb.AppendLine(angle);
StringBuilder sbScores = new StringBuilder();
CharScores.ForEach(x => sbScores.Append($"{x},"));
string textLine = $"│ ├──TextLine[Text({Text}),CharScores({sbScores.ToString()}),Time({CrnnTime}ms)]";
sb.AppendLine(textLine);
sb.AppendLine($"│ └──BlockTime({BlockTime}ms)");
return sb.ToString();
}
public double CalculateArea(List<Point> vectorPoints)
{
int iCycle, iCount;
iCycle = 0;
iCount = vectorPoints.Count;
double iArea = 0;
for (iCycle = 0; iCycle < iCount; iCycle++)
{
iArea = iArea + (vectorPoints[iCycle].X * vectorPoints[(iCycle + 1) % iCount].Y - vectorPoints[(iCycle + 1) % iCount].X * vectorPoints[iCycle].Y);
}
double area = (double)Math.Abs(0.5 * iArea);
return area;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class UsersLogin : IDisposable
{
private DAL.SQLite lite;
public UsersLogin()
{
lite = new();
lite.Connect();
}
public void Dispose()
{
lite.Close();
lite = null;
}
public bool Logion(string userName, string password, out Model.UserLevel level)
{
level = Model.UserLevel.None;
string sql = "SELECT ID,Level FROM Users WHERE UserName='" + userName + "' and Password='" + password + "'";
bool rtn = lite.Select(sql, out string[][] data);
if (!rtn) return false;
if (data.Length != 1) return false;
level = (Model.UserLevel)Convert.ToInt32(data[0][1]);
return true;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClosedXML" version="0.96.0" targetFramework="net472" />
<package id="DocumentFormat.OpenXml" version="2.16.0" targetFramework="net472" />
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net472" />
<package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="ZXing.Net" version="0.16.6" targetFramework="net461" requireReinstallation="true" />
</packages>
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace DAL
{
public class ConfigRW
{
private readonly Dictionary<string, string> config = new();
private readonly System.Xml.XmlDocument doc = new();
private readonly System.Xml.XmlNode root;
private readonly string filePath;
private bool changed = false;
public ConfigRW(string path)
{
filePath = path;
Model.LogNet.log.Info($"读取配置文件");
Model.LogNet.log.Debug($"配置文件目录:{path}");
try
{
doc.Load(filePath);
root = doc.SelectSingleNode("appSettings");
for (int i = 0; i < root.ChildNodes.Count; i++)
{
string key = root.ChildNodes[i].Name;
string value = root.ChildNodes[i].InnerText;
config.Add(key, value);
}
}
catch (Exception ex)
{
Model.LogNet.log.Error("ConfigRW", ex);
}
}
public void Read<T>(string key, out T value)
{
value = (T)TypeDefault(typeof(T));
bool rtn = config.TryGetValue(key, out string str);
if (rtn)
{
if (TypeConv(typeof(T), str, out object obj))
value = (T)obj;
}
//Model.LogNet.log.Debug($"Read Config {key}:{value}");
}
public T Read<T>(string key)
{
Read(key, out T value);
return value;
}
public T Read<T>(string key, T defaultValue)
{
T value = defaultValue;
bool rtn = config.TryGetValue(key, out string str);
if (rtn)
{
if (TypeConv(typeof(T), str, out object obj))
value = (T)obj;
}
//Model.LogNet.log.Debug($"Read Config {key}:{value}");
return value;
}
public void Write<T>(string key, T value)
{
if (config.ContainsKey(key))
{
config[key] = value.ToString();
root.SelectSingleNode(key).InnerText = config[key];
}
else
{
config.Add(key, value.ToString());
System.Xml.XmlElement node = doc.CreateElement(key);
node.InnerText = config[key];
root.AppendChild(node);
}
changed = true;
Model.LogNet.log.Debug($"Write Config {key}:{value}");
}
public void Save()
{
if (changed)
{
doc.Save(filePath);
changed = false;
Model.LogNet.log.Info("Save Config");
}
}
private bool TypeConv(Type type, string str, out object obj)
{
bool rtn = false;
obj = null;
if (type == typeof(string))
{
obj = str;
rtn = true;
}
else if (type == typeof(int))
{
if (int.TryParse(str, out int result))
{
obj = result;
rtn = true;
}
}
else if (type == typeof(float))
{
if (float.TryParse(str, out float result))
{
obj = result;
rtn = true;
}
}
else if (type == typeof(double))
{
if (double.TryParse(str, out double result))
{
obj = result;
rtn = true;
}
}
else if (type == typeof(bool))
{
if (bool.TryParse(str, out bool result))
{
obj = result;
rtn = true;
}
}
return rtn;
}
private object TypeDefault(Type type)
{
if (type == typeof(string))
return "";
else if (type == typeof(int) || type == typeof(float) || type == typeof(double))
return 0;
else if (type == typeof(bool))
return false;
else
return null;
}
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DAL</RootNamespace>
<AssemblyName>DAL</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<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>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.115.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ConfigRW.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SQLite.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj">
<Project>{20e61a3d-bf87-4a99-9756-7fe13d2daa6e}</Project>
<Name>Model</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target>
</Project>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("DAL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DAL")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("e28de77a-fc70-4be4-96ec-d0c1a7215a15")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System;
using System.Collections.Generic;
using System.Data.SQLite;
namespace DAL
{
public class SQLite
{
private SQLiteConnection con;
public SQLite()
{
}
public bool IsCon { private set; get; } = false;
//public bool Create()
//{
// try
// {
// con = new SQLiteConnection("data source=" + Model.FilePath.CONFIG_DATABASE);
// SQLiteCommand cmd = new(con);
// con.Open();
// cmd.CommandText = "CREATE TABLE SN ([Text] STRING NOT NULL UNIQUE, [Count] INT NOT NULL)";
// cmd.ExecuteNonQuery();
// cmd.CommandText = "CREATE TABLE History ([QRCode] STRING, [LabelName] STRING, [BarCode] STRING, [PrintKey] STRING, [CreateTime] STRING)";
// cmd.ExecuteNonQuery();
// cmd.Dispose();
// con.Close();
// con.Dispose();
// return true;
// }
// catch (Exception ex)
// {
// return false;
// }
//}
public bool Connect()
{
try
{
con = new SQLiteConnection("data source='" + Model.FilePath.CONFIG_DATABASE + "';Version=3");
Model.LogNet.log.Debug($"SQLite ConnectionString = {con.ConnectionString}");
con.Open();
IsCon = true;
Model.LogNet.log.Debug("SQLite数据库连接成功");
}
catch (Exception ex)
{
IsCon = false;
Model.LogNet.log.Error("数据库连接失败", ex);
}
return IsCon;
}
public void Close()
{
if (con != null)
{
con.Close();
con.Dispose();
}
Model.LogNet.log.Debug("SQLite数据库关闭");
}
public bool Select(string sql, out string[][] data)
{
data = null;
if (!IsCon) return false;
List<string[]> content = new();
try
{
SQLiteCommand cmd = new(con) { CommandText = sql };
SQLiteDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
string[] s = new string[dr.FieldCount];
for (int i = 0; i < s.Length; i++)
s[i] = dr[i].ToString();
content.Add(s);
}
dr.Close();
cmd.Dispose();
data = content.ToArray();
Model.LogNet.log.Debug("Select,SQL = " + sql);
return true;
}
catch (Exception ex)
{
Model.LogNet.log.Error("Select", ex);
return false;
}
}
public bool Execute(string sql)
{
if (!IsCon) return false;
try
{
SQLiteCommand cmd = new(con) { CommandText = sql };
int n = cmd.ExecuteNonQuery();
cmd.Dispose();
Model.LogNet.log.Info("Execute,SQL = " + sql);
return true;
}
catch (Exception ex)
{
Model.LogNet.log.Error("Execute", ex);
return false;
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.115.0" targetFramework="net461" />
<package id="System.Data.SQLite.Core" version="1.0.115.0" targetFramework="net461" />
</packages>
\ No newline at end of file
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
namespace ExtensionGroup
{
public class EventGroup
{
public event IExtension.PrintDelegate Printing;
private readonly Dictionary<string, IExtension> extEvent;
private readonly Alcoelectro alcoelectro = new();
private readonly Inventec inventec = new();
private readonly PanaCIM panaCIM = new();
private readonly Item_NanRui nanRui = new();
private readonly KaiFa kaiFa = new();
public EventGroup()
{
extEvent = new()
{
{ "Bwit", alcoelectro },
{ "Inventec", inventec },
{ "PanaCIM", panaCIM },
{ "NanRui", nanRui },
{ "KaiFa", kaiFa }
};
for (int i = 0; i < extEvent.Count; i++)
extEvent.ElementAt(i).Value.Printing += Group_Printing;
}
public IExtension GetEventGroup(string name)
{
if (extEvent.ContainsKey(name))
return extEvent[name];
else
return null;
}
private void Group_Printing(Dictionary<string, string> content)
{
Printing?.Invoke(content);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExtensionGroup
{
public abstract class ExtensionBase : IDisposable
{
public void Dispose()
{
//throw new NotImplementedException();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2AB75B8C-0538-423C-83EA-702379AD622A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ExtensionGroup</RootNamespace>
<AssemblyName>ExtensionGroup</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Face.Control">
<HintPath>..\..\..\DLL\FaceControl\Asa.Face.Control.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Alcoelectro.cs" />
<Compile Include="EventGroup.cs" />
<Compile Include="ExtensionBase.cs" />
<Compile Include="Inventec.cs" />
<Compile Include="KaiFa.cs" />
<Compile Include="Item_NanRui.cs" />
<Compile Include="PanaCIM.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj">
<Project>{20e61a3d-bf87-4a99-9756-7fe13d2daa6e}</Project>
<Name>Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
/*
* kaifa
*/
using System;
using System.Collections.Generic;
using System.Linq;
using Model;
using Asa.FaceControl;
using System.Web.Script.Serialization;
namespace ExtensionGroup
{
public class KaiFa : IExtension
{
private int reelID = 0;
private List<ExtensionControl> extensions;
public event IExtension.PrintDelegate Printing;
public KaiFa() { }
public void Clear()
{
Log.Info("Clear()");
for (int i = 0; i < extensions.Count; i++)
{
if (!extensions[i].CanClear) continue;
if (extensions[i].Control is FaceComboBox box)
box.Items.Clear();
extensions[i].Control.Text = "";
}
}
public void Dispose()
{
}
public void Load(List<ExtensionControl> extensions)
{
this.extensions = extensions;
ReadReelID();
}
public void SetKey(string[] originalCode, Dictionary<string, string> key)
{
for (int i = 0; i < extensions.Count; i++)
{
if (key.ContainsKey(extensions[i].Key))
extensions[i].Control.Text = key[extensions[i].Key];
}
if (CanPrint())
PrintLabel(null, EventArgs.Empty);
}
public void Update()
{
}
private bool CanPrint()
{
int index = extensions.FindIndex(match => match.Control.Name == "TxtPart");
if (index == -1) return false;
if (extensions[index].Control.Text == "") return false;
index = extensions.FindIndex(match => match.Control.Name == "TxtQty");
if (index == -1) return false;
if (extensions[index].Control.Text == "") return false;
return true;
}
private void ReadReelID()
{
try
{
if (System.IO.File.Exists(FilePath.CONFIG_REELID))
{
string text = System.IO.File.ReadAllText(FilePath.CONFIG_REELID);
bool bln = int.TryParse(text, out reelID);
Log.Info($"ReadReelID {bln} text={text}");
}
else
{
System.IO.FileStream fs = System.IO.File.Create(FilePath.CONFIG_REELID);
fs.Close();
reelID = 0;
Log.Info("ReadReelID Create");
}
}
catch (Exception ex)
{
Log.Error("ReadReelID", ex);
System.Windows.Forms.MessageBox.Show(ex.Message, "Warning", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
}
}
private void SaveAddReelID()
{
try
{
Log.Debug("打印标签前的ID:" + reelID);
reelID++;
System.IO.File.WriteAllText(FilePath.CONFIG_REELID, reelID.ToString());
Log.Info($"Save ReelID:{reelID}");
}
catch (Exception ex)
{
Log.Error("SaveAddReelID error", ex);
}
}
private void PrintLabel(object sender, EventArgs e)
{
Log.Debug("Enter PrintLabel Method");
Dictionary<string, string> key = new();
for (int i = 0; i < extensions.Count; i++)
{
if (extensions[i].Key == "") continue;
if (key.ContainsKey(extensions[i].Key))
key[extensions[i].Key] = extensions[i].Control.Text;
else
key.Add(extensions[i].Key, extensions[i].Control.Text);
}
SaveAddReelID();
Printing?.Invoke(key);
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Extension")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Extension")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("2ab75b8c-0538-423c-83ea-702379ad622a")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System;
namespace Model
{
/// <summary>
/// 扩展控件
/// </summary>
public class ExtensionControl
{
/// <summary>
/// 控件类型
/// </summary>
public string Type { set; get; } = "";
/// <summary>
/// 控件关键字
/// </summary>
public string Key { set; get; } = "";
/// <summary>
/// 可以清除Text
/// </summary>
public bool CanClear { set; get; } = false;
/// <summary>
/// 关联控件名称
/// </summary>
public string LinkName { set; get; } = "";
/// <summary>
/// 控件
/// </summary>
public Asa.FaceControl.ControlBase Control = null;
}
}
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
//namespace Model
//{
// public abstract class ExtensionFunction
// {
// protected List<ExtensionControl> extensions;
// private Dictionary<string, int> reelID;
// private void ReelIDInit()
// {
// reelID = new();
// if (System.IO.File.Exists(FilePath.CONFIG_REELID))
// {
// string[] lines = System.IO.File.ReadAllLines(FilePath.CONFIG_REELID);
// for (int i = 0; i < lines.Length; i++)
// {
// string[] arr = lines[i].Split(',');
// if (arr.Length != 2) continue;
// reelID.Add(arr[0], Convert.ToInt32(arr[1]));
// }
// }
// }
// protected void ClearText()
// {
// for (int i = 0; i < extensions.Count; i++)
// {
// if (!extensions[i].CanClear) continue;
// if (extensions[i].Control is Asa.FaceControl.FaceComboBox box)
// box.Items.Clear();
// extensions[i].Control.Text = "";
// }
// }
// protected void SetControlText(Dictionary<string, string> key)
// {
// for (int i = 0; i < extensions.Count; i++)
// {
// if (key.ContainsKey(extensions[i].Key))
// extensions[i].Control.Text = key[extensions[i].Key];
// }
// }
// protected void SetControlText(string name, string text)
// {
// int index = extensions.FindIndex(match => match.Control.Name == name);
// if (index > -1) extensions[index].Control.Text = text;
// }
// protected void SetComboItem(string name, string[] text)
// {
// int index = extensions.FindIndex(match => match.Control.Name == name);
// if (index == -1) return;
// Asa.FaceControl.FaceComboBox cbo = (Asa.FaceControl.FaceComboBox)extensions[index].Control;
// cbo.Items.AddRange(text);
// cbo.SelectedIndex = -1;
// }
// protected void SetComboSelected(string name, int index)
// {
// int idx = extensions.FindIndex(match => match.Control.Name == name);
// if (idx == -1) return;
// ((Asa.FaceControl.FaceComboBox)extensions[idx].Control).SelectedIndex = index;
// }
// protected string GetControlText(string name)
// {
// int index = extensions.FindIndex(match => match.Control.Name == name);
// if (index == -1) return "";
// return extensions[index].Control.Text;
// }
// //protected string GetControlTextFromKey(string key)
// //{
// // int index = extensions.FindIndex(match => match.Key == key);
// // if (index == -1) return "";
// // return extensions[index].Control.Text;
// //}
// protected void SetControlEnabled(bool value, params string[] name)
// {
// for (int i = 0; i < name.Length; i++)
// {
// int index = extensions.FindIndex(match => match.Control.Name == name[i]);
// if (index == -1) continue;
// extensions[index].Control.Enabled = value;
// }
// }
// protected void GetReelID(out string key, out string value)
// {
// //读取参数
// string matchID = AppConfig.Read(AppConfigKey.REEL_ID_MATCH);
// AppConfig.Read(AppConfigKey.REEL_ID_PLACES, out int matchPlace);
// AppConfig.Read(AppConfigKey.REEL_ID_FILL_ZERO, out bool matchFill);
// string matchPrefix = AppConfig.Read(AppConfigKey.REEL_ID_PREFIX);
// string matchPostfix = AppConfig.Read(AppConfigKey.REEL_ID_POSTFIX);
// //把key替换成实际值
// string[] keys = ObjConversion.StrGetKey(matchID);
// for (int i = 0; i < keys.Length; i++)
// {
// int index = extensions.FindIndex(match => match.Key == keys[i]);
// if (index == -1) continue;
// string oldValue = string.Format("[{0}]", keys[i]);
// matchID = matchID.Replace(oldValue, extensions[index].Control.Text);
// }
// //查找是否存在
// if (reelID == null) ReelIDInit();
// if (!reelID.ContainsKey(matchID))
// reelID.Add(matchID, 0);
// int val = reelID[matchID] + 1;
// //填充0
// string text = matchPrefix;
// if (matchFill)
// text += string.Format("{0:d" + matchPlace + "}", val);
// else
// text += val.ToString();
// text += matchPostfix;
// key = matchID;
// value = text;
// }
// protected void SetReelIDAdd(string key)
// {
// reelID[key]++;
// int idx = 0;
// string[] lines = new string[reelID.Count];
// foreach (string s in reelID.Keys)
// lines[idx++] = string.Format("{0},{1}", s, reelID[s]);
// System.IO.File.WriteAllLines(FilePath.CONFIG_REELID, lines);
// }
// protected Dictionary<string, string> GetPrintKey()
// {
// Dictionary<string, string> key = new();
// for (int i = 0; i < extensions.Count; i++)
// {
// if (extensions[i].Key == "") continue;
// if (key.ContainsKey(extensions[i].Key))
// key[extensions[i].Key] = extensions[i].Control.Text;
// else
// key.Add(extensions[i].Key, extensions[i].Control.Text);
// }
// return key;
// }
// protected bool CheckEmptyContent()
// {
// //返回true有空内容不打印
// AppConfig.Read(AppConfigKey.LABEL_EMPTY_CHECK, out bool check);
// if (!check) return false;
// if (extensions == null) return true;
// bool find = false;
// for (int i = 0; i < extensions.Count; i++)
// {
// if (extensions[i].Key != "" && extensions[i].Control.Text == "")
// {
// find = true;
// break;
// }
// }
// if (find)
// {
// string text = Asa.FaceControl.Language.Dialog("LabelEmpty");
// Asa.FaceControl.FaceMessageBox dlg = new("", text, System.Windows.Forms.MessageBoxButtons.YesNo);
// System.Windows.Forms.DialogResult dr = dlg.ShowDialog();
// return dr == System.Windows.Forms.DialogResult.No;
// }
// return false;
// }
// }
//}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
/// <summary>
/// 文件路径
/// </summary>
public static class FilePath
{
public static readonly string LANGUAGE_DIR = Environment.CurrentDirectory + "\\Language\\";
public static readonly string MATERIAL_DIR = Environment.CurrentDirectory + "\\Material\\";
public static readonly string RETROSPECT_DIR = Environment.CurrentDirectory + "\\Retrospect\\";
public static readonly string PRINT_LABEL_DIR = Environment.CurrentDirectory + "\\PrintLabel\\";
public static readonly string CONFIG_DIR = Environment.CurrentDirectory + "\\Config\\";
public static readonly string CONFIG_APP = Environment.CurrentDirectory + "\\Config\\app.config";
public static readonly string CONFIG_CAMERA = Environment.CurrentDirectory + "\\Config\\Camera.json";
public static readonly string CONFIG_MACRO_KEY = Environment.CurrentDirectory + "\\Config\\MacroKey.txt";
public static readonly string CONFIG_HTTP_TEST_DATA = Environment.CurrentDirectory + "\\Config\\HttpTestData.json";
public static readonly string CONFIG_EXTENSION = Environment.CurrentDirectory + "\\Config\\Extension.json";
public static readonly string CONFIG_REELID = Environment.CurrentDirectory + "\\Config\\ReelID";
public static readonly string CONFIG_DATABASE = Environment.CurrentDirectory + "\\Config\\Database.db3";
}
}
using System;
namespace Model
{
/// <summary>
/// 历史追溯保存的图像
/// </summary>
public enum HistoryImage
{
/// <summary>
/// 原图
/// </summary>
Original,
/// <summary>
/// 压缩图
/// </summary>
Condense,
/// <summary>
/// 不保存图片
/// </summary>
NoImage
}
}
using Newtonsoft.Json;
using RestSharp;
using System;
using System.Collections.Generic;
namespace Model
{
public static class Http
{
public static bool Ping(string ip)
{
try
{
using System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping();
System.Net.NetworkInformation.PingReply result = ping.Send(ip, 2000);
bool rtn = result.Status == System.Net.NetworkInformation.IPStatus.Success;
if (rtn)
LogNet.log.Info(string.Format("Ping {0} OK", ip));
else
LogNet.log.Info(string.Format("Ping {0} timeout", ip));
return rtn;
}
catch (Exception ex)
{
LogNet.log.Error("Ping", ex);
return false;
}
}
public static string Get(string url)
{
RestClient client = new(url) { Timeout = 60000 };
RestRequest request = new(Method.GET);
IRestResponse response = client.Execute(request);
string s = response.Content;
///LogNet.log.Info($"[GET][URL:{url}][Return:{s}]");
return FormatContent(s);
}
public static string Post(string url, Dictionary<string, string> param)
{
List<string> body = new();
foreach (string key in param.Keys)
body.Add(string.Format("{0}={1}", key, param[key]));
LogNet.log.Info("[Post]URL:" + url + " Body:" + string.Join(",", body));
RestClient client = new(url) { Timeout = 10000 };
RestRequest request = new(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
foreach(string key in param.Keys)
request.AddParameter(key, param[key]);
IRestResponse response = client.Execute(request);
string s = response.Content;
LogNet.log.Info("Return:" + s);
return FormatContent(s);
}
public static string PostJson<T>(string url, Dictionary<string, string> headers, T jsonobject, int timeout = 10000, bool wlog=true)
{
RestClient client = new(url) { Timeout = timeout };
client.UseSerializer(new CustSerialize());
RestRequest request = new(Method.POST);
request.AddHeader("Content-Type", "application/json");
if (headers != null)
{
foreach (var head in headers)
{
request.AddHeader(head.Key, head.Value);
}
}
request.AddJsonBody(jsonobject);
IRestResponse response = client.Execute(request);
string s = response.Content;
if (wlog)
LogNet.log.Info("Return:" + s);
return s;
}
private static string FormatContent(string s)
{
if (string.IsNullOrWhiteSpace(s))
{
return "";
}
else
{
s = s.Replace("\n", "");
s = s.Replace("\r", "");
while (s.IndexOf(" ") >= 0)
s = s.Replace(" ", " ");
return s;
}
}
}
public class CustSerialize : RestSharp.Serialization.IRestSerializer
{
public string ContentType { get; set; } = "application/json";
public string[] SupportedContentTypes { get; set; } = new string[] { "application/json" };
public DataFormat DataFormat { get; set; } = DataFormat.Json;
public T Deserialize<T>(IRestResponse response)
{
return JsonConvert.DeserializeObject<T>(response.Content);
}
public string Serialize(object obj)
{
return JsonConvert.SerializeObject(obj);
}
public string Serialize(Parameter parameter)
{
return JsonConvert.SerializeObject(parameter.Value);
}
}
}
using System;
using System.Collections.Generic;
namespace Model
{
public interface IExtension
{
public delegate void PrintDelegate(Dictionary<string, string> content);
public event PrintDelegate Printing;
public event PrintDelegate SaveRetrospect;
public void Clear();
public void Load(List<ExtensionControl> extensions);
public bool SetKey(string[] originalCode, Dictionary<string, string> key,bool hasMatch, out string errmsg);
public void Update();
public void Dispose();
}
}
using System;
namespace Model
{
public interface ISetMenu
{
public Asa.FaceControl.FacePanel GetPanel();
public void Save();
}
}
using System.IO;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Runtime.Serialization;
using System.Collections.Generic;
using CameraVisionLib.Model;
namespace Model
{
[ServiceContract(Name = "Services")]
public interface IWeb
{
[OperationContract]
[WebGet(UriTemplate = "NeoScan/CloseApp", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void CloseApp();
[OperationContract]
[WebGet(UriTemplate = "NeoScan/WorkWithCamera", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCamera WorkWithCamera();
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "NeoScan/WorkWithCode", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode WorkWithCode(Stream json);
[OperationContract]
[WebGet(UriTemplate = "alive", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
string alive();
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "NeoScan/ProcessBitmap?param={param}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode ProcessBitmap(Stream info, string param);
}
[DataContract]
public class WebResultCamera
{
[DataMember]
public int ErrorCode { get; set; }
[DataMember]
public string Msg { get; set; }
[DataMember]
public WebCodeAll[] Data { get; set; }
public WebResultCamera()
{
ErrorCode = 0;
Msg = "OK";
}
}
[DataContract]
public class WebResultCode
{
[DataMember]
public int ErrorCode { get; set; }
[DataMember]
public string Msg { get; set; }
[DataMember]
public WebCodeText[] Data { get; set; }
[DataMember]
public List<KeyValuePair<string, string>> workCodeKeyword;
[DataMember]
public List<BarcodeInfo> workCodeInfo = new List<BarcodeInfo>();
public WebResultCode()
{
ErrorCode = 0;
Msg = "OK";
}
}
public class WebCodeAll
{
public string Text { get; set; } = "";
public string CodeType { get; set; } = "";
public float CenterX { get; set; } = 0;
public float CenterY { get; set; } = 0;
public float Angle { get; set; } = 0;
public float Width { get; set; } = 0;
public float Height { get; set; } = 0;
public bool IsUsed { get; set; } = false;
}
public class WebCodeText
{
public string Text { get; set; } = "";
public bool IsUsed { get; set; } = false;
}
}
//using System;
//using System.Drawing;
//namespace Model
//{
// /// <summary>
// /// 用于打印的标签类
// /// </summary>
// public class LabelToPrint
// {
// /// <summary>
// /// 字段的类型
// /// </summary>
// public enum FieldType
// {
// /// <summary>
// /// Code39一维码
// /// </summary>
// Code39,
// /// <summary>
// /// Code93一维码
// /// </summary>
// Code93,
// /// <summary>
// /// Code128一维码
// /// </summary>
// Code128,
// /// <summary>
// /// DM二维码
// /// </summary>
// DataMatrix,
// /// <summary>
// /// QR二维码
// /// </summary>
// QRCode,
// /// <summary>
// /// 文本
// /// </summary>
// Text,
// /// <summary>
// /// PDF417二维码
// /// </summary>
// PDF417
// }
// /// <summary>
// /// 标签字段类
// /// </summary>
// public class Field
// {
// /// <summary>
// /// 位置大小,像素
// /// </summary>
// public RectangleF Rect_px = new();
// /// <summary>
// /// 位置大小,毫米
// /// </summary>
// public RectangleF Rect_mm = new();
// /// <summary>
// /// 字体
// /// </summary>
// public Font Font = new("宋体", 9f);
// /// <summary>
// /// 打印的文本内容
// /// </summary>
// public string Text = "";
// /// <summary>
// /// 字段的关键字
// /// </summary>
// public string Key = "";
// /// <summary>
// /// 字段类型
// /// </summary>
// public FieldType Type = FieldType.Text;
// /// <summary>
// /// 字段图片,Text类型为null
// /// </summary>
// public Bitmap Image = null;
// }
// }
//}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class LanguageDialogKey
{
public const string CODE_COUNT = "CodeCount";
public const string PRINT_TEMPLATE_ADD = "PrintTemplateAdd";
public const string PRINT_TEMPLATE_DEL = "PrintTemplateDel";
public const string PRINT_TEMPLATE_RENAME = "PrintTemplateRename";
public const string MATERIAL_TEMPLATE_ADD = "MaterialTemplateAdd";
public const string MATERIAL_TEMPLATE_DEL = "MaterialTemplateDel";
public const string MATERIAL_TEMPLATE_RENAME = "MaterialTemplateRename";
public const string SAVE_SUCCEED = "SaveSucceed";
}
}
using System;
using System.Collections.Generic;
namespace Model
{
public static class LogNet
{
public static log4net.ILog log;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public static class MaterialAsciiCode
{
private static readonly Dictionary<string, string> ASCII_CODE = new() { { "[space]", " " }, { "[tab]", "\t" } };
public static string GetAsciiCode(string code)
{
if (code.StartsWith("[") && code.EndsWith("]"))
{
if (ASCII_CODE.TryGetValue(code.ToLower(), out string value))
return value;
else
return code;
}
else
{
return code;
}
}
}
}
using System;
using System.Collections.Generic;
using System.Drawing;
namespace Model
{
public class MaterialCode
{
public int ID { get; set; } = -1;
public string Text { get; set; } = "";
public string CodeType { get; set; } = "";
public float CenterX { get; set; } = 0;
public float CenterY { get; set; } = 0;
public float Angle { get; set; } = 0;
public float Width { get; set; } = 0;
public float Height { get; set; } = 0;
public float Distance { get; set; } = 0;
public MaterialCode Clone()
{
MaterialCode node = new();
System.Reflection.PropertyInfo[] destination = node.GetType().GetProperties();
System.Reflection.PropertyInfo[] orgin = GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
destination[i].SetValue(node, orgin[i].GetValue(this));
return node;
}
}
///// <summary>
///// 物料原始条形码类
///// </summary>
//public class MaterialCode : ICloneable
//{
// public int ID { get; set; }
// /// <summary>
// /// 文本
// /// </summary>
// public string Text { get; set; }
// /// <summary>
// /// 条码类型
// /// </summary>
// public string CodeType { get; set; }
// /// <summary>
// /// 中心点
// /// </summary>
// public PointF Center { get; set; }
// /// <summary>
// /// 角度,3点钟方向0°,逆时针为正,顺时针为负。
// /// </summary>
// public float Angle { get; set; }
// /// <summary>
// /// 宽度
// /// </summary>
// public float Width { get; set; }
// /// <summary>
// /// 高度
// /// </summary>
// public float Height { get; set; }
// /// <summary>
// /// 中心点到原点直线方程的距离
// /// </summary>
// public double Distance { get; set; }
// public bool MatchingStart { get; set; } = false;
// public string MatchingStartText { get; set; } = "";
// public bool MatchingEnd { get; set; } = false;
// public string MatchingEndText { get; set; } = "";
// public bool MatchingMiddle { get; set; } = false;
// public string MatchingMiddleText { get; set; } = "";
// public bool MatchingCaseSensitivity { get; set; } = false;
// public bool MatchingMinLength { get; set; } = false;
// public int MatchingMinLengthValue { get; set; } = 1;
// public bool MatchingMaxLength { get; set; } = false;
// public int MatchingMaxLengthValue { get; set; } = 1;
// /// <summary>
// /// 关键字
// /// </summary>
// public string Keyword { set; get; }
// /// <summary>
// /// 字符串截取起始
// /// </summary>
// public int Start { set; get; }
// /// <summary>
// /// 字符串截取长度
// /// </summary>
// public int Length { set; get; }
// public object Clone()
// {
// MaterialCode node = new MaterialCode();
// System.Reflection.PropertyInfo[] info1 = node.GetType().GetProperties();
// System.Reflection.PropertyInfo[] info2 = this.GetType().GetProperties();
// for (int i = 0; i < info1.Length; i++)
// info1[i].SetValue(node, info2[i].GetValue(this));
// return node;
// }
//}
///// <summary>
///// 物料原始条码对应的OCR类
///// </summary>
//public class OriginalCodeOCR : ICloneable
//{
// /// <summary>
// /// 条码ID
// /// </summary>
// public int CodeID { set; get; }
// /// <summary>
// /// 与指定条码的偏移
// /// </summary>
// public Point Offset { set; get; }
// /// <summary>
// /// 识别区域的大小
// /// </summary>
// public Size Size { set; get; }
// /// <summary>
// /// 模式,用于替换
// /// </summary>
// public string Mode { set; get; } = "";
// public object Clone()
// {
// OriginalCodeOCR node = new OriginalCodeOCR();
// System.Reflection.PropertyInfo[] info1 = node.GetType().GetProperties();
// System.Reflection.PropertyInfo[] info2 = this.GetType().GetProperties();
// for (int i = 0; i < info1.Length; i++)
// info1[i].SetValue(node, info2[i].GetValue(this));
// return node;
// }
//}
///// <summary>
///// 物料模板类
///// </summary>
//public class MaterialTemplate: ICloneable
//{
// public List<MaterialCode> Code = new List<MaterialCode>();
// public List<OriginalCodeOCR> OCR = new List<OriginalCodeOCR>();
// public string FilePath { get; set; } = "";
// public string ImagePath { get; set; } = "";
// public Bitmap Image { get; set; } = null;
// public string Name { get; set; } = "";
// public int PrimaryCode { get; set; } = -1;
// public object Clone()
// {
// MaterialTemplate node = new MaterialTemplate
// {
// Code = new List<MaterialCode>(),
// OCR = new List<OriginalCodeOCR>()
// };
// for (int i = 0; i < Code.Count; i++)
// node.Code.Add((MaterialCode)Code[i].Clone());
// for (int i = 0; i < OCR.Count; i++)
// node.OCR.Add((OriginalCodeOCR)OCR[i].Clone());
// System.Reflection.PropertyInfo[] info1 = node.GetType().GetProperties();
// System.Reflection.PropertyInfo[] info2 = this.GetType().GetProperties();
// for (int i = 0; i < info1.Length; i++)
// info1[i].SetValue(node, info2[i].GetValue(this));
// return node;
// }
//}
}
using System;
namespace Model
{
/// <summary>
/// 物料模板条码匹配条件
/// </summary>
public class MaterialCodeMatch
{
public int CodeID { get; set; } = -1;
public string Keyword { get; set; } = "";
/// <summary>
/// 是否匹配开头
/// </summary>
public bool MatchStart { get; set; } = false;
/// <summary>
/// 匹配中间
/// </summary>
public bool MatchMiddle { get; set; } = false;
/// <summary>
/// 是否匹配结尾
/// </summary>
public bool MatchEnd { get; set; } = false;
/// <summary>
/// 是否使用分隔字符
/// </summary>
public bool MatchSplit { get; set; } = false;
/// <summary>
/// 是否检查条码类型
/// </summary>
public bool CheckCodeType { get; set; } = false;
/// <summary>
/// 条码类型
/// </summary>
public string CodeType { get; set; } = "";
public string StartText { get; set; } = "";
public string MiddleText { get; set; } = "";
public int MatchMiddleType { get; set; } = -1;
public int MiddleTextCount { get; set; } = 1;
public string EndText { get; set; } = "";
public string SplitText { get; set; } = "";
/// <summary>
/// 大小写敏感
/// </summary>
public bool CaseSensitive { get; set; } = false;
public bool MatchMinLength { get; set; } = false;
public bool MatchMaxLength { get; set; } = false;
public int MinLength { get; set; } = 0;
public int MaxLength { get; set; } = 0;
public int SubstringStart { get; set; } = 0;
public int SubstringLength { get; set; } = 1;
public int SplitPart { get; set; } = 1;
public bool MatchISNumber { get; set; } = false;
public MaterialCodeMatch Clone()
{
MaterialCodeMatch node = new();
System.Reflection.PropertyInfo[] destination = node.GetType().GetProperties();
System.Reflection.PropertyInfo[] orgin = GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
destination[i].SetValue(node, orgin[i].GetValue(this));
return node;
}
}
}
using System;
namespace Model
{
public class MaterialCodeOCR
{
public int ID { get; set; } = -1;
public string Text { get; set; } = "";
public int CodeID { set; get; } = -1;
public float OffsetX { set; get; } = 0;
public float OffsetY { set; get; } = 0;
public int Width { set; get; } = 0;
public int Height { set; get; } = 0;
//public string Mode { set; get; } = "";
public MaterialCodeOCR Clone()
{
MaterialCodeOCR node = new();
System.Reflection.PropertyInfo[] destination = node.GetType().GetProperties();
System.Reflection.PropertyInfo[] orgin = GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
destination[i].SetValue(node, orgin[i].GetValue(this));
return node;
}
}
}
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
namespace Model
{
public class MaterialTemplate
{
public List<MaterialCode> Code = new();
public List<MaterialCodeOCR> Ocr = new();
public List<MaterialCodeMatch> Match = new();
public string FilePath { get; set; } = "";
public string ImagePath { get; set; } = "";
public Bitmap Image { get; set; } = null;
public string Name { get; set; } = "";
public int PrimaryCode { get; set; } = -1;
public TemplateState State { get; set; } = TemplateState.Saved;
public MaterialTemplate Clone()
{
MaterialTemplate node = new();
for (int i = 0; i < Code.Count; i++)
node.Code.Add(Code[i].Clone());
for (int i = 0; i < Ocr.Count; i++)
node.Ocr.Add(Ocr[i].Clone());
for (int i = 0; i < Match.Count; i++)
node.Match.Add(Match[i].Clone());
System.Reflection.PropertyInfo[] destination = node.GetType().GetProperties();
System.Reflection.PropertyInfo[] orgin = GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
destination[i].SetValue(node, orgin[i].GetValue(this));
return node;
}
public int[] GetCodeID()
{
int[] id = new int[Code.Count];
for (int i = 0; i < Code.Count; i++)
id[i] = Code[i].ID;
return id;
}
public int[] GetOcrID()
{
int[] id = new int[Ocr.Count];
for (int i = 0; i < Ocr.Count; i++)
id[i] = Ocr[i].ID;
return id;
}
public int GetMaxID()
{
int max1 = 0;
int max2 = 0;
if (Code.Count > 0) max1 = Code.Max(t => t.ID);
if (Ocr.Count > 0) max2 = Ocr.Max(t => t.ID);
return Math.Max(max1, max2);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Model</RootNamespace>
<AssemblyName>Model</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8398.28384, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
</Reference>
<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>
</Reference>
<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>
</Reference>
<Reference Include="RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.11.7\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="Tesseract, Version=3.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Tesseract.3.3.0\lib\net45\Tesseract.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ExtensionControl.cs" />
<Compile Include="ExtensionFunction.cs" />
<Compile Include="FilePath.cs" />
<Compile Include="HistoryImage.cs" />
<Compile Include="Http.cs" />
<Compile Include="IExtension.cs" />
<Compile Include="ISetMenu.cs" />
<Compile Include="IWeb.cs" />
<Compile Include="LanguageDialogKey.cs" />
<Compile Include="Log.cs" />
<Compile Include="MaterialAsciiCode.cs" />
<Compile Include="MaterialCode.cs" />
<Compile Include="MaterialCodeMatch.cs" />
<Compile Include="MaterialCodeOCR.cs" />
<Compile Include="MaterialTemplate.cs" />
<Compile Include="OCR.cs" />
<Compile Include="Printer.cs" />
<Compile Include="LabelToPrint.cs" />
<Compile Include="PrintLabelField.cs" />
<Compile Include="PrintLabelFieldType.cs" />
<Compile Include="PrintLabelTemplate.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SizeConversion.cs" />
<Compile Include="TemplateState.cs" />
<Compile Include="UserLevel.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Tesseract.3.3.0\build\Tesseract.targets" Condition="Exists('..\packages\Tesseract.3.3.0\build\Tesseract.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Tesseract.3.3.0\build\Tesseract.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Tesseract.3.3.0\build\Tesseract.targets'))" />
</Target>
</Project>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class OCR
{
private Tesseract.TesseractEngine eng;
public OCR()
{
try
{
LogNet.log.Info("初始化OCR类");
eng = new Tesseract.TesseractEngine("./tessdata", "eng", Tesseract.EngineMode.TesseractAndCube);
}
catch (Exception ex)
{
eng = null;
LogNet.log.Error("OCR", ex);
}
}
public string GetString(System.Drawing.Bitmap bmp)
{
try
{
if (eng == null)
{
LogNet.log.Warn("eng is null");
return "";
}
else
{
Tesseract.Page page = eng.Process(bmp);
string s = page.GetText();
page.Dispose();
return s.Trim('\n');
}
}
catch (Exception ex)
{
LogNet.log.Error("GetString", ex);
return "";
}
}
}
}
using System;
using System.Drawing;
namespace Model
{
public class PrintLabelField
{
public PrintLabelFieldType Type { set; get; } = PrintLabelFieldType.Text;
public string Text { set; get; } = "";
public RectangleF Rectangle { set; get; } = new();
public Font Font { set; get; } = new("宋体", 9f);
public string PrintText = "";
public Bitmap Image = null;
public PrintLabelField Clone()
{
PrintLabelField node = new();
if (Image != null) node.Image = new Bitmap(Image);
System.Reflection.PropertyInfo[] destination = node.GetType().GetProperties();
System.Reflection.PropertyInfo[] orgin = GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
destination[i].SetValue(node, orgin[i].GetValue(this));
return node;
}
}
}
using System;
namespace Model
{
public enum PrintLabelFieldType
{
/// <summary>
/// Code39一维码
/// </summary>
Code39,
/// <summary>
/// Code93一维码
/// </summary>
Code93,
/// <summary>
/// Code128一维码
/// </summary>
Code128,
/// <summary>
/// DM二维码
/// </summary>
DataMatrix,
/// <summary>
/// QR二维码
/// </summary>
QRCode,
/// <summary>
/// 文本
/// </summary>
Text,
/// <summary>
/// PDF417二维码
/// </summary>
PDF417
}
}
using System;
using System.Collections.Generic;
using System.Drawing;
namespace Model
{
public class PrintLabelTemplate
{
public List<PrintLabelField> Field = new();
public string FilePath { set; get; } = "";
public string Name { set; get; } = "";
public SizeF Size { set; get; } = new();
public TemplateState State { get; set; } = TemplateState.Saved;
public bool FieldShowKey { set; get; } = false;
public PrintLabelTemplate Clone()
{
PrintLabelTemplate node = new();
for (int i = 0; i < Field.Count; i++)
node.Field.Add(Field[i].Clone());
System.Reflection.PropertyInfo[] destination = node.GetType().GetProperties();
System.Reflection.PropertyInfo[] orgin = GetType().GetProperties();
for (int i = 0; i < destination.Length; i++)
destination[i].SetValue(node, orgin[i].GetValue(this));
return node;
}
}
}
using System;
using System.Collections.Generic;
namespace Model
{
/// <summary>
/// 打印机类
/// </summary>
public static class Printer
{
/// <summary>
/// 所有已安装的打印机名称
/// </summary>
public static string[] AllName
{
get
{
List<string> list = new();
foreach (string ss in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
list.Add(ss);
return list.ToArray();
}
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Model")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Model")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("20e61a3d-bf87-4a99-9756-7fe13d2daa6e")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System;
using System.Collections.Generic;
using System.Drawing;
namespace Model
{
public static class ObjConversion
{
private const float MULTIPLE = 100f;
public static SizeF MmToPx(SizeF size)
{
return new SizeF(size.Width / 25.4f * MULTIPLE, size.Height / 25.4f * MULTIPLE);
}
public static RectangleF MmToPx(RectangleF rect)
{
float x = rect.X / 25.4f * MULTIPLE;
float y = rect.Y / 25.4f * MULTIPLE;
float w = rect.Width / 25.4f * MULTIPLE;
float h = rect.Height / 25.4f * MULTIPLE;
return new RectangleF(x, y, w, h);
}
public static RectangleF PxToMm(RectangleF rect)
{
float x = rect.X / MULTIPLE * 25.4f;
float y = rect.Y / MULTIPLE * 25.4f;
float w = rect.Width / MULTIPLE * 25.4f;
float h = rect.Height / MULTIPLE * 25.4f;
return new RectangleF(x, y, w, h);
}
public static SizeF PxToMm(Size size)
{
return new SizeF(Convert.ToSingle(size.Width / MULTIPLE * 25.4f), Convert.ToSingle(size.Height / MULTIPLE * 25.4f));
}
public static PrintLabelFieldType StrToFieldType(string s)
{
PrintLabelFieldType type = (PrintLabelFieldType)Enum.Parse(typeof(PrintLabelFieldType), s);
return type;
}
public static RectangleF StrToRectF(string s)
{
RectangleF rect = new();
string[] arr = s.Split(',');
if (arr.Length == 4)
{
if (float.TryParse(arr[0], out float result))
rect.X = result;
if (float.TryParse(arr[1], out result))
rect.Y = result;
if (float.TryParse(arr[2], out result))
rect.Width = result;
if (float.TryParse(arr[3], out result))
rect.Height = result;
}
return rect;
}
public static string RectFToStr(RectangleF rect)
{
return string.Format("{0},{1},{2},{3}", rect.X, rect.Y, rect.Width, rect.Height);
}
public static Font StrToFont(string s)
{
string[] t = s.Split(',');
float emSize = Convert.ToSingle(t[1]);
FontStyle style = FontStyle.Regular;
if (t[2] == "B") style |= FontStyle.Bold;
if (t[3] == "I") style |= FontStyle.Italic;
Font font = new(t[0], emSize, style);
return font;
}
public static string FontToStr(Font font)
{
string[] s = new string[4];
s[0] = font.Name;
s[1] = font.Size.ToString();
if (font.Bold) s[2] = "B";
if (font.Italic) s[3] = "I";
return string.Join(",", s);
}
public static SizeF StrToSizeF(string s)
{
SizeF size = new();
string[] arr = s.Split(',');
if (arr.Length == 2)
{
if (float.TryParse(arr[0], out float result))
size.Width = result;
if (float.TryParse(arr[1], out result))
size.Height = result;
}
return size;
}
public static string SizeFToStr(SizeF size)
{
return string.Format("{0},{1}", size.Width, size.Height);
}
public static string StrRemoveKey(string s)
{
string rtn = "";
bool into = false;
for (int i = 0; i < s.Length; i++)
{
if (s[i] == '[')
into = true;
else if (s[i] == ']')
into = false;
else if (!into)
rtn += s[i];
}
return rtn;
}
public static string[] StrGetKey(string s)
{
string tt = "";
List<string> rtn = new();
bool into = false;
for (int i = 0; i < s.Length; i++)
{
if (s[i] == '[')
{
into = true;
tt = "";
}
else if (s[i] == ']')
{
into = false;
rtn.Add(tt);
}
else if (into)
{
tt += s[i];
}
}
return rtn.ToArray();
}
public static Bitmap ReadImageFile(string path)
{
if (!System.IO.File.Exists(path))
return null;
using System.IO.FileStream file = new(path, System.IO.FileMode.Open);
byte[] b = new byte[file.Length];
file.Read(b, 0, b.Length);
System.IO.MemoryStream stream = new(b);
return new Bitmap(Image.FromStream(stream));
}
}
}
using System;
namespace Model
{
public enum TemplateState
{
Saved,
Unsaved
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public enum UserLevel
{
Admin = -1,
None = 0,
User = 1
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="RestSharp" version="106.11.7" targetFramework="net461" />
<package id="Tesseract" version="3.3.0" targetFramework="net461" />
</packages>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartScan", "SmartScan\SmartScan.csproj", "{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtensionGroup", "ExtensionGroup\ExtensionGroup.csproj", "{2AB75B8C-0538-423C-83EA-702379AD622A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BLL", "BLL\BLL.csproj", "{F7499DE9-5665-49FD-BDB6-602B9AF98541}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DAL", "DAL\DAL.csproj", "{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "paddleOCR", "paddleOCR\paddleOCR.csproj", "{7178A902-E193-40CB-8AF5-4EEA05876522}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Debug|x64.ActiveCfg = Debug|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Debug|x64.Build.0 = Debug|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Debug|x86.ActiveCfg = Debug|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Debug|x86.Build.0 = Debug|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Release|Any CPU.Build.0 = Release|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Release|x64.ActiveCfg = Release|x64
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Release|x64.Build.0 = Release|x64
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Release|x86.ActiveCfg = Release|Any CPU
{D7FE70F5-DDE7-4A87-A69C-8B2DE5D88207}.Release|x86.Build.0 = Release|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Debug|x64.ActiveCfg = Debug|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Debug|x64.Build.0 = Debug|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Debug|x86.ActiveCfg = Debug|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Debug|x86.Build.0 = Debug|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Release|Any CPU.Build.0 = Release|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Release|x64.ActiveCfg = Release|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Release|x64.Build.0 = Release|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Release|x86.ActiveCfg = Release|Any CPU
{2AB75B8C-0538-423C-83EA-702379AD622A}.Release|x86.Build.0 = Release|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Debug|x64.ActiveCfg = Debug|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Debug|x64.Build.0 = Debug|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Debug|x86.ActiveCfg = Debug|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Debug|x86.Build.0 = Debug|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Release|Any CPU.Build.0 = Release|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Release|x64.ActiveCfg = Release|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Release|x64.Build.0 = Release|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Release|x86.ActiveCfg = Release|Any CPU
{F7499DE9-5665-49FD-BDB6-602B9AF98541}.Release|x86.Build.0 = Release|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Debug|x64.ActiveCfg = Debug|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Debug|x64.Build.0 = Debug|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Debug|x86.ActiveCfg = Debug|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Debug|x86.Build.0 = Debug|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Release|Any CPU.Build.0 = Release|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Release|x64.ActiveCfg = Release|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Release|x64.Build.0 = Release|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Release|x86.ActiveCfg = Release|Any CPU
{E28DE77A-FC70-4BE4-96EC-D0C1A7215A15}.Release|x86.Build.0 = Release|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Debug|x64.ActiveCfg = Debug|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Debug|x64.Build.0 = Debug|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Debug|x86.ActiveCfg = Debug|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Debug|x86.Build.0 = Debug|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Release|Any CPU.Build.0 = Release|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Release|x64.ActiveCfg = Release|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Release|x64.Build.0 = Release|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Release|x86.ActiveCfg = Release|Any CPU
{20E61A3D-BF87-4A99-9756-7FE13D2DAA6E}.Release|x86.Build.0 = Release|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Debug|x64.ActiveCfg = Debug|x64
{7178A902-E193-40CB-8AF5-4EEA05876522}.Debug|x64.Build.0 = Debug|x64
{7178A902-E193-40CB-8AF5-4EEA05876522}.Debug|x86.ActiveCfg = Debug|x86
{7178A902-E193-40CB-8AF5-4EEA05876522}.Debug|x86.Build.0 = Debug|x86
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|Any CPU.Build.0 = Release|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|x64.ActiveCfg = Release|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|x64.Build.0 = Release|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|x86.ActiveCfg = Release|x86
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2833D095-37E0-481F-8AB5-62EC4C646A0D}
EndGlobalSection
EndGlobal
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
<?xml version="1.0"?>
<doc>
<assembly>
<name>ConfigHelper</name>
</assembly>
<members>
<member name="F:ConfigHelper.AdvanceConfigEdit.CustomEditor">
<summary>
自定义编辑器
</summary>
</member>
<member name="F:ConfigHelper.AdvanceConfigEdit.components">
<summary>
必需的设计器变量。
</summary>
</member>
<member name="M:ConfigHelper.AdvanceConfigEdit.Dispose(System.Boolean)">
<summary>
清理所有正在使用的资源。
</summary>
<param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
</member>
<member name="M:ConfigHelper.AdvanceConfigEdit.InitializeComponent">
<summary>
设计器支持所需的方法 - 不要修改
使用代码编辑器修改此方法的内容。
</summary>
</member>
<member name="M:ConfigHelper.AdvanceConfigForm.AddCustomEditor``1(System.String)">
<summary>
添加自定义编辑器
</summary>
<typeparam name="T"></typeparam>
<param name="name"></param>
</member>
<member name="M:ConfigHelper.AdvanceConfigForm.ShowEditDialog(System.Windows.Forms.IWin32Window,System.Boolean)">
<summary>
显示配置界面,2秒内调用约6次后显示
</summary>
<param name="owner"></param>
<param name="TopMost"></param>
</member>
<member name="F:ConfigHelper.AdvanceConfigForm.components">
<summary>
Required designer variable.
</summary>
</member>
<member name="M:ConfigHelper.AdvanceConfigForm.Dispose(System.Boolean)">
<summary>
Clean up any resources being used.
</summary>
<param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
</member>
<member name="M:ConfigHelper.AdvanceConfigForm.InitializeComponent">
<summary>
Required method for Designer support - do not modify
the contents of this method with the code editor.
</summary>
</member>
<member name="T:ConfigHelper.Config">
<summary>
自定义配置存取
</summary>
</member>
<member name="F:ConfigHelper.Config.hasChange">
<summary>
指示配置文件是否存在变化
</summary>
</member>
<member name="P:ConfigHelper.Config.SaveToAppdata">
<summary>
将设置保存至appdata目录
</summary>
</member>
<member name="M:ConfigHelper.Config.ReloadConfig">
<summary>
重载配置
</summary>
</member>
<member name="M:ConfigHelper.Config.SetComment(System.String,System.String)">
<summary>
设置备注
</summary>
<param name="key"></param>
<param name="Comment"></param>
</member>
<member name="M:ConfigHelper.Config.Get(System.String)">
<summary>
读取配置
</summary>
<param name="key"></param>
<returns></returns>
</member>
<member name="M:ConfigHelper.Config.Get(System.Object)">
<summary>
读取配置
</summary>
<param name="key">传入一个枚举值</param>
<returns></returns>
</member>
<member name="M:ConfigHelper.Config.Get``1(System.Object,``0)">
<summary>
读取配置
</summary>
<typeparam name="T">返回类型</typeparam>
<param name="key">传入一个枚举值</param>
<param name="defaultvalue">失败默认值</param>
<returns></returns>
</member>
<member name="M:ConfigHelper.Config.Get``1(System.String,``0)">
<summary>
读取配置
</summary>
<typeparam name="T">返回类型</typeparam>
<param name="key">key</param>
<param name="defaultvalue">失败默认值</param>
<returns></returns>
</member>
<member name="M:ConfigHelper.Config.Set(System.String,System.String)">
<summary>
设置配置
</summary>
<param name="key"></param>
<param name="value"></param>
</member>
<member name="M:ConfigHelper.Config.Set(System.Object,System.String)">
<summary>
设置配置
</summary>
<param name="key">配置枚举值</param>
<param name="value"></param>
</member>
<member name="M:ConfigHelper.Config.Set``1(System.Object,``0)">
<summary>
设置配置
</summary>
<param name="key">配置枚举值</param>
<param name="value"></param>
</member>
<member name="M:ConfigHelper.Config.Set``1(System.String,``0)">
<summary>
设置配置
</summary>
<typeparam name="T">值类型</typeparam>
<param name="key"></param>
<param name="value"></param>
</member>
<member name="M:ConfigHelper.Config.SaveChangeDebounce">
<summary>
保存设置
</summary>
</member>
<member name="M:ConfigHelper.Config.SaveChange">
<summary>
保存设置
</summary>
</member>
<member name="M:ConfigHelper.Config.PropertyBind(System.Object,System.Object,System.String,System.String,System.String)">
<summary>
绑定UI属性
</summary>
<param name="key">配置key</param>
<param name="uiobj">ui对象</param>
<param name="Property">绑定属性</param>
<param name="SaveEvent">绑定事件(object s, EventArgs x),可以为空</param>
<param name="defaultvalue">默认值</param>
</member>
<member name="M:ConfigHelper.Config.PropertyBind``1(System.Object,System.Object,System.String,System.String,``0)">
<summary>
绑定UI属性
</summary>
<param name="key">配置key</param>
<param name="uiobj">ui对象</param>
<param name="Property">绑定属性</param>
<param name="SaveEvent">绑定事件(object s, EventArgs x),可以为空</param>
<param name="defaultvalue">默认值</param>
</member>
<member name="M:ConfigHelper.Config.LoadMyConfig(System.Type)">
<summary>
转换自定义配置类
</summary>
<param name="ConfigClassType"></param>
<returns>加载到的配置Key数量</returns>
</member>
<member name="T:ConfigHelper.ICustEditor">
<summary>
自定义编辑器接口
</summary>
</member>
<member name="M:ConfigHelper.ICustEditor.ValueEdit(System.Object)">
<summary>
自己的编辑方法或界面
</summary>
<param name="value">传入的值</param>
<returns>传出的值</returns>
</member>
<member name="T:ConfigHelper.MyConfig`1">
<summary>
自动化我的配置
</summary>
</member>
<member name="F:ConfigHelper.MyConfig`1.Key">
<summary>
配置的Key
</summary>
</member>
<member name="P:ConfigHelper.MyConfig`1.Val">
<summary>
配置的值
</summary>
</member>
<member name="M:ConfigHelper.MyConfig`1.ToString">
<summary>
获取配置数据的文本
</summary>
<returns></returns>
</member>
<member name="M:ConfigHelper.MyConfig`1.op_Implicit(ConfigHelper.MyConfig{`0})~`0">
<summary>
隐式转换,读值
</summary>
<param name="m1"></param>
</member>
<member name="M:ConfigHelper.MyConfig`1.op_Implicit(`0)~ConfigHelper.MyConfig{`0}">
<summary>
隐式转换,写值
</summary>
<param name="v1"></param>
</member>
<member name="T:ConfigHelper.MyConfigComment">
<summary>
自定义配置描述
</summary>
</member>
<member name="M:ConfigHelper.MyConfigComment.#ctor(System.String)">
<summary>
配置的说明
</summary>
<param name="comment"></param>
</member>
</members>
</doc>
此文件类型无法预览
此文件类型无法预览
此文件的差异太大,无法显示。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
</appSettings>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding maxReceivedMessageSize="90000000" maxBufferPoolSize="90000000" maxBufferSize="90000000" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:01:00" sendTimeout="00:01:00">
<readerQuotas maxStringContentLength="90000000" maxArrayLength="90000000" maxBytesPerRead="90000000" />
<security mode="None"/>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
此文件类型无法预览
using System;
using System.Collections.Generic;
using System.Drawing;
namespace SmartScan
{
public static class Common
{
public static FrmMain frmMain;
public static FrmWaitting frmWaitting;
public static BLL.Config config;
public static BLL.Extension extension;
public static BLL.PrintLabelEdit labelEdit;
public static BLL.MaterialEdit mateEdit;
public static Model.OCR ocr;
public static Asa.Camera.VisionLib cameraVision;
public static BLL.IO_Interface ioModule;
public static LightSource lightSource;
public static ServerCommunication SCMM;
public static List<string> macroKey;
public static List<string> extraKey=new List<string>();
//public static Dictionary<string, Dictionary<string, string>> extraData = new Dictionary<string, Dictionary<string, string>>();
public static int mateMaxCodeID;
public static readonly string[] CODE_SPLIT = new string[] { ",", ";", ":", "@", "#", "$", "%", "&", "-", "_", "+", "|", "!", "^", "*", "?", "/", "\\", "[Space]", "[Tab]" };
}
}

namespace SmartScan
{
partial class FrmAbout
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.LblName = new Asa.FaceControl.FaceLabel();
this.faceLabel2 = new Asa.FaceControl.FaceLabel();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pictureBox1.Image = global::SmartScan.Properties.Resources.App;
this.pictureBox1.Location = new System.Drawing.Point(38, 55);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(411, 94);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex = 6;
this.pictureBox1.TabStop = false;
//
// LblName
//
this.LblName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LblName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.LblName.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblName.BorderWidth = 2;
this.LblName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblName.Location = new System.Drawing.Point(11, 155);
this.LblName.Name = "LblName";
this.LblName.Padding = new System.Windows.Forms.Padding(3);
this.LblName.Size = new System.Drawing.Size(464, 50);
this.LblName.TabIndex = 8;
this.LblName.Text = "faceLabel1";
//
// faceLabel2
//
this.faceLabel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.faceLabel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.faceLabel2.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.faceLabel2.BorderWidth = 2;
this.faceLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.faceLabel2.Location = new System.Drawing.Point(11, 211);
this.faceLabel2.Name = "faceLabel2";
this.faceLabel2.Padding = new System.Windows.Forms.Padding(3);
this.faceLabel2.Size = new System.Drawing.Size(464, 45);
this.faceLabel2.TabIndex = 9;
this.faceLabel2.Text = "faceLabel2";
this.faceLabel2.Click += new System.EventHandler(this.faceLabel2_Click);
//
// FrmAbout
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(486, 339);
this.Controls.Add(this.faceLabel2);
this.Controls.Add(this.LblName);
this.Controls.Add(this.pictureBox1);
this.Icon = global::SmartScan.Properties.Resources.NEO_64;
this.Name = "FrmAbout";
this.Text = "FrmAbout";
this.Load += new System.EventHandler(this.FrmAbout_Load);
this.Controls.SetChildIndex(this.pictureBox1, 0);
this.Controls.SetChildIndex(this.LblName, 0);
this.Controls.SetChildIndex(this.faceLabel2, 0);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private Asa.FaceControl.FaceLabel LblName;
private Asa.FaceControl.FaceLabel faceLabel2;
}
}
\ No newline at end of file
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件的差异被折叠, 点击展开。
此文件类型无法预览
此文件类型无法预览
此文件类型无法预览
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!