重写更新程序和一些优化

1.重写了更新程序
2.身份证阅读器接口增加SW100
3.FastReport组件汉化
4.修正撤回发送科室时SQL语句
5.修正分检生成小结时结论重复的BUG
dhzzyy
LiJiaWen 3 weeks ago
parent 9e192567f2
commit a5cd6013b3
  1. 35
      PEIS.sln
  2. 44
      PEIS/App.config
  3. 2
      PEIS/Model/Enrollment/EnrollmentPatientModel.cs
  4. 3
      PEIS/Model/Exam/PartModel.cs
  5. 59
      PEIS/PEIS.csproj
  6. 15
      PEIS/Program.cs
  7. 10
      PEIS/Utils/Global.cs
  8. 79
      PEIS/Utils/IDCard/IDCardHelper.cs
  9. 2
      PEIS/Utils/IDCard/SS860/IMAGE.cs
  10. 4
      PEIS/Utils/IDCard/SS860/ReadCardAPI64.cs
  11. 4
      PEIS/Utils/IDCard/SS860/ReadCardAPI86.cs
  12. 18
      PEIS/Utils/IDCard/SS860/ReadCardInfo.cs
  13. 158
      PEIS/Utils/IDCard/SW100/SW100.cs
  14. 111
      PEIS/Utils/SS860/RdCardModel.cs
  15. 283
      PEIS/Utils/SS860/ReadSs628.cs
  16. 125
      PEIS/Utils/VersionHelper.cs
  17. 13
      PEIS/View/Base/NewPersonForm.cs
  18. 40
      PEIS/View/CountdownMessageBox.Designer.cs
  19. 79
      PEIS/View/CountdownMessageBox.cs
  20. 2
      PEIS/View/Enrollment/EnrollmentOrgForm.cs
  21. 25
      PEIS/View/Enrollment/EnrollmentPersonForm.Designer.cs
  22. 4
      PEIS/View/Enrollment/EnrollmentPersonForm.cs
  23. 4
      PEIS/View/Enrollment/NewEnrollmentPersonForm.cs
  24. 1510
      Third/FastReport/zh-CHS/FastReport/Chinese (Simplified).frl
  25. 0
      Third/SS860/RDCard64/RdCard.dll
  26. 0
      Third/SS860/RDCard64/WltRS.dll
  27. 0
      Third/SS860/RDCard64/license.dat
  28. 0
      Third/SS860/RDCard64/msvcr100.dll
  29. 0
      Third/SS860/RDCard64/sdtapi.dll
  30. 0
      Third/SS860/RDCard64/unpack.dll
  31. 0
      Third/SS860/RDCard86/RdCard.dll
  32. 0
      Third/SS860/RDCard86/WltRS.dll
  33. 0
      Third/SS860/RDCard86/license.dat
  34. 0
      Third/SS860/RDCard86/sdtapi.dll
  35. BIN
      Third/SW100/BmpToJpg.dll
  36. BIN
      Third/SW100/Device.dll
  37. BIN
      Third/SW100/SSCARDInterface.dll
  38. BIN
      Third/SW100/SSSE32.dll
  39. BIN
      Third/SW100/SW100.dll
  40. BIN
      Third/SW100/TestCard.exe
  41. BIN
      Third/SW100/UnPack.dll
  42. BIN
      Third/SW100/zpp.bmp
  43. 334
      Third/SW100/接口说明.doc
  44. 7
      Update/App.config
  45. 40
      Update/CountdownMessageBox.Designer.cs
  46. 85
      Update/CountdownMessageBox.cs
  47. 79
      Update/Form1.Designer.cs
  48. 168
      Update/Form1.cs
  49. 95
      Update/MainFrom.Designer.cs
  50. 241
      Update/MainFrom.cs
  51. 3
      Update/MainFrom.resx
  52. 24
      Update/Program.cs
  53. 8
      Update/Properties/AssemblyInfo.cs
  54. 57
      Update/Properties/Resources.Designer.cs
  55. 17
      Update/Properties/Resources.resx
  56. 3
      Update/Properties/Settings.Designer.cs
  57. 75
      Update/Update.csproj
  58. 4
      Update/packages.config
  59. BIN
      Update/update.png

@ -1,13 +1,16 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.33529.398 VisualStudioVersion = 16.0.36324.18
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PEIS", "PEIS\PEIS.csproj", "{8980800E-6620-4B2E-A7DD-8C4651E1A344}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PEIS", "PEIS\PEIS.csproj", "{8980800E-6620-4B2E-A7DD-8C4651E1A344}"
ProjectSection(ProjectDependencies) = postProject
{12FE71E3-1E39-424C-8685-64EC743A248F} = {12FE71E3-1E39-424C-8685-64EC743A248F}
EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{AB0394FA-735E-4213-9ACE-31C02F698FA7}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{AB0394FA-735E-4213-9ACE-31C02F698FA7}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Update", "Update\Update.csproj", "{12FE71E3-1E39-424C-8685-64EC743A248F}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -19,26 +22,26 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|Any CPU.Build.0 = Debug|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|x86.ActiveCfg = Debug|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|x86.ActiveCfg = Debug|x86
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|x86.Build.0 = Debug|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Debug|x86.Build.0 = Debug|x86
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|Any CPU.ActiveCfg = Release|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|Any CPU.Build.0 = Release|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|Any CPU.Build.0 = Release|Any CPU
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|x86.ActiveCfg = Release|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|x86.ActiveCfg = Release|x86
{8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|x86.Build.0 = Release|Any CPU {8980800E-6620-4B2E-A7DD-8C4651E1A344}.Release|x86.Build.0 = Release|x86
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|Any CPU.Build.0 = Debug|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|x86.ActiveCfg = Debug|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Debug|x86.ActiveCfg = Debug|x86
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Debug|x86.Build.0 = Debug|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Debug|x86.Build.0 = Debug|x86
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|Any CPU.ActiveCfg = Release|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|Any CPU.Build.0 = Release|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Release|Any CPU.Build.0 = Release|Any CPU
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|x86.ActiveCfg = Release|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Release|x86.ActiveCfg = Release|x86
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}.Release|x86.Build.0 = Release|Any CPU {12FE71E3-1E39-424C-8685-64EC743A248F}.Release|x86.Build.0 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution GlobalSection(NestedProjects) = preSolution
{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5} = {AB0394FA-735E-4213-9ACE-31C02F698FA7} {12FE71E3-1E39-424C-8685-64EC743A248F} = {AB0394FA-735E-4213-9ACE-31C02F698FA7}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {56DA78F6-DED1-4B17-AE1F-7DCF4A666388} SolutionGuid = {56DA78F6-DED1-4B17-AE1F-7DCF4A666388}

@ -4,42 +4,26 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections> </configSections>
<appSettings> <appSettings>
<!-- <add value="1.0.3" key="Version"/> --> <!--<add value="1.0.0" key="Version"/>-->
<!-- <add value="http://200.200.200.71:5200/version/download" key="DownloadUrl"/> --> <!-- <add value="http://200.200.200.71:5200/version/download" key="DownloadUrl"/> -->
<!-- 德宏中医 -->
<!--<add value="0513" key="UserCode"/> 1115-->
<!--<add value="赵翠回" key="UserName"/>-->
<!-- 芒市妇幼 -->
<!--<add value="0465" key="UserCode"/> 2-->
<!--<add value="李信富" key="UserName"/>-->
<!-- 盈江妇幼 -->
<!--<add value="0125" key="UserCode"/> 666-->
<!--<add value="刘华香" key="UserName"/>-->
<!-- 188 -->
<add value="0293" key="UserCode"/>
<add value="罗忠兰" key="UserName"/>
</appSettings> </appSettings>
<connectionStrings> <connectionStrings>
<!--本地测试--> <!--公司内网 192.168.12.188-->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D3D78E221B3E0300765B697A8C044694AA8A0575480464D83BBFC4445FA39D2B9C1CA21CD35ACFCC5B3BF8E10022ADBFBF9EF84CC3D425C90"/>--> <add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D3D78E221B3E0300765B697A8C044694AA8A0575480464D83BBFC4445FA39D2B9C1CA21CD35ACFCC5B3BF8E10022ADBFBF9EF84CC3D425C90"/>
<!-- 德宏州中医院 peisdb--> <!--德宏中医院 200.200.200.71-->
<add name="ConnString" connectionString="10C598E364BCAFCF71617738597417B368D095FA1A37D76CC4755C411E5B6E792E0D4950863434F9B242AA9F134426A27810AC34D6EDC4F6ABFC4BE6027BB990824DB7092BFDA15709314FEBC2C3C9E312752DFBDF33BC1BF3C0FC84EAA83A4F"/> <!--<add name="ConnString" connectionString="10C598E364BCAFCF71617738597417B368D095FA1A37D76CC4755C411E5B6E792E0D4950863434F9B242AA9F134426A27810AC34D6EDC4F6ABFC4BE6027BB990824DB7092BFDA15709314FEBC2C3C9E312752DFBDF33BC1BF3C0FC84EAA83A4F"/>-->
<!-- 192.168.12.188 --> <!--芒市妇幼 192.168.11.5 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D3D78E221B3E0300765B697A8C044694AA8A0575480464D83E79206ED689FE4A1CE0C479D02BC880B7FDEDDC464EE6B74BDB082FD5B1B9EFC"/>-->
<!-- 盈江妇幼YJFY -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCF5A016EA6C7463FAC7D75379F63924F4F82C1749BDA88D9414EC0303E1ECC3E76895E07FCFC13332D1D79643A2AD3AA60507FD3EAF9A41761B30F4FDE900F983F1FE6ED6F0245E5BF8BFCFC5F0A2C03E4"/>-->
<!-- 芒市妇幼MSFY -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C71974C5748654F280FDC48E754851202242B4E7B1AA07112A874114ABFCB682AC3D64541EBBF807FEB54E514CC3815F4A0521AC62245D6E0B29E34ADCAE07492C51045002E903C53C8DC45FF6FC4A547A"/>--> <!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C71974C5748654F280FDC48E754851202242B4E7B1AA07112A874114ABFCB682AC3D64541EBBF807FEB54E514CC3815F4A0521AC62245D6E0B29E34ADCAE07492C51045002E903C53C8DC45FF6FC4A547A"/>-->
<!-- 德宏妇幼--> <!--德宏妇幼 192.168.1.37-->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C763905B6860F9682000563332FCAB5C73858C4F5055412BEEA4250C4B7F818B1131EA88AF653A3B4CEF4C8709AEC4870673F567CE7499A1B68594877CCF22BD0DBB127636E607D7B6"/>--> <!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C763905B6860F9682000563332FCAB5C73858C4F5055412BEEA4250C4B7F818B1131EA88AF653A3B4CEF4C8709AEC4870673F567CE7499A1B68594877CCF22BD0DBB127636E607D7B6"/>-->
<!-- 102——盈江妇幼 --> <!--蒙自中医院 192.168.0.188-->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D3DB10592B6516FF392A06CF6BBE697638BCAD04DF0DF496E1C332BF92A6874860C05781802A1E73DB9BCDE3FC2DDFD90CF24B75D2553DC3421EF8DCF69412797"/>-->
<!-- 112——盈江妇幼 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D633D848E48ED11DF6B495F1D3AF9FC81959B048C0867E34D998ABDB34CF97D8FB976771F7C353F03582C9014715850C95ABC7C01A7B6078593BEEC3D0D66205D"/>-->
<!-- 112——芒市妇幼 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C75BD46245729DFD1D633D848E48ED11DF6B495F1D3AF9FC81959B048C0867E34D998ABDB34CF97D8FA6CC121A7855C73F474C304BCC447B73AC55CB42AA7DCEFB8FF5D776C08381C7DF5946B167D70A5C"/>-->
<!-- 蒙自中医院 -->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C704A2748FB5D61E41F06B6364853FE182D9FC9283BABF6C8A1505FE989308F14A00128E081E2BB18B70748D03C4064CF31C4A739EFFBF998EDD22C1959E48486F5415E6D133CD4459"/>--> <!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C704A2748FB5D61E41F06B6364853FE182D9FC9283BABF6C8A1505FE989308F14A00128E081E2BB18B70748D03C4064CF31C4A739EFFBF998EDD22C1959E48486F5415E6D133CD4459"/>-->
<!--德宏职业学院 10.1.179.14-->
<!--<add name="ConnString" connectionString="10C598E364BCAFCF6AF2FBDEB827EFFB10D93F7AAFDB0FD914ED51A3D8929CD01C8104316955C2A802EB19B021E6578438F82E9E8382AA40590C3C64E4FD26200844127899803B9ADEA5C06EA44D516F"/>-->
<!--盈江妇幼 172.172.100.12-->
<!--<add name="ConnString" connectionString="10C598E364BCAFCF5A016EA6C7463FAC7D75379F63924F4F82C1749BDA88D9414EC0303E1ECC3E76895E07FCFC13332D1D79643A2AD3AA60507FD3EAF9A41761B30F4FDE900F983F1FE6ED6F0245E5BF8BFCFC5F0A2C03E4"/>-->
<!--宁蒗中医院 192.168.201.73-->
<!--<add name="ConnString" connectionString="10C598E364BCAFCFDC6960B18CB026C70DC3B8A49169216C1749C51F4EDF5B75A5049148D112117979F484C7F946E0D5E74F84A273B2485C1FB00BDFF13CE76F00379FFA912E2DF6A43D30E4CB54F8E7EBEA0C92081E71F8"/>-->
</connectionStrings> </connectionStrings>
<entityFramework> <entityFramework>
<providers> <providers>

@ -210,7 +210,7 @@ namespace PEIS.Model.Enrollment
// 撤回发送到科室 // 撤回发送到科室
public bool RecallDept(Int64 EId, String Name) public bool RecallDept(Int64 EId, String Name)
{ {
var checkCost = $@"UPDATE Enrollment_CheckCost SET SendTime = null, SenderCode = null, Sender = null WHERE EID = {EId} AND SendTime is not null AND DeleteTime is null AND WeChatCostTime is null"; var checkCost = $@"UPDATE Enrollment_CheckCost SET SendTime = null, SenderCode = null, Sender = null WHERE EID = {EId} AND SendTime is not null AND DeleteTime is null";
var enrollmentPatient = $@"UPDATE Enrollment_Patient SET SignTime = null, SignerCode = null, Signer = null WHERE ID = {EId} AND SignTime is not null"; var enrollmentPatient = $@"UPDATE Enrollment_Patient SET SignTime = null, SignerCode = null, Signer = null WHERE ID = {EId} AND SignTime is not null";
var enrollmentFeeItem = $@"UPDATE a SET a.IsSend = 0 FROM Enrollment_FeeItem a LEFT JOIN Enrollment_CheckCost b ON a.OrderNO = b.ID AND a.EID = b.EID WHERE b.SendTime IS NULL AND a.EID = {EId}"; var enrollmentFeeItem = $@"UPDATE a SET a.IsSend = 0 FROM Enrollment_FeeItem a LEFT JOIN Enrollment_CheckCost b ON a.OrderNO = b.ID AND a.EID = b.EID WHERE b.SendTime IS NULL AND a.EID = {EId}";

@ -307,6 +307,9 @@ FROM StatusData;";
};*/ };*/
#endregion #endregion
//先清除旧的结论
DAOHelp.ExecuteSql($@" DELETE FROM Exam_Conclusion WHERE PID ={part.ID} AND EID={eid};");
var index = 1; var index = 1;
results.GroupBy(g => g.FeeItemName).ToList().ForEach(items => results.GroupBy(g => g.FeeItemName).ToList().ForEach(items =>
{ {

@ -61,6 +61,24 @@
<PropertyGroup> <PropertyGroup>
<StartupObject>PEIS.Program</StartupObject> <StartupObject>PEIS.Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Accessibility" /> <Reference Include="Accessibility" />
<Reference Include="AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb, processorArchitecture=MSIL"> <Reference Include="AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb, processorArchitecture=MSIL">
@ -310,20 +328,20 @@
<Compile Include="Utils\DAOHelp.cs" /> <Compile Include="Utils\DAOHelp.cs" />
<Compile Include="Utils\DAOHelp4His.cs" /> <Compile Include="Utils\DAOHelp4His.cs" />
<Compile Include="Utils\Global.cs" /> <Compile Include="Utils\Global.cs" />
<Compile Include="Utils\IDCard\IDCardHelper.cs" />
<Compile Include="Utils\IDCard\SW100\SW100.cs" />
<Compile Include="Utils\LogHelper.cs" /> <Compile Include="Utils\LogHelper.cs" />
<Compile Include="Utils\MySecurity.cs" /> <Compile Include="Utils\MySecurity.cs" />
<Compile Include="Utils\NoPresenter.cs" /> <Compile Include="Utils\NoPresenter.cs" />
<Compile Include="Utils\ObjectData.cs" /> <Compile Include="Utils\ObjectData.cs" />
<Compile Include="Utils\PingYinHelper.cs" /> <Compile Include="Utils\PingYinHelper.cs" />
<Compile Include="Utils\ReportHelper.cs" /> <Compile Include="Utils\ReportHelper.cs" />
<Compile Include="Utils\SS860\IMAGE.cs" /> <Compile Include="Utils\IDCard\SS860\IMAGE.cs" />
<Compile Include="Utils\SS860\RdCardModel.cs" /> <Compile Include="Utils\IDCard\SS860\ReadCardAPI64.cs" />
<Compile Include="Utils\SS860\ReadCardAPI64.cs" /> <Compile Include="Utils\IDCard\SS860\ReadCardAPI86.cs" />
<Compile Include="Utils\SS860\ReadCardAPI86.cs" /> <Compile Include="Utils\IDCard\SS860\ReadCardInfo.cs" />
<Compile Include="Utils\SS860\ReadCardInfo.cs" />
<Compile Include="Utils\StoredProcedure.cs" /> <Compile Include="Utils\StoredProcedure.cs" />
<Compile Include="Utils\VersionHelper.cs" /> <Compile Include="Utils\VersionHelper.cs" />
<Compile Include="Utils\SS860\ReadSs628.cs" />
<Compile Include="View\Base\IBaseOrgView.cs" /> <Compile Include="View\Base\IBaseOrgView.cs" />
<Compile Include="View\Base\IBasePatientView.cs" /> <Compile Include="View\Base\IBasePatientView.cs" />
<Compile Include="View\Base\NewOrgForm.cs"> <Compile Include="View\Base\NewOrgForm.cs">
@ -368,6 +386,12 @@
<Compile Include="View\Base\SelectPatientForm.Designer.cs"> <Compile Include="View\Base\SelectPatientForm.Designer.cs">
<DependentUpon>SelectPatientForm.cs</DependentUpon> <DependentUpon>SelectPatientForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="View\CountdownMessageBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="View\CountdownMessageBox.Designer.cs">
<DependentUpon>CountdownMessageBox.cs</DependentUpon>
</Compile>
<Compile Include="View\Enrollment\BatchForm.cs"> <Compile Include="View\Enrollment\BatchForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@ -807,8 +831,6 @@
<None Include="ReportFiles\HospitalBasicInformationRegistration.xlsx"> <None Include="ReportFiles\HospitalBasicInformationRegistration.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="Utils\SS860\RDCard64\license.dat" />
<None Include="Utils\SS860\RDCard86\license.dat" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="peis_1.ico" /> <Content Include="peis_1.ico" />
@ -834,14 +856,6 @@
<Content Include="Update\update.png"> <Content Include="Update\update.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="Utils\SS860\RDCard64\msvcr100.dll" />
<Content Include="Utils\SS860\RDCard64\RdCard.dll" />
<Content Include="Utils\SS860\RDCard64\sdtapi.dll" />
<Content Include="Utils\SS860\RDCard64\unpack.dll" />
<Content Include="Utils\SS860\RDCard64\WltRS.dll" />
<Content Include="Utils\SS860\RDCard86\RdCard.dll" />
<Content Include="Utils\SS860\RDCard86\sdtapi.dll" />
<Content Include="Utils\SS860\RDCard86\WltRS.dll" />
<None Include="ReportFiles\TCheckCost.frx"> <None Include="ReportFiles\TCheckCost.frx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
@ -929,6 +943,17 @@
<Error Condition="!Exists('..\packages\PdfiumViewer.Native.x86.v8-xfa.2018.4.8.256\build\PdfiumViewer.Native.x86.v8-xfa.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PdfiumViewer.Native.x86.v8-xfa.2018.4.8.256\build\PdfiumViewer.Native.x86.v8-xfa.props'))" /> <Error Condition="!Exists('..\packages\PdfiumViewer.Native.x86.v8-xfa.2018.4.8.256\build\PdfiumViewer.Native.x86.v8-xfa.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PdfiumViewer.Native.x86.v8-xfa.2018.4.8.256\build\PdfiumViewer.Native.x86.v8-xfa.props'))" />
</Target> </Target>
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>xcopy $(SolutionDir)Third\DevExpress\ $(TargetDir) /e /y</PreBuildEvent> <PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>:: Update目录
xcopy "$(SolutionDir)Update\bin\$(ConfigurationName)\" "$(TargetDir)Update\" /e /y
:: 汉化目录
xcopy "$(SolutionDir)Third\DevExpress\" "$(TargetDir)" /e /y
xcopy "$(SolutionDir)Third\FastReport\" "$(TargetDir)" /e /y
:: 设备目录
xcopy "$(SolutionDir)Third\SW100\" "$(TargetDir)SW100\" /e /y
xcopy "$(SolutionDir)Third\SS860\" "$(TargetDir)SS860\" /e /y</PostBuildEvent>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -14,7 +14,7 @@ namespace PEIS
/// 应用程序的主入口点。 /// 应用程序的主入口点。
/// </summary> /// </summary>
[STAThread] [STAThread]
static void Main() static void Main(string[] args)
{ {
//var test = new TestView(); //var test = new TestView();
//test.ShowDialog(); //test.ShowDialog();
@ -35,14 +35,16 @@ namespace PEIS
//汉化Dev组件 //汉化Dev组件
ForceLoadDevExpressLocalization(); ForceLoadDevExpressLocalization();
//汉化FastReport组件
ForceLoadFastReportLocalization();
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
CacheDataModel.GetConfig(); CacheDataModel.GetConfig();
VersionHelper.CheckUpdate(); VersionHelper.CheckUpdate(args.Length > 0 ? args[0] : null);
var login = new LoginForm(); var login = new LoginForm();
login.ShowDialog(); login.ShowDialog();
if (login.DialogResult == DialogResult.OK) if (login.DialogResult == DialogResult.OK)
{ {
//ThreadPool.QueueUserWorkItem(state => CacheDataModel.GetConfig()); //ThreadPool.QueueUserWorkItem(state => CacheDataModel.GetConfig());
@ -56,6 +58,13 @@ namespace PEIS
} }
} }
private static void ForceLoadFastReportLocalization()
{
string chineseSimpleFrl = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "zh-CHS", "FastReport", "Chinese (Simplified).frl");
FastReport.Utils.Res.LoadLocale(chineseSimpleFrl);
}
private static void ForceLoadDevExpressLocalization() private static void ForceLoadDevExpressLocalization()
{ {

@ -56,6 +56,16 @@ namespace PEIS.Utils
return Global._lstConfig.FirstOrDefault(x => x.Key == "UseGroupFeeItemsInTeamReport")?.Value ?? "0"; return Global._lstConfig.FirstOrDefault(x => x.Key == "UseGroupFeeItemsInTeamReport")?.Value ?? "0";
} }
} }
/// <summary>
/// 身份证阅读器
/// </summary>
public static string IDReader
{
get
{
return Global._lstConfig.FirstOrDefault(x => x.Key == "IDReader")?.Value ?? "";
}
}
/// <summary> /// <summary>
/// 配置信息 /// 配置信息

@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace PEIS.Utils.IDCard
{
public static class IDCardHelper
{
public static IDCardInfo Read()
{
IDCardInfo info = null;
switch (Global.IDReader)
{
case "SW100":
info = SW100.SW100.ReadIDCard();
break;
default:
info = SS860.ReadCardInfo.Get();
break;
}
return info;
}
}
public class IDCardInfo
{
/// <summary>
        /// 姓名
        /// </summary>
        public string NAME { get; set; }
        /// <summary>
        /// 性别
        /// </summary>
        public string SEX { get; set; }
        /// <summary>
        /// 民族
        /// </summary>
        public string NATION { get; set; }
        /// <summary>
        /// 住址
        /// </summary>
        public string ADDRESS { get; set; }
        /// <summary>
        /// 签发机关
        /// </summary>
        public string ISSUE_AUTH { get; set; }
        /// <summary>
        /// 有效期开始日期
        /// </summary>
        public DateTime BEGIN_DATE { get; set; }
        /// <summary>
        /// 有效期结束日期
        /// </summary>
        public DateTime END_DATE { get; set; }
        /// <summary>
        /// 身份证号码
        /// </summary>
        public string IDNO { get; set; }
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime BIRTH { get; set; }
        /// <summary>
        /// 头像
        /// </summary>
        public Bitmap HEADPORTRAIT { get; set; }
}
}

@ -3,7 +3,7 @@ using System.Drawing;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
namespace PEIS.Utils.SS860 namespace PEIS.Utils.IDCard.SS860
{ {
class IMAGE class IMAGE
{ {

@ -1,13 +1,13 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace PEIS.Utils.SS860 namespace PEIS.Utils.IDCard.SS860
{ {
/// <summary> /// <summary>
/// 神思二代读卡器API函数 /// 神思二代读卡器API函数
/// </summary> /// </summary>
public class ReadCardApi64 public class ReadCardApi64
{ {
[DllImport("./RDCard64/RdCard.DLL")] [DllImport("./SS860/RDCard64/RdCard.DLL")]
public static extern int UCommand1(string pcmd, ref int arg0, ref int arg1, byte[] arg3); public static extern int UCommand1(string pcmd, ref int arg0, ref int arg1, byte[] arg3);
} }
} }

@ -1,6 +1,6 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace PEIS.Utils.SS860 namespace PEIS.Utils.IDCard.SS860
{ {
/// <summary> /// <summary>
    /// 神思二代读卡器API函数     /// 神思二代读卡器API函数
@ -8,7 +8,7 @@ namespace PEIS.Utils.SS860
    public class ReadCardApi86     public class ReadCardApi86
{ {
               
[DllImport("./RDCard86/RdCard.DLL")] [DllImport("./SS860/RDCard86/RdCard.DLL")]
public static extern int UCommand1(string pcmd, ref int arg0, ref int arg1, byte[] arg3); public static extern int UCommand1(string pcmd, ref int arg0, ref int arg1, byte[] arg3);
} }

@ -6,14 +6,14 @@ using System.IO;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace PEIS.Utils.SS860 namespace PEIS.Utils.IDCard.SS860
{ {
/// <summary> /// <summary>
/// 读卡相关类 /// 读卡相关类
/// </summary> /// </summary>
public class ReadCardInfo public class ReadCardInfo
{ {
public static RdCardModel Get() public static IDCardInfo Get()
{ {
//Win64/Win32 //Win64/Win32
return Environment.Is64BitOperatingSystem ? ReadCard() : ReadCard86(); return Environment.Is64BitOperatingSystem ? ReadCard() : ReadCard86();
@ -22,9 +22,9 @@ namespace PEIS.Utils.SS860
/// 读取卡内容--表示层应用 /// 读取卡内容--表示层应用
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private static RdCardModel ReadCard() private static IDCardInfo ReadCard()
{ {
RdCardModel model = null; IDCardInfo model = null;
var pcmd = Char.ConvertFromUtf32(0x41); var pcmd = Char.ConvertFromUtf32(0x41);
var result = Application.StartupPath + "\\"; var result = Application.StartupPath + "\\";
@ -55,9 +55,9 @@ namespace PEIS.Utils.SS860
/// </summary> /// </summary>
/// <param name="message">错误信息</param> /// <param name="message">错误信息</param>
/// <returns></returns> /// <returns></returns>
private static RdCardModel ReadCard86() private static IDCardInfo ReadCard86()
{ {
RdCardModel model = null; IDCardInfo model = null;
var pcmd = Char.ConvertFromUtf32(0x41); var pcmd = Char.ConvertFromUtf32(0x41);
var result = Application.StartupPath + "\\"; var result = Application.StartupPath + "\\";
@ -87,9 +87,9 @@ namespace PEIS.Utils.SS860
/// 读取生成文件内容 /// 读取生成文件内容
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private static RdCardModel GetCardInfo() private static IDCardInfo GetCardInfo()
{ {
var model = new RdCardModel(); IDCardInfo model = new IDCardInfo();
var infoPath = Application.StartupPath + "\\wz.txt"; var infoPath = Application.StartupPath + "\\wz.txt";
//string NewAddressPath = Application.StartupPath + "\\NewAdd.txt"; //string NewAddressPath = Application.StartupPath + "\\NewAdd.txt";
var binPath = Application.StartupPath + "\\fp.bin"; var binPath = Application.StartupPath + "\\fp.bin";
@ -118,7 +118,7 @@ namespace PEIS.Utils.SS860
if (list.Count == 9) if (list.Count == 9)
{ {
model.NAME = list[0];//姓名 model.NAME = list[0];//姓名
model.SEX = list[1] == "女" ? 2 : 1; //性别 model.SEX = list[1];//性别
model.NATION = list[2];//民族 model.NATION = list[2];//民族
model.BIRTH = DateTime.ParseExact(list[3], "yyyyMMdd", CultureInfo.InvariantCulture); model.BIRTH = DateTime.ParseExact(list[3], "yyyyMMdd", CultureInfo.InvariantCulture);
model.ADDRESS = list[4];//住址 model.ADDRESS = list[4];//住址

@ -0,0 +1,158 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace PEIS.Utils.IDCard.SW100
{
public static class SW100
{
#region DLL导入声明
[DllImport("./SW100/SSCARDInterface.dll", EntryPoint = "iOpenPort")]
public static extern int iOpenPort(StringBuilder errMsg);
[DllImport("./SW100/SSCARDInterface.dll", EntryPoint = "iClosePort")]
public static extern int iClosePort();
[DllImport("./SW100/SSCARDInterface.dll", EntryPoint = "iReaderIDCard_CS")]
public static extern int iReaderIDCard_CS(StringBuilder bmpFilePath, StringBuilder cardInfo, StringBuilder base64Info, StringBuilder errMsg);
[DllImport("./SW100/SSCARDInterface.dll", EntryPoint = "iPosBeep")]
public static extern int iPosBeep();
#endregion
private const int BUFFER_SIZE = 1024;
/// <summary>
/// 打开设备
/// </summary>
/// <returns>打开结果</returns>
private static bool OpenDevice()
{
try
{
StringBuilder errMsg = new StringBuilder(BUFFER_SIZE);
int result = iOpenPort(errMsg);
if (result == 0)
{
return true;
}
else
{
Global.MsgErr($"设备打开失败:{errMsg}");
return false;
}
}
catch (Exception ex)
{
Global.MsgErr($"设备打开失败:{ex.Message}");
return false;
}
}
/// <summary>
/// 关闭设备
/// </summary>
/// <returns>关闭结果</returns>
private static bool CloseDevice()
{
try
{
int result = iClosePort();
if (result == 0)
{
return true;
}
else
{
Global.MsgErr($"设备关闭失败");
return false;
}
}
catch (Exception ex)
{
Global.MsgErr($"设备关闭失败:{ex.Message}");
return false;
}
}
/// <summary>
/// 读取身份证信息
/// </summary>
/// <param name="photoSavePath">照片保存路径,例如:D:\zp.bmp</param>
/// <returns>身份证信息</returns>
public static IDCardInfo ReadIDCard()
{
IDCardInfo idCardInfo = null;
if (OpenDevice())
{
try
{
// 设置默认照片路径
StringBuilder photoSavePath = new StringBuilder(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "idcard_photo.bmp"));
// 准备缓冲区
StringBuilder cardInfoBuffer = new StringBuilder(BUFFER_SIZE);
StringBuilder dspBuffer = new StringBuilder(BUFFER_SIZE * 10);
StringBuilder errMsgBuffer = new StringBuilder(BUFFER_SIZE);
// 调用读取方法
long result = iReaderIDCard_CS(photoSavePath, cardInfoBuffer, dspBuffer, errMsgBuffer);
if (result == 0)
{
// 解析返回的数据
string cardInfoStr = cardInfoBuffer.ToString();
string[] infoArray = cardInfoStr.Split('|');
if (infoArray.Length >= 10)
{
idCardInfo = new IDCardInfo();
idCardInfo.NAME = infoArray[0];
idCardInfo.SEX = infoArray[1];
idCardInfo.NATION = infoArray[2];
idCardInfo.BIRTH = DateTime.ParseExact(infoArray[3], "yyyyMMdd", CultureInfo.InvariantCulture);
idCardInfo.ADDRESS = infoArray[4];
idCardInfo.IDNO = infoArray[5];
idCardInfo.ISSUE_AUTH = infoArray[6];
idCardInfo.BEGIN_DATE = DateTime.ParseExact(infoArray[7], "yyyyMMdd", CultureInfo.InvariantCulture);
idCardInfo.END_DATE = DateTime.ParseExact(infoArray[8], "yyyyMMdd", CultureInfo.InvariantCulture);
using (var fs = new FileStream(photoSavePath.ToString(), FileMode.Open, FileAccess.Read))
{
idCardInfo.HEADPORTRAIT = new Bitmap(fs);
}
}
else
{
Global.MsgErr($"返回的数据格式不正确");
}
}
else
{
Global.MsgErr($"读取身份证失败:{ errMsgBuffer}");
}
}
catch (Exception ex)
{
Global.MsgErr($"读取身份证时发生异常:{ex.Message}");
}
finally
{
iPosBeep();
CloseDevice();
}
}
return idCardInfo;
}
}
}

@ -1,111 +0,0 @@
using System;
using System.Drawing;
namespace PEIS.Utils.SS860
{
public class RdCardModel
{
private string nAME;
        /// <summary>
        /// 姓名
        /// </summary>
        public string NAME
{
get { return nAME; }
set { nAME = value; }
}
private int sEX;
        /// <summary>
        /// 性别
        /// </summary>
        public int SEX
{
get { return sEX; }
set { sEX = value; }
}
private string nATION;
        /// <summary>
        /// 民族
        /// </summary>
        public string NATION
{
get { return nATION; }
set { nATION = value; }
}
private string aDDRESS;
        /// <summary>
        /// 住址
        /// </summary>
        public string ADDRESS
{
get { return aDDRESS; }
set { aDDRESS = value; }
}
private string iSSUE_AUTH;
        /// <summary>
        /// 签发机关
        /// </summary>
        public string ISSUE_AUTH
{
get { return iSSUE_AUTH; }
set { iSSUE_AUTH = value; }
}
private DateTime bEGIN_DATE;
        /// <summary>
        /// 有效期开始日期
        /// </summary>
        public DateTime BEGIN_DATE
{
get { return bEGIN_DATE; }
set { bEGIN_DATE = value; }
}
private DateTime eND_DATE;
        /// <summary>
        /// 有效期结束日期
        /// </summary>
        public DateTime END_DATE
{
get { return eND_DATE; }
set { eND_DATE = value; }
}
private string iDNO;
        /// <summary>
        /// 身份证号码
        /// </summary>
        public string IDNO
{
get { return iDNO; }
set { iDNO = value; }
}
private string nEW_ADDR;
        /// <summary>
        /// 最新住址
        /// </summary>
        public string NEW_ADDR
{
get { return nEW_ADDR; }
set { nEW_ADDR = value; }
}
private DateTime bIRTH;
        /// <summary>
        /// 生日
        /// </summary>
        public DateTime BIRTH
{
get { return bIRTH; }
set { bIRTH = value; }
}
private Bitmap hEADPORTRAIT;
        /// <summary>
        /// 头像
        /// </summary>
        public Bitmap HEADPORTRAIT
{
get { return hEADPORTRAIT; }
set { hEADPORTRAIT = value; }
}
}
}

@ -1,283 +0,0 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
namespace PEIS.Utils.SS860
{
public class WltRead
{
[DllImport("RdCard.dll", EntryPoint = "UCommand1", CharSet = CharSet.Ansi)]
private static extern int UCommand1(ref byte pCmd, ref int parg0, ref int parg1, byte[] parg2);
//<summary>
//初始化设备(串口:1-16, USB:1001-1016),为零自动找接口
//</summary>
//<param name = "nPort" > (串口: 1 - 16, USB: 1001 - 1016) </ param >
//< returns ></ returns >
public static bool InitCom(int nPort=0)
{
string sMsg = string.Empty;
try
{
Byte cmd = 0x41;
int para0 = nPort;
int para1 = 8811;
byte[] para2 = { 0x02, 0x27, 0x00, 0x00 }; //9986
int nRet = UCommand1(ref cmd, ref para0, ref para1, para2);
if (nRet == 62171)
{
sMsg = "身份证读卡器连接成功";
return true;
}
else
sMsg = "身份证读卡器连接失败!";
}
catch (Exception ex)
{
sMsg = "身份证读卡器连接失败,原因是:" + ex.Message;
}
Console.WriteLine(sMsg);
return false;
}
// <summary>
// 关闭设备
// </summary>
// <returns></returns>
public static bool CloseCom(int nPort)
{
string sMsg = string.Empty;
try
{
Byte cmd = 0x42;
int para0 = nPort;
int para1 = 8811;
byte[] para2 = { 0x02, 0x27, 0x00, 0x00 }; //9986
IntPtr ptrRet = Marshal.StringToHGlobalAnsi(UCommand1(ref cmd, ref para0, ref para1, para2).ToString());
string retlust = Marshal.PtrToStringAnsi(ptrRet);
int nRet = int.Parse(retlust);
if (nRet == 62171)
{
sMsg = "端口关闭成功";
return true;
}
else
sMsg = "端口关闭失败!";
}
catch (Exception ex)
{
sMsg = "端口关闭失败,原因是:" + ex.Message;
}
return false;
}
// <summary>
// 获取身份证信息
// </summary>
// <param name="objCardInfo"></param>
// <param name="nInfoType">nInfoType=1,读基本信息;nInfoType=3,读追加地址</param>
// <returns></returns>
public static CardInfo ReadCardInfo(int nPort)//,
{
string sMsg = string.Empty;
CardInfo objCardInfo = null;
string savePath =Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "IDCard");
if (!Directory.Exists(savePath))
{
Directory.CreateDirectory(savePath);
}
Random rd = new Random();
int i = rd.Next() * 10;
savePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "IDCard") + i;
try
{
byte bCmd = 0x43;//验证信息
int nPara0 = nPort;
int nPara1 = 8811;
byte[] nPara2 = { 0x02, 0x27, 0x00, 0x00 }; //9986
int nRet = UCommand1(ref bCmd, ref nPara0, ref nPara1, nPara2);// 验证卡
if (nRet == 62171)//身份证验证成功
{
bCmd = 68;// "0x44 读卡内信息
nPara0 = nPort;
nPara1 = 8811;
//如果要用sSavePath,请将sSavePath转换为ANSI编码格式。因为.net中的字符串是unicode格式,所以这里使用byte类型,内部逐字节进行赋值,最后一个是0
//如,C:\a 调用后会生成a.txt a1.txt,a.bmp a1.wlt
// byte[] ctr = { (byte)"C", (byte)":", (byte)"\\", (byte)"a", (byte)"\0" };
byte[] ctr = Encoding.ASCII.GetBytes(savePath);
nRet = UCommand1(ref bCmd, ref nPara0, ref nPara1, ctr);//读取卡内信息
if (nRet == 62171)
{
objCardInfo = new CardInfo();
System.IO.StreamReader objStreamReader = new System.IO.StreamReader(savePath + @"wx.txt", System.Text.Encoding.Default);
objCardInfo.Name = objStreamReader.ReadLine();
objCardInfo.Sex = objStreamReader.ReadLine();
objCardInfo.Nation = objStreamReader.ReadLine();
objCardInfo.Birthday = objStreamReader.ReadLine();
objCardInfo.Address = objStreamReader.ReadLine();
objCardInfo.CardNo = objStreamReader.ReadLine();
objCardInfo.Department = objStreamReader.ReadLine();
objCardInfo.StartDate = objStreamReader.ReadLine();
//objCardInfo.EndDate = objStreamReader.ReadLine(); //身份证有效期"长期"
objCardInfo.AddressEx = objStreamReader.ReadLine();
objCardInfo.PhotoPath = savePath + @"zp.bmp";
string sPhotoPath = objCardInfo.PhotoPath;
objCardInfo.ArrPhotoByte = ImageToByteArray(sPhotoPath);
objStreamReader.Close();
objStreamReader.Dispose();
return objCardInfo;
}
else if (nRet == -5)
sMsg = "返回值:" + nRet + "软件未授权!";
else
{
sMsg = "返回值:" + nRet + "读身份证不成功";
}
}
else
sMsg = "请将身份证放置感应区,谢谢合作!";
}
catch (Exception ex)
{
sMsg = "读身份证失败,原因是:" + ex.Message;
Console.WriteLine(sMsg);
return null;
}
Console.WriteLine(sMsg);
return objCardInfo;
}
// <summary>
// 将图片转换成字节
// </summary>
// <param name="selectPictureFile"></param>
// <returns></returns>
private static Byte[] ImageToByteArray(string selectPictureFile)
{
//Image photo = new Bitmap(selectPictureFile);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
//photo.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] imagedata = ms.GetBuffer();
//ms.Close();
//ms.Dispose();
//photo.Dispose();
return imagedata;
}
}
// <summary>
// 身份证的信息
// </summary>
public class CardInfo
{
/// <summary>
/// 订单编号
/// </summary>
public string OrderNo;
public int Id;
/// <summary>
/// 身份证号码
/// </summary>
public string CardNo;
/// <summary>
/// 姓名
/// </summary>
public string Name;
/// <summary>
/// 性别
/// </summary>
public string Sex;
/// <summary>
/// 出生日期
/// </summary>
public string Birthday;
/// <summary>
/// 地址
/// </summary>
public string Address;
/// <summary>
/// 追加地址
/// </summary>
public string AddressEx;
/// <summary>
/// 发卡机关
/// </summary>
public string Department;
/// <summary>
/// 证件开始日期
/// </summary>
public string StartDate;
/// <summary>
/// 证件结束日期
/// </summary>
public string EndDate;
/// <summary>
/// 民族
/// </summary>
public string Nation;
/// <summary>
/// 分店编号
/// </summary>
public int ChainID;
/// <summary>
/// 相片路径
/// </summary>
public string PhotoPath;
/// <summary>
/// 相片的字节信息
/// </summary>
public byte[] ArrPhotoByte;
/// <summary>
/// 时时图片字节信息
/// </summary>
public byte[] PhoTimeByte;
/// <summary>
/// 操作时间
/// </summary>
public DateTime OpeTime;
/// <summary>
/// 操作人
/// </summary>
public int UserID;
/// <summary>
/// 操作人
/// </summary>
public string UserName;
/// <summary>
/// 入住人数
/// </summary>
public int nMebCount;
/// <summary>
/// 提交状态,1:插入成功;0:插入失败
/// </summary>
public string nState;
/// <summary>
/// 备注信息
/// </summary>
public string sRemark;
/// <summary>
/// 客户端名称
/// </summary>
public string ClientName;
}
}

@ -4,7 +4,9 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Windows.Forms;
using PEIS.Entity; using PEIS.Entity;
using PEIS.View;
namespace PEIS.Utils namespace PEIS.Utils
{ {
@ -15,117 +17,60 @@ namespace PEIS.Utils
/// <summary> /// <summary>
/// 检查更新 /// 检查更新
/// </summary> /// </summary>
public static void CheckUpdate() public static void CheckUpdate(string updateVersion)
{ {
var version = Global._lstConfig.FirstOrDefault(x => x.Key == "Version")?.Value ?? ""; if (string.IsNullOrEmpty(updateVersion))
var currentVersion = ConfigurationManager.AppSettings["Version"]; {
if (string.IsNullOrEmpty(currentVersion) || string.IsNullOrEmpty(version) || currentVersion == version) var remoteVersion = Global._lstConfig.FirstOrDefault(x => x.Key == "Version")?.Value ?? "";
var localVersion = ConfigurationManager.AppSettings["Version"];
if (string.IsNullOrEmpty(localVersion) || string.IsNullOrEmpty(remoteVersion) || localVersion == remoteVersion)
return; return;
Download(version, currentVersion); StartUpdate(remoteVersion);
}
private static void Download(string version, string currentVersion)
{
Global.MsgInfo($@"发现新版本:{version},启动更新");
// var versionUrl = ConfigurationManager.AppSettings["VersionUrl"];
var downloadUrl = ConfigurationManager.AppSettings["DownloadUrl"];
//return;
try
{
if ((string.IsNullOrEmpty(version)) || (string.IsNullOrEmpty(currentVersion)) || currentVersion == version) return;
// 保存路径
var savePath = Path.Combine(BasePath, "Update");
if (!Directory.Exists(savePath))
{
Directory.CreateDirectory(savePath);
}
//保存文件
var zipFilePath = Path.Combine(savePath, version + ".zip");
//解压路径
var unZipPath = Path.Combine(BasePath, "Update", "UnZip");
if (!Directory.Exists(unZipPath))
{
Directory.CreateDirectory(unZipPath);
} }
// 创建HttpWebRequest对象 else
var request2 = (HttpWebRequest)WebRequest.Create(downloadUrl + $"?fileName={version}.zip");
// 获取响应
using (var response2 = (HttpWebResponse)request2.GetResponse())
{
// 读取响应流
using (var stream = response2.GetResponseStream())
{
// 将响应保存到本地文件
using (var fileStream = File.Create(zipFilePath))
{
var buffer = new byte[4096];
int bytesRead;
// 循环读取和写入,直到读取完整个响应流
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0)
{ {
// 写入文件流 CopyUpdate(updateVersion);
fileStream.Write(buffer, 0, bytesRead);
} }
} }
}
// Global.MsgInfo(@"更新文件下载完成!"); private static void StartUpdate(string remoteVersion)
}
// 解压文件
UnZipAndReplace(zipFilePath, unZipPath);
// Global.MsgInfo(@"解压完成!");
var path = Path.Combine(BasePath, "Update", "Update.exe");
if (File.Exists(path))
{ {
Process.Start(path); var messageBox = new CountdownMessageBox($"检测到新版本{remoteVersion}\r\n正在启动更新程序...");
messageBox.ShowDialog();
Process.Start(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update", "Update.exe"), remoteVersion);
Environment.Exit(0);
} }
else
private static void CopyUpdate(string updateVersion)
{ {
Global.MsgErr(@"未找到更新程序!"); string sourceDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update", "Update", "UnZip", updateVersion, "Update");
} string destDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update");
Process.GetCurrentProcess().Kill(); if (Directory.Exists(sourceDir))
}
catch (Exception ex)
{ {
Global.MsgErr($@"下载更新程序出错,{ex.Message}"); CopyFiles(sourceDir, destDir);
Process.GetCurrentProcess().Kill();
} }
} }
/// <summary> private static void CopyFiles(string sourceDir, string destDir)
/// 解压文件到Update
/// </summary>
private static void UnZipAndReplace(string zipFilePath, string unZipPath)
{ {
if (Directory.Exists(unZipPath)) Directory.Delete(unZipPath, true); // 复制当前目录的文件
Directory.CreateDirectory(unZipPath); foreach (string sourceFile in Directory.GetFiles(sourceDir))
if (!File.Exists(zipFilePath))
{ {
Global.MsgErr(@"更新文件下载失败,请重试!"); string destFile = Path.Combine(destDir, Path.GetFileName(sourceFile));
return; File.Copy(sourceFile, destFile, overwrite: true);
} }
//保存文件路径检查
if (Directory.Exists(unZipPath))
{
var di = new DirectoryInfo(unZipPath);
foreach (var file in di.EnumerateFiles()) // 递归处理子目录
foreach (string subDir in Directory.GetDirectories(sourceDir))
{ {
file.Delete();
} string destSubDir = Path.Combine(destDir, Path.GetFileName(subDir));
foreach (var dir in di.EnumerateDirectories()) Directory.CreateDirectory(destSubDir);
{
dir.Delete(true); CopyFiles(subDir, destSubDir);
}
} }
//解压
using (var zipFile = new Ionic.Zip.ZipFile(zipFilePath))
{
zipFile.ExtractAll(unZipPath);
} }
//Directory.Delete(unZipPath, true);//删除压缩目录
//File.Delete(zipFilePath);//删除压缩文件
}
} }
} }

@ -8,9 +8,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using PEIS.Utils.SS860;
using System.Windows.Forms; using System.Windows.Forms;
using System.Dynamic; using System.Dynamic;
using PEIS.Utils.IDCard;
namespace PEIS.View.Base namespace PEIS.View.Base
{ {
@ -128,7 +128,8 @@ namespace PEIS.View.Base
IDCard.ForeColor = System.Drawing.Color.Black; IDCard.ForeColor = System.Drawing.Color.Black;
BirthdayDateTimePicker.Value = new DateTime(int.Parse(year), int.Parse(month), int.Parse(day)); BirthdayDateTimePicker.Value = new DateTime(int.Parse(year), int.Parse(month), int.Parse(day));
}catch(Exception) }
catch (Exception)
{ {
Global.Msg("err", "身份证出生日期错误!"); Global.Msg("err", "身份证出生日期错误!");
return; return;
@ -155,12 +156,12 @@ namespace PEIS.View.Base
{ {
try try
{ {
var idCard = ReadCardInfo.Get(); var idCard = IDCardHelper.Read();
if (idCard == null) return; if (idCard == null) return;
NameTextBox.Text = idCard.NAME; NameTextBox.Text = idCard.NAME;
Male.Checked = idCard.SEX == 1 ? true : false; Male.Checked = idCard.SEX == "男" ? true : false;
Female.Checked = idCard.SEX == 2 ? true : false; Female.Checked = !Male.Checked;
CardTypeComboBox.SelectedIndex = 0; CardTypeComboBox.SelectedIndex = 0;
IDCard.Text = idCard.IDNO; IDCard.Text = idCard.IDNO;
BirthdayDateTimePicker.Value = idCard.BIRTH; BirthdayDateTimePicker.Value = idCard.BIRTH;
@ -380,7 +381,7 @@ namespace PEIS.View.Base
public event EventHandler<Args<BasePatient>> IsExitBaseInfo; public event EventHandler<Args<BasePatient>> IsExitBaseInfo;
public void ShowIsExitBaseInfo(BasePatient item) public void ShowIsExitBaseInfo(BasePatient item)
{ {
Invoke(new Action(() => _patient = item )); Invoke(new Action(() => _patient = item));
} }
protected virtual void OnIsExitBaseInfo() protected virtual void OnIsExitBaseInfo()
{ {

@ -0,0 +1,40 @@

namespace PEIS.View
{
partial class CountdownMessageBox
{
/// <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.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "CountdownMessageBox";
}
#endregion
}
}

@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PEIS.View
{
public partial class CountdownMessageBox : Form
{
private int _countdownSeconds = 3;
private System.Windows.Forms.Timer _countdownTimer;
public CountdownMessageBox(string message, int seconds = 3)
{
// 设置窗体属性
this.Text = "提示";
this.StartPosition = FormStartPosition.CenterScreen;
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.ControlBox = false;
this.TopMost = true;
this.ShowInTaskbar = false;
this.Size = new Size(350, 150);
// 消息文本
Label lblMessage = new Label
{
Text = message,
Font = new Font("Microsoft YaHei", 10),
TextAlign = ContentAlignment.MiddleCenter,
Location = new Point(20, 40),
Size = new Size(310, 50),
AutoSize = false
};
// 倒计时文本
Label lblCountdown = new Label
{
Text = $"({seconds}秒后自动关闭)",
Font = new Font("Microsoft YaHei", 9),
ForeColor = Color.Blue,
TextAlign = ContentAlignment.MiddleCenter,
Location = new Point(20, 100),
Size = new Size(310, 20),
AutoSize = false
};
// 将控件添加到窗体
this.Controls.Add(lblMessage);
this.Controls.Add(lblCountdown);
// 初始化计时器
_countdownSeconds = seconds;
_countdownTimer = new System.Windows.Forms.Timer
{
Interval = 1000
};
_countdownTimer.Tick += (s, e) =>
{
_countdownSeconds--;
lblCountdown.Text = $"({_countdownSeconds}秒后自动关闭)";
if (_countdownSeconds <= 0)
{
_countdownTimer.Stop();
this.Close();
}
};
// 窗体显示时开始倒计时
this.Shown += (s, e) => _countdownTimer.Start();
}
}
}

@ -980,7 +980,7 @@ namespace PEIS.View.Enrollment
var eid = _chooseRegItem.ID; var eid = _chooseRegItem.ID;
if (_lstCheckCost?.Concat(_lstCheckCost2).Where(w => w.ChargeTime == null && w.EID == eid).ToList().Count != 0) if (_lstCheckCost?.Concat(_lstCheckCost2).Where(w => w.ChargeTime == null && w.CostTime == null && w.EID == eid).ToList().Count != 0)
{ {
Global.Msg("info", "订单还未收费或未记账,不能操作,请核对后重试!"); Global.Msg("info", "订单还未收费或未记账,不能操作,请核对后重试!");
return; return;

@ -235,6 +235,7 @@
this.TsmiCopyFeeItem = new System.Windows.Forms.ToolStripMenuItem(); this.TsmiCopyFeeItem = new System.Windows.Forms.ToolStripMenuItem();
this.DgcCheckCost = new DevExpress.XtraGrid.GridControl(); this.DgcCheckCost = new DevExpress.XtraGrid.GridControl();
this.DgvCheckCost = new DevExpress.XtraGrid.Views.Grid.GridView(); this.DgvCheckCost = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gridColumn55 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gridColumn53 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn53 = new DevExpress.XtraGrid.Columns.GridColumn();
this.repositoryItemMemoEdit3 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit(); this.repositoryItemMemoEdit3 = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit();
this.RegListPanel.SuspendLayout(); this.RegListPanel.SuspendLayout();
@ -316,7 +317,7 @@
this.gridColumn52.OptionsColumn.ReadOnly = true; this.gridColumn52.OptionsColumn.ReadOnly = true;
this.gridColumn52.OptionsFilter.AllowFilter = false; this.gridColumn52.OptionsFilter.AllowFilter = false;
this.gridColumn52.Visible = true; this.gridColumn52.Visible = true;
this.gridColumn52.VisibleIndex = 15; this.gridColumn52.VisibleIndex = 16;
// //
// gridColumn118 // gridColumn118
// //
@ -2767,6 +2768,7 @@
this.gridColumn36, this.gridColumn36,
this.gridColumn37, this.gridColumn37,
this.gridColumn38, this.gridColumn38,
this.gridColumn55,
this.gridColumn53, this.gridColumn53,
this.gridColumn52}); this.gridColumn52});
this.DgvCheckCost.FixedLineWidth = 1; this.DgvCheckCost.FixedLineWidth = 1;
@ -2792,6 +2794,24 @@
this.DgvCheckCost.OptionsView.ShowIndicator = false; this.DgvCheckCost.OptionsView.ShowIndicator = false;
this.DgvCheckCost.RowHeight = 35; this.DgvCheckCost.RowHeight = 35;
// //
// gridColumn55
//
this.gridColumn55.Caption = "微信预约缴费时间";
this.gridColumn55.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
this.gridColumn55.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.gridColumn55.FieldName = "WeChatCostTime";
this.gridColumn55.Name = "gridColumn55";
this.gridColumn55.OptionsColumn.AllowEdit = false;
this.gridColumn55.OptionsColumn.AllowGroup = DevExpress.Utils.DefaultBoolean.False;
this.gridColumn55.OptionsColumn.AllowMerge = DevExpress.Utils.DefaultBoolean.False;
this.gridColumn55.OptionsColumn.AllowMove = false;
this.gridColumn55.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
this.gridColumn55.OptionsColumn.Printable = DevExpress.Utils.DefaultBoolean.False;
this.gridColumn55.OptionsColumn.ReadOnly = true;
this.gridColumn55.OptionsFilter.AllowFilter = false;
this.gridColumn55.Visible = true;
this.gridColumn55.VisibleIndex = 14;
//
// gridColumn53 // gridColumn53
// //
this.gridColumn53.Caption = "退费人"; this.gridColumn53.Caption = "退费人";
@ -2806,7 +2826,7 @@
this.gridColumn53.OptionsColumn.ReadOnly = true; this.gridColumn53.OptionsColumn.ReadOnly = true;
this.gridColumn53.OptionsFilter.AllowFilter = false; this.gridColumn53.OptionsFilter.AllowFilter = false;
this.gridColumn53.Visible = true; this.gridColumn53.Visible = true;
this.gridColumn53.VisibleIndex = 14; this.gridColumn53.VisibleIndex = 15;
// //
// repositoryItemMemoEdit3 // repositoryItemMemoEdit3
// //
@ -3112,5 +3132,6 @@
private DevExpress.XtraGrid.Columns.GridColumn gridColumn54; private DevExpress.XtraGrid.Columns.GridColumn gridColumn54;
private System.Windows.Forms.ContextMenuStrip FeeFastMenu; private System.Windows.Forms.ContextMenuStrip FeeFastMenu;
private System.Windows.Forms.ToolStripMenuItem PartOption; private System.Windows.Forms.ToolStripMenuItem PartOption;
private DevExpress.XtraGrid.Columns.GridColumn gridColumn55;
} }
} }

@ -218,7 +218,7 @@ namespace PEIS.View.Enrollment
{ {
e.Appearance.ForeColor = Color.FromArgb(234, 149, 24); e.Appearance.ForeColor = Color.FromArgb(234, 149, 24);
} }
if (_order.CostTime != null) if (_order.CostTime != null || _order.WeChatCostTime != null)
{ {
e.Appearance.ForeColor = Color.ForestGreen; e.Appearance.ForeColor = Color.ForestGreen;
} }
@ -707,7 +707,7 @@ namespace PEIS.View.Enrollment
return; return;
} }
if (_lstCheckCost.Where(w => w.ChargeTime == null).ToList().Count != 0) if (_lstCheckCost.Where(w => w.ChargeTime == null && w.CostTime == null && w.WeChatCostTime == null).ToList().Count != 0)
{ {
Global.Msg("info", "订单还未收费或未记账,不能操作,请核对后重试!"); Global.Msg("info", "订单还未收费或未记账,不能操作,请核对后重试!");
return; return;

@ -5,7 +5,7 @@ using PEIS.Entity;
using PEIS.Event; using PEIS.Event;
using PEIS.Presenter; using PEIS.Presenter;
using PEIS.Utils; using PEIS.Utils;
using PEIS.Utils.SS860; using PEIS.Utils.IDCard;
using PEIS.View.Base; using PEIS.View.Base;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -340,7 +340,7 @@ namespace PEIS.View.Enrollment
try try
{ {
RdCardModel idCard = ReadCardInfo.Get(); IDCardInfo idCard = IDCardHelper.Read();
if (idCard == null) return; if (idCard == null) return;
NameTextBox.Text = idCard.IDNO; NameTextBox.Text = idCard.IDNO;

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

@ -0,0 +1,334 @@
多合一读写器接口规范
动态库名:SSCARDInterface.dll
一、外部方法
1.1打开设备
long WINAPI iOpenPort(char* ErrMsg);
参数:ErrMsg:[OUT]返回错误信息,下同
返回值:非0表示失败
1.2关闭设备
long WINAPI iClosePort();
返回值:非0表示失败
蜂鸣器
long WINAPI iPosBeep ();
返回值:非0表示失败
1.3读取身份证/港澳台居住证信息
函数原型:
long WINAPI iReaderIDCard_CS(char* pPicFilePath, char* cardinfo, char* dsp,
char* ErrMsg);
功能:读取身份证信息
参数:pPicFilePath:[IN]照片路径,例:D:\\zp.bmp
Cardinfo:[OUT] 读卡成功时返回
"姓名|性别|民族|出生日期|地址|身份证号|发卡机关|发卡日期|卡有效期|证件类型|"
证件类型:I:外国人 J:港澳台居住证,居民身份证为空格
dsp[OUT] 预留
返回值:非0表示失败
读取身份证UID
long WINAPI iReadCertID_CS(char* cardinfo, char* ErrMsg);
功能:读取社保卡信息
参数:
Cardinfo:[OUT] 成功返回身份证16位UID字符串。
返回值:非0表示失败
1.4读取社保卡信息
函数原型:
long WINAPI iReadSicard_CS(int slot,char* cardinfo, char* ErrMsg);
功能:读取社保卡信息
参数:slot:[IN]PSAM卡槽,SAM1~SAM4(值:17~20)
Cardinfo:[OUT]
成功返回:"卡识别码|社保卡卡号|社会保障号码|姓名|性别|民族|出生日期|发卡日期
|卡有效期|"。
返回值:非0表示失败
1.5 M1卡读写
1.5.1 M1卡读操作
1)函数原型:
long WINAPI MifareOnCardRead_CS(int addr, int keyType, char* passWord,
char* OutData, char* ErrMsg)
功能:读取M1卡某一块的数据,ASCii格式
参数:
addr:[IN]块地址(0~63)
keyType:[IN]认证KeyA时传0x60, KeyB:0x61
passWord:[IN]6字节十六进制字符串密码,例如 "ffffffffffff"
OutData:[OUT]读取的数据
返回值:非0表示失败。
2)函数原型:
long WINAPI MifareOnCardReadHEX_CS(int addr, int keyType, char* passWord,
char* OutData, char* ErrMsg)
功能:读取M1卡某一块的数据,十六进制字符串格式
参数:
addr:[IN]块地址(0~63)
keyType:[IN]认证KeyA时传0x60, KeyB:0x61
passWord:[IN]6字节十六进制字符串密码,例如 "ffffffffffff"
OutData:[OUT]读取的数据
返回值:非0表示失败。
1.5.2 M1卡写操作
1)函数原型:
long WINAPI MifareOnCardWrite_CS(int addr, int keyType, char* passWord,
char* Data, char* ErrMsg)
功能:写入M1卡某一块的数据,ASCii格式
参数:
addr:[IN]块地址(0~63)
keyType:[IN]认证KeyA时传0x60, KeyB:0x61
passWord:[IN]6字节十六进制字符串密码,例如 "ffffffffffff"
Data:[IN]待写入的数据 16个字符
返回值:非0表示失败。
2)函数原型:
long WINAPI MifareOnCardWriteHEX_CS(int addr, int keyType, char* passWord,
char* Data, char* ErrMsg)
功能:写入M1卡某一块的数据,十六进制字符串格式
参数:
addr:[IN]块地址(0~63)
keyType:[IN]认证KeyA时传0x60, KeyB:0x61
passWord:[IN]6字节十六进制字符串密码,例如 "ffffffffffff"
Data:[IN]待写入的数据 32个字符
返回值:非0表示失败。
1.6读取磁条卡信息
函数原型:
long WINAPI iReadMagCard(int timeOut, int nTrack, char* trackData, char*
ErrMsg);
功能:读取磁条卡信息
参数:timeOut:[IN]刷卡超时值,单位为秒
nTrack:[IN] 磁道值1-3
Cardinfo:[OUT] 成功返回磁道信息。
返回值:小于等于0表示失败,大于0表示成功
1.7扫码二维码信息
函数原型:
long WINAPI ScanQRcode(int nTimeOut, char* pCodeInfo, char* ErrMsg);
功能:扫码信息
参数:nTimeOut:[IN]扫码超时值,单位为秒
pCodeInfo:[OUT] 成功返回扫码信息。
返回值:非0表示失败,等于0表示成功
相关函数:
设置主动扫码:
long WINAPI SetAutoQRcode(char* ErrMsg);
关闭主动扫码:
long WINAPI CloseAutoQRcode(char* ErrMsg);
加密机部分
1 1“读基本信息”函数
1 1.1 SI_ReadCardBas “读基本信息”
1.1.1函数定义
读基本信息接口函数定义见表1。在进行任何社保卡操作前,应先调用此函数。
表1读基本信息接口函数定义
|函数名称 |读基本信息 |
|语法 |long SI_ReadCardBas (int iType, char* pOutInfo) |
|功能描述 |选择社保卡社会保障系统环境后,通过PSAM卡对社保卡进行内部认证,|
| |通过后将卡内的基本信息读出返回。 |
|参数说明 |序号 |参数 |输入/输 |类型 |长度(十进 |含义 |
| | | |出 | |制) | |
| |1 |iType |IN |整数 |4 |操作卡的类型 |
| |2 |pOutInfo |OUT |字符串|1024 |读出数据或返回错误 |
| | | | | | |信息 |
|返回值 |0表示成功;非0表示失败。 |
1.1.2参数说明
1. 输入参数iType
表示执行本函数时操作卡的类型,定义如下:1-接触式操作卡;2-
非接触式操作卡;3-自动寻卡,接触式操作卡优先;4-
自动寻卡,非接触式操作卡优先。
2. 输出参数pOutInfo
当函数执行成功时,该输出参数为读出的社保卡基本信息各数据项,依次为:发卡地
区行政区划代码(卡识别码前6位)、社会保障号码、卡号、卡识别码、姓名、卡复位信
息(仅取历史字节)、规范版本、发卡日期、卡有效期、终端机编号、终端设备号。各
数据项之间以“|”分割,且最后一个数据项以“|”结尾。例如:639900|111111198101011
110|X00000019|639900D15600000500BF7C7A48FB4966|张三|00814E43238697159900BF7C
7A|1.00|20101001|20201001|410100813475|终端设备号|。
当函数执行失败时,该输出参数为错误信息描述。
注:当没有终端设备号时,终端设备号返回空字符串。
2 1.2 SI_ReadCardHSM_Step1 “基于加密机的读基本信息(步骤一)”
1.2.1函数定义
基于加密机的读基本信息(步骤一)接口函数定义见表2。
表2基于加密机的读基本信息(步骤一)接口函数定义
|函数名称 |基于加密机的读基本信息(步骤一) |
|语法 |long SI_ReadCardHSM_Step1 (int iType, char* pOutInfo) |
|功能描述 |选择社会保障系统环境后,返回内部认证和外部认证所需信息。 |
|参数说明 |序号 |参数 |输入/输 |类型 |长度(十进 |含义 |
| | | |出 | |制) | |
| |1 |iType |IN |整数 |4 |操作卡的类型 |
| |2 |pOutInfo |OUT |字符串|1024 |返回认证信息或错误 |
| | | | | | |信息 |
|返回值 |0表示成功;非0表示失败。 |
1.2.2参数说明
1. 输入参数iType
定义同1.1.2(1)。
2. 输出参数pOutInfo
当函数执行成功时,该输出参数为读出的社保卡内部认证和外部认证的计算数据,依
次为:发卡地区行政区划代码(卡识别码前6位)、卡复位信息(仅取历史字节)、算法
标识、卡识别码、内部认证过程因子、内部认证鉴别所需的原始信息、外部认证过程因
子、外部认证鉴别所需的原始信息,其中外部认证相关数据项全部不为空或全部为空。
各数据项之间以“|”分割,且最后一个数据项以“|”结尾。
当函数执行失败时,该输出参数为错误信息描述。
注:当外部认证相关数据项为空时,表示不做外部认证。
3 1.3 SI_ReadCardHSM_Step2 “基于加密机的读基本信息(步骤二)”
1.3.1函数定义
基于加密机的读基本信息(步骤二)接口函数定义见表3。
表3基于加密机的读基本信息(步骤二)接口函数定义
|函数名称 |基于加密机的读基本信息(步骤二) |
|语法 |long SI_ReadCardHSM_Step2 (char *pKey, char* pOutInfo) |
|功能描述 |根据加密机返回的内部认证和外部认证结果数据对社保卡进行内部认证|
| |和外部认证,通过后将卡内的基本信息读出返回。 |
|参数说明 |序号 |参数 |输入/输 |类型 |长度(十进 |含义 |
| | | |出 | |制) | |
| |1 |pKey |IN |字符串|128 |加密机返回的内部认 |
| | | | | | |证和外部认证结果数 |
| | | | | | |据 |
| |2 |pOutInfo |OUT |字符串|1024 |读出数据或返回错误 |
| | | | | | |信息 |
|返回值 |0表示成功;非0表示失败。 |
1.3.2参数说明
1. 输入参数pKey
加密机返回的内部认证和外部认证结果数据,依次为:内部认证结果数据(即内部认
证鉴别数据(16位)和内部认证鉴别所需的原始信息(16位)拼接组成)、外部认证结
果数据(即外部认证鉴别数据(16位)和外部认证鉴别所需的原始信息(16位)拼接组
成)。各数据项之间以“|”分割,且最后一个数据项以“|”结尾。
注:如果不做外部认证,则后面一个参数都为空字符串。
2. 输出参数pOutInfo
定义同1.1.2(2)。
注:当没有PSAM卡时,终端机编号返回12个0,即6个0x00对应的字符。
当没有终端设备号时,终端设备号返回空字符串。
2 2 读社保基本信息流程
读基本信息流程如图C.1所示。
[pic]
图C.1读基本信息流程
具体流程如下:
(1)调用SI_ReadCardBas函数,判断函数执行结果,若执行成功,则返回基本信息
,调用持卡库的卡鉴权服务接口,完成卡鉴权操作;若执行失败,返回错误代码并进行
判断,当判断到五种情况的错误代码(详见10.5)后,则调用基于加密机的SI_ReadCar
dBas_HSM_Step1函数,否则报错退出;
(2)若SI_ReadCardBas_HSM_Step1函数执行成功,则分析返回数据内容,组织持卡
库报文,调用持卡库的卡内部认证服务接口,否则报错退出;
(3)若卡内部认证服务接口调用成功,则调用基于加密机的SI_ReadCardBas_HSM_S
tep2函数,否则报错退出;
(4)若SI_ReadCardBas_HSM_Step2函数执行成功,则返回基本信息,调用持卡库的
卡鉴权服务接口,完成卡鉴权操作,否则报错退出。
附录
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add value="PEIS" key="ProgramName"/>
<add value="http://200.200.200.71:5200/version/download" key="DownloadUrl"/>
</appSettings>
</configuration>

@ -0,0 +1,40 @@

namespace Update
{
partial class CountdownMessageBox
{
/// <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.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "CountdownMessageBox";
}
#endregion
}
}

@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Update
{
public partial class CountdownMessageBox : Form
{
private int _countdownSeconds = 3;
private Label _lblMessage;
private Label _lblCountdown;
public CountdownMessageBox(string message, int seconds = 3)
{
_countdownSeconds = seconds;
// 窗体设置
this.Text = "提示";
this.StartPosition = FormStartPosition.CenterScreen;
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.ControlBox = false;
this.TopMost = true;
this.ShowInTaskbar = false;
// 设置窗体大小
this.Size = new Size(400, 200);
// 创建消息标签 - 关键设置
_lblMessage = new Label();
_lblMessage.Text = message; // 先设置文本
_lblMessage.Font = new Font("Microsoft YaHei", 10);
_lblMessage.TextAlign = ContentAlignment.MiddleCenter;
_lblMessage.AutoSize = false; // 设置为false
_lblMessage.Size = new Size(360, 120); // 明确设置大小
_lblMessage.Location = new Point(20, 20);
// 创建倒计时标签
_lblCountdown = new Label();
_lblCountdown.Text = $"({_countdownSeconds}秒后自动关闭)";
_lblCountdown.Font = new Font("Microsoft YaHei", 9);
_lblCountdown.ForeColor = Color.Blue;
_lblCountdown.TextAlign = ContentAlignment.MiddleCenter;
_lblCountdown.AutoSize = false;
_lblCountdown.Size = new Size(360, 25);
_lblCountdown.Location = new Point(20, 150);
// 添加控件
this.Controls.Add(_lblMessage);
this.Controls.Add(_lblCountdown);
// 初始化计时器
System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer
{
Interval = 1000
};
timer.Tick += (s, e) =>
{
_countdownSeconds--;
_lblCountdown.Text = $"({_countdownSeconds}秒后自动关闭)";
if (_countdownSeconds <= 0)
{
timer.Stop();
this.Close();
}
};
this.Shown += (s, e) => timer.Start();
// 确保控件可见
_lblMessage.Visible = true;
_lblCountdown.Visible = true;
// 强制刷新显示
this.Refresh();
}
}
}

@ -1,79 +0,0 @@
namespace Update
{
partial class Form1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.lblTips = new System.Windows.Forms.Label();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// lblTips
//
this.lblTips.AutoSize = true;
this.lblTips.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTips.Location = new System.Drawing.Point(93, 55);
this.lblTips.Name = "lblTips";
this.lblTips.Size = new System.Drawing.Size(74, 20);
this.lblTips.TabIndex = 4;
this.lblTips.Text = "正在更新···";
this.lblTips.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// pictureBox1
//
this.pictureBox1.Image = global::Update.Properties.Resources.update;
this.pictureBox1.InitialImage = null;
this.pictureBox1.Location = new System.Drawing.Point(12, 40);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(50, 50);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pictureBox1.TabIndex = 5;
this.pictureBox1.TabStop = false;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(304, 141);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.lblTips);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "体检系统更新";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblTips;
private System.Windows.Forms.PictureBox pictureBox1;
}
}

@ -1,168 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace Update
{
public partial class Form1 : Form
{
// 当前程序目录 **/Update/
private static string CurrentPath = Application.StartupPath;
public Form1()
{
InitializeComponent();
TopMost = true;
MaximizeBox = false;
ControlBox = true;
ControlBox = false;
try
{
// 体检系统
var program = "PEIS.exe";
// 解压文件目录 **/Update/Unzip/
var unZipPath = Path.Combine(CurrentPath, "UnZip");
// 检查程序是否正在运行
var processes = Process.GetProcessesByName(program);
if (processes.Length > 0)
{
// 关闭程序
foreach (var process in processes)
{
process.Kill();
process.WaitForExit(); // 等待程序退出
Console.WriteLine($@"Closed existing instance of {program}");
}
// 等待1秒
Thread.Sleep(1000);
}
lblTips.Text = @"正在更新……";
// 删除文件夹
DelDirectory();
// 解压路径是否存在
if (Directory.Exists(unZipPath))
{
// 获取解压文件下的第一个文件夹,避免 **/Update/UnZip/PEIS.exe || **/Update/UnZip/XxDirectory/PEIS.exe
var temp = Directory.GetDirectories(unZipPath, "*", SearchOption.AllDirectories).ToList()
?.FirstOrDefault();
if (File.Exists(Path.Combine(unZipPath, program)))
{
CopyFilesRecursively(unZipPath, Path.GetDirectoryName(CurrentPath));
var sourceFilePath = Path.Combine(unZipPath, "PEIS.exe.config");
var targetFilePath = Path.Combine(Path.GetDirectoryName(CurrentPath), "PEIS.exe.config");
// 复制并替换指定文件 PEIS.exe.config
File.Copy(sourceFilePath, targetFilePath, true);
//删除压缩目录
//Directory.Delete(unZipPath, true);
lblTips.Text = (@"更新完成,请重新启动!");
//Process.Start(programPath);
}
else if (File.Exists(Path.Combine(temp, program)))
{
CopyFilesRecursively(temp, Path.GetDirectoryName(CurrentPath));
var sourceFilePath = Path.Combine(temp, "PEIS.exe.config");
var targetFilePath = Path.Combine(Path.GetDirectoryName(CurrentPath), "PEIS.exe.config");
// 复制并替换指定文件
File.Copy(sourceFilePath, targetFilePath, true);
lblTips.Text = (@"更新完成,请重新启动!");
}
else
{
lblTips.Text = (@"未找到更新程序!");
}
}
else
{
lblTips.Text = (@"未找到更新文件!");
}
//Process.GetCurrentProcess().Kill();
}
catch (Exception e)
{
lblTips.Text = (e.Message);
//Process.GetCurrentProcess().Kill();
}
finally
{
ControlBox = true;
}
}
/// <summary>
/// 文件复制替换
/// </summary>
/// <param name="sourcePath">原位置</param>
/// <param name="targetPath">目标位置</param>
private static void CopyFilesRecursively(string sourcePath, string targetPath)
{
//现在创建所有目录
foreach (var dirPath in Directory.GetDirectories(sourcePath, "*", SearchOption.AllDirectories))
{
if (dirPath == CurrentPath) continue;
if (dirPath.Contains("Update")) continue;
var dir = dirPath.Replace(sourcePath, targetPath);
Directory.CreateDirectory(dir);
}
//复制所有文件并替换所有同名文件
foreach (var newPath in Directory.GetFiles(sourcePath, "*.*", SearchOption.AllDirectories))
{
//File.Copy(newPath, newPath.Replace(sourcePath, targetPath), true);
var newFilePath = newPath.Replace(sourcePath, targetPath);
var targetDirectory = Path.GetDirectoryName(newFilePath);
if (newPath.Contains("Update.exe")) continue;
if (newFilePath.Contains("Update.exe")) continue;
// 如果目标文件夹不存在,则创建
if (!Directory.Exists(targetDirectory))
{
Directory.CreateDirectory(targetDirectory);
}
File.Copy(newPath, newFilePath, true);
}
}
private static void DelDirectory()
{
var list = new List<string>()
{
"de",
"es",
"ja",
"ru",
"nl",
"x64",
"x86",
};
list.ForEach(item =>
{
var path = Path.Combine( Path.GetDirectoryName(CurrentPath), item);
DeleteDirectory(path);
});
}
static void DeleteDirectory(string targetDir)
{
if (Directory.Exists(targetDir))
{
string[] files = Directory.GetFiles(targetDir);
foreach (string file in files)
{
File.Delete(file);
}
string[] subDirs = Directory.GetDirectories(targetDir);
foreach (string subDir in subDirs)
{
DeleteDirectory(subDir);
}
Directory.Delete(targetDir);
}
}
}
}

@ -0,0 +1,95 @@

namespace Update
{
partial class MainFrom
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.MainBackgroundWorker = new System.ComponentModel.BackgroundWorker();
this.MainProgressBar = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.MainProcessLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// MainBackgroundWorker
//
this.MainBackgroundWorker.WorkerReportsProgress = true;
//
// MainProgressBar
//
this.MainProgressBar.Location = new System.Drawing.Point(16, 48);
this.MainProgressBar.Name = "MainProgressBar";
this.MainProgressBar.Size = new System.Drawing.Size(365, 33);
this.MainProgressBar.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(286, 19);
this.label1.TabIndex = 1;
this.label1.Text = "更新程序运行中, 请勿操作电脑!";
//
// MainProcessLabel
//
this.MainProcessLabel.AutoSize = true;
this.MainProcessLabel.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MainProcessLabel.Location = new System.Drawing.Point(392, 55);
this.MainProcessLabel.Name = "MainProcessLabel";
this.MainProcessLabel.Size = new System.Drawing.Size(21, 14);
this.MainProcessLabel.TabIndex = 2;
this.MainProcessLabel.Text = "0%";
//
// MainFrom
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(442, 102);
this.ControlBox = false;
this.Controls.Add(this.MainProcessLabel);
this.Controls.Add(this.label1);
this.Controls.Add(this.MainProgressBar);
this.Name = "MainFrom";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "更新程序";
this.TopMost = true;
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.ComponentModel.BackgroundWorker MainBackgroundWorker;
private System.Windows.Forms.ProgressBar MainProgressBar;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label MainProcessLabel;
}
}

@ -0,0 +1,241 @@
using Ionic.Zip;
using System;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Text;
using System.Windows.Forms;
namespace Update
{
public partial class MainFrom : Form
{
readonly string programName = ConfigurationManager.AppSettings["ProgramName"];
readonly string downloadUrl = ConfigurationManager.AppSettings["DownloadUrl"];
string version;
public MainFrom(string[] args)
{
InitializeComponent();
// 参数验证
if (args.Length < 1)
{
MessageBox.Show("未接收到启动参数!程序即将关闭!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
Close();
}
else
{
version = args[0];
}
// 杀死业务系统进程
Process[] processes = Process.GetProcessesByName(programName);
foreach (Process process in processes)
{
process.Kill();
process.WaitForExit(); // 可选:等待进程完全退出
process.Close(); // 释放资源
}
MainBackgroundWorker.DoWork += BackgroundWorker_DoWork;
MainBackgroundWorker.ProgressChanged += BackgroundWorker_ProgressChanged;
MainBackgroundWorker.RunWorkerCompleted += BackgroundWorker_RunWorkerCompleted;
MainBackgroundWorker.RunWorkerAsync();
}
private void BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
//下载 80%
Download();
//解压 10%
UnZip();
//复制 10%
Copy();
}
private void Download()
{
//保存路径
var savePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update");
if (Directory.Exists(savePath))
{
Directory.Delete(savePath, true);
}
Directory.CreateDirectory(savePath);
//保存文件
var zipFilePath = Path.Combine(savePath, version + ".zip");
// 创建HttpWebRequest对象
var request = (HttpWebRequest)WebRequest.Create(downloadUrl + $"?fileName={version}.zip");
// 获取响应
using (var response = (HttpWebResponse)request.GetResponse())
{
long totalBytes = response.ContentLength;
long downloadedBytes = 0;
// 读取响应流
using (var stream = response.GetResponseStream())
{
// 将响应保存到本地文件
using (var fileStream = File.Create(zipFilePath))
{
var buffer = new byte[4096];
int bytesRead;
// 循环读取和写入,直到读取完整个响应流
while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0)
{
// 写入文件流
fileStream.Write(buffer, 0, bytesRead);
downloadedBytes += bytesRead;
MainBackgroundWorker.ReportProgress((int)((double)downloadedBytes / totalBytes * 80), "正在下载");
}
}
}
}
}
private void UnZip()
{
//保存路径
var savePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update");
//保存文件
var zipFilePath = Path.Combine(savePath, version + ".zip");
//解压路径
var unZipPath = Path.Combine(savePath, "UnZip");
if (Directory.Exists(unZipPath))
Directory.Delete(unZipPath, true);
Directory.CreateDirectory(unZipPath);
int totalFiles = 0;
int processedFiles = 0;
using (ZipFile zip = ZipFile.Read(zipFilePath, new ReadOptions { Encoding = Encoding.GetEncoding("GB2312") }))
{
totalFiles = zip.Count;
foreach (ZipEntry entry in zip)
{
entry.Extract(unZipPath, ExtractExistingFileAction.OverwriteSilently);
processedFiles++;
// 报告进度
MainBackgroundWorker.ReportProgress((int)((double)processedFiles / totalFiles * 10) + 80, "正在解压");
}
}
}
private void OnExtractProgress(object sender, ExtractProgressEventArgs e)
{
throw new NotImplementedException();
}
/// <summary>
/// 在 BackgroundWorker 中递归复制文件(简单进度报告)
/// </summary>
private void Copy()
{
string sourceDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Update", "UnZip", version);
string destDir = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.FullName;
int totalFiles = CountAllFiles(sourceDir);
int copiedFiles = 0;
// 执行复制
CopyFiles(sourceDir, destDir, ref copiedFiles, totalFiles);
MainBackgroundWorker.ReportProgress(100, $"复制完成,共复制 {copiedFiles} 个文件");
}
/// <summary>
/// 统计目录下所有文件数量
/// </summary>
private int CountAllFiles(string directory)
{
int count = 0;
try
{
// 当前目录的文件数
count += Directory.GetFiles(directory).Length;
// 递归统计子目录
foreach (string subDir in Directory.GetDirectories(directory))
{
count += CountAllFiles(subDir);
}
}
catch (UnauthorizedAccessException)
{
// 无权限访问,跳过该目录
}
return count;
}
private void CopyFiles(string sourceDir, string destDir, ref int copiedFiles, int totalFiles)
{
if (sourceDir.EndsWith("Update"))
{
return;
}
// 复制当前目录的文件
foreach (string sourceFile in Directory.GetFiles(sourceDir))
{
string destFile = Path.Combine(destDir, Path.GetFileName(sourceFile));
File.Copy(sourceFile, destFile, overwrite: true);
copiedFiles++;
// 报告进度
MainBackgroundWorker.ReportProgress((int)((double)copiedFiles / totalFiles * 10) + 90, "正在复制");
}
// 递归处理子目录
foreach (string subDir in Directory.GetDirectories(sourceDir))
{
string destSubDir = Path.Combine(destDir, Path.GetFileName(subDir));
Directory.CreateDirectory(destSubDir);
CopyFiles(subDir, destSubDir, ref copiedFiles, totalFiles);
}
}
private void BackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
// 更新进度条
MainProgressBar.Value = e.ProgressPercentage;
// 更新百分比标签
MainProcessLabel.Text = $"{e.ProgressPercentage}%";
// 如果需要显示具体信息
//if (e.UserState != null)
//{
// lblProgress.Text = $"{e.ProgressPercentage}% - {e.UserState}";
//}
}
private void BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Error != null)
{
var box = new CountdownMessageBox($"更新出错, 请联系系统管理员:\r\n{e.Error.Message}", 15);
box.ShowDialog();
}
else
{
var box = new CountdownMessageBox("更新完成!即将启动系统...");
box.ShowDialog();
Process.Start(Path.Combine(Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.FullName, programName + ".exe"), version);
}
Close();
}
}
}

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="MainBackgroundWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

@ -1,8 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Threading;
using System.Windows.Forms; using System.Windows.Forms;
namespace Update namespace Update
@ -13,29 +11,11 @@ namespace Update
/// 应用程序的主入口点。 /// 应用程序的主入口点。
/// </summary> /// </summary>
[STAThread] [STAThread]
static void Main() static void Main(string[] args)
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
var program = "PEIS.exe"; Application.Run(new MainFrom(args));
// 检查程序是否正在运行
Process[] processes = Process.GetProcessesByName(program);
if (processes.Length > 0)
{
// 关闭程序
foreach (var process in processes)
{
process.Kill();
process.WaitForExit(); // 等待程序退出
Console.WriteLine($@"Closed existing instance of {program}");
}
// 等待2秒
Thread.Sleep(1000);
}
Application.Run(new Form1());
} }
} }
} }

@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Update")] [assembly: AssemblyProduct("Update")]
[assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("8894c92c-210d-459c-b5cd-7a6d2ab4cbe5")] [assembly: Guid("12fe71e3-1e39-424c-8685-64ec743a248f")]
// 程序集的版本信息由下列四个值组成: // 程序集的版本信息由下列四个值组成:
// //
@ -29,8 +29,8 @@ using System.Runtime.InteropServices;
// 生成号 // 生成号
// 修订号 // 修订号
// //
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
// 方法是按如下所示使用“*”: : //通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

@ -1,44 +1,48 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
// 运行时版本:4.0.30319.42000 // 运行时版本: 4.0.30319.42000
// //
// 对此文件的更改可能导致不正确的行为,并且如果 // 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,这些更改将会丢失。 // 重新生成代码,则所做更改将丢失。
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Update.Properties {
using System;
namespace Update.Properties
{
/// <summary> /// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。 /// 强类型资源类,用于查找本地化字符串等。
/// </summary> /// </summary>
// 此类是由 StronglyTypedResourceBuilder // 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen // 若要添加或除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。 // (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan; private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture; private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() { internal Resources()
{
} }
/// <summary> /// <summary>
/// 返回此类使用的缓存 ResourceManager 实例。 /// 返回此类使用的缓存 ResourceManager 实例。
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager
get { {
if (object.ReferenceEquals(resourceMan, null)) { get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Update.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Update.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
@ -47,27 +51,20 @@ namespace Update.Properties {
} }
/// <summary> /// <summary>
/// 重写当前线程的 CurrentUICulture 属性 /// 重写当前线程的 CurrentUICulture 属性,对
/// 重写当前线程的 CurrentUICulture 属性 /// 使用此强类型资源类的所有资源查找执行重写。
/// </summary> /// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture { internal static global::System.Globalization.CultureInfo Culture
get { {
get
{
return resourceCulture; return resourceCulture;
} }
set { set
{
resourceCulture = value; resourceCulture = value;
} }
} }
/// <summary>
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
/// </summary>
internal static System.Drawing.Bitmap update {
get {
object obj = ResourceManager.GetObject("update", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
} }
} }

@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
@ -60,7 +60,6 @@
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
--> -->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true"> <xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
@ -69,10 +68,9 @@
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
@ -87,10 +85,9 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
@ -112,13 +109,9 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="update" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\update.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root> </root>

@ -8,10 +8,9 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Update.Properties namespace Update.Properties
{ {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase

@ -4,28 +4,13 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8894C92C-210D-459C-B5CD-7A6D2AB4CBE5}</ProjectGuid> <ProjectGuid>{12FE71E3-1E39-424C-8685-64EC743A248F}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>Update</RootNamespace> <RootNamespace>Update</RootNamespace>
<AssemblyName>Update</AssemblyName> <AssemblyName>Update</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -46,22 +31,54 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Form1.cs"> <Compile Include="CountdownMessageBox.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Form1.Designer.cs"> <Compile Include="CountdownMessageBox.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>CountdownMessageBox.cs</DependentUpon>
</Compile>
<Compile Include="MainFrom.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainFrom.Designer.cs">
<DependentUpon>MainFrom.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx"> <EmbeddedResource Include="MainFrom.resx">
<DependentUpon>Form1.cs</DependentUpon> <DependentUpon>MainFrom.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
@ -71,9 +88,8 @@
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="packages.config" /> <None Include="App.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -85,16 +101,9 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <PackageReference Include="DotNetZip">
<Visible>False</Visible> <Version>1.16.0</Version>
<ProductName>.NET Framework 3.5 SP1</ProductName> </PackageReference>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="update.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.16.0" targetFramework="net40" />
</packages>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Loading…
Cancel
Save