初始化提交
仓库转移到Gitea,初始化提交,可能丢失以前的git版本日志
This commit is contained in:
6
.cr/personal/Editor/Painting/Structural Highlighting.xml
Normal file
6
.cr/personal/Editor/Painting/Structural Highlighting.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Root Type="DevExpress.CodeRush.VisualizePlugins.StructuralHighlighting.Options.StructuralHighlightingOptions">
|
||||
<Options Language="Neutral">
|
||||
<Enabled>False</Enabled>
|
||||
</Options>
|
||||
</Root>
|
||||
47
.gitignore
vendored
Normal file
47
.gitignore
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
.vs/
|
||||
|
||||
# .NET编译生成文件
|
||||
[Bb]in
|
||||
[Oo]bj
|
||||
[Dd]ebug*/
|
||||
*.pdb
|
||||
*.user
|
||||
*.suo
|
||||
*.cache
|
||||
*.ilk
|
||||
*.ncb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.vsp
|
||||
*.vspscc
|
||||
|
||||
# 发布输出
|
||||
publish/
|
||||
*.pubxml
|
||||
|
||||
# NuGet包
|
||||
packages/
|
||||
*.nupkg
|
||||
|
||||
# Visual Studio临时文件
|
||||
_ReSharper.*
|
||||
*.resharper
|
||||
[Tt]emp/
|
||||
|
||||
# MSTest测试结果
|
||||
TestResults/
|
||||
*.trx
|
||||
|
||||
# Rider IDE
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# VS Code
|
||||
.vscode/
|
||||
*.code-workspace
|
||||
|
||||
# 用户特定文件
|
||||
*.userprefs
|
||||
|
||||
# 构建日志
|
||||
msbuild.log
|
||||
217
AUTS_AOI/AUTS_AOI.vbproj
Normal file
217
AUTS_AOI/AUTS_AOI.vbproj
Normal file
@@ -0,0 +1,217 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\OpenCvSharp4.runtime.win.4.6.0.20220608\build\net48\OpenCvSharp4.runtime.win.props" Condition="Exists('..\packages\OpenCvSharp4.runtime.win.4.6.0.20220608\build\net48\OpenCvSharp4.runtime.win.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{63C0C05D-77F2-4F37-9D0E-2EF197337FCF}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>AUTS_AOI.My.MyApplication</StartupObject>
|
||||
<RootNamespace>AUTS_AOI</RootNamespace>
|
||||
<AssemblyName>AUTS_AOI</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>AUTS_AOI.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>AUTS_AOI.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>On</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>Off</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>iconfinder_Instagram_571111.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>0A24DBE81683427A18C6FFDAD761CAAF5FF0B642</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentFTP">
|
||||
<HintPath>..\AUTS_UpdateService\FluentFTP.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpenCvSharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OpenCvSharp4.4.6.0.20220608\lib\net48\OpenCvSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="OpenCvSharp.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6adad1e807fea099, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\OpenCvSharp4.Extensions.4.6.0.20220608\lib\net48\OpenCvSharp.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Security" />
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xaml" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FrmMain.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmMain.Designer.vb">
|
||||
<DependentUpon>FrmMain.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="IStatisticsObserver.vb" />
|
||||
<Compile Include="IFailTip.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="Statistics.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FrmMain.resx">
|
||||
<DependentUpon>FrmMain.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="iconfinder_Instagram_571111.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.8 %28x86 和 x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
|
||||
<Project>{33c6456c-f00d-41ac-a6fb-db0601495c6a}</Project>
|
||||
<Name>UTS_Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\OpenCvSharp4.runtime.win.4.6.0.20220608\build\net48\OpenCvSharp4.runtime.win.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OpenCvSharp4.runtime.win.4.6.0.20220608\build\net48\OpenCvSharp4.runtime.win.props'))" />
|
||||
</Target>
|
||||
</Project>
|
||||
57
AUTS_AOI/App.config
Normal file
57
AUTS_AOI/App.config
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="AUTS_AOI.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.30.1.0" newVersion="3.30.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<userSettings>
|
||||
<AUTS_AOI.My.MySettings>
|
||||
<setting name="Project" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ProcessStation" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ProductionLine" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="UseCamera" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="CameraFrameIndex" serializeAs="String">
|
||||
<value>4</value>
|
||||
</setting>
|
||||
<setting name="DoubleCamera" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</AUTS_AOI.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
61
AUTS_AOI/CheckRecorder.vb
Normal file
61
AUTS_AOI/CheckRecorder.vb
Normal file
@@ -0,0 +1,61 @@
|
||||
Imports UTS_Core.Database
|
||||
Imports UTS_Core.UTSModule
|
||||
Imports UTS_Core.UTSModule.DbTableModel.Customer
|
||||
|
||||
Public Class CheckRecorder
|
||||
|
||||
Private ReadOnly _failTipDictionary As Dictionary(Of String, Integer)
|
||||
|
||||
Sub New()
|
||||
_failTipDictionary = New Dictionary(Of String, Integer)()
|
||||
End Sub
|
||||
|
||||
Public Property TestLogTableName As String
|
||||
|
||||
|
||||
Public Sub Commit(failTip As String)
|
||||
If _failTipDictionary.ContainsKey(failTip) Then
|
||||
_failTipDictionary(failTip) += 1
|
||||
Else
|
||||
_failTipDictionary.Add(failTip, 1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 获取当前倒叙排序的结果信息
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function UpdateFailStrings() As String()
|
||||
Dim result As New List(Of String)
|
||||
'排序
|
||||
For Each valuePair As KeyValuePair(Of String, Integer) In _failTipDictionary.OrderByDescending(Function(x) x.Value)
|
||||
result.Add(valuePair.Key)
|
||||
Next
|
||||
|
||||
Return result.ToArray()
|
||||
End Function
|
||||
|
||||
|
||||
Public Sub ReloadFailString()
|
||||
If String.IsNullOrWhiteSpace(TestLogTableName) Then Return
|
||||
|
||||
'以本地库为准
|
||||
Using db As New DbExecutor(UtsDb.LocalDbType, UtsDb.LocalConnString)
|
||||
db.Open()
|
||||
|
||||
Dim cmdText As String
|
||||
|
||||
'统计日志表分组信息
|
||||
cmdText = $"select `{TestLogTable.ColNamesEnum.QA_CheckResult}`,count(*) as count from `{TestLogTableName}` where `TestResult` = '0' group by `{TestLogTable.ColNamesEnum.QA_CheckResult}` order by count"
|
||||
Dim dtTable As DataTable = db.ExecuteDataTable(cmdText)
|
||||
|
||||
For Each row As DataRow In dtTable.Rows
|
||||
_failTipDictionary.Add(row($"{TestLogTable.ColNamesEnum.QA_CheckResult}").ToString(), CInt(row("count")))
|
||||
Next
|
||||
|
||||
db.Close()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
452
AUTS_AOI/FrmMain.Designer.vb
generated
Normal file
452
AUTS_AOI/FrmMain.Designer.vb
generated
Normal file
@@ -0,0 +1,452 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FrmMain
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Windows 窗体设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||
'可以使用 Windows 窗体设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmMain))
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.TssLblProductionLine = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblStaion = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TsLblCheckSum = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblInvalidCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblValidCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblPassCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblFailCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblYield = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.TsChangeStation = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.TsCboCameraFrame = New System.Windows.Forms.ToolStripComboBox()
|
||||
Me.ToolStripLabel2 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.RdBtnDouble = New System.Windows.Forms.RadioButton()
|
||||
Me.RdBtnSingle = New System.Windows.Forms.RadioButton()
|
||||
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||
Me.RtxRecord = New System.Windows.Forms.RichTextBox()
|
||||
Me.LblResult = New System.Windows.Forms.Label()
|
||||
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
|
||||
Me.CboProductionLines = New System.Windows.Forms.ComboBox()
|
||||
Me.BtnCommit = New System.Windows.Forms.Button()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.RtxBarcodeSn = New System.Windows.Forms.RichTextBox()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.PicCamera1 = New System.Windows.Forms.PictureBox()
|
||||
Me.GroupBox5 = New System.Windows.Forms.GroupBox()
|
||||
Me.PicCamera2 = New System.Windows.Forms.PictureBox()
|
||||
Me.StatusStrip1.SuspendLayout()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
Me.GroupBox3.SuspendLayout()
|
||||
Me.GroupBox4.SuspendLayout()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||
Me.SplitContainer2.Panel2.SuspendLayout()
|
||||
Me.SplitContainer2.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
CType(Me.PicCamera1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.GroupBox5.SuspendLayout()
|
||||
CType(Me.PicCamera2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TssLblProductionLine, Me.TssLblStaion, Me.TsLblCheckSum, Me.TssLblInvalidCount, Me.TssLblValidCount, Me.TssLblPassCount, Me.TssLblFailCount, Me.TssLblYield})
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 579)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(790, 22)
|
||||
Me.StatusStrip1.TabIndex = 0
|
||||
Me.StatusStrip1.Text = "StatusStrip1"
|
||||
'
|
||||
'TssLblProductionLine
|
||||
'
|
||||
Me.TssLblProductionLine.ForeColor = System.Drawing.Color.Black
|
||||
Me.TssLblProductionLine.Name = "TssLblProductionLine"
|
||||
Me.TssLblProductionLine.Size = New System.Drawing.Size(44, 17)
|
||||
Me.TssLblProductionLine.Text = "A-Line"
|
||||
'
|
||||
'TssLblStaion
|
||||
'
|
||||
Me.TssLblStaion.ForeColor = System.Drawing.Color.Black
|
||||
Me.TssLblStaion.Name = "TssLblStaion"
|
||||
Me.TssLblStaion.Size = New System.Drawing.Size(68, 17)
|
||||
Me.TssLblStaion.Text = "BLV-12 A1"
|
||||
'
|
||||
'TsLblCheckSum
|
||||
'
|
||||
Me.TsLblCheckSum.Name = "TsLblCheckSum"
|
||||
Me.TsLblCheckSum.Size = New System.Drawing.Size(64, 17)
|
||||
Me.TsLblCheckSum.Text = "Sum:0000"
|
||||
'
|
||||
'TssLblInvalidCount
|
||||
'
|
||||
Me.TssLblInvalidCount.Name = "TssLblInvalidCount"
|
||||
Me.TssLblInvalidCount.Size = New System.Drawing.Size(77, 17)
|
||||
Me.TssLblInvalidCount.Text = "Invalid:0000"
|
||||
'
|
||||
'TssLblValidCount
|
||||
'
|
||||
Me.TssLblValidCount.Name = "TssLblValidCount"
|
||||
Me.TssLblValidCount.Size = New System.Drawing.Size(68, 17)
|
||||
Me.TssLblValidCount.Text = "Valid:0000"
|
||||
'
|
||||
'TssLblPassCount
|
||||
'
|
||||
Me.TssLblPassCount.Name = "TssLblPassCount"
|
||||
Me.TssLblPassCount.Size = New System.Drawing.Size(65, 17)
|
||||
Me.TssLblPassCount.Text = "Pass:0000"
|
||||
'
|
||||
'TssLblFailCount
|
||||
'
|
||||
Me.TssLblFailCount.Name = "TssLblFailCount"
|
||||
Me.TssLblFailCount.Size = New System.Drawing.Size(58, 17)
|
||||
Me.TssLblFailCount.Text = "Fail:0000"
|
||||
'
|
||||
'TssLblYield
|
||||
'
|
||||
Me.TssLblYield.Name = "TssLblYield"
|
||||
Me.TssLblYield.Size = New System.Drawing.Size(81, 17)
|
||||
Me.TssLblYield.Text = "Yield:00.00%"
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsChangeStation, Me.ToolStripLabel1, Me.TsCboCameraFrame, Me.ToolStripLabel2})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(790, 40)
|
||||
Me.ToolStrip1.TabIndex = 1
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'TsChangeStation
|
||||
'
|
||||
Me.TsChangeStation.Image = CType(resources.GetObject("TsChangeStation.Image"), System.Drawing.Image)
|
||||
Me.TsChangeStation.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsChangeStation.Name = "TsChangeStation"
|
||||
Me.TsChangeStation.Size = New System.Drawing.Size(60, 37)
|
||||
Me.TsChangeStation.Text = "切换站位"
|
||||
Me.TsChangeStation.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
|
||||
Me.TsChangeStation.ToolTipText = "切换站位"
|
||||
'
|
||||
'ToolStripLabel1
|
||||
'
|
||||
Me.ToolStripLabel1.Name = "ToolStripLabel1"
|
||||
Me.ToolStripLabel1.Size = New System.Drawing.Size(44, 37)
|
||||
Me.ToolStripLabel1.Text = "分辨率"
|
||||
'
|
||||
'TsCboCameraFrame
|
||||
'
|
||||
Me.TsCboCameraFrame.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.TsCboCameraFrame.Name = "TsCboCameraFrame"
|
||||
Me.TsCboCameraFrame.Size = New System.Drawing.Size(121, 40)
|
||||
'
|
||||
'ToolStripLabel2
|
||||
'
|
||||
Me.ToolStripLabel2.Name = "ToolStripLabel2"
|
||||
Me.ToolStripLabel2.Size = New System.Drawing.Size(0, 37)
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 40)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.RdBtnDouble)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.RdBtnSingle)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.GroupBox3)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.LblResult)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.GroupBox4)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.BtnCommit)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.GroupBox1)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(790, 539)
|
||||
Me.SplitContainer1.SplitterDistance = 429
|
||||
Me.SplitContainer1.TabIndex = 0
|
||||
Me.SplitContainer1.TabStop = False
|
||||
'
|
||||
'RdBtnDouble
|
||||
'
|
||||
Me.RdBtnDouble.AutoSize = True
|
||||
Me.RdBtnDouble.Checked = True
|
||||
Me.RdBtnDouble.Location = New System.Drawing.Point(347, 154)
|
||||
Me.RdBtnDouble.Name = "RdBtnDouble"
|
||||
Me.RdBtnDouble.Size = New System.Drawing.Size(71, 16)
|
||||
Me.RdBtnDouble.TabIndex = 1
|
||||
Me.RdBtnDouble.TabStop = True
|
||||
Me.RdBtnDouble.Text = "双摄像头"
|
||||
Me.RdBtnDouble.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RdBtnSingle
|
||||
'
|
||||
Me.RdBtnSingle.AutoSize = True
|
||||
Me.RdBtnSingle.Location = New System.Drawing.Point(259, 154)
|
||||
Me.RdBtnSingle.Name = "RdBtnSingle"
|
||||
Me.RdBtnSingle.Size = New System.Drawing.Size(71, 16)
|
||||
Me.RdBtnSingle.TabIndex = 6
|
||||
Me.RdBtnSingle.TabStop = True
|
||||
Me.RdBtnSingle.Text = "单摄像头"
|
||||
Me.RdBtnSingle.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox3.Controls.Add(Me.RtxRecord)
|
||||
Me.GroupBox3.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(12, 172)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(406, 317)
|
||||
Me.GroupBox3.TabIndex = 2
|
||||
Me.GroupBox3.TabStop = False
|
||||
Me.GroupBox3.Text = "校验日志"
|
||||
'
|
||||
'RtxRecord
|
||||
'
|
||||
Me.RtxRecord.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxRecord.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxRecord.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.RtxRecord.Location = New System.Drawing.Point(3, 22)
|
||||
Me.RtxRecord.Name = "RtxRecord"
|
||||
Me.RtxRecord.ReadOnly = True
|
||||
Me.RtxRecord.Size = New System.Drawing.Size(400, 292)
|
||||
Me.RtxRecord.TabIndex = 0
|
||||
Me.RtxRecord.TabStop = False
|
||||
Me.RtxRecord.Text = ""
|
||||
'
|
||||
'LblResult
|
||||
'
|
||||
Me.LblResult.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.LblResult.Font = New System.Drawing.Font("宋体", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.LblResult.Location = New System.Drawing.Point(12, 496)
|
||||
Me.LblResult.Name = "LblResult"
|
||||
Me.LblResult.Size = New System.Drawing.Size(249, 40)
|
||||
Me.LblResult.TabIndex = 4
|
||||
Me.LblResult.Text = "待开始测试"
|
||||
Me.LblResult.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'GroupBox4
|
||||
'
|
||||
Me.GroupBox4.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox4.Controls.Add(Me.CboProductionLines)
|
||||
Me.GroupBox4.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox4.Location = New System.Drawing.Point(12, 9)
|
||||
Me.GroupBox4.Name = "GroupBox4"
|
||||
Me.GroupBox4.Size = New System.Drawing.Size(409, 50)
|
||||
Me.GroupBox4.TabIndex = 3
|
||||
Me.GroupBox4.TabStop = False
|
||||
Me.GroupBox4.Text = "产线"
|
||||
'
|
||||
'CboProductionLines
|
||||
'
|
||||
Me.CboProductionLines.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CboProductionLines.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboProductionLines.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CboProductionLines.ForeColor = System.Drawing.Color.Gray
|
||||
Me.CboProductionLines.FormattingEnabled = True
|
||||
Me.CboProductionLines.Items.AddRange(New Object() {"Q1", "Q2", "Q3", "Q4"})
|
||||
Me.CboProductionLines.Location = New System.Drawing.Point(3, 22)
|
||||
Me.CboProductionLines.Name = "CboProductionLines"
|
||||
Me.CboProductionLines.Size = New System.Drawing.Size(403, 24)
|
||||
Me.CboProductionLines.TabIndex = 0
|
||||
Me.CboProductionLines.TabStop = False
|
||||
'
|
||||
'BtnCommit
|
||||
'
|
||||
Me.BtnCommit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.BtnCommit.Font = New System.Drawing.Font("宋体", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.BtnCommit.Location = New System.Drawing.Point(313, 495)
|
||||
Me.BtnCommit.Name = "BtnCommit"
|
||||
Me.BtnCommit.Size = New System.Drawing.Size(105, 40)
|
||||
Me.BtnCommit.TabIndex = 2
|
||||
Me.BtnCommit.Text = "提交"
|
||||
Me.BtnCommit.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox1.Controls.Add(Me.RtxBarcodeSn)
|
||||
Me.GroupBox1.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(12, 65)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(409, 86)
|
||||
Me.GroupBox1.TabIndex = 0
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "产品序号"
|
||||
'
|
||||
'RtxBarcodeSn
|
||||
'
|
||||
Me.RtxBarcodeSn.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxBarcodeSn.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxBarcodeSn.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.RtxBarcodeSn.ForeColor = System.Drawing.Color.Gray
|
||||
Me.RtxBarcodeSn.Location = New System.Drawing.Point(3, 22)
|
||||
Me.RtxBarcodeSn.Name = "RtxBarcodeSn"
|
||||
Me.RtxBarcodeSn.Size = New System.Drawing.Size(403, 61)
|
||||
Me.RtxBarcodeSn.TabIndex = 0
|
||||
Me.RtxBarcodeSn.Text = "123456ABCDEFabcdef"
|
||||
'
|
||||
'SplitContainer2
|
||||
'
|
||||
Me.SplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer2.IsSplitterFixed = True
|
||||
Me.SplitContainer2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer2.Name = "SplitContainer2"
|
||||
Me.SplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer2.Panel1
|
||||
'
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.GroupBox2)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.GroupBox5)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(357, 539)
|
||||
Me.SplitContainer2.SplitterDistance = 258
|
||||
Me.SplitContainer2.TabIndex = 0
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Controls.Add(Me.PicCamera1)
|
||||
Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GroupBox2.Font = New System.Drawing.Font("微软雅黑", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(357, 258)
|
||||
Me.GroupBox2.TabIndex = 1
|
||||
Me.GroupBox2.TabStop = False
|
||||
Me.GroupBox2.Text = "主摄像头"
|
||||
'
|
||||
'PicCamera1
|
||||
'
|
||||
Me.PicCamera1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.PicCamera1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.PicCamera1.Location = New System.Drawing.Point(3, 25)
|
||||
Me.PicCamera1.Name = "PicCamera1"
|
||||
Me.PicCamera1.Size = New System.Drawing.Size(351, 230)
|
||||
Me.PicCamera1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
Me.PicCamera1.TabIndex = 3
|
||||
Me.PicCamera1.TabStop = False
|
||||
'
|
||||
'GroupBox5
|
||||
'
|
||||
Me.GroupBox5.Controls.Add(Me.PicCamera2)
|
||||
Me.GroupBox5.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GroupBox5.Font = New System.Drawing.Font("微软雅黑", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox5.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GroupBox5.Name = "GroupBox5"
|
||||
Me.GroupBox5.Size = New System.Drawing.Size(357, 277)
|
||||
Me.GroupBox5.TabIndex = 2
|
||||
Me.GroupBox5.TabStop = False
|
||||
Me.GroupBox5.Text = "次摄像头"
|
||||
'
|
||||
'PicCamera2
|
||||
'
|
||||
Me.PicCamera2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.PicCamera2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.PicCamera2.Location = New System.Drawing.Point(3, 25)
|
||||
Me.PicCamera2.Name = "PicCamera2"
|
||||
Me.PicCamera2.Size = New System.Drawing.Size(351, 249)
|
||||
Me.PicCamera2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
Me.PicCamera2.TabIndex = 3
|
||||
Me.PicCamera2.TabStop = False
|
||||
'
|
||||
'FrmMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(790, 601)
|
||||
Me.Controls.Add(Me.SplitContainer1)
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Controls.Add(Me.StatusStrip1)
|
||||
Me.ForeColor = System.Drawing.Color.Gray
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "FrmMain"
|
||||
Me.Text = "Form1"
|
||||
Me.StatusStrip1.ResumeLayout(False)
|
||||
Me.StatusStrip1.PerformLayout()
|
||||
Me.ToolStrip1.ResumeLayout(False)
|
||||
Me.ToolStrip1.PerformLayout()
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel1.PerformLayout()
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.SplitContainer1.ResumeLayout(false)
|
||||
Me.GroupBox3.ResumeLayout(false)
|
||||
Me.GroupBox4.ResumeLayout(false)
|
||||
Me.GroupBox1.ResumeLayout(false)
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(false)
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(false)
|
||||
CType(Me.SplitContainer2,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.SplitContainer2.ResumeLayout(false)
|
||||
Me.GroupBox2.ResumeLayout(false)
|
||||
CType(Me.PicCamera1,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.GroupBox5.ResumeLayout(false)
|
||||
CType(Me.PicCamera2,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.ResumeLayout(false)
|
||||
Me.PerformLayout
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents StatusStrip1 As StatusStrip
|
||||
Friend WithEvents ToolStrip1 As ToolStrip
|
||||
Friend WithEvents TsChangeStation As ToolStripButton
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents GroupBox2 As GroupBox
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents RtxBarcodeSn As RichTextBox
|
||||
Friend WithEvents RtxRecord As RichTextBox
|
||||
Friend WithEvents GroupBox3 As GroupBox
|
||||
Friend WithEvents TsLblCheckSum As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblPassCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblFailCount As ToolStripStatusLabel
|
||||
Friend WithEvents BtnCommit As Button
|
||||
Friend WithEvents TssLblStaion As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblYield As ToolStripStatusLabel
|
||||
Friend WithEvents GroupBox4 As GroupBox
|
||||
Friend WithEvents CboProductionLines As ComboBox
|
||||
Friend WithEvents TssLblProductionLine As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblInvalidCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblValidCount As ToolStripStatusLabel
|
||||
Friend WithEvents PicCamera1 As PictureBox
|
||||
Friend WithEvents LblResult As Label
|
||||
Friend WithEvents ToolStripLabel1 As ToolStripLabel
|
||||
Friend WithEvents TsCboCameraFrame As ToolStripComboBox
|
||||
Friend WithEvents ToolStripLabel2 As ToolStripLabel
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents GroupBox5 As GroupBox
|
||||
Friend WithEvents PicCamera2 As PictureBox
|
||||
Friend WithEvents RdBtnDouble As RadioButton
|
||||
Friend WithEvents RdBtnSingle As RadioButton
|
||||
End Class
|
||||
1978
AUTS_AOI/FrmMain.resx
Normal file
1978
AUTS_AOI/FrmMain.resx
Normal file
File diff suppressed because it is too large
Load Diff
541
AUTS_AOI/FrmMain.vb
Normal file
541
AUTS_AOI/FrmMain.vb
Normal file
@@ -0,0 +1,541 @@
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports OpenCvSharp
|
||||
Imports OpenCvSharp.Extensions
|
||||
Imports UTS_Core.UTSModule.Test
|
||||
Imports UTS_Core.UTSModule
|
||||
Imports UTS_Core.UTSModule.Station
|
||||
|
||||
Public Class FrmMain
|
||||
Implements IStatisticsObserver
|
||||
Implements IProcessStation
|
||||
Implements IProductionLine
|
||||
|
||||
Private _ftp As FtpService
|
||||
Private _utsApp As UtsAppForm
|
||||
Private _checkStatistics As Statistics
|
||||
|
||||
Private _snSqliteChar As Char = "|"c
|
||||
|
||||
Private _useCamera As Boolean
|
||||
Private _doubleCarera As Boolean
|
||||
Public Sub ProductionLineChanged() Implements IProductionLine.ProductionLineChanged
|
||||
TssLblProductionLine.Text = CboProductionLines.Text
|
||||
My.Settings.ProductionLine = CboProductionLines.Text
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub StationChanged() Implements IProcessStation.StationChanged
|
||||
My.Settings.Project = _utsApp.ProcessStation.ParentProject.Name
|
||||
My.Settings.ProcessStation = _utsApp.ProcessStation.Name
|
||||
|
||||
UpdateStation(_utsApp.ProcessStation.ParentProject.Name, _utsApp.ProcessStation.Name)
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateStation(projectName As String, stationName As String)
|
||||
If String.IsNullOrWhiteSpace(projectName) OrElse
|
||||
String.IsNullOrWhiteSpace(stationName) Then
|
||||
TssLblStaion.Text = $"Invalid Station"
|
||||
Else
|
||||
TssLblStaion.Text = $"{projectName} - {stationName}"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateFailCount(failCount As Integer) Implements IStatisticsObserver.UpdateFailCount
|
||||
TssLblFailCount.Text = $"Fail:{failCount:D4}"
|
||||
End Sub
|
||||
|
||||
Public Sub UpdatePassCount(passCount As Integer) Implements IStatisticsObserver.UpdatePassCount
|
||||
TssLblPassCount.Text = $"Pass:{passCount:D4}"
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateValidCount(validCount As Integer) Implements IStatisticsObserver.UpdateValidCount
|
||||
TssLblValidCount.Text = $"Valid:{validCount:D4}"
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateInvalidCount(invalidCount As Integer) Implements IStatisticsObserver.UpdateInvalidCount
|
||||
TssLblInvalidCount.Text = $"Invalid:{invalidCount:D4}"
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateSumCount(sumCount As Integer) Implements IStatisticsObserver.UpdateSumCount
|
||||
TsLblCheckSum.Text = $"Sum:{sumCount:D4}"
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateYield(yield As Double) Implements IStatisticsObserver.UpdateYield
|
||||
Select Case yield
|
||||
Case > 90
|
||||
TssLblYield.ForeColor = Color.DarkGreen
|
||||
Case > 75
|
||||
TssLblYield.ForeColor = Color.Green
|
||||
Case > 60
|
||||
TssLblYield.ForeColor = Color.Orange
|
||||
Case > 40
|
||||
TssLblYield.ForeColor = Color.OrangeRed
|
||||
Case Else
|
||||
TssLblYield.ForeColor = Color.Red
|
||||
End Select
|
||||
|
||||
TssLblYield.Text = $"Yield:{yield:F2}%"
|
||||
End Sub
|
||||
|
||||
Private Sub FrmMain_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
My.Application.SaveMySettingsOnExit = True
|
||||
|
||||
_checkStatistics = New Statistics()
|
||||
_checkStatistics.AddStatisticsObserver(Me)
|
||||
|
||||
_utsApp = UtsAppForm.CreateSingleton()
|
||||
Try
|
||||
If _utsApp.IsInitialized = False Then
|
||||
_utsApp.AddStatisticsObserver(Me)
|
||||
_utsApp.Initialize(ProcessStation.StationTypeEnum.AOI)
|
||||
_utsApp.LoadStation(My.Settings.Project, My.Settings.ProcessStation)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox($"Initialize UTSForm Error:{ex.Message}")
|
||||
Close()
|
||||
Return
|
||||
End Try
|
||||
|
||||
Try
|
||||
_ftp = New FtpService(UtsRegistry.FtpHost, CInt(_utsApp.License.FtpPort), _utsApp.License.FtpUser, _utsApp.License.FtpPwd)
|
||||
Catch ex As Exception
|
||||
MsgBox($"Initialize FtpService Error:{ex.Message}")
|
||||
Close()
|
||||
Return
|
||||
End Try
|
||||
|
||||
'初始化产线信息
|
||||
CboProductionLines.Items.Clear()
|
||||
CboProductionLines.Items.AddRange(_utsApp.ProductionLines.GetLineNames())
|
||||
CboProductionLines.SelectedIndex = CboProductionLines.Items.IndexOf(My.Settings.ProductionLine)
|
||||
|
||||
_doubleCarera = My.Settings.DoubleCamera
|
||||
If _doubleCarera Then
|
||||
RdBtnDouble.Checked = True
|
||||
Else
|
||||
RdBtnSingle.Checked = True
|
||||
End If
|
||||
|
||||
|
||||
TsCboCameraFrame.Items.Clear()
|
||||
For Each siz As Size In _cameraFrame
|
||||
TsCboCameraFrame.Items.Add($"{siz.Width}*{siz.Height}")
|
||||
Next
|
||||
TsCboCameraFrame.SelectedIndex = My.Settings.CameraFrameIndex
|
||||
|
||||
RtxBarcodeSn.Clear()
|
||||
|
||||
InitImageControl()
|
||||
|
||||
Text = $"{Application.ProductName} {Application.ProductVersion}"
|
||||
End Sub
|
||||
|
||||
Private Sub InitImageControl()
|
||||
_imgControl(0) = PicCamera1
|
||||
_imgControl(1) = PicCamera2
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub FrmMain_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
SaveLogFile()
|
||||
|
||||
My.Settings.CameraFrameIndex = _selectFrameSizeIndex
|
||||
My.Settings.DoubleCamera = _doubleCarera
|
||||
|
||||
_utsApp.Dispose()
|
||||
|
||||
CloseForm()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CloseForm()
|
||||
Text = $"Goodbye World."
|
||||
|
||||
For i As Double = 1 To 0 Step -0.05
|
||||
Thread.Sleep(50)
|
||||
Opacity = i
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub RtxDUT_SN_KeyDown(sender As Object, e As KeyEventArgs) Handles RtxBarcodeSn.KeyDown
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
If String.IsNullOrWhiteSpace(RtxBarcodeSn.Text) = False Then
|
||||
My.Computer.Keyboard.SendKeys("|")
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
End If
|
||||
ElseIf e.KeyCode = Keys.Space Then
|
||||
CommitTestResult()
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
|
||||
Console.WriteLine($"{ e.SuppressKeyPress} { e.Handled}")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function UploadFileToFtp(localPath As String, remotePath As String) As Boolean
|
||||
Try
|
||||
_ftp.FtpUpload(remotePath, localPath)
|
||||
Catch ex As Exception
|
||||
MsgBox($"上传图像[{localPath}]失败:{ex.Message}")
|
||||
|
||||
'todo:添加本地缓存上传失败图像,定期上传
|
||||
|
||||
'记录本地位置,上传文件位置,写入FTP的缓存数据库
|
||||
|
||||
'服务新增ftp同步任务,区分上传下载,
|
||||
'
|
||||
'
|
||||
'记录ftp命令?
|
||||
|
||||
'只记录上传下载命令?
|
||||
|
||||
|
||||
Return False
|
||||
End Try
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function GetImageName(barCode As String, index As Integer) As String
|
||||
Dim fileName As New StringBuilder
|
||||
fileName.Append(_utsApp.ProcessStation.ParentProject.Name)
|
||||
fileName.Append("_")
|
||||
fileName.Append(_utsApp.ProcessStation.Name)
|
||||
fileName.Append("_")
|
||||
fileName.Append(barCode)
|
||||
fileName.Append("_")
|
||||
fileName.Append($"{Now:yyyyMMdd_HHmmss}")
|
||||
fileName.Append("_")
|
||||
fileName.Append($"{index}")
|
||||
fileName.Append(".jpg")
|
||||
|
||||
Return fileName.ToString()
|
||||
End Function
|
||||
|
||||
Private Function SaveImageToLocal(localPath As String, index As Integer) As Boolean
|
||||
If _imgControl(index).Image Is Nothing Then
|
||||
MsgBox($"未检测到Camera[{index}] Image,录入失败")
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim img As Image = CType(_imgControl(index).Image.Clone(), Image)
|
||||
Try
|
||||
img.Save(localPath, Imaging.ImageFormat.Jpeg)
|
||||
Catch ex As Exception
|
||||
MsgBox($"Save Camera[{index}] Image Error:{ex.Message}")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub BtnCommit_Click(sender As Object, e As EventArgs) Handles BtnCommit.Click
|
||||
CommitTestResult()
|
||||
End Sub
|
||||
|
||||
Private Sub CommitTestResult()
|
||||
If _utsApp.ProcessStation Is Nothing Then
|
||||
MsgBox($"请选择项目与测试站后再尝试录入!")
|
||||
Return
|
||||
End If
|
||||
|
||||
If String.IsNullOrWhiteSpace(CboProductionLines.Text) Then
|
||||
MsgBox($"请选择生产线后再尝试录入!")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim barcodeString As String = RtxBarcodeSn.Text.ToUpper
|
||||
If String.IsNullOrWhiteSpace(barcodeString) Then
|
||||
MsgBox($"请输入合法的序列号!")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim barcodeList As String() = barcodeString.Split(New Char() {_snSqliteChar}, StringSplitOptions.RemoveEmptyEntries)
|
||||
If barcodeList.Count() = 0 Then Return
|
||||
|
||||
For Each barcode As String In barcodeList
|
||||
|
||||
If barcode.Length <> 8 Then
|
||||
MsgBox($"录入失败,条码[{barcode}]长度非法,请检查后重新录入!")
|
||||
Return
|
||||
End If
|
||||
|
||||
Static imgDirPath As String = $"{Application.StartupPath}\Img"
|
||||
If IO.Directory.Exists(imgDirPath) = False Then IO.Directory.CreateDirectory(imgDirPath)
|
||||
|
||||
Dim imgFileName As String = GetImageName(barcode, 0)
|
||||
Dim imgLocalPath As String = $"{imgDirPath}\{imgFileName}"
|
||||
Dim imgRemotePath As String = $"/uts_Manager/AUTS/{_utsApp.License.VendorName}/AOI/{_utsApp.ProcessStation.ParentProject.Index}/{imgFileName}"
|
||||
If SaveImageToLocal(imgLocalPath, 0) = False Then Return
|
||||
If UploadFileToFtp(imgLocalPath, imgRemotePath) = False Then Return
|
||||
|
||||
Dim imgFileName2 As String = GetImageName(barcode, 1)
|
||||
|
||||
Dim imgRemotePath2 As String = ""
|
||||
|
||||
If _doubleCarera Then
|
||||
Dim imgLocalPath2 As String = $"{imgDirPath}\{imgFileName2}"
|
||||
If SaveImageToLocal(imgLocalPath2, 1) = False Then Return
|
||||
|
||||
imgRemotePath2 = $"/uts_Manager/AUTS/{_utsApp.License.VendorName}/AOI/{_utsApp.ProcessStation.ParentProject.Index}/{imgFileName2}"
|
||||
If UploadFileToFtp(imgLocalPath2, imgRemotePath2) = False Then Return
|
||||
End If
|
||||
|
||||
Try
|
||||
FillTestResult(barcode, imgRemotePath, imgRemotePath2)
|
||||
_utsApp.CommitTestResult()
|
||||
|
||||
_checkStatistics.AddPassCount()
|
||||
AppendRecord(True, _utsApp.ProcessStation.ParentProject.Index, _utsApp.ProcessStation.StationID, _utsApp.TestResult.OrderID, _utsApp.TestResult.DUT_SN, "Pass")
|
||||
|
||||
LblResult.Text = $"{_utsApp.ProcessStation.ParentProject.Index:D2}-{_utsApp.ProcessStation.StationID:D2}-{_utsApp.TestResult.OrderID:D6}-{_utsApp.TestResult.DUT_SN} 录入成功"
|
||||
LblResult.ForeColor = Color.Green
|
||||
Catch ex As Exception
|
||||
_checkStatistics.AddInvalidCount()
|
||||
MsgBox($"测试结果录入失败:{ex.Message}")
|
||||
LblResult.Text = $"{_utsApp.TestResult.DUT_SN} 录入失败"
|
||||
LblResult.ForeColor = Color.Red
|
||||
End Try
|
||||
Next
|
||||
|
||||
TestResultCommitted()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 填充测试记录内容,每个应用程序这个部分有所差异
|
||||
''' </summary>
|
||||
Public Sub FillTestResult(barcodeSn As String, imgPath As String, imgPath2 As String)
|
||||
_utsApp.TestResult.ResetTestResult()
|
||||
|
||||
'产线索引
|
||||
Dim lineID As Integer = _utsApp.ProductionLines(CboProductionLines.Text).ID
|
||||
_utsApp.TestResult.ProductionLineID = lineID
|
||||
|
||||
|
||||
'测试开始时间
|
||||
_utsApp.TestResult.StartTime = Now
|
||||
|
||||
_utsApp.TestResult.DUT_SN = barcodeSn
|
||||
|
||||
_utsApp.TestResult.TestResult = TestResult.TestResultEnum.Pass
|
||||
|
||||
_utsApp.TestResult.AddCustomRecord("ImagePath", imgPath)
|
||||
|
||||
_utsApp.TestResult.AddCustomRecord("ImagePath2", imgPath2)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub TestResultCommitted()
|
||||
|
||||
RtxBarcodeSn.Focus()
|
||||
RtxBarcodeSn.SelectAll()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TsChangeStation_Click(sender As Object, e As EventArgs) Handles TsChangeStation.Click
|
||||
Try
|
||||
Dim filed As New Dictionary(Of String, String) From {{"ImagePath", "varchar(128)"}, {"ImagePath2", "varchar(128)"}}
|
||||
|
||||
_utsApp.ChangeStation(filed)
|
||||
Catch ex As Exception
|
||||
MsgBox($"ChangeStation Error:{ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 添加提示信息
|
||||
''' </summary>
|
||||
''' <param name="checkResult">校验结果</param>
|
||||
''' <param name="log">提示信息</param>
|
||||
Private Sub AppendRecord(checkResult As Boolean, pid As Integer, sid As Integer, order As Integer, barcode As String, log As String)
|
||||
Static recordMaxCount As Integer = 256
|
||||
Static recordCount As Integer = 1
|
||||
|
||||
With RtxRecord
|
||||
.Enabled = False
|
||||
|
||||
If recordCount >= recordMaxCount Then
|
||||
SaveLogFile()
|
||||
|
||||
.Clear()
|
||||
recordCount = 1
|
||||
End If
|
||||
|
||||
.SelectionStart = .TextLength
|
||||
.SelectionColor = Color.Black
|
||||
.AppendText($"{recordCount:D4} ")
|
||||
|
||||
.SelectionStart = .TextLength
|
||||
.SelectionColor = Color.DarkBlue
|
||||
.AppendText($"{Now:MMdd_HH:mm:ss} ")
|
||||
|
||||
.SelectionStart = .TextLength
|
||||
.SelectionColor = Color.Black
|
||||
.AppendText($"{pid:D2}-")
|
||||
|
||||
.SelectionStart = .TextLength
|
||||
.SelectionColor = Color.Black
|
||||
.AppendText($"{sid:D2} ")
|
||||
|
||||
.SelectionStart = .TextLength
|
||||
.SelectionColor = Color.DarkSeaGreen
|
||||
.AppendText($"{order:D6} ")
|
||||
|
||||
.SelectionStart = .TextLength
|
||||
.SelectionColor = Color.DarkOrange
|
||||
.AppendText($"{barcode,8} ")
|
||||
|
||||
.SelectionStart = .TextLength
|
||||
.SelectionColor = CType(IIf(checkResult, Color.Green, Color.Red), Color)
|
||||
.AppendText($"{log}{vbNewLine}")
|
||||
|
||||
recordCount += 1
|
||||
|
||||
.ScrollToCaret()
|
||||
.Enabled = True
|
||||
End With
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub SaveLogFile()
|
||||
Dim dirPath As String = $"{Application.StartupPath}\Log"
|
||||
Dim filePath As String = $"{dirPath}\Log_{Now:yyyyMMdd_HHmmss}.txt"
|
||||
|
||||
If IO.Directory.Exists(dirPath) = False Then IO.Directory.CreateDirectory(dirPath)
|
||||
RtxRecord.SaveFile(filePath, RichTextBoxStreamType.TextTextOleObjs)
|
||||
End Sub
|
||||
|
||||
Private Sub CboProductionLines_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboProductionLines.SelectedIndexChanged
|
||||
ProductionLineChanged()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region "相机"
|
||||
Private ReadOnly _imgControl(1) As PictureBox
|
||||
|
||||
Private ReadOnly _camera(1) As VideoCapture
|
||||
|
||||
Private ReadOnly _frameChanged(1) As Boolean
|
||||
|
||||
Private _selectFrameSizeIndex As Integer
|
||||
|
||||
Private ReadOnly _cameraFrame() As Size = {New Size(640, 480), New Size(1280, 960), New Size(2048, 1536), New Size(2560, 1920), New Size(3200, 2400), New Size(3840, 2880)}
|
||||
|
||||
|
||||
Private Sub UpdateText(w As Integer, h As Integer, fps As Double)
|
||||
If InvokeRequired Then
|
||||
Invoke(New Action(Sub()
|
||||
Text = $"{Application.ProductName} {Application.ProductVersion} Camera : {w} * {h} : {CInt(fps)} Fps"
|
||||
End Sub))
|
||||
Else
|
||||
Text = $"{Application.ProductName} {Application.ProductVersion} Camera : {w} * {h} : {CInt(fps)} Fps"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 打开摄像头显示图像
|
||||
''' </summary>
|
||||
Private Sub OpenVideoThread(state As Object)
|
||||
Dim index As Integer = CInt(state)
|
||||
While _useCamera
|
||||
|
||||
Thread.Sleep(10)
|
||||
|
||||
If _doubleCarera = False AndAlso index = 1 Then
|
||||
|
||||
If _camera(index) IsNot Nothing Then
|
||||
_camera(index).Release()
|
||||
_camera(index).Dispose()
|
||||
_camera(index) = Nothing
|
||||
_imgControl(index).Image = Nothing
|
||||
End If
|
||||
|
||||
Continue While
|
||||
End If
|
||||
|
||||
If _camera(index) Is Nothing Then
|
||||
_camera(index) = New VideoCapture(index) '打开默认的相机使用默认为0
|
||||
|
||||
'摄像头为4:3
|
||||
If _selectFrameSizeIndex <> -1 Then
|
||||
_camera(index).FrameWidth = _cameraFrame(_selectFrameSizeIndex).Width
|
||||
_camera(index).FrameHeight = _cameraFrame(_selectFrameSizeIndex).Height
|
||||
Else
|
||||
_camera(index).FrameWidth = 2560
|
||||
_camera(index).FrameHeight = 1920
|
||||
End If
|
||||
|
||||
_camera(index).Fps = 30 '采集率FTP
|
||||
_camera(index).Saturation = 60 '图像饱和度
|
||||
_camera(index).Gain = 0 '图像增益
|
||||
_camera(index).Contrast = 0 '对比度
|
||||
_camera(index).Hue = 20 '色调
|
||||
_camera(index).Brightness = 0
|
||||
_camera(index).Exposure = 0 '曝光度
|
||||
|
||||
If _camera(index).IsOpened() = False Then
|
||||
Thread.Sleep(1000)
|
||||
Continue While
|
||||
End If
|
||||
|
||||
UpdateText(_camera(index).FrameWidth, _camera(index).FrameHeight, _camera(index).Fps)
|
||||
End If
|
||||
|
||||
If _frameChanged(index) Then
|
||||
Console.WriteLine($"分辨率切换!")
|
||||
_camera(index).Release()
|
||||
_camera(index).Dispose()
|
||||
_camera(index) = Nothing
|
||||
|
||||
_frameChanged(index) = False
|
||||
|
||||
Continue While
|
||||
End If
|
||||
|
||||
Using src As New Mat
|
||||
If _camera(index).Read(src) = False Then
|
||||
Console.WriteLine($"图像为空!")
|
||||
_camera(index).Release()
|
||||
_camera(index).Dispose()
|
||||
_camera(index) = Nothing
|
||||
|
||||
Continue While
|
||||
End If
|
||||
|
||||
Cv2.Flip(src, src, FlipMode.XY) '反转图像
|
||||
_imgControl(index).Image = src.ToBitmap
|
||||
End Using
|
||||
|
||||
GC.Collect()
|
||||
End While
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub FrmMain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
_useCamera = True
|
||||
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf OpenVideoThread), 0)
|
||||
ThreadPool.QueueUserWorkItem(New WaitCallback(AddressOf OpenVideoThread), 1)
|
||||
End Sub
|
||||
|
||||
Private Sub TsCboCameraFrame_SelectedIndexChanged(sender As Object, e As EventArgs) Handles TsCboCameraFrame.SelectedIndexChanged
|
||||
_frameChanged(0) = True
|
||||
_frameChanged(1) = True
|
||||
_selectFrameSizeIndex = TsCboCameraFrame.SelectedIndex
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RdBtnDouble_CheckedChanged(sender As Object, e As EventArgs) Handles RdBtnDouble.CheckedChanged
|
||||
_doubleCarera = RdBtnDouble.Checked
|
||||
End Sub
|
||||
|
||||
Private Sub RtxRecord_TextChanged(sender As Object, e As EventArgs) Handles RtxRecord.TextChanged
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
51
AUTS_AOI/FtpService.vb
Normal file
51
AUTS_AOI/FtpService.vb
Normal file
@@ -0,0 +1,51 @@
|
||||
Imports FluentFTP
|
||||
|
||||
Public Class FtpService
|
||||
Private _ftpUser As String
|
||||
Private _ftpPwd As String
|
||||
Private _ftpPort As Integer
|
||||
Private _ftpHost As String
|
||||
|
||||
Sub New(host As String, port As Integer, user As String, pwd As String)
|
||||
_ftpHost = host
|
||||
_ftpPort = port
|
||||
_ftpUser = user
|
||||
_ftpPwd = pwd
|
||||
End Sub
|
||||
|
||||
Private Sub OnValidateCertificate(control As FtpClient, e As FtpSslValidationEventArgs)
|
||||
e.Accept = True
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 文件上传,覆盖式上传,文件夹不存在则回创建文件夹
|
||||
''' </summary>
|
||||
Public Sub UploadFile(remotePath As String, loadPath As String)
|
||||
Using ftpClient As New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
||||
|
||||
ftpClient.Connect()
|
||||
ftpClient.UploadFile(loadPath, remotePath, FtpRemoteExists.Overwrite, True)
|
||||
ftpClient.Disconnect()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 文件下载
|
||||
''' 从FTP下载压缩包,到本地指定路径
|
||||
''' </summary>
|
||||
Public Sub DownloadFile(remotePath As String, loadPath As String)
|
||||
Using ftpClient As New FtpClient(_ftpHost, _ftpPort, _ftpUser, _ftpPwd)
|
||||
AddHandler ftpClient.ValidateCertificate, AddressOf OnValidateCertificate
|
||||
ftpClient.EncryptionMode = FtpEncryptionMode.Auto
|
||||
|
||||
ftpClient.Connect()
|
||||
ftpClient.DownloadFile(loadPath, remotePath)
|
||||
ftpClient.Disconnect()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
3
AUTS_AOI/IFailTip.vb
Normal file
3
AUTS_AOI/IFailTip.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Interface IFailTip
|
||||
Sub UpdateFailTips(failTips() As String)
|
||||
End Interface
|
||||
15
AUTS_AOI/IStatisticsObserver.vb
Normal file
15
AUTS_AOI/IStatisticsObserver.vb
Normal file
@@ -0,0 +1,15 @@
|
||||
Public Interface IStatisticsObserver
|
||||
Sub UpdateFailCount(failCount As Integer)
|
||||
|
||||
Sub UpdatePassCount(passCount As Integer)
|
||||
|
||||
|
||||
Sub UpdateValidCount(validCount As Integer)
|
||||
|
||||
Sub UpdateInvalidCount(invalidCount As Integer)
|
||||
|
||||
Sub UpdateSumCount(sumCount As Integer)
|
||||
|
||||
|
||||
Sub UpdateYield(yield As Double)
|
||||
End Interface
|
||||
38
AUTS_AOI/My Project/Application.Designer.vb
generated
Normal file
38
AUTS_AOI/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'注意:此文件是自动生成的;请勿直接进行修改。若要更改,
|
||||
' 或者如果您在此文件中遇到生成错误,请转至项目设计器
|
||||
' (转至“项目属性”或在解决方案资源管理器中双击“我的项目”节点),
|
||||
' 然后在“应用程序”选项卡中进行更改。
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.AUTS_AOI.FrmMain
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
AUTS_AOI/My Project/Application.myapp
Normal file
10
AUTS_AOI/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>FrmMain</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
AUTS_AOI/My Project/AssemblyInfo.vb
Normal file
35
AUTS_AOI/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' 有关程序集的一般信息由以下
|
||||
' 控制。更改这些特性值可修改
|
||||
' 与程序集关联的信息。
|
||||
|
||||
'查看程序集特性的值
|
||||
|
||||
<Assembly: AssemblyTitle("AUTS_AOI")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("AUTS_AOI")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2021")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||
<Assembly: Guid("17469f21-f87e-49db-a07a-eab96b4e1476")>
|
||||
|
||||
' 程序集的版本信息由下列四个值组成:
|
||||
'
|
||||
' 主版本
|
||||
' 次版本
|
||||
' 生成号
|
||||
' 修订号
|
||||
'
|
||||
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
'通过使用 "*",如下所示:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.3.1.0")>
|
||||
63
AUTS_AOI/My Project/Resources.Designer.vb
generated
Normal file
63
AUTS_AOI/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'此类是由 StronglyTypedResourceBuilder
|
||||
'类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
'若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
'(以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
'''<summary>
|
||||
''' 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' 返回此类使用的缓存的 ResourceManager 实例。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AUTS_AOI.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 重写当前线程的 CurrentUICulture 属性,对
|
||||
''' 使用此强类型资源类的所有资源查找执行重写。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
AUTS_AOI/My Project/Resources.resx
Normal file
117
AUTS_AOI/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
145
AUTS_AOI/My Project/Settings.Designer.vb
generated
Normal file
145
AUTS_AOI/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,145 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings 自动保存功能"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property Project() As String
|
||||
Get
|
||||
Return CType(Me("Project"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("Project") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property ProcessStation() As String
|
||||
Get
|
||||
Return CType(Me("ProcessStation"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("ProcessStation") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property ProductionLine() As String
|
||||
Get
|
||||
Return CType(Me("ProductionLine"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("ProductionLine") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("True")> _
|
||||
Public Property UseCamera() As Boolean
|
||||
Get
|
||||
Return CType(Me("UseCamera"),Boolean)
|
||||
End Get
|
||||
Set
|
||||
Me("UseCamera") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("4")> _
|
||||
Public Property CameraFrameIndex() As Integer
|
||||
Get
|
||||
Return CType(Me("CameraFrameIndex"),Integer)
|
||||
End Get
|
||||
Set
|
||||
Me("CameraFrameIndex") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("True")> _
|
||||
Public Property DoubleCamera() As Boolean
|
||||
Get
|
||||
Return CType(Me("DoubleCamera"),Boolean)
|
||||
End Get
|
||||
Set
|
||||
Me("DoubleCamera") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.AUTS_AOI.My.MySettings
|
||||
Get
|
||||
Return Global.AUTS_AOI.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
24
AUTS_AOI/My Project/Settings.settings
Normal file
24
AUTS_AOI/My Project/Settings.settings
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Project" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ProcessStation" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ProductionLine" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="UseCamera" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="CameraFrameIndex" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">4</Value>
|
||||
</Setting>
|
||||
<Setting Name="DoubleCamera" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
161
AUTS_AOI/Statistics.vb
Normal file
161
AUTS_AOI/Statistics.vb
Normal file
@@ -0,0 +1,161 @@
|
||||
''' <summary>
|
||||
''' 生产统计类(当前类线程仅限同步中使用)
|
||||
''' </summary>
|
||||
Public Class Statistics
|
||||
''' <summary>
|
||||
''' 校验总数,包含有效校验与无效检验
|
||||
''' </summary>
|
||||
Private _checkCount As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 检验有效总数中无效总数
|
||||
''' </summary>
|
||||
Private _invalidCount As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 检验总数中有效总数
|
||||
''' </summary>
|
||||
Private _validCount As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 检验有效总数中失败总数
|
||||
''' </summary>
|
||||
Private _failCount As Integer
|
||||
''' <summary>
|
||||
''' 检验有效总数中通过总数
|
||||
''' </summary>
|
||||
Private _passCount As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 产品运行时良品率,通过总数除以有效总数
|
||||
''' </summary>
|
||||
Private _yield As Double
|
||||
|
||||
Private ReadOnly _observerList As List(Of IStatisticsObserver)
|
||||
|
||||
Sub New()
|
||||
_checkCount = 0
|
||||
_failCount = 0
|
||||
_passCount = 0
|
||||
|
||||
_observerList = New List(Of IStatisticsObserver)()
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property CheckCount() As Integer
|
||||
Get
|
||||
Return _checkCount
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property InvalidCount() As Integer
|
||||
Get
|
||||
Return _invalidCount
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Public ReadOnly Property FailCount() As Integer
|
||||
Get
|
||||
Return _failCount
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PassCount() As Integer
|
||||
Get
|
||||
Return _passCount
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub AddFailCount()
|
||||
_failCount += 1
|
||||
UpdateFailCount(_failCount)
|
||||
|
||||
_validCount +=1
|
||||
UpdateValidCount(_validCount)
|
||||
|
||||
_checkCount += 1
|
||||
UpdateSumCount(_checkCount)
|
||||
|
||||
|
||||
_yield = (_passCount / _validCount) * 100
|
||||
UpdateYield(_yield)
|
||||
End Sub
|
||||
|
||||
Public Sub AddPassCount()
|
||||
_passCount += 1
|
||||
UpdatePassCount(_passCount)
|
||||
|
||||
_validCount +=1
|
||||
UpdateValidCount(_validCount)
|
||||
|
||||
_checkCount += 1
|
||||
UpdateSumCount(_checkCount)
|
||||
|
||||
_yield = (_passCount / _validCount) * 100
|
||||
UpdateYield(_yield)
|
||||
End Sub
|
||||
|
||||
Public Sub AddInvalidCount()
|
||||
_invalidCount += 1
|
||||
UpdateInvalidCount(_invalidCount)
|
||||
|
||||
_checkCount += 1
|
||||
UpdateSumCount(_checkCount)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub AddStatisticsObserver(observer As IStatisticsObserver)
|
||||
_observerList.Add(observer)
|
||||
End Sub
|
||||
|
||||
Public Sub RemoveStatisticsObserver(observer As IStatisticsObserver)
|
||||
_observerList.Remove(observer)
|
||||
End Sub
|
||||
|
||||
Public Sub ClearStatisticsObserver()
|
||||
_observerList.Clear()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub UpdateFailCount(count As Integer)
|
||||
For Each observer As IStatisticsObserver In _observerList
|
||||
observer.UpdateFailCount(count)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub UpdatePassCount(count As Integer)
|
||||
For Each observer As IStatisticsObserver In _observerList
|
||||
observer.UpdatePassCount(count)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub UpdateValidCount(count As Integer)
|
||||
For Each observer As IStatisticsObserver In _observerList
|
||||
observer.UpdateValidCount(count)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateInvalidCount(count As Integer)
|
||||
For Each observer As IStatisticsObserver In _observerList
|
||||
observer.UpdateInvalidCount(count)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub UpdateSumCount(count As Integer)
|
||||
For Each observer As IStatisticsObserver In _observerList
|
||||
observer.UpdateSumCount(count)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateYield(yield As Double)
|
||||
For Each observer As IStatisticsObserver In _observerList
|
||||
observer.UpdateYield(yield)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
BIN
AUTS_AOI/iconfinder_Instagram_571111.ico
Normal file
BIN
AUTS_AOI/iconfinder_Instagram_571111.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 107 KiB |
12
AUTS_AOI/packages.config
Normal file
12
AUTS_AOI/packages.config
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="OpenCvSharp4" version="4.6.0.20220608" targetFramework="net48" />
|
||||
<package id="OpenCvSharp4.Extensions" version="4.6.0.20220608" targetFramework="net48" />
|
||||
<package id="OpenCvSharp4.runtime.win" version="4.6.0.20220608" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.6.0" targetFramework="net48" />
|
||||
<package id="System.Drawing.Common" version="6.0.0" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net48" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
|
||||
</packages>
|
||||
147
AUTS_Assembly/AUTS_Assembly.vbproj
Normal file
147
AUTS_Assembly/AUTS_Assembly.vbproj
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8DAB8B67-D59B-4413-9024-8FA8EBBE821D}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>AUTS_Assembly.My.MyApplication</StartupObject>
|
||||
<RootNamespace>AUTS_Assembly</RootNamespace>
|
||||
<AssemblyName>AUTS_Assembly</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>AUTS_Assembly.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>AUTS_Assembly.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>On</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>Off</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>iconfinder_60_939814.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentFTP">
|
||||
<HintPath>..\packages\FluentFTP.33.0.3\lib\net45\FluentFTP.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>..\UTS_Core\bin\Debug\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ApplicationEvents.vb" />
|
||||
<Compile Include="FrmMain.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmMain.Designer.vb">
|
||||
<DependentUpon>FrmMain.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FrmMain.resx">
|
||||
<DependentUpon>FrmMain.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="iconfinder_60_939814.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
|
||||
<Project>{33c6456c-f00d-41ac-a6fb-db0601495c6a}</Project>
|
||||
<Name>UTS_Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
50
AUTS_Assembly/App.config
Normal file
50
AUTS_Assembly/App.config
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="AUTS_Assembly.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.30.1.0" newVersion="3.30.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<userSettings>
|
||||
<AUTS_Assembly.My.MySettings>
|
||||
<setting name="Project" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ProcessStation" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ProductionLine" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="SingleSn" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="BarCount" serializeAs="String">
|
||||
<value>1</value>
|
||||
</setting>
|
||||
</AUTS_Assembly.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
10
AUTS_Assembly/ApplicationEvents.vb
Normal file
10
AUTS_Assembly/ApplicationEvents.vb
Normal file
@@ -0,0 +1,10 @@
|
||||
Namespace My
|
||||
' 以下事件可用于 MyApplication:
|
||||
' Startup:应用程序启动时在创建启动窗体之前引发。
|
||||
' Shutdown:在关闭所有应用程序窗体后引发。如果应用程序非正常终止,则不会引发此事件。
|
||||
' UnhandledException:在应用程序遇到未经处理的异常时引发。
|
||||
' StartupNextInstance:在启动单实例应用程序且应用程序已处于活动状态时引发。
|
||||
' NetworkAvailabilityChanged:在连接或断开网络连接时引发。
|
||||
Partial Friend Class MyApplication
|
||||
End Class
|
||||
End Namespace
|
||||
416
AUTS_Assembly/FrmMain.Designer.vb
generated
Normal file
416
AUTS_Assembly/FrmMain.Designer.vb
generated
Normal file
@@ -0,0 +1,416 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FrmMain
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Windows 窗体设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||
'可以使用 Windows 窗体设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmMain))
|
||||
Me.lab_Result = New System.Windows.Forms.Label()
|
||||
Me.lab_ModelName = New System.Windows.Forms.Label()
|
||||
Me.BtnOpenProject = New System.Windows.Forms.Button()
|
||||
Me.BtnStartProgramming = New System.Windows.Forms.Button()
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.TxtThirdRecord = New System.Windows.Forms.TextBox()
|
||||
Me.TxtFifthRecord = New System.Windows.Forms.TextBox()
|
||||
Me.TxtFourthRecord = New System.Windows.Forms.TextBox()
|
||||
Me.RadFour = New System.Windows.Forms.RadioButton()
|
||||
Me.RadThree = New System.Windows.Forms.RadioButton()
|
||||
Me.RadTwo = New System.Windows.Forms.RadioButton()
|
||||
Me.RadSingle = New System.Windows.Forms.RadioButton()
|
||||
Me.TxtSecondRecord = New System.Windows.Forms.TextBox()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.TxtFirstRecord = New System.Windows.Forms.TextBox()
|
||||
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||
Me.RtxLog = New System.Windows.Forms.RichTextBox()
|
||||
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
|
||||
Me.CboProductionLines = New System.Windows.Forms.ComboBox()
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.TssLblProductionLine = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblStaion = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TsLblCheckSum = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblPassCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblFailCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblYield = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.GroupBox3.SuspendLayout()
|
||||
Me.GroupBox4.SuspendLayout()
|
||||
Me.StatusStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lab_Result
|
||||
'
|
||||
Me.lab_Result.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lab_Result.BackColor = System.Drawing.Color.Black
|
||||
Me.lab_Result.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
|
||||
Me.lab_Result.Font = New System.Drawing.Font("Consolas", 27.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lab_Result.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer))
|
||||
Me.lab_Result.Location = New System.Drawing.Point(447, 84)
|
||||
Me.lab_Result.Name = "lab_Result"
|
||||
Me.lab_Result.Size = New System.Drawing.Size(433, 112)
|
||||
Me.lab_Result.TabIndex = 13
|
||||
Me.lab_Result.Text = "PASS"
|
||||
Me.lab_Result.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'lab_ModelName
|
||||
'
|
||||
Me.lab_ModelName.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lab_ModelName.BackColor = System.Drawing.SystemColors.ActiveCaption
|
||||
Me.lab_ModelName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
|
||||
Me.lab_ModelName.Font = New System.Drawing.Font("Consolas", 27.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lab_ModelName.Location = New System.Drawing.Point(447, 9)
|
||||
Me.lab_ModelName.Name = "lab_ModelName"
|
||||
Me.lab_ModelName.Size = New System.Drawing.Size(433, 67)
|
||||
Me.lab_ModelName.TabIndex = 12
|
||||
Me.lab_ModelName.Text = "SW-570"
|
||||
Me.lab_ModelName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'BtnOpenProject
|
||||
'
|
||||
Me.BtnOpenProject.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.BtnOpenProject.Font = New System.Drawing.Font("微软雅黑", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.BtnOpenProject.Location = New System.Drawing.Point(447, 204)
|
||||
Me.BtnOpenProject.Name = "BtnOpenProject"
|
||||
Me.BtnOpenProject.Size = New System.Drawing.Size(169, 104)
|
||||
Me.BtnOpenProject.TabIndex = 11
|
||||
Me.BtnOpenProject.Text = "选择项目"
|
||||
Me.BtnOpenProject.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BtnStartProgramming
|
||||
'
|
||||
Me.BtnStartProgramming.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.BtnStartProgramming.Font = New System.Drawing.Font("微软雅黑", 24.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.BtnStartProgramming.ForeColor = System.Drawing.Color.Blue
|
||||
Me.BtnStartProgramming.Location = New System.Drawing.Point(622, 204)
|
||||
Me.BtnStartProgramming.Name = "BtnStartProgramming"
|
||||
Me.BtnStartProgramming.Size = New System.Drawing.Size(258, 104)
|
||||
Me.BtnStartProgramming.TabIndex = 10
|
||||
Me.BtnStartProgramming.Text = "开始录入"
|
||||
Me.BtnStartProgramming.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox2.Controls.Add(Me.TxtThirdRecord)
|
||||
Me.GroupBox2.Controls.Add(Me.TxtFifthRecord)
|
||||
Me.GroupBox2.Controls.Add(Me.TxtFourthRecord)
|
||||
Me.GroupBox2.Controls.Add(Me.RadFour)
|
||||
Me.GroupBox2.Controls.Add(Me.RadThree)
|
||||
Me.GroupBox2.Controls.Add(Me.RadTwo)
|
||||
Me.GroupBox2.Controls.Add(Me.RadSingle)
|
||||
Me.GroupBox2.Controls.Add(Me.TxtSecondRecord)
|
||||
Me.GroupBox2.Font = New System.Drawing.Font("微软雅黑", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox2.ForeColor = System.Drawing.Color.Blue
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(3, 143)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(439, 165)
|
||||
Me.GroupBox2.TabIndex = 15
|
||||
Me.GroupBox2.TabStop = False
|
||||
Me.GroupBox2.Text = "其他序号"
|
||||
'
|
||||
'TxtThirdRecord
|
||||
'
|
||||
Me.TxtThirdRecord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TxtThirdRecord.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
|
||||
Me.TxtThirdRecord.Font = New System.Drawing.Font("微软雅黑", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TxtThirdRecord.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtThirdRecord.Location = New System.Drawing.Point(0, 72)
|
||||
Me.TxtThirdRecord.Multiline = True
|
||||
Me.TxtThirdRecord.Name = "TxtThirdRecord"
|
||||
Me.TxtThirdRecord.Size = New System.Drawing.Size(433, 26)
|
||||
Me.TxtThirdRecord.TabIndex = 11
|
||||
Me.TxtThirdRecord.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'TxtFifthRecord
|
||||
'
|
||||
Me.TxtFifthRecord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TxtFifthRecord.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
|
||||
Me.TxtFifthRecord.Font = New System.Drawing.Font("微软雅黑", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TxtFifthRecord.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtFifthRecord.Location = New System.Drawing.Point(0, 134)
|
||||
Me.TxtFifthRecord.Name = "TxtFifthRecord"
|
||||
Me.TxtFifthRecord.Size = New System.Drawing.Size(433, 29)
|
||||
Me.TxtFifthRecord.TabIndex = 10
|
||||
Me.TxtFifthRecord.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'TxtFourthRecord
|
||||
'
|
||||
Me.TxtFourthRecord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TxtFourthRecord.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
|
||||
Me.TxtFourthRecord.Font = New System.Drawing.Font("微软雅黑", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TxtFourthRecord.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtFourthRecord.Location = New System.Drawing.Point(0, 103)
|
||||
Me.TxtFourthRecord.Multiline = True
|
||||
Me.TxtFourthRecord.Name = "TxtFourthRecord"
|
||||
Me.TxtFourthRecord.Size = New System.Drawing.Size(433, 26)
|
||||
Me.TxtFourthRecord.TabIndex = 9
|
||||
Me.TxtFourthRecord.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'RadFour
|
||||
'
|
||||
Me.RadFour.AutoSize = True
|
||||
Me.RadFour.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.RadFour.Location = New System.Drawing.Point(370, 15)
|
||||
Me.RadFour.Name = "RadFour"
|
||||
Me.RadFour.Size = New System.Drawing.Size(62, 21)
|
||||
Me.RadFour.TabIndex = 8
|
||||
Me.RadFour.TabStop = True
|
||||
Me.RadFour.Tag = "4"
|
||||
Me.RadFour.Text = "四条码"
|
||||
Me.RadFour.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RadThree
|
||||
'
|
||||
Me.RadThree.AutoSize = True
|
||||
Me.RadThree.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.RadThree.Location = New System.Drawing.Point(281, 15)
|
||||
Me.RadThree.Name = "RadThree"
|
||||
Me.RadThree.Size = New System.Drawing.Size(62, 21)
|
||||
Me.RadThree.TabIndex = 7
|
||||
Me.RadThree.TabStop = True
|
||||
Me.RadThree.Tag = "3"
|
||||
Me.RadThree.Text = "三条码"
|
||||
Me.RadThree.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RadTwo
|
||||
'
|
||||
Me.RadTwo.AutoSize = True
|
||||
Me.RadTwo.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.RadTwo.Location = New System.Drawing.Point(192, 15)
|
||||
Me.RadTwo.Name = "RadTwo"
|
||||
Me.RadTwo.Size = New System.Drawing.Size(62, 21)
|
||||
Me.RadTwo.TabIndex = 6
|
||||
Me.RadTwo.TabStop = True
|
||||
Me.RadTwo.Tag = "2"
|
||||
Me.RadTwo.Text = "双条码"
|
||||
Me.RadTwo.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RadSingle
|
||||
'
|
||||
Me.RadSingle.AutoSize = True
|
||||
Me.RadSingle.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.RadSingle.Location = New System.Drawing.Point(103, 15)
|
||||
Me.RadSingle.Name = "RadSingle"
|
||||
Me.RadSingle.Size = New System.Drawing.Size(62, 21)
|
||||
Me.RadSingle.TabIndex = 5
|
||||
Me.RadSingle.TabStop = True
|
||||
Me.RadSingle.Tag = "1"
|
||||
Me.RadSingle.Text = "单条码"
|
||||
Me.RadSingle.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TxtSecondRecord
|
||||
'
|
||||
Me.TxtSecondRecord.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TxtSecondRecord.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
|
||||
Me.TxtSecondRecord.Font = New System.Drawing.Font("微软雅黑", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TxtSecondRecord.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtSecondRecord.Location = New System.Drawing.Point(0, 41)
|
||||
Me.TxtSecondRecord.Name = "TxtSecondRecord"
|
||||
Me.TxtSecondRecord.Size = New System.Drawing.Size(433, 29)
|
||||
Me.TxtSecondRecord.TabIndex = 2
|
||||
Me.TxtSecondRecord.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox1.Controls.Add(Me.TxtFirstRecord)
|
||||
Me.GroupBox1.Font = New System.Drawing.Font("微软雅黑", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(3, 72)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(439, 65)
|
||||
Me.GroupBox1.TabIndex = 16
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "成品序号"
|
||||
'
|
||||
'TxtFirstRecord
|
||||
'
|
||||
Me.TxtFirstRecord.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper
|
||||
Me.TxtFirstRecord.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TxtFirstRecord.Font = New System.Drawing.Font("微软雅黑", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TxtFirstRecord.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtFirstRecord.Location = New System.Drawing.Point(3, 30)
|
||||
Me.TxtFirstRecord.Name = "TxtFirstRecord"
|
||||
Me.TxtFirstRecord.Size = New System.Drawing.Size(433, 29)
|
||||
Me.TxtFirstRecord.TabIndex = 1
|
||||
Me.TxtFirstRecord.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox3.Controls.Add(Me.RtxLog)
|
||||
Me.GroupBox3.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(0, 314)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(878, 245)
|
||||
Me.GroupBox3.TabIndex = 17
|
||||
Me.GroupBox3.TabStop = False
|
||||
Me.GroupBox3.Text = "录入记录"
|
||||
'
|
||||
'RtxLog
|
||||
'
|
||||
Me.RtxLog.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxLog.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxLog.Location = New System.Drawing.Point(3, 22)
|
||||
Me.RtxLog.Name = "RtxLog"
|
||||
Me.RtxLog.Size = New System.Drawing.Size(872, 220)
|
||||
Me.RtxLog.TabIndex = 0
|
||||
Me.RtxLog.Text = ""
|
||||
'
|
||||
'GroupBox4
|
||||
'
|
||||
Me.GroupBox4.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox4.Controls.Add(Me.CboProductionLines)
|
||||
Me.GroupBox4.Font = New System.Drawing.Font("微软雅黑", 15.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox4.Location = New System.Drawing.Point(3, 2)
|
||||
Me.GroupBox4.Name = "GroupBox4"
|
||||
Me.GroupBox4.Size = New System.Drawing.Size(439, 64)
|
||||
Me.GroupBox4.TabIndex = 18
|
||||
Me.GroupBox4.TabStop = False
|
||||
Me.GroupBox4.Text = "产线"
|
||||
'
|
||||
'CboProductionLines
|
||||
'
|
||||
Me.CboProductionLines.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CboProductionLines.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboProductionLines.Font = New System.Drawing.Font("微软雅黑", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CboProductionLines.ForeColor = System.Drawing.Color.Gray
|
||||
Me.CboProductionLines.FormattingEnabled = True
|
||||
Me.CboProductionLines.Items.AddRange(New Object() {"Q1", "Q2", "Q3", "Q4"})
|
||||
Me.CboProductionLines.Location = New System.Drawing.Point(3, 30)
|
||||
Me.CboProductionLines.Name = "CboProductionLines"
|
||||
Me.CboProductionLines.Size = New System.Drawing.Size(433, 34)
|
||||
Me.CboProductionLines.TabIndex = 0
|
||||
Me.CboProductionLines.TabStop = False
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TssLblProductionLine, Me.TssLblStaion, Me.TsLblCheckSum, Me.TssLblPassCount, Me.TssLblFailCount, Me.TssLblYield})
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 563)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(880, 22)
|
||||
Me.StatusStrip1.TabIndex = 19
|
||||
Me.StatusStrip1.Text = "StatusStrip1"
|
||||
'
|
||||
'TssLblProductionLine
|
||||
'
|
||||
Me.TssLblProductionLine.ForeColor = System.Drawing.Color.Black
|
||||
Me.TssLblProductionLine.Name = "TssLblProductionLine"
|
||||
Me.TssLblProductionLine.Size = New System.Drawing.Size(44, 17)
|
||||
Me.TssLblProductionLine.Text = "A-Line"
|
||||
'
|
||||
'TssLblStaion
|
||||
'
|
||||
Me.TssLblStaion.ForeColor = System.Drawing.Color.Black
|
||||
Me.TssLblStaion.Name = "TssLblStaion"
|
||||
Me.TssLblStaion.Size = New System.Drawing.Size(68, 17)
|
||||
Me.TssLblStaion.Text = "BLV-12 A1"
|
||||
'
|
||||
'TsLblCheckSum
|
||||
'
|
||||
Me.TsLblCheckSum.Name = "TsLblCheckSum"
|
||||
Me.TsLblCheckSum.Size = New System.Drawing.Size(64, 17)
|
||||
Me.TsLblCheckSum.Text = "Sum:0000"
|
||||
'
|
||||
'TssLblPassCount
|
||||
'
|
||||
Me.TssLblPassCount.Name = "TssLblPassCount"
|
||||
Me.TssLblPassCount.Size = New System.Drawing.Size(65, 17)
|
||||
Me.TssLblPassCount.Text = "Pass:0000"
|
||||
'
|
||||
'TssLblFailCount
|
||||
'
|
||||
Me.TssLblFailCount.Name = "TssLblFailCount"
|
||||
Me.TssLblFailCount.Size = New System.Drawing.Size(58, 17)
|
||||
Me.TssLblFailCount.Text = "Fail:0000"
|
||||
'
|
||||
'TssLblYield
|
||||
'
|
||||
Me.TssLblYield.Name = "TssLblYield"
|
||||
Me.TssLblYield.Size = New System.Drawing.Size(81, 17)
|
||||
Me.TssLblYield.Text = "Yield:00.00%"
|
||||
'
|
||||
'FrmMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 12!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(880, 585)
|
||||
Me.Controls.Add(Me.StatusStrip1)
|
||||
Me.Controls.Add(Me.GroupBox4)
|
||||
Me.Controls.Add(Me.GroupBox3)
|
||||
Me.Controls.Add(Me.GroupBox2)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.Controls.Add(Me.lab_Result)
|
||||
Me.Controls.Add(Me.lab_ModelName)
|
||||
Me.Controls.Add(Me.BtnOpenProject)
|
||||
Me.Controls.Add(Me.BtnStartProgramming)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon)
|
||||
Me.Name = "FrmMain"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Form1"
|
||||
Me.GroupBox2.ResumeLayout(false)
|
||||
Me.GroupBox2.PerformLayout
|
||||
Me.GroupBox1.ResumeLayout(false)
|
||||
Me.GroupBox1.PerformLayout
|
||||
Me.GroupBox3.ResumeLayout(false)
|
||||
Me.GroupBox4.ResumeLayout(false)
|
||||
Me.StatusStrip1.ResumeLayout(false)
|
||||
Me.StatusStrip1.PerformLayout
|
||||
Me.ResumeLayout(false)
|
||||
Me.PerformLayout
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents lab_Result As Label
|
||||
Friend WithEvents lab_ModelName As Label
|
||||
Friend WithEvents BtnOpenProject As Button
|
||||
Friend WithEvents BtnStartProgramming As Button
|
||||
Friend WithEvents GroupBox2 As GroupBox
|
||||
Friend WithEvents TxtSecondRecord As TextBox
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents TxtFirstRecord As TextBox
|
||||
Friend WithEvents GroupBox3 As GroupBox
|
||||
Friend WithEvents RtxLog As RichTextBox
|
||||
Friend WithEvents GroupBox4 As GroupBox
|
||||
Friend WithEvents CboProductionLines As ComboBox
|
||||
Friend WithEvents StatusStrip1 As StatusStrip
|
||||
Friend WithEvents TssLblProductionLine As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblStaion As ToolStripStatusLabel
|
||||
Friend WithEvents TsLblCheckSum As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblPassCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblFailCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblYield As ToolStripStatusLabel
|
||||
Friend WithEvents RadSingle As RadioButton
|
||||
Friend WithEvents RadTwo As RadioButton
|
||||
Friend WithEvents RadThree As RadioButton
|
||||
Friend WithEvents RadFour As RadioButton
|
||||
Friend WithEvents TxtFourthRecord As TextBox
|
||||
Friend WithEvents TxtFifthRecord As TextBox
|
||||
Friend WithEvents TxtThirdRecord As TextBox
|
||||
End Class
|
||||
6296
AUTS_Assembly/FrmMain.resx
Normal file
6296
AUTS_Assembly/FrmMain.resx
Normal file
File diff suppressed because it is too large
Load Diff
382
AUTS_Assembly/FrmMain.vb
Normal file
382
AUTS_Assembly/FrmMain.vb
Normal file
@@ -0,0 +1,382 @@
|
||||
Imports System.Text
|
||||
Imports UTS_Core.UTSModule
|
||||
Imports UTS_Core.UTSModule.Station
|
||||
Imports UTS_Core.UTSModule.Test
|
||||
|
||||
Public Class FrmMain
|
||||
Implements IProcessStation
|
||||
Implements IProductionLine
|
||||
|
||||
Private _utsApp As UtsAppForm
|
||||
|
||||
Private _txtList As New List(Of TextBox)
|
||||
|
||||
''' <summary>
|
||||
''' 条码总数
|
||||
''' </summary>
|
||||
Private _barCodeCount As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 测试总数
|
||||
''' </summary>
|
||||
Private _testCount As Integer = 0
|
||||
''' <summary>
|
||||
''' 测试成功总数
|
||||
''' </summary>
|
||||
Private _testFailCount As Integer = 0
|
||||
''' <summary>
|
||||
''' 测试失败总数
|
||||
''' </summary>
|
||||
Private _testPassCount As Integer = 0
|
||||
|
||||
|
||||
Public Sub ProductionLineChanged() Implements IProductionLine.ProductionLineChanged
|
||||
TssLblProductionLine.Text = CboProductionLines.Text
|
||||
|
||||
My.Settings.ProductionLine = CboProductionLines.Text
|
||||
End Sub
|
||||
|
||||
Public Sub StationChanged() Implements IProcessStation.StationChanged
|
||||
My.Settings.Project = _utsApp.ProcessStation.ParentProject.Name
|
||||
My.Settings.ProcessStation = _utsApp.ProcessStation.Name
|
||||
|
||||
UpdateStation(_utsApp.ProcessStation.ParentProject.Name, _utsApp.ProcessStation.Name)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateStation(projectName As String, stationName As String)
|
||||
If String.IsNullOrWhiteSpace(projectName) OrElse
|
||||
String.IsNullOrWhiteSpace(stationName) Then
|
||||
TssLblStaion.Text = $"Invalid Station"
|
||||
Else
|
||||
TssLblStaion.Text = $"{projectName} - {stationName}"
|
||||
lab_ModelName.Text = $"{projectName} - {stationName}"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
'自动保存设置
|
||||
My.Application.SaveMySettingsOnExit = True
|
||||
|
||||
'初始化UTS窗体信息,失败则关闭窗体
|
||||
If InitializeUtsApp() = False Then Return
|
||||
|
||||
'初始化界面信息
|
||||
InitializeForm()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function InitializeUtsApp() As Boolean
|
||||
_utsApp = UtsAppForm.CreateSingleton()
|
||||
|
||||
Try
|
||||
If _utsApp.IsInitialized = False Then
|
||||
_utsApp.AddStatisticsObserver(Me)
|
||||
_utsApp.Initialize(ProcessStation.StationTypeEnum.Assem)
|
||||
_utsApp.LoadStation(My.Settings.Project, My.Settings.ProcessStation)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox($"Initialize UtsForm Error:{ex.Message}")
|
||||
Close()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub InitializeForm()
|
||||
'初始化产线信息
|
||||
CboProductionLines.Items.Clear()
|
||||
CboProductionLines.Items.AddRange(_utsApp.ProductionLines.GetLineNames())
|
||||
CboProductionLines.SelectedIndex = CboProductionLines.Items.IndexOf(My.Settings.ProductionLine)
|
||||
|
||||
_txtList.Clear()
|
||||
_txtList.Add(TxtFirstRecord)
|
||||
_txtList.Add(TxtSecondRecord)
|
||||
_txtList.Add(TxtThirdRecord)
|
||||
_txtList.Add(TxtFourthRecord)
|
||||
_txtList.Add(TxtFifthRecord)
|
||||
|
||||
RtxLog.Clear()
|
||||
|
||||
_barCodeCount = My.Settings.BarCount
|
||||
If _barCodeCount < 1 Then _barCodeCount = 1
|
||||
If _barCodeCount > 4 Then _barCodeCount = 4
|
||||
Select Case _barCodeCount
|
||||
Case 1
|
||||
RadSingle.Checked = True
|
||||
Case 2
|
||||
RadTwo.Checked = True
|
||||
Case 3
|
||||
RadThree.Checked = True
|
||||
Case 4
|
||||
RadFour.Checked = True
|
||||
End Select
|
||||
|
||||
Text = $"{Application.ProductName} {Application.ProductVersion} User:{_utsApp.Account.UserName}"
|
||||
End Sub
|
||||
|
||||
Private Sub CboProductionLines_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboProductionLines.SelectedIndexChanged
|
||||
ProductionLineChanged()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnOpenProject_Click(sender As Object, e As EventArgs) Handles BtnOpenProject.Click
|
||||
Try
|
||||
_utsApp.ChangeStation()
|
||||
Catch ex As Exception
|
||||
MsgBox($"ChangeStation Error:{ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Tb_FirstRecord_KeyDown(sender As Object, e As KeyEventArgs) Handles TxtFirstRecord.KeyDown
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
|
||||
TxtSecondRecord.Focus()
|
||||
TxtSecondRecord.SelectAll()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Tb_SecondRecord_KeyDown(sender As Object, e As KeyEventArgs) Handles TxtSecondRecord.KeyDown
|
||||
If e.KeyCode <> Keys.Enter Then Return
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
|
||||
If _barCodeCount > 1 Then
|
||||
TxtThirdRecord.Focus()
|
||||
TxtThirdRecord.SelectAll()
|
||||
Else
|
||||
'此处为单个条码对应的执行逻辑
|
||||
SaveTestResult()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TxtThirdRecord_KeyDown(sender As Object, e As KeyEventArgs) Handles TxtThirdRecord.KeyDown
|
||||
If e.KeyCode <> Keys.Enter Then Return
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
|
||||
If _barCodeCount > 2 Then
|
||||
TxtFourthRecord.Focus()
|
||||
TxtFourthRecord.SelectAll()
|
||||
Else
|
||||
SaveTestResult()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TxtFourthRecord_KeyDown(sender As Object, e As KeyEventArgs) Handles TxtFourthRecord.KeyDown
|
||||
If e.KeyCode <> Keys.Enter Then Return
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
|
||||
If _barCodeCount > 3 Then
|
||||
TxtFifthRecord.Focus()
|
||||
TxtFifthRecord.SelectAll()
|
||||
Else
|
||||
SaveTestResult()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TxtFifthRecord_KeyDown(sender As Object, e As KeyEventArgs) Handles TxtFifthRecord.KeyDown
|
||||
If e.KeyCode <> Keys.Enter Then Return
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
|
||||
If _barCodeCount > 4 Then
|
||||
MsgBox("条码达到上限,请重新选择条码数")
|
||||
Else
|
||||
SaveTestResult()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BtnStartProgramming_Click(sender As Object, e As EventArgs) Handles BtnStartProgramming.Click
|
||||
SaveTestResult()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub SaveTestResult()
|
||||
If _utsApp.ProcessStation Is Nothing Then
|
||||
MsgBox($"请选择项目与测试站后再尝试录入!")
|
||||
Return
|
||||
End If
|
||||
|
||||
If String.IsNullOrWhiteSpace(CboProductionLines.Text) Then
|
||||
MsgBox($"请选择生产线后再尝试录入!")
|
||||
Return
|
||||
End If
|
||||
|
||||
If String.IsNullOrWhiteSpace(TxtFirstRecord.Text) Then
|
||||
MsgBox($"请输入成品序号!")
|
||||
TxtFirstRecord.Focus()
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim snMain As String = TxtFirstRecord.Text
|
||||
Dim sb As New StringBuilder
|
||||
Dim snLst As New List(Of String)
|
||||
snLst.Add(TxtFirstRecord.Text)
|
||||
|
||||
For i As Integer = 1 To _barCodeCount
|
||||
If String.IsNullOrWhiteSpace(_txtList(i).Text) Then
|
||||
MsgBox($"请输入第 [{i}] 个其他序号!")
|
||||
_txtList(i).Focus()
|
||||
Return
|
||||
Else
|
||||
If snLst.Contains(_txtList(i).Text) Then
|
||||
MsgBox($"第 [{i}] 个序号 [{_txtList(i).Text}] 与已有序号重复,请重新输入!")
|
||||
_txtList(i).SelectAll()
|
||||
_txtList(i).Focus()
|
||||
Return
|
||||
Else
|
||||
snLst.Add(_txtList(i).Text)
|
||||
sb.Append($"{_txtList(i).Text},")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim assemblyString As String = sb.ToString()
|
||||
|
||||
If assemblyString.Length >= 128 Then
|
||||
MsgBox($"整机序号超过128个字符,无法录入,请联系管理员!")
|
||||
Return
|
||||
End If
|
||||
|
||||
assemblyString = assemblyString.Replace(","c, ",")
|
||||
If assemblyString.EndsWith(","c) OrElse assemblyString.EndsWith(","c) Then
|
||||
assemblyString = assemblyString.Substring(0, assemblyString.Length - 1)
|
||||
End If
|
||||
|
||||
Dim saveDb As Boolean
|
||||
Try
|
||||
FillTestResult(snMain, assemblyString)
|
||||
_utsApp.CommitTestResult(uniqueRecord:=True)
|
||||
|
||||
DbConnect.DbConnector.SaveOtherSn(snLst, _utsApp.ProcessStation, _utsApp.TestResult)
|
||||
|
||||
saveDb = True
|
||||
Catch ex As Exception
|
||||
MsgBox($"测试结果录入失败:{ex.Message}")
|
||||
saveDb = False
|
||||
End Try
|
||||
|
||||
Static inputCount As Integer = 0
|
||||
inputCount += 1 : If inputCount > 9999 Then inputCount = 0
|
||||
RtxLog.SelectionStart = 0
|
||||
RtxLog.SelectionLength = RtxLog.TextLength
|
||||
RtxLog.SelectionColor = Color.Gray
|
||||
|
||||
If saveDb Then
|
||||
lab_Result.ForeColor = Color.Green
|
||||
lab_Result.Text = $"{snMain}-Pass"
|
||||
|
||||
RtxLog.SelectionStart = RtxLog.TextLength
|
||||
RtxLog.SelectionColor = Color.Green
|
||||
AppendRecord($"{inputCount:D4}.BarcodeSn:{snMain},AssemblySn:{assemblyString},录入成功!")
|
||||
_testPassCount += 1
|
||||
Else
|
||||
lab_Result.ForeColor = Color.Red
|
||||
lab_Result.Text = $"{snMain}-Fail"
|
||||
|
||||
RtxLog.SelectionStart = RtxLog.TextLength
|
||||
RtxLog.SelectionColor = Color.Red
|
||||
AppendRecord($"{inputCount:D4}.BarcodeSn:{snMain},AssemblySn:{assemblyString},录入失败!")
|
||||
_testFailCount += 1
|
||||
End If
|
||||
|
||||
_testCount += 1
|
||||
|
||||
TssLblPassCount.Text = "Pass:" & _testPassCount.ToString
|
||||
TssLblFailCount.Text = "Fail:" & _testFailCount.ToString
|
||||
TsLblCheckSum.Text = "Sum:" & _testCount.ToString
|
||||
TssLblYield.Text = "Yield:" & (_testPassCount / _testCount * 100).ToString("F2") & "%"
|
||||
|
||||
TxtFirstRecord.Focus()
|
||||
TxtFirstRecord.SelectAll()
|
||||
End Sub
|
||||
|
||||
Public Sub AppendRecord(logString As String)
|
||||
If RtxLog.InvokeRequired Then '判断是否需要开委托
|
||||
RtxLog.Invoke(New Action(Of String)(AddressOf AppendRecord), New Object() {logString})
|
||||
Return
|
||||
End If
|
||||
|
||||
With RtxLog
|
||||
If .Lines.Length > 256 Then '超过上限则移除最初行内容
|
||||
.ReadOnly = False
|
||||
.SelectionStart = 0
|
||||
.SelectionLength = .GetFirstCharIndexFromLine(1)
|
||||
.SelectedText = String.Empty
|
||||
.ReadOnly = True
|
||||
.SelectionStart = .TextLength
|
||||
End If
|
||||
|
||||
.AppendText($"{Now:yyyy:MM:dd HH:mm:ss} - {logString}{vbNewLine}")
|
||||
|
||||
.ScrollToCaret()
|
||||
End With
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 填充测试记录内容,每个应用程序这个部分有所差异
|
||||
''' </summary>
|
||||
Public Sub FillTestResult(barcodeString As String, assemblyString As String)
|
||||
_utsApp.TestResult.ResetTestResult()
|
||||
|
||||
'产线索引
|
||||
Dim lineID As Integer = _utsApp.ProductionLines(CboProductionLines.Text).ID
|
||||
_utsApp.TestResult.ProductionLineID = lineID
|
||||
|
||||
|
||||
'测试开始时间
|
||||
_utsApp.TestResult.StartTime = Now
|
||||
_utsApp.TestResult.DUT_SN = barcodeString
|
||||
_utsApp.TestResult.TestResult = TestResult.TestResultEnum.Pass
|
||||
|
||||
'自定义字段
|
||||
_utsApp.TestResult.AddCustomRecord("AssemblySn", $"{assemblyString}")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub RadSingle_CheckedChanged(sender As Object, e As EventArgs) Handles RadTwo.CheckedChanged, RadThree.CheckedChanged, RadSingle.CheckedChanged, RadFour.CheckedChanged
|
||||
Dim rad As RadioButton = CType(sender, RadioButton)
|
||||
If rad.Checked Then
|
||||
_barCodeCount = CInt(rad.Tag)
|
||||
My.Settings.BarCount = _barCodeCount
|
||||
|
||||
Select Case _barCodeCount
|
||||
Case 1
|
||||
TxtSecondRecord.Visible = True
|
||||
TxtThirdRecord.Visible = False
|
||||
TxtFourthRecord.Visible = False
|
||||
TxtFifthRecord.Visible = False
|
||||
Case 2
|
||||
TxtSecondRecord.Visible = True
|
||||
TxtThirdRecord.Visible = True
|
||||
TxtFourthRecord.Visible = False
|
||||
TxtFifthRecord.Visible = False
|
||||
Case 3
|
||||
TxtSecondRecord.Visible = True
|
||||
TxtThirdRecord.Visible = True
|
||||
TxtFourthRecord.Visible = True
|
||||
TxtFifthRecord.Visible = False
|
||||
Case 4
|
||||
TxtSecondRecord.Visible = True
|
||||
TxtThirdRecord.Visible = True
|
||||
TxtFourthRecord.Visible = True
|
||||
TxtFifthRecord.Visible = True
|
||||
End Select
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
38
AUTS_Assembly/My Project/Application.Designer.vb
generated
Normal file
38
AUTS_Assembly/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'注意:此文件是自动生成的;请勿直接进行修改。若要更改,
|
||||
' 或者如果您在此文件中遇到生成错误,请转至项目设计器
|
||||
' (转至“项目属性”或在解决方案资源管理器中双击“我的项目”节点),
|
||||
' 然后在“应用程序”选项卡中进行更改。
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.AUTS_Assembly.FrmMain
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
AUTS_Assembly/My Project/Application.myapp
Normal file
10
AUTS_Assembly/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>FrmMain</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
AUTS_Assembly/My Project/AssemblyInfo.vb
Normal file
35
AUTS_Assembly/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' 有关程序集的一般信息由以下
|
||||
' 控制。更改这些特性值可修改
|
||||
' 与程序集关联的信息。
|
||||
|
||||
'查看程序集特性的值
|
||||
|
||||
<Assembly: AssemblyTitle("AUTS_Assembly")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("AUTS_Assembly")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||
<Assembly: Guid("7916ee8a-7f3c-49af-b4b5-1446c7611ad3")>
|
||||
|
||||
' 程序集的版本信息由下列四个值组成:
|
||||
'
|
||||
' 主版本
|
||||
' 次版本
|
||||
' 生成号
|
||||
' 修订号
|
||||
'
|
||||
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
'通过使用 "*",如下所示:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.1.1")>
|
||||
<Assembly: AssemblyFileVersion("1.1.1.1")>
|
||||
63
AUTS_Assembly/My Project/Resources.Designer.vb
generated
Normal file
63
AUTS_Assembly/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'此类是由 StronglyTypedResourceBuilder
|
||||
'类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
'若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
'(以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
'''<summary>
|
||||
''' 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' 返回此类使用的缓存的 ResourceManager 实例。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AUTS_Assembly.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 重写当前线程的 CurrentUICulture 属性,对
|
||||
''' 使用此强类型资源类的所有资源查找执行重写。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
AUTS_Assembly/My Project/Resources.resx
Normal file
117
AUTS_Assembly/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
133
AUTS_Assembly/My Project/Settings.Designer.vb
generated
Normal file
133
AUTS_Assembly/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,133 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings 自动保存功能"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property Project() As String
|
||||
Get
|
||||
Return CType(Me("Project"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("Project") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property ProcessStation() As String
|
||||
Get
|
||||
Return CType(Me("ProcessStation"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("ProcessStation") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property ProductionLine() As String
|
||||
Get
|
||||
Return CType(Me("ProductionLine"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("ProductionLine") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("True")> _
|
||||
Public Property SingleSn() As Boolean
|
||||
Get
|
||||
Return CType(Me("SingleSn"),Boolean)
|
||||
End Get
|
||||
Set
|
||||
Me("SingleSn") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("1")> _
|
||||
Public Property BarCount() As Integer
|
||||
Get
|
||||
Return CType(Me("BarCount"),Integer)
|
||||
End Get
|
||||
Set
|
||||
Me("BarCount") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.AUTS_Assembly.My.MySettings
|
||||
Get
|
||||
Return Global.AUTS_Assembly.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
21
AUTS_Assembly/My Project/Settings.settings
Normal file
21
AUTS_Assembly/My Project/Settings.settings
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="Project" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ProcessStation" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ProductionLine" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="SingleSn" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="BarCount" Type="System.Int32" Scope="User">
|
||||
<Value Profile="(Default)">1</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
BIN
AUTS_Assembly/iconfinder_60_939814.ico
Normal file
BIN
AUTS_Assembly/iconfinder_60_939814.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 361 KiB |
167
AUTS_DataService/AUTS_DataService.vbproj
Normal file
167
AUTS_DataService/AUTS_DataService.vbproj
Normal file
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{163446E7-7512-4ECE-819D-AF1A139E3DFB}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>AUTS_DataService.Service1</StartupObject>
|
||||
<RootNamespace>AUTS_DataService</RootNamespace>
|
||||
<AssemblyName>AUTS_DataService</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>AUTS_DataService.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>AUTS_DataService.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>On</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>Off</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentFTP">
|
||||
<HintPath>..\packages\FluentFTP.33.0.3\lib\net45\FluentFTP.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data, Version=8.0.26.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\UTS_Core\bin\Debug\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\UTS_Core\bin\Debug\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ServiceError.vb" />
|
||||
<Compile Include="UtsGroup\ServiceGroup.vb" />
|
||||
<Compile Include="ServiceLog.vb" />
|
||||
<Compile Include="ServiceConfig.vb" />
|
||||
<Compile Include="ServiceTask\ServiceTasks.vb" />
|
||||
<Compile Include="UtsApp\UtsApp.vb" />
|
||||
<Compile Include="UtsApp\UtsAppManager.vb" />
|
||||
<Compile Include="UtsGroup\ServiceGroupManager.vb" />
|
||||
<Compile Include="UtsWeb\CheckSum.vb" />
|
||||
<Compile Include="ServiceTask\DbSynchronizer.vb" />
|
||||
<Compile Include="ServiceTask\DbSyncServiceTask.vb" />
|
||||
<Compile Include="UtsWeb\IDataPacket.vb" />
|
||||
<Compile Include="ServiceTask\JsonFileListen.vb" />
|
||||
<Compile Include="ServiceTask\ListenJsonFileServiceTask.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.Designer.vb">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ProjectInstaller.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Service1.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Service1.Designer.vb">
|
||||
<DependentUpon>Service1.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Include="ServiceSettings.vb" />
|
||||
<Compile Include="UtsWeb\UtsWebPacket.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ProjectInstaller.resx">
|
||||
<DependentUpon>ProjectInstaller.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
|
||||
<Project>{33C6456C-F00D-41AC-A6FB-DB0601495C6A}</Project>
|
||||
<Name>UTS_Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
42
AUTS_DataService/App.config
Normal file
42
AUTS_DataService/App.config
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="AUTS_DataService.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<AUTS_DataService.My.MySettings>
|
||||
<setting name="dbLogType" serializeAs="String">
|
||||
<value>30</value>
|
||||
</setting>
|
||||
</AUTS_DataService.My.MySettings>
|
||||
</userSettings>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.30.1.0" newVersion="3.30.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
13
AUTS_DataService/My Project/Application.Designer.vb
generated
Normal file
13
AUTS_DataService/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
10
AUTS_DataService/My Project/Application.myapp
Normal file
10
AUTS_DataService/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>3</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
AUTS_DataService/My Project/AssemblyInfo.vb
Normal file
35
AUTS_DataService/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' 有关程序集的一般信息由以下
|
||||
' 控制。更改这些特性值可修改
|
||||
' 与程序集关联的信息。
|
||||
|
||||
'查看程序集特性的值
|
||||
|
||||
<Assembly: AssemblyTitle("AUTS_DataService")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Microsoft")>
|
||||
<Assembly: AssemblyProduct("AUTS_DataService")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Microsoft 2020")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||
<Assembly: Guid("ce81e273-2959-4d63-90b0-54545ed20a06")>
|
||||
|
||||
' 程序集的版本信息由下列四个值组成:
|
||||
'
|
||||
' 主版本
|
||||
' 次版本
|
||||
' 生成号
|
||||
' 修订号
|
||||
'
|
||||
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
'通过使用 "*",如下所示:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.6.0.1")>
|
||||
<Assembly: AssemblyFileVersion("2.6.0.1")>
|
||||
63
AUTS_DataService/My Project/Resources.Designer.vb
generated
Normal file
63
AUTS_DataService/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'此类是由 StronglyTypedResourceBuilder
|
||||
'类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
'若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
'(以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
'''<summary>
|
||||
''' 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' 返回此类使用的缓存的 ResourceManager 实例。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AUTS_DataService.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 重写当前线程的 CurrentUICulture 属性,对
|
||||
''' 使用此强类型资源类的所有资源查找执行重写。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
AUTS_DataService/My Project/Resources.resx
Normal file
117
AUTS_DataService/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
85
AUTS_DataService/My Project/Settings.Designer.vb
generated
Normal file
85
AUTS_DataService/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,85 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings 自动保存功能"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("30")> _
|
||||
Public Property dbLogType() As Byte
|
||||
Get
|
||||
Return CType(Me("dbLogType"),Byte)
|
||||
End Get
|
||||
Set
|
||||
Me("dbLogType") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.AUTS_DataService.My.MySettings
|
||||
Get
|
||||
Return Global.AUTS_DataService.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
9
AUTS_DataService/My Project/Settings.settings
Normal file
9
AUTS_DataService/My Project/Settings.settings
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="dbLogType" Type="System.Byte" Scope="User">
|
||||
<Value Profile="(Default)">30</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
47
AUTS_DataService/ProjectInstaller.Designer.vb
generated
Normal file
47
AUTS_DataService/ProjectInstaller.Designer.vb
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
<System.ComponentModel.RunInstaller(True)> Partial Class ProjectInstaller
|
||||
Inherits System.Configuration.Install.Installer
|
||||
|
||||
'Installer 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'组件设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是组件设计器所必需的
|
||||
'可使用组件设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.ServiceProcessInstaller1 = New System.ServiceProcess.ServiceProcessInstaller()
|
||||
Me.ServiceInstaller1 = New System.ServiceProcess.ServiceInstaller()
|
||||
'
|
||||
'ServiceProcessInstaller1
|
||||
'
|
||||
Me.ServiceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem
|
||||
Me.ServiceProcessInstaller1.Password = Nothing
|
||||
Me.ServiceProcessInstaller1.Username = Nothing
|
||||
'
|
||||
'ServiceInstaller1
|
||||
'
|
||||
Me.ServiceInstaller1.Description = "AUTS_DataService"
|
||||
Me.ServiceInstaller1.DisplayName = "AUTS_DataService"
|
||||
Me.ServiceInstaller1.ServiceName = "AUTS_DataService"
|
||||
Me.ServiceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic
|
||||
'
|
||||
'ProjectInstaller
|
||||
'
|
||||
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})
|
||||
|
||||
End Sub
|
||||
Private WithEvents ServiceInstaller1 As ServiceProcess.ServiceInstaller
|
||||
Private WithEvents ServiceProcessInstaller1 As ServiceProcess.ServiceProcessInstaller
|
||||
End Class
|
||||
129
AUTS_DataService/ProjectInstaller.resx
Normal file
129
AUTS_DataService/ProjectInstaller.resx
Normal file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="ServiceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="ServiceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>14, 22</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
16
AUTS_DataService/ProjectInstaller.vb
Normal file
16
AUTS_DataService/ProjectInstaller.vb
Normal file
@@ -0,0 +1,16 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Configuration.Install
|
||||
|
||||
Public Class ProjectInstaller
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'组件设计器需要此调用。
|
||||
InitializeComponent()
|
||||
|
||||
'调用 InitializeComponent 后添加初始化代码
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
48
AUTS_DataService/Service1.Designer.vb
generated
Normal file
48
AUTS_DataService/Service1.Designer.vb
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
Imports System.ServiceProcess
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class Service1
|
||||
Inherits System.ServiceProcess.ServiceBase
|
||||
|
||||
'UserService 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
' 此进程的主入口点
|
||||
<MTAThread()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Shared Sub Main()
|
||||
Dim ServicesToRun() As System.ServiceProcess.ServiceBase
|
||||
|
||||
' 同一进程内可运行多个 NT 服务。若要将
|
||||
' 另一个服务添加到此进程中,请更改下行以
|
||||
' 创建另一个服务对象。例如,
|
||||
'
|
||||
' ServicesToRun = New System.ServiceProcess.ServiceBase () {New Service1, New MySecondUserService}
|
||||
'
|
||||
ServicesToRun = New System.ServiceProcess.ServiceBase() {New Service1}
|
||||
|
||||
System.ServiceProcess.ServiceBase.Run(ServicesToRun)
|
||||
End Sub
|
||||
|
||||
'组件设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
' 注意: 以下过程是组件设计器所必需的
|
||||
' 可使用组件设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
components = New System.ComponentModel.Container()
|
||||
Me.ServiceName = "Service1"
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
2233
AUTS_DataService/Service1.vb
Normal file
2233
AUTS_DataService/Service1.vb
Normal file
File diff suppressed because it is too large
Load Diff
294
AUTS_DataService/ServiceConfig.vb
Normal file
294
AUTS_DataService/ServiceConfig.vb
Normal file
@@ -0,0 +1,294 @@
|
||||
Imports System.Management
|
||||
Imports System.Net
|
||||
Imports UTS_Core.Database
|
||||
Imports UTS_Core.UTSModule
|
||||
Imports UTS_Core.UTSModule.DbTableModel.Manage
|
||||
|
||||
Public Class ServiceConfig
|
||||
Private _privateIP As String
|
||||
|
||||
Private _publicIP As String
|
||||
|
||||
Private _mac As String
|
||||
|
||||
Private ReadOnly _dsIndex As Integer
|
||||
|
||||
Private ReadOnly _dsName As String
|
||||
|
||||
Private ReadOnly _dsVerString As String
|
||||
|
||||
Private _usVerString As String
|
||||
|
||||
Private ReadOnly _usName As String
|
||||
|
||||
Private _dsVer As Version
|
||||
|
||||
Private _usVer As Version
|
||||
|
||||
|
||||
Sub New()
|
||||
_dsIndex = CInt(UtsRegistry.DataServiceIndex)
|
||||
_dsName = My.Application.Info.ProductName
|
||||
_dsVer = My.Application.Info.Version
|
||||
_dsVerString = My.Application.Info.Version.ToString
|
||||
_usName = UtsRegistry.UpdateServiceName
|
||||
_usVerString = UtsRegistry.UpdateServiceVersion
|
||||
If Version.TryParse(_usVerString, _usVer) = False Then
|
||||
_usVer = New Version(0, 0, 0, 0)
|
||||
End If
|
||||
|
||||
BarnchNet = UtsRegistry.BarnchNet
|
||||
|
||||
If Integer.TryParse(UtsRegistry.Roles, Roles) = False Then
|
||||
Roles = 0
|
||||
End If
|
||||
|
||||
IsDBProxyConn = 0
|
||||
CacheCount = 0
|
||||
DbStatus = 0
|
||||
FtpStatus = 0
|
||||
NetworkNeiborhood = ""
|
||||
|
||||
UsConnected = 0
|
||||
|
||||
InitMacAndLocalIP()
|
||||
End Sub
|
||||
|
||||
Public ReadOnly Property DsIndex() As Integer
|
||||
Get
|
||||
Return _dsIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 数据服务的数据服务的名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public ReadOnly Property DsName() As String
|
||||
Get
|
||||
Return _dsName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 数据服务的版本字符串
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public ReadOnly Property DsVerString() As String
|
||||
Get
|
||||
Return _dsVerString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 更新服务的版本字符串
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property UsVerString() As String
|
||||
Get
|
||||
Return _usVerString
|
||||
End Get
|
||||
Set(value As String)
|
||||
_usVerString = value
|
||||
If Version.TryParse(_usVerString, _usVer) = False Then
|
||||
_usVer = New Version(0, 0, 0, 0)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 数据服务的版本
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public ReadOnly Property DsVersion() As Version
|
||||
Get
|
||||
Return _dsVer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 更新服务的版本
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public ReadOnly Property UsVersion() As Version
|
||||
Get
|
||||
Return _usVer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 更新服务的名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public ReadOnly Property UsName() As String
|
||||
Get
|
||||
Return _usName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 设备的局域网IP
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public ReadOnly Property PrivateIP() As String
|
||||
Get
|
||||
Return _privateIP
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 设备的MAC地址
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public ReadOnly Property Mac() As String
|
||||
Get
|
||||
Return _mac
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 与更新服务的连接状态
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property UsConnected As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 设备运行中产生的异常
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Private Property ErrMsg As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 局域网中与主机的连接状态
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property IsDBProxyConn As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 设备加入的子网名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property BarnchNet As String
|
||||
|
||||
''' <summary>
|
||||
''' 当前设备在局域网中的角色
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Roles As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 网上邻居集合
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property NetworkNeiborhood As String
|
||||
|
||||
''' <summary>
|
||||
''' 当前缓存表字段数量
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property CacheCount As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 云端数据库连接状态
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property DbStatus As Integer
|
||||
|
||||
''' <summary>
|
||||
''' Ftp服务器连接状态
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property FtpStatus As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 私有IP地址变化
|
||||
''' </summary>
|
||||
''' <param name="ip"></param>
|
||||
Public Event PrivateIPChanged(ip As String)
|
||||
|
||||
''' <summary>
|
||||
''' MAC地址变化
|
||||
''' </summary>
|
||||
''' <param name="mac"></param>
|
||||
Public Event MACChanged(mac As String)
|
||||
|
||||
|
||||
Public Sub UpdateErrMsg(type As String, msg As String)
|
||||
ErrMsg = $"{type},{msg}"
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 初始化MAC地址与获取本地IP
|
||||
''' </summary>
|
||||
Public Sub InitMacAndLocalIP()
|
||||
' Dim ip As String
|
||||
Dim mac As String
|
||||
Dim searcher As New ManagementObjectSearcher("select * from win32_NetworkAdapterConfiguration")
|
||||
Dim moc2 As ManagementObjectCollection = searcher.Get()
|
||||
For Each mo As ManagementObject In moc2
|
||||
If CBool(mo("IPEnabled")) Then
|
||||
mac = mo("MACAddress").ToString()
|
||||
If String.Compare(_mac, mac) <> 0 Then
|
||||
_mac = mac
|
||||
'触发MAC地址变化
|
||||
RaiseEvent MACChanged(_mac)
|
||||
End If
|
||||
|
||||
Dim a() As String = CType(mo("IpAddress"), String())
|
||||
|
||||
Dim address As IPAddress = Nothing
|
||||
For Each ip As String In a
|
||||
If IPAddress.TryParse(ip, address) Then
|
||||
|
||||
'使用IPV4地址
|
||||
If address.AddressFamily = Sockets.AddressFamily.InterNetwork Then
|
||||
|
||||
If String.Compare(_privateIP, ip) <> 0 Then
|
||||
'触发IP地址变化
|
||||
_privateIP = ip
|
||||
RaiseEvent PrivateIPChanged(_privateIP)
|
||||
End If
|
||||
|
||||
Return
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 上传服务信息至数据库
|
||||
''' </summary>
|
||||
Public Sub UpdateServiceInfo()
|
||||
Using db As New DbExecutor(UtsDb.RemoteDbType, UtsDb.RemoteConnString)
|
||||
db.Open()
|
||||
|
||||
Dim cmdText As String
|
||||
Dim tbName As String = DataServiceListTable.TableName
|
||||
Dim filed As New Dictionary(Of String, String)
|
||||
filed.Add($"{DataServiceListTable.ColNames.ServiceVersion}", DsVerString)
|
||||
filed.Add($"{DataServiceListTable.ColNames.CacheCount}", CacheCount.ToString)
|
||||
filed.Add($"{DataServiceListTable.ColNames.IsDBProxyConn}", IsDBProxyConn.ToString)
|
||||
filed.Add($"{DataServiceListTable.ColNames.NetworkNeiborhood}", NetworkNeiborhood)
|
||||
|
||||
If String.IsNullOrEmpty(ErrMsg) = False Then
|
||||
filed.Add($"{DataServiceListTable.ColNames.ErrMsg}", ErrMsg)
|
||||
ErrMsg = String.Empty
|
||||
End If
|
||||
|
||||
Dim condition As String = $"`{DataServiceListTable.ColNames.ID}` = {_dsIndex}"
|
||||
cmdText = db.CmdHelper.DbUpdate(UtsDb.RemotePublicDb, tbName, filed, condition)
|
||||
|
||||
Try
|
||||
db.ExecuteNonQuery(cmdText)
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"Update ServiceTable Error:{ex.Message}")
|
||||
End Try
|
||||
|
||||
db.Close()
|
||||
End Using
|
||||
End Sub
|
||||
End Class
|
||||
7
AUTS_DataService/ServiceError.vb
Normal file
7
AUTS_DataService/ServiceError.vb
Normal file
@@ -0,0 +1,7 @@
|
||||
Public Class ServiceError
|
||||
Public Shared Event ServiceError(type As String, msg As String)
|
||||
|
||||
Public Shared Sub RecodeError(type As String, msg As String)
|
||||
RaiseEvent ServiceError(type, msg)
|
||||
End Sub
|
||||
End Class
|
||||
334
AUTS_DataService/ServiceLog.vb
Normal file
334
AUTS_DataService/ServiceLog.vb
Normal file
@@ -0,0 +1,334 @@
|
||||
Imports UTS_Core.Database
|
||||
Imports UTS_Core.UTSModule
|
||||
Imports UTS_Core.UTSModule.DbConnect
|
||||
Imports UTS_Core.UTSModule.DbTableModel.Manage
|
||||
|
||||
Public Class ServiceLog
|
||||
|
||||
Private Shared ReadOnly LogLock As New Object()
|
||||
|
||||
Private Shared ReadOnly LogQueue As New List(Of Dictionary(Of String, String))
|
||||
|
||||
''' <summary>厂商名</summary>
|
||||
Public Shared VendorName As String
|
||||
|
||||
''' <summary>公网IP</summary>
|
||||
Public Shared PublicIp As String
|
||||
|
||||
''' <summary>本地IP</summary>
|
||||
Public Shared PrivateIp As String
|
||||
|
||||
''' <summary>本地MAC地址</summary>
|
||||
Public Shared MAC As String
|
||||
|
||||
''' <summary>服务索引</summary>
|
||||
Public Shared DsIndex As Integer
|
||||
|
||||
''' <summary>数据服务版本</summary>
|
||||
Public Shared DsVersion As String
|
||||
|
||||
''' <summary>更新服务版本</summary>
|
||||
Public Shared UsVersion As String
|
||||
|
||||
''' <summary>存入数据库日志类型</summary>
|
||||
Public Shared DbLogType As Byte
|
||||
|
||||
''' <summary>日志文件夹路径</summary>
|
||||
Public Shared Property LogDirPath As String
|
||||
Get
|
||||
Return UTS_Core.DebugLog.ApplicationLog.LogDirPath
|
||||
End Get
|
||||
Set(value As String)
|
||||
UTS_Core.DebugLog.ApplicationLog.LogDirPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>日志文件前缀</summary>
|
||||
Public Shared Property LogFilePrefix As String
|
||||
Get
|
||||
Return UTS_Core.DebugLog.ApplicationLog.LogFilePrefix
|
||||
End Get
|
||||
Set(value As String)
|
||||
UTS_Core.DebugLog.ApplicationLog.LogFilePrefix = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Shared ReadOnly Property LogFilePath() As String
|
||||
Get
|
||||
Return UTS_Core.DebugLog.ApplicationLog.LogFilePath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>在线状态</summary>
|
||||
Public Shared Online As Boolean
|
||||
|
||||
''' <summary>将日志写入到本地文件</summary>
|
||||
Public Shared Sub WriteErrorLogToFile(logText As String)
|
||||
UTS_Core.DebugLog.ApplicationLog.WriteErrorLog(logText)
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 写入致命错误至本地与云端数据库
|
||||
''' </summary>
|
||||
''' <param name="logText">日志内容</param>
|
||||
Public Shared Sub WriteFatalLog(logText As String)
|
||||
WriteLogToLogQueue(UTS_Core.DebugLog.ApplicationLog.LogTypes.Fatal, logText)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Sub WriteErrorLog(logText As String)
|
||||
WriteLogToLogQueue(UTS_Core.DebugLog.ApplicationLog.LogTypes.Error, logText)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub WriteWarningLog(logText As String)
|
||||
WriteLogToLogQueue(UTS_Core.DebugLog.ApplicationLog.LogTypes.Warn, logText)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub WriteInfoLog(logText As String)
|
||||
WriteLogToLogQueue(UTS_Core.DebugLog.ApplicationLog.LogTypes.Info, logText)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub WriteDebugLog(logText As String)
|
||||
WriteLogToLogQueue(UTS_Core.DebugLog.ApplicationLog.LogTypes.Debug, logText)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 添加日志内容至缓存的日志队列中
|
||||
''' 调用SaveLogQueueToDb将队列中的数据写入到数据库
|
||||
'''
|
||||
''' Tip:缓存队列仅记录每条日志不同的内容,例如写入时间,日志类型,日志内容等
|
||||
''' </summary>
|
||||
''' <param name="logType"></param>
|
||||
''' <param name="logText"></param>
|
||||
Public Shared Sub WriteLogToLogQueue(logType As UTS_Core.DebugLog.ApplicationLog.LogTypes, logText As String)
|
||||
UTS_Core.DebugLog.ApplicationLog.WriteLog($"{logType}", logText) '写入本地文本日志
|
||||
If ((DbLogType >> logType) And 1) = 0 Then Return '过滤不入库的信息
|
||||
|
||||
Dim dicFiled As New Dictionary(Of String, String)
|
||||
|
||||
dicFiled.Add($"{DataServiceLogTable.ColNames.DateTime}", $"{Now:yyyy-MM-dd HH:mm:ss}")
|
||||
|
||||
dicFiled.Add($"{DataServiceLogTable.ColNames.LogType}", $"{logType}")
|
||||
dicFiled.Add($"{DataServiceLogTable.ColNames.LogText}", $"{logText.Replace("'"c, """"c).Replace("`", """"c)}")
|
||||
|
||||
SyncLock LogLock
|
||||
LogQueue.Add(dicFiled) '将日志信息放入缓冲队列
|
||||
End SyncLock
|
||||
End Sub
|
||||
|
||||
Private Shared Sub SaveLogToLocalDb(count As Integer, Optional saveCache As Boolean = False)
|
||||
Dim tableName As String = DataServiceLogTable.TableName
|
||||
Using db As New DbExecutor(UtsDb.LocalDbType, UtsDb.LocalConnString)
|
||||
db.Open()
|
||||
|
||||
db.BeginTransaction()
|
||||
|
||||
Dim dicFiled As Dictionary(Of String, String)
|
||||
Dim cmdText As String
|
||||
Dim cmdHelper As DbCmdHelper = DbCmdHelper.CreateCmdHelper(UtsDb.RemoteDbType)
|
||||
|
||||
SyncLock LogLock
|
||||
For i As Integer = 0 To count - 1
|
||||
dicFiled = LogQueue.Item(i)
|
||||
|
||||
'修改上传方式为插值方式
|
||||
Dim colName As String
|
||||
Dim colNames As New List(Of String)
|
||||
Dim remoteFileds As New Dictionary(Of String, String)
|
||||
Try
|
||||
colName = $"{DataServiceLogTable.ColNames.ServiceID}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.Int32, colName, DsIndex)
|
||||
remoteFileds.Add(colName, DsIndex.ToString)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.ServiceVersion}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, DsVersion)
|
||||
remoteFileds.Add(colName, DsVersion)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.UpdateServiceVersion}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, UsVersion)
|
||||
remoteFileds.Add(colName, UsVersion)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.VendorName}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, VendorName)
|
||||
remoteFileds.Add(colName, VendorName)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.DateTime}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.DateTime, colName, dicFiled(colName))
|
||||
remoteFileds.Add(colName, dicFiled(colName))
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.PublicIp}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, PublicIp)
|
||||
remoteFileds.Add(colName, PublicIp)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.PrivateIp}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, PrivateIp)
|
||||
remoteFileds.Add(colName, PrivateIp)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.LogType}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, dicFiled(colName))
|
||||
remoteFileds.Add(colName, dicFiled(colName))
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.LogText}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, dicFiled(colName))
|
||||
remoteFileds.Add(colName, dicFiled(colName).Replace("'", " ").Replace("’", " "))
|
||||
|
||||
cmdText = db.CmdHelper.InsertParam(tableName, colNames)
|
||||
|
||||
db.ExecuteNonQuery(cmdText) '执行语句
|
||||
Catch ex As Exception
|
||||
WriteErrorLogToFile($"Write LogQueue To Local DB Error: {ex.Message}")
|
||||
Continue For
|
||||
End Try
|
||||
|
||||
|
||||
If saveCache Then
|
||||
Try
|
||||
cmdText = cmdHelper.DbInsert(UtsDb.RemotePublicDb, tableName, remoteFileds)
|
||||
DbConnector.SaveCmdStringToCacheTable(db, cmdText) '执行命令入缓存库
|
||||
Catch ex As Exception
|
||||
WriteErrorLogToFile($"Write LogQueue To Chche DB Error: {ex.Message}")
|
||||
Continue For
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
End SyncLock
|
||||
|
||||
db.CommitTransaction()
|
||||
db.Close()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
Private Shared Function SaveLogToRemoteDb(count As Integer) As Boolean
|
||||
Dim tableName As String = DataServiceLogTable.TableName
|
||||
Using db As New DbExecutor(UtsDb.RemoteDbType, UtsDb.RemoteConnString)
|
||||
db.Open()
|
||||
|
||||
db.BeginTransaction()
|
||||
|
||||
Dim dicFiled As Dictionary(Of String, String)
|
||||
Dim cmdText As String
|
||||
Dim colName As String
|
||||
Dim colNames As New List(Of String)
|
||||
|
||||
For i As Integer = 0 To count - 1
|
||||
colNames.Clear()
|
||||
dicFiled = LogQueue.Item(i)
|
||||
|
||||
Try
|
||||
colName = $"{DataServiceLogTable.ColNames.ServiceID}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.Int32, colName, DsIndex)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.ServiceVersion}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, DsVersion)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.UpdateServiceVersion}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, UsVersion)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.VendorName}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, VendorName)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.DateTime}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.DateTime, colName, dicFiled(colName))
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.PublicIp}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, PublicIp)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.PrivateIp}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, PrivateIp)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.Mac}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, MAC)
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.LogType}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, dicFiled(colName))
|
||||
|
||||
colName = $"{DataServiceLogTable.ColNames.LogText}"
|
||||
colNames.Add(colName)
|
||||
db.AddDbParameter(DbType.AnsiString, colName, dicFiled(colName))
|
||||
|
||||
cmdText = db.CmdHelper.DbInsertParam(UtsDb.RemotePublicDb, tableName, colNames)
|
||||
|
||||
db.ExecuteNonQuery(cmdText) '执行语句
|
||||
|
||||
db.ClearDbParameter()
|
||||
Catch ex As Exception
|
||||
WriteErrorLogToFile($"[{i}]Write LogQueue To Remote DB Error: {ex.Message}")
|
||||
|
||||
Try
|
||||
db.RollbackTransaction()
|
||||
db.Close()
|
||||
Catch ex2 As Exception
|
||||
WriteErrorLogToFile($"Write LogQueue To Remote DB Rollback Transaction Error: {ex.Message}")
|
||||
End Try
|
||||
|
||||
Return False
|
||||
End Try
|
||||
Next
|
||||
|
||||
db.CommitTransaction()
|
||||
db.Close()
|
||||
End Using
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Sub SaveLogQueueToDb()
|
||||
If LogQueue.Count <= 0 Then Return
|
||||
|
||||
Dim count As Integer = LogQueue.Count
|
||||
Dim saveCache As Boolean
|
||||
SyncLock LogLock
|
||||
'执行
|
||||
saveCache = SaveLogToRemoteDb(count) = False
|
||||
SaveLogToLocalDb(count, saveCache)
|
||||
|
||||
'删除
|
||||
For i As Integer = 0 To count - 1
|
||||
LogQueue.RemoveAt(0)
|
||||
Next
|
||||
End SyncLock
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 创建数据服务日志表,数据服务独有
|
||||
''' </summary>
|
||||
Public Shared Sub CreateServiceLogTable()
|
||||
|
||||
Using db As New DbExecutor(UtsDb.LocalDbType, UtsDb.LocalConnString)
|
||||
db.Open()
|
||||
|
||||
Dim cmdText As String = DataServiceLogTable.CreateTableString("", DbExecutor.DbTypeEnum.Sqlite)
|
||||
|
||||
db.ExecuteNonQuery(cmdText)
|
||||
|
||||
db.Close()
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
16
AUTS_DataService/ServiceSettings.vb
Normal file
16
AUTS_DataService/ServiceSettings.vb
Normal file
@@ -0,0 +1,16 @@
|
||||
Imports System.Xml.Serialization
|
||||
Imports UTS_Core.UTSModule.Service
|
||||
|
||||
|
||||
<XmlInclude(GetType(ServiceSettings))>
|
||||
<XmlInclude(GetType(ServiceTask))>
|
||||
<XmlInclude(GetType(DbSyncServiceTask))>
|
||||
<XmlInclude(GetType(ListenJsonFileServiceTask))>
|
||||
Public Class ServiceSettings
|
||||
Public Tasks As List(Of ServiceTask)
|
||||
|
||||
Sub New()
|
||||
Tasks = New List(Of ServiceTask)()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
219
AUTS_DataService/ServiceTask/DbSyncServiceTask.vb
Normal file
219
AUTS_DataService/ServiceTask/DbSyncServiceTask.vb
Normal file
@@ -0,0 +1,219 @@
|
||||
Imports System.Threading
|
||||
Imports System.Xml.Serialization
|
||||
Imports UTS_Core.Database
|
||||
Imports UTS_Core.UTSModule
|
||||
Imports UTS_Core.UTSModule.Service
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 数据库同步类
|
||||
''' </summary>
|
||||
<XmlInclude(GetType(DbSyncServiceTask))>
|
||||
Public Class DbSyncServiceTask
|
||||
Inherits ServiceTask
|
||||
|
||||
Sub New()
|
||||
TaskType = ServiceTaskTypeEnum.DbSync
|
||||
TaskStatus = ServiceTaskStatusEnum.Stop
|
||||
TaskName = "DbSync_Default"
|
||||
|
||||
Interval = 5
|
||||
|
||||
|
||||
LocalDbType = UtsDb.LocalDbType
|
||||
LocalConnString = UtsDb.LocalConnString
|
||||
|
||||
RemoteDbType = UtsDb.RemoteDbType
|
||||
RemoteConnString = UtsDb.RemoteConnString
|
||||
RemotePublicDb = UtsDb.RemotePublicDb
|
||||
RemotePrivateDb = UtsDb.RemotePrivateDb
|
||||
End Sub
|
||||
|
||||
Sub New(name As String, param As Dictionary(Of String, String))
|
||||
TaskType = ServiceTaskTypeEnum.DbSync
|
||||
TaskStatus = ServiceTaskStatusEnum.Stop
|
||||
TaskName = name
|
||||
|
||||
LocalDbType = UtsDb.LocalDbType
|
||||
LocalConnString = UtsDb.LocalConnString
|
||||
|
||||
RemoteDbType = UtsDb.RemoteDbType
|
||||
RemoteConnString = UtsDb.RemoteConnString
|
||||
RemotePublicDb = UtsDb.RemotePublicDb
|
||||
RemotePrivateDb = UtsDb.RemotePrivateDb
|
||||
|
||||
SetParams(param)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub StartCallback(stat As Object)
|
||||
While TaskStatus = ServiceTaskStatusEnum.Start
|
||||
|
||||
'同步任务
|
||||
Try
|
||||
Dim syncParam As DbSynchronizer.SyncParam
|
||||
syncParam.LocalConnString = LocalConnString
|
||||
syncParam.LocalType = LocalDbType
|
||||
syncParam.RemoteType = RemoteDbType
|
||||
syncParam.RemoteConnString = RemoteConnString
|
||||
syncParam.PublicDb = RemotePublicDb
|
||||
syncParam.PrivateDb = RemotePrivateDb
|
||||
|
||||
'开始数据库同步
|
||||
Dim sync As DbSynchronizer
|
||||
sync = New DbSynchronizer(syncParam)
|
||||
sync.SyncDatabase()
|
||||
ServiceLog.WriteInfoLog($"DbSynchronizer Succeeded!")
|
||||
|
||||
'更新数据库更新时间
|
||||
LastUpdateTime = $"{Now:yyyy-MM-dd HH:mm:ss}"
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"TaskName:{TaskName},SyncDatabase Error:{ex.Message}")
|
||||
End Try
|
||||
|
||||
'等待任务
|
||||
Dim lastTime As Date = Now
|
||||
While (Now - lastTime).TotalMinutes < Interval
|
||||
If TaskStatus = ServiceTaskStatusEnum.Stop Then
|
||||
Return
|
||||
End If
|
||||
|
||||
Thread.Sleep(1000)
|
||||
End While
|
||||
|
||||
End While
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub Start()
|
||||
TaskStatus = ServiceTaskStatusEnum.Start
|
||||
|
||||
If _syncThread IsNot Nothing AndAlso _syncThread.IsAlive Then
|
||||
ServiceLog.WriteDebugLog($"SyncThread IsAlive!")
|
||||
Return
|
||||
End If
|
||||
|
||||
_syncThread = New Thread(AddressOf StartCallback)
|
||||
_syncThread.IsBackground = True
|
||||
_syncThread.Start()
|
||||
|
||||
ServiceLog.WriteDebugLog($"DbSync Start!")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub [Stop]()
|
||||
TaskStatus = ServiceTaskStatusEnum.Stop
|
||||
|
||||
Dim lastTime As Date = Now
|
||||
While _syncThread IsNot Nothing AndAlso _syncThread.IsAlive
|
||||
If (Now - lastTime).TotalMilliseconds > 10000 Then
|
||||
_syncThread.Abort()
|
||||
End If
|
||||
|
||||
Thread.Sleep(100)
|
||||
End While
|
||||
ServiceLog.WriteInfoLog($"DbSync Stop!")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub Restart()
|
||||
If _syncThread IsNot Nothing AndAlso _syncThread.IsAlive Then
|
||||
[Stop]()
|
||||
End If
|
||||
|
||||
|
||||
Start()
|
||||
ServiceLog.WriteInfoLog($"DbSync Restart!")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub SetParams(params As Dictionary(Of String, String))
|
||||
Dim tmpStatus As ServiceTaskStatusEnum = TaskStatus
|
||||
Dim tmpInterval As Integer = Interval
|
||||
|
||||
'将转换后的数据填充至临时缓存,一遍设置失败时可以保留上一次数据
|
||||
For Each param As KeyValuePair(Of String, String) In params
|
||||
Select Case param.Key
|
||||
Case "Interval"
|
||||
If Integer.TryParse(param.Value, tmpInterval) = False Then
|
||||
Throw New Exception($"Error Interval :{param.Value}")
|
||||
End If
|
||||
Case "LocalDbType"
|
||||
'If [Enum].TryParse(param.Value, tmpLocalType) = False Then
|
||||
' Throw New Exception($"Error LocalDbType :{param.Value}")
|
||||
'End If
|
||||
Case "LocalConnString"
|
||||
'tmpLocalConnString = UTS_Core.Security.Aes128.DecryptStr(param.Value, UTS_Core.Security.Aes128.ServerAesKey)
|
||||
Case "Status", "Type", "Name" '不处理的字段
|
||||
|
||||
|
||||
Case Else
|
||||
ServiceLog.WriteWarningLog($"DbSync Unknown param name :{param.Key}")
|
||||
End Select
|
||||
Next
|
||||
|
||||
TaskStatus = tmpStatus
|
||||
Interval = tmpInterval
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Function GetParams() As Dictionary(Of String, String)
|
||||
Dim params As New Dictionary(Of String, String)
|
||||
params.Add("Type", TaskType.ToString())
|
||||
params.Add("Name", TaskName)
|
||||
params.Add("Status", TaskStatus.ToString())
|
||||
params.Add("Interval", Interval.ToString())
|
||||
params.Add("LocalDbType", LocalDbType.ToString())
|
||||
params.Add("LocalConnString", UTS_Core.Security.Aes128.EncryptStr(LocalConnString, UTS_Core.Security.Aes128.ServerAesKey))
|
||||
|
||||
Return params
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 远程数据库的类型
|
||||
''' </summary>
|
||||
Private RemoteDbType As DbExecutor.DbTypeEnum
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 远程数据库的连接字符串
|
||||
''' </summary>
|
||||
Private RemoteConnString As String
|
||||
|
||||
''' <summary>
|
||||
''' 远端公共数据库名
|
||||
''' </summary>
|
||||
Private RemotePublicDb As String
|
||||
|
||||
''' <summary>
|
||||
''' 远端私有库名
|
||||
''' </summary>
|
||||
Private RemotePrivateDb As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 本地数据库的类型
|
||||
''' </summary>
|
||||
Private LocalDbType As DbExecutor.DbTypeEnum
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 本地数据库的连接字符串
|
||||
''' </summary>
|
||||
Private LocalConnString As String
|
||||
|
||||
''' <summary>
|
||||
''' 同步间隔,单位分钟,默认5分钟,最小值为1分钟
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Interval() As Integer
|
||||
|
||||
Private _syncThread As Thread
|
||||
|
||||
''' <summary>
|
||||
''' 最后一次更新的时间字符串
|
||||
''' </summary>
|
||||
Public Shared LastUpdateTime As String = ""
|
||||
End Class
|
||||
678
AUTS_DataService/ServiceTask/DbSynchronizer.vb
Normal file
678
AUTS_DataService/ServiceTask/DbSynchronizer.vb
Normal file
@@ -0,0 +1,678 @@
|
||||
Imports System.Data.Common
|
||||
Imports System.Text
|
||||
Imports MySql.Data.MySqlClient
|
||||
Imports UTS_Core.Database
|
||||
Imports UTS_Core.UTSModule.DbTableModel
|
||||
|
||||
''' <summary>
|
||||
''' 数据库同步器
|
||||
''' </summary>
|
||||
Public Class DbSynchronizer
|
||||
|
||||
''' <summary>
|
||||
''' 同步表内容
|
||||
''' </summary>
|
||||
Structure SyncTableScheme
|
||||
''' <summary>表名</summary>
|
||||
Public TableName As String
|
||||
''' <summary>同步类型</summary>
|
||||
Public SyncType As String
|
||||
''' <summary>是否存在当前数据表</summary>
|
||||
Public IsExistsTable As Boolean
|
||||
''' <summary>更新版本</summary>
|
||||
Public RevisionID As String
|
||||
''' <summary>上一次更新时间字符串</summary>
|
||||
Public LastSyncTime As String
|
||||
''' <summary>同步后更新的时间字符串</summary>
|
||||
Public NowSyncTime As String
|
||||
End Structure
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 同步数据库参数
|
||||
''' </summary>
|
||||
Structure SyncParam
|
||||
Public PublicDb As String
|
||||
|
||||
Public PrivateDb As String
|
||||
|
||||
Public RemoteType As DbExecutor.DbTypeEnum
|
||||
|
||||
Public RemoteConnString As String
|
||||
|
||||
Public LocalType As DbExecutor.DbTypeEnum
|
||||
|
||||
Public LocalConnString As String
|
||||
End Structure
|
||||
|
||||
|
||||
Sub New(param As SyncParam)
|
||||
Parameters = param
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 连接参数
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Parameters() As SyncParam
|
||||
|
||||
''' <summary>
|
||||
''' 同步数据库,开始同步
|
||||
''' </summary>
|
||||
Public Sub SyncDatabase()
|
||||
Using remoteDb As New DbExecutor(Parameters.RemoteType, Parameters.RemoteConnString)
|
||||
remoteDb.Open()
|
||||
|
||||
Using localDb As New DbExecutor(Parameters.LocalType, Parameters.LocalConnString)
|
||||
localDb.Open()
|
||||
|
||||
SyncDatabase(localDb, remoteDb, Parameters.PublicDb, Parameters.PrivateDb)
|
||||
|
||||
localDb.Close()
|
||||
End Using
|
||||
|
||||
remoteDb.Close()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 同步数据库执行过程
|
||||
''' </summary>
|
||||
''' <param name="localDb">本地数据库执行器</param>
|
||||
''' <param name="remoteDb">云端数据库执行器</param>
|
||||
''' <param name="publicDb">远端数据库公共库名</param>
|
||||
''' <param name="privateDb">远端数据库私有库名</param>
|
||||
Public Sub SyncDatabase(localDb As DbExecutor, remoteDb As DbExecutor, publicDb As String, privateDb As String)
|
||||
If remoteDb Is Nothing Then Return
|
||||
If localDb Is Nothing Then Return
|
||||
|
||||
'上传本地缓存数据
|
||||
remoteDb.BeginTransaction()
|
||||
UploadCacheData(remoteDb, localDb)
|
||||
remoteDb.CommitTransaction()
|
||||
ServiceLog.WriteDebugLog($"UploadCacheData Successded!")
|
||||
|
||||
'获取需要公有下载的数据表
|
||||
DownloadSyncTable(remoteDb, localDb, publicDb, Manage.SyncListTable.TableName)
|
||||
ServiceLog.WriteDebugLog($"Download Puclic SyncTable Successded!")
|
||||
|
||||
'获取需要私有下载的数据表
|
||||
DownloadSyncTable(remoteDb, localDb, privateDb, Customer.SyncListTable.TableName)
|
||||
ServiceLog.WriteDebugLog($"Download Private SyncTable Successded!")
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 上传本地缓存数据,DataTable的方式
|
||||
''' </summary>
|
||||
''' <param name="remoteDb">远程数据库执行器</param>
|
||||
''' <param name="localDb">本地数据库执行器</param>
|
||||
Private Sub UploadCacheData(remoteDb As DbExecutor, localDb As DbExecutor)
|
||||
|
||||
CreateCacheTableWhenNotExists(localDb)
|
||||
|
||||
Dim dataTable As DataTable = SearchCacheData(localDb)
|
||||
|
||||
UploadCacheData(remoteDb, localDb, dataTable)
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "上传本地缓存数据"
|
||||
''' <summary>
|
||||
''' 本地创建缓存记录表,如果不存在则创建
|
||||
''' </summary>
|
||||
''' <param name="localDb">本地数据库的执行器</param>
|
||||
Private Sub CreateCacheTableWhenNotExists(localDb As DbExecutor)
|
||||
localDb.ExecuteNonQuery(LocalPrivate.CacheTable.CreateTableString)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 查询本地未上传的数据,单次查询5000条数据
|
||||
''' </summary>
|
||||
''' <param name="localDb">本地数据库的执行器</param>
|
||||
''' <returns></returns>
|
||||
Private Function SearchCacheData(localDb As DbExecutor) As DataTable
|
||||
Dim tableName As String = LocalPrivate.CacheTable.TableName
|
||||
Dim colNames As String = $"{LocalPrivate.CacheTable.ColNamesEnum.ID},{LocalPrivate.CacheTable.ColNamesEnum.SqlCmd}"
|
||||
Dim condition As String = $"{LocalPrivate.CacheTable.ColNamesEnum.IsUpload} = 0 order by `{LocalPrivate.CacheTable.ColNamesEnum.ID}` Limit 5000"
|
||||
Dim cmdText As String = localDb.CmdHelper.Search(colNames, tableName, condition)
|
||||
Return localDb.ExecuteDataTable(cmdText)
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 上传本地数据至云端数据库
|
||||
''' </summary>
|
||||
''' <param name="remoteDb"></param>
|
||||
''' <param name="localDb"></param>
|
||||
''' <param name="dataTable"></param>
|
||||
Private Sub UploadCacheData(remoteDb As DbExecutor, localDb As DbExecutor, dataTable As DataTable)
|
||||
ServiceLog.WriteDebugLog($"Begin Upload Cache DataTable [{dataTable.Rows.Count}] Rows!")
|
||||
For Each row As DataRow In dataTable.Rows
|
||||
Try
|
||||
Dim cmdText As String = row(LocalPrivate.CacheTable.ColNamesEnum.SqlCmd.ToString()).ToString()
|
||||
remoteDb.ExecuteNonQuery(cmdText)
|
||||
|
||||
Catch ex As MySqlException
|
||||
'记录失败
|
||||
Dim id As String = row(LocalPrivate.CacheTable.ColNamesEnum.ID.ToString()).ToString()
|
||||
|
||||
ServiceLog.WriteErrorLog($"UploadData Error:{ex.Message},ErrorNumber:{ex.Number},ID:{id}")
|
||||
|
||||
Select Case ex.Number
|
||||
Case MySqlErrorCode.DuplicateFieldName '重复字段
|
||||
ServiceLog.WriteInfoLog($"DuplicateFieldName,Ignore the error!")
|
||||
Case Else
|
||||
ServiceLog.WriteWarningLog($"Unknown,Continue to perform!")
|
||||
Exit For
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
'记录失败
|
||||
ServiceLog.WriteErrorLog($"UploadData Error:{ex.Message}")
|
||||
|
||||
ServiceError.RecodeError("DbSync", $"UploadData Error:{ex.Message}")
|
||||
Exit For
|
||||
End Try
|
||||
|
||||
Try
|
||||
DeleteUploadData(localDb, row(LocalPrivate.CacheTable.ColNamesEnum.ID).ToString)
|
||||
Catch ex As Exception
|
||||
'记录失败
|
||||
ServiceLog.WriteErrorLog($"UpdateCacheTable Error:{ex.Message}")
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 数据上传完成后,删除本地数据库中对应序号的记录
|
||||
''' </summary>
|
||||
''' <param name="localDb"></param>
|
||||
''' <param name="sn"></param>
|
||||
Private Sub DeleteUploadData(localDb As DbExecutor, sn As String)
|
||||
Dim tableName As String = LocalPrivate.CacheTable.TableName
|
||||
Dim condition As String = $"{LocalPrivate.CacheTable.ColNamesEnum.ID} = '{sn}'"
|
||||
localDb.ExecuteNonQuery(localDb.CmdHelper.DeleteRows(tableName, condition))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "获取需要下载表集合"
|
||||
''' <summary>
|
||||
''' 比对本地与云端版本表,下载变化的数据表
|
||||
''' </summary>
|
||||
''' <param name="remoteDb"></param>
|
||||
''' <param name="localDb"></param>
|
||||
''' <param name="dbName"></param>
|
||||
''' <param name="tbName"></param>
|
||||
Public Sub DownloadSyncTable(remoteDb As DbExecutor, localDb As DbExecutor, dbName As String, tbName As String)
|
||||
Dim downloadTables As List(Of SyncTableScheme)
|
||||
downloadTables = CompareVersionTable(remoteDb, localDb, dbName, tbName)
|
||||
UpdateTables(remoteDb, localDb, dbName, downloadTables) '更新本地数据
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 比较本地与云端版本表的差异,获取需要下载的数据表
|
||||
''' </summary>
|
||||
''' <param name="remoteDb"></param>
|
||||
''' <param name="localDb"></param>
|
||||
''' <param name="tableName"></param>
|
||||
''' <returns></returns>
|
||||
Private Function CompareVersionTable(remoteDb As DbExecutor, localDb As DbExecutor, dbName As String, tableName As String) As List(Of SyncTableScheme)
|
||||
CreateVersionTableWhenNotExists(localDb)
|
||||
Dim localTable As DataTable = localDb.ExecuteDataTable(localDb.CmdHelper.SearchAll(Customer.SyncListTable.TableName))
|
||||
Dim remoteTable As DataTable = remoteDb.ExecuteDataTable(remoteDb.CmdHelper.DbSearchAll(dbName, tableName))
|
||||
Return CompareVersionTable(localTable, remoteTable)
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 创建本地数据库表版本记录表
|
||||
''' </summary>
|
||||
''' <param name="localDb"></param>
|
||||
Private Sub CreateVersionTableWhenNotExists(localDb As DbExecutor)
|
||||
Try
|
||||
localDb.ExecuteNonQuery(Customer.SyncListTable.CreateTableString(localDb.DatabaseType))
|
||||
Catch ex As Exception
|
||||
'记录失败
|
||||
ServiceLog.WriteErrorLog($"CreateVersionTableWhenNotExists Error:{ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 比较本地与云端版本表的差异
|
||||
''' </summary>
|
||||
''' <param name="srcDataTable">源DataTable</param>
|
||||
''' <param name="destDataTable">目标DataTable</param>
|
||||
''' <returns>差异信息列表</returns>
|
||||
Private Function CompareVersionTable(srcDataTable As DataTable, destDataTable As DataTable) As List(Of SyncTableScheme)
|
||||
Dim result As New List(Of SyncTableScheme)
|
||||
Dim srcTableName As String
|
||||
Dim destTableName As String
|
||||
Dim isFind As Boolean
|
||||
Dim srcReVId As String = String.Empty
|
||||
Dim destRevId As String
|
||||
For i As Integer = 0 To destDataTable.Rows.Count - 1
|
||||
destTableName = $"{destDataTable.Rows(i)($"{Customer.SyncListTable.ColNamesEnum.TableName}")}"
|
||||
isFind = False
|
||||
|
||||
For j As Integer = 0 To srcDataTable.Rows.Count - 1
|
||||
srcTableName = $"{srcDataTable.Rows(j)($"{Customer.SyncListTable.ColNamesEnum.TableName}")}"
|
||||
|
||||
If String.Compare(destTableName, srcTableName, True) = 0 Then
|
||||
srcReVId = $"{srcDataTable.Rows(j)($"{Customer.SyncListTable.ColNamesEnum.RevisionID}")}"
|
||||
isFind = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If isFind Then
|
||||
destRevId = $"{destDataTable.Rows(i)($"{Customer.SyncListTable.ColNamesEnum.RevisionID}")}"
|
||||
If String.Compare(srcReVId, destRevId, True) <> 0 Then '源表中存在记录且与目的表记录时间不相同
|
||||
result.Add(New SyncTableScheme() With {.TableName = destTableName,
|
||||
.SyncType = $"{destDataTable.Rows(i)($"{Customer.SyncListTable.ColNamesEnum.SyncType}")}",
|
||||
.LastSyncTime = $"{srcDataTable.Rows(i)($"{Customer.SyncListTable.ColNamesEnum.SyncTime}")}",
|
||||
.RevisionID = destRevId,
|
||||
.IsExistsTable = True})
|
||||
End If
|
||||
Else
|
||||
result.Add(New SyncTableScheme() With {.TableName = destTableName,
|
||||
.SyncType = $"{destDataTable.Rows(i)($"{Customer.SyncListTable.ColNamesEnum.SyncType}")}",
|
||||
.LastSyncTime = $"2000-01-01 00:00:00",
|
||||
.RevisionID = $"{destDataTable.Rows(i)($"{Customer.SyncListTable.ColNamesEnum.RevisionID}")}",
|
||||
.IsExistsTable = False})
|
||||
End If
|
||||
Next
|
||||
Return result
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "下载远程数据至本地"
|
||||
''' <summary>
|
||||
''' 更新下载数据表
|
||||
''' </summary>
|
||||
''' <param name="remoteDb">远程数据库执行器</param>
|
||||
''' <param name="localDb">本地数据库执行器</param>
|
||||
''' <param name="tables">需要同步的数据表信息集合</param>
|
||||
Private Sub UpdateTables(remoteDb As DbExecutor, localDb As DbExecutor, dbName As String, tables As List(Of SyncTableScheme))
|
||||
Dim ts As Date
|
||||
Try
|
||||
ts = CDate(remoteDb.ExecuteScalar("select current_timestamp()"))
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"Get DB System Time Error:{ex.Message}")
|
||||
Return
|
||||
End Try
|
||||
|
||||
For Each table As SyncTableScheme In tables
|
||||
table.NowSyncTime = ts.ToString("yyyy-MM-dd HH:mm:ss")
|
||||
localDb.BeginTransaction()
|
||||
Try
|
||||
If String.Compare(table.SyncType, "all", True) = 0 Then
|
||||
UpdateTableForAll(remoteDb, localDb, dbName, table)
|
||||
ElseIf String.Compare(table.SyncType, "new", True) = 0 Then
|
||||
'增量更新Update限制,必须包含ID、UpdateTime字段,且ID字段为主键
|
||||
UpdateTableForNew(remoteDb, localDb, dbName, table)
|
||||
Else
|
||||
UpdateTableForAll(remoteDb, localDb, dbName, table)
|
||||
End If
|
||||
|
||||
UpdateVersionTable(localDb, table)
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"UpdateTable {table.TableName} Error:{ex.Message}")
|
||||
End Try
|
||||
localDb.CommitTransaction()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 下载修改全表修改部分的方式下载表
|
||||
''' </summary>
|
||||
''' <param name="remoteDb"></param>
|
||||
''' <param name="localDb"></param>
|
||||
''' <param name="dbName"></param>
|
||||
''' <param name="table"></param>
|
||||
Private Sub UpdateTableForNew(remoteDb As DbExecutor, localDb As DbExecutor, dbName As String, table As SyncTableScheme)
|
||||
Dim maxID As Integer = 0
|
||||
If table.IsExistsTable = False Then
|
||||
Dim remoteTable As DataTable = remoteDb.ExecuteDataTable(remoteDb.CmdHelper.DbSearchAll(dbName, table.TableName, "1 = 0"))
|
||||
Dim createTableString As String = CreateTableStringByDataTable(table.TableName, remoteTable) '获取建表语句
|
||||
localDb.ExecuteNonQuery(createTableString)
|
||||
Else
|
||||
'查询本地最大ID,主键必须为ID
|
||||
Dim cmd As String = localDb.CmdHelper.SearchOrder(New List(Of String)() From {"ID"}, table.TableName, "ORDER BY [ID] DESC LIMIT 1")
|
||||
Dim maxIdObject As Object = localDb.ExecuteScalar(cmd)
|
||||
If IsDBNull(maxIdObject) = False Then
|
||||
maxID = CInt(maxIdObject)
|
||||
End If
|
||||
End If
|
||||
|
||||
'通过dataReader插入数据,查询远程更新时间后的所有内容
|
||||
Using reader As DbDataReader = remoteDb.ExecuteReader(remoteDb.CmdHelper.DbSearchAll(dbName, table.TableName, $"`UpdateTime` > '{table.LastSyncTime}'"))
|
||||
While reader.Read()
|
||||
If CInt(reader("ID")) > maxID Then '小于最大ID则更新,大于最大ID则插入
|
||||
InsertDataByDataReader(localDb, table.TableName, reader)
|
||||
Else
|
||||
UpdateDataByDataReader(localDb, table.TableName, reader)
|
||||
End If
|
||||
End While
|
||||
reader.Close()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 更新全表的方式下载表
|
||||
''' </summary>
|
||||
''' <param name="remoteDb"></param>
|
||||
''' <param name="localDb"></param>
|
||||
''' <param name="table"></param>
|
||||
Private Sub UpdateTableForAll(remoteDb As DbExecutor, localDb As DbExecutor, dbName As String, table As SyncTableScheme)
|
||||
'删除本地表
|
||||
If table.IsExistsTable Then
|
||||
localDb.ExecuteNonQuery(localDb.CmdHelper.DropTable(table.TableName))
|
||||
End If
|
||||
|
||||
'新建表(考虑是否应该查询总数后,依此取1000行的方式下载,或考虑使用DataReader)
|
||||
Dim remoteTable As DataTable = remoteDb.ExecuteDataTable(remoteDb.CmdHelper.DbSearchAll(dbName, table.TableName, "1 = 0"))
|
||||
Dim createTableString As String = CreateTableStringByDataTable(table.TableName, remoteTable) '获取建表语句
|
||||
localDb.ExecuteNonQuery(createTableString)
|
||||
|
||||
'通过dataReader插入数据
|
||||
Using reader As DbDataReader = remoteDb.ExecuteReader(remoteDb.CmdHelper.DbSearchAll(dbName, table.TableName))
|
||||
While reader.Read()
|
||||
InsertDataByDataReader(localDb, table.TableName, reader)
|
||||
End While
|
||||
reader.Close()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateDataByDataReader(localDb As DbExecutor, tableName As String, dbReader As DbDataReader)
|
||||
Dim colNames As New List(Of String)
|
||||
|
||||
Using comm As DbCommand = localDb.CreateCommand()
|
||||
For i As Integer = 0 To dbReader.FieldCount - 1
|
||||
colNames.Add(dbReader.GetName(i))
|
||||
|
||||
Dim param As DbParameter = comm.CreateParameter()
|
||||
param.DbType = DbType.Object
|
||||
param.ParameterName = $"@{dbReader.GetName(i)}"
|
||||
param.Value = dbReader.Item(i)
|
||||
|
||||
comm.Parameters.Add(param)
|
||||
Next
|
||||
|
||||
comm.CommandText = localDb.CmdHelper.UpdateParam(tableName, colNames, $"`ID` = {dbReader("ID")}")
|
||||
|
||||
comm.ExecuteNonQuery()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub InsertDataByDataReader(localDb As DbExecutor, tableName As String, dbReader As DbDataReader)
|
||||
Dim colNames As New List(Of String)
|
||||
|
||||
Using comm As DbCommand = localDb.CreateCommand()
|
||||
For i As Integer = 0 To dbReader.FieldCount - 1
|
||||
colNames.Add(dbReader.GetName(i))
|
||||
|
||||
Dim param As DbParameter = comm.CreateParameter()
|
||||
param.DbType = DbType.Object
|
||||
param.ParameterName = $"@{dbReader.GetName(i)}"
|
||||
param.Value = dbReader.Item(i)
|
||||
|
||||
comm.Parameters.Add(param)
|
||||
Next
|
||||
|
||||
comm.CommandText = localDb.CmdHelper.InsertParam(tableName, colNames)
|
||||
|
||||
comm.ExecuteNonQuery()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 将目标DataTable的所有数据插入到指定数据表中,不检测是否需要新增列
|
||||
'''
|
||||
''' 后续插入字符需要区别数值与字符串
|
||||
''' </summary>
|
||||
''' <param name="localDb"></param>
|
||||
''' <param name="tableName"></param>
|
||||
''' <param name="dataTable"></param>
|
||||
Private Sub InsertDataByDataTable(localDb As DbExecutor, tableName As String, dataTable As DataTable)
|
||||
Dim colNameParams As New Dictionary(Of String, String)
|
||||
' Dim colParamValues As New Dictionary(Of String, Object)
|
||||
|
||||
For Each dtRow As DataRow In dataTable.Rows
|
||||
For Each dtCol As DataColumn In dataTable.Columns
|
||||
colNameParams.Add(dtCol.ColumnName, $"@{dtCol.ColumnName}")
|
||||
' colParamValues.Add($"@{dtCol.ColumnName}", dtRow(dtCol.ColumnName))
|
||||
|
||||
'存疑是否可以修改
|
||||
Dim param As DbParameter = localDb.Command.CreateParameter()
|
||||
param.DbType = DbType.Object
|
||||
param.ParameterName = $"@{dtCol.ColumnName}"
|
||||
param.Value = dtRow(dtCol.ColumnName)
|
||||
|
||||
localDb.Command.Parameters.Add(param)
|
||||
Next
|
||||
|
||||
Dim cmdText As String = localDb.CmdHelper.Insert(tableName, colNameParams)
|
||||
localDb.ExecuteNonQuery(cmdText) '执行插入
|
||||
localDb.Command.Parameters.Clear() '清空参数
|
||||
|
||||
|
||||
colNameParams.Clear() '复位
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 更新本地数据成功后,同步更新本地版本记录表
|
||||
''' </summary>
|
||||
''' <param name="localDb">本地数据库执行器</param>
|
||||
''' <param name="table">需要同步的数据表信息</param>
|
||||
Private Sub UpdateVersionTable(localDb As DbExecutor, table As SyncTableScheme)
|
||||
Dim tableName As String = Customer.SyncListTable.TableName
|
||||
Dim cmdText As String
|
||||
|
||||
If table.IsExistsTable Then
|
||||
Dim colNameValue As New Dictionary(Of String, String) From {
|
||||
{$"{Customer.SyncListTable.ColNamesEnum.RevisionID}", table.RevisionID},
|
||||
{$"{Customer.SyncListTable.ColNamesEnum.SyncTime}", table.NowSyncTime}
|
||||
}
|
||||
Dim condition As String = $"{Customer.SyncListTable.ColNamesEnum.TableName} = '{table.TableName}'"
|
||||
cmdText = localDb.CmdHelper.Update(tableName, colNameValue, condition)
|
||||
Else
|
||||
Dim colNameValue As New Dictionary(Of String, String) From {
|
||||
{$"{Customer.SyncListTable.ColNamesEnum.TableName}", table.TableName},
|
||||
{$"{Customer.SyncListTable.ColNamesEnum.RevisionID}", table.RevisionID},
|
||||
{$"{Customer.SyncListTable.ColNamesEnum.SyncType}", table.SyncType},
|
||||
{$"{Customer.SyncListTable.ColNamesEnum.SyncTime}", table.NowSyncTime}
|
||||
}
|
||||
cmdText = localDb.CmdHelper.Insert(tableName, colNameValue)
|
||||
End If
|
||||
|
||||
Try
|
||||
localDb.ExecuteNonQuery(cmdText)
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"UpdateVersionTable Error:{ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "数据类型转换"
|
||||
Enum SystemTypeEnum
|
||||
[AnsiString]
|
||||
[AnsiStringFixedLength]
|
||||
Binary
|
||||
[Boolean]
|
||||
[Byte]
|
||||
[DateTime]
|
||||
[Decimal]
|
||||
[Double]
|
||||
[Guid]
|
||||
[Int16]
|
||||
[Int32]
|
||||
[Int64]
|
||||
[SByte]
|
||||
[Single]
|
||||
[String]
|
||||
[TimeSpan]
|
||||
[UInt16]
|
||||
[UInt32]
|
||||
[UInt64]
|
||||
End Enum
|
||||
|
||||
''' <summary>
|
||||
''' 将.net数据类型转换为Sqlite数据类型
|
||||
''' </summary>
|
||||
''' <param name="dataType">.net数据类型</param>
|
||||
''' <returns>转换后的Sqlite数据类型</returns>
|
||||
Public Shared Function ConvertSystemTypeToSqliteType(dataType As String) As String
|
||||
Dim reType As String
|
||||
|
||||
Select Case dataType
|
||||
Case SystemTypeEnum.AnsiString.ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Varchar.ToString()
|
||||
|
||||
Case SystemTypeEnum.[AnsiStringFixedLength].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Nchar.ToString()
|
||||
|
||||
Case SystemTypeEnum.Binary.ToString(), SystemTypeEnum.Byte.ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Blob.ToString()
|
||||
|
||||
Case SystemTypeEnum.[Boolean].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Bit.ToString()
|
||||
|
||||
Case SystemTypeEnum.[DateTime].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Datetime.ToString()
|
||||
|
||||
Case SystemTypeEnum.[Decimal].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.[Decimal].ToString()
|
||||
|
||||
Case SystemTypeEnum.[Double].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Real.ToString()
|
||||
|
||||
Case SystemTypeEnum.[Guid].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.UniqueIdentifier.ToString()
|
||||
|
||||
Case SystemTypeEnum.[Int16].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.SmallInt.ToString()
|
||||
|
||||
Case SystemTypeEnum.[Int32].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.[Integer].ToString()
|
||||
|
||||
Case SystemTypeEnum.[Int64].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.[Integer].ToString()
|
||||
|
||||
Case SystemTypeEnum.[SByte].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.TinyInt.ToString()
|
||||
|
||||
Case SystemTypeEnum.[Single].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.[Single].ToString()
|
||||
|
||||
Case SystemTypeEnum.[String].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Nvarchar.ToString()
|
||||
|
||||
Case SystemTypeEnum.TimeSpan.ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Datetime.ToString()
|
||||
|
||||
Case SystemTypeEnum.[UInt16].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.SmallUint.ToString()
|
||||
|
||||
Case SystemTypeEnum.[UInt32].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Uint.ToString()
|
||||
|
||||
Case SystemTypeEnum.[UInt64].ToString()
|
||||
reType = Sqlite.DataParam.DataTypeEnum.UnsignedInteger.ToString()
|
||||
|
||||
Case "Byte[]"
|
||||
reType = Sqlite.DataParam.DataTypeEnum.Blob.ToString()
|
||||
|
||||
Case Else
|
||||
'reType = Sqlite.DataParam.DataTypeEnum.Varchar.ToString()
|
||||
Throw New Exception($"ConvertSystemTypeToSqliteType,UnDealType:{dataType}{vbNewLine}")
|
||||
End Select
|
||||
|
||||
Return reType
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 通过解析DbDataReader列名与列类型,暂不可用
|
||||
''' </summary>
|
||||
''' <param name="tableName"></param>
|
||||
''' <param name="reader"></param>
|
||||
''' <returns></returns>
|
||||
Private Function CreateTableStringByDataReader(tableName As String, reader As DbDataReader) As String
|
||||
Dim builder As New StringBuilder
|
||||
builder.Append($"CREATE TABLE If Not Exists [{tableName}] (")
|
||||
|
||||
For i As Integer = 0 To reader.FieldCount - 1
|
||||
If i = 0 Then
|
||||
'应该修改成通用的类型转换
|
||||
builder.Append($"[{reader.GetName(i)}] {ConvertSystemTypeToSqliteType(reader.GetDataTypeName(i))}")
|
||||
Else
|
||||
builder.Append($", [{reader.GetName(i)}] {ConvertSystemTypeToSqliteType(reader.GetDataTypeName(i))}")
|
||||
End If
|
||||
Next
|
||||
|
||||
builder.Append(" )")
|
||||
Return builder.ToString()
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 通过解析DataTable,获取建表语句
|
||||
''' </summary>
|
||||
''' <param name="tableName">数据表名</param>
|
||||
''' <param name="destTable">需要解析的内存数据表</param>
|
||||
''' <returns></returns>
|
||||
Private Function CreateTableStringByDataTable(tableName As String, destTable As DataTable) As String
|
||||
Dim builder As New StringBuilder
|
||||
builder.Append($"CREATE TABLE If Not Exists [{tableName}] (")
|
||||
For i As Integer = 0 To destTable.Columns.Count - 1
|
||||
If i = 0 Then
|
||||
'应该修改成通用的类型转换
|
||||
builder.Append($"[{destTable.Columns(i).ColumnName}] {ConvertSystemTypeToSqliteType(destTable.Columns(i).DataType.Name)}")
|
||||
Else
|
||||
builder.Append($", [{destTable.Columns(i).ColumnName}] {ConvertSystemTypeToSqliteType(destTable.Columns(i).DataType.Name)}")
|
||||
End If
|
||||
|
||||
'列名长度
|
||||
If destTable.Columns(i).MaxLength > -1 Then
|
||||
builder.Append($"({destTable.Columns(i).MaxLength})")
|
||||
End If
|
||||
|
||||
'列为空
|
||||
If destTable.Columns(i).AllowDBNull = False Then
|
||||
builder.Append($" NOT NULL")
|
||||
End If
|
||||
|
||||
'列自增(默认列自增为主键)
|
||||
If destTable.Columns(i).AutoIncrement Then
|
||||
builder.Append($" PRIMARY KEY AutoIncrement")
|
||||
'Else
|
||||
' '唯一值
|
||||
' If destTable.Columns(i).Unique Then
|
||||
' builder.Append($" Unique")
|
||||
' End If
|
||||
End If
|
||||
|
||||
''默认值
|
||||
'If destTable.Columns(i).DefaultValue IsNot Nothing Then
|
||||
' If String.IsNullOrEmpty(destTable.Columns(i).DefaultValue.ToString()) = False Then
|
||||
' builder.Append($" DEFAULT '{destTable.Columns(i).DefaultValue}'")
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Next
|
||||
|
||||
builder.Append(" )")
|
||||
Return builder.ToString()
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
33
AUTS_DataService/ServiceTask/IServiceTask.vb
Normal file
33
AUTS_DataService/ServiceTask/IServiceTask.vb
Normal file
@@ -0,0 +1,33 @@
|
||||
''' <summary>
|
||||
''' 任务类型接口,每个任务必须实现的功能
|
||||
''' </summary>
|
||||
Public Interface IServiceTask
|
||||
''' <summary>
|
||||
''' 任务开始
|
||||
''' </summary>
|
||||
Sub Start()
|
||||
|
||||
''' <summary>
|
||||
''' 任务退出
|
||||
''' </summary>
|
||||
Sub [Stop]()
|
||||
|
||||
''' <summary>
|
||||
''' 重启任务
|
||||
''' </summary>
|
||||
Sub Restart()
|
||||
|
||||
''' <summary>
|
||||
''' 设置任务参数
|
||||
''' </summary>
|
||||
''' <param name="params"></param>
|
||||
Sub SetParams(params As Dictionary(Of String, String))
|
||||
|
||||
''' <summary>
|
||||
''' 获取任务参数
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Function GetParams() As Dictionary(Of String, String)
|
||||
|
||||
|
||||
End Interface
|
||||
127
AUTS_DataService/ServiceTask/JsonFileListen.vb
Normal file
127
AUTS_DataService/ServiceTask/JsonFileListen.vb
Normal file
@@ -0,0 +1,127 @@
|
||||
Imports System.IO
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Imports UTS_Core.Database
|
||||
Imports UTS_Core.UTSModule.DbConnect
|
||||
|
||||
Public Class JsonFileListen
|
||||
|
||||
''' <summary>
|
||||
''' 读取文件并将内容保存在本地数据库中
|
||||
''' </summary>
|
||||
''' <param name="path"></param>
|
||||
''' <returns></returns>
|
||||
Public Function ReadFile(db As DbExecutor, path As String) As Boolean
|
||||
ServiceLog.WriteInfoLog($"FileListen Begin ReadFile!")
|
||||
|
||||
If File.Exists(path) = False Then
|
||||
Throw New Exception($"{path}不存在!")
|
||||
End If
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Get fileLength!")
|
||||
|
||||
Dim fileInfo As New FileInfo(path) '获取文件大小
|
||||
If fileInfo.Length = 0 Then Return True
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Begin Read Text String!")
|
||||
|
||||
Using reader As New StreamReader(path)
|
||||
While reader.Peek() <> -1
|
||||
Dim line As String = reader.ReadLine()
|
||||
If String.IsNullOrWhiteSpace(line) Then Continue While '过滤信息
|
||||
line = line.Replace("\", "\\") '处理转义字符
|
||||
|
||||
Dim tmpField As Dictionary(Of String, String)
|
||||
Try
|
||||
tmpField = CType(JsonConvert.DeserializeObject(line, GetType(Dictionary(Of String, String))), Dictionary(Of String, String))
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"FileListen JsonConvertToKeyValue Error:{ex.Message};JsonString:{line}")
|
||||
Continue While
|
||||
End Try
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Filter Text String!")
|
||||
|
||||
''过滤缺失字段字符串
|
||||
If tmpField.ContainsKey("ProjectName") = False OrElse tmpField.ContainsKey("StationName") = False Then
|
||||
ServiceLog.WriteErrorLog($"FileListen Unexist ProjectName Or StationName Filed,JsonString:{line}")
|
||||
Continue While
|
||||
End If
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Filter Text String Success!")
|
||||
|
||||
'数据处理,根据表名进行分类,增删必要字段
|
||||
Dim tableName As String
|
||||
Try
|
||||
Dim projectIndex As Integer = DbConnector.SearchProjectIndex(db, tmpField("ProjectName"))
|
||||
Dim stationIndex As Integer = DbConnector.SearchStationIndex(db, projectIndex, tmpField("StationName"))
|
||||
tableName = UTS_Core.UTSModule.DbTableModel.Customer.TestLogTable.TableName(projectIndex, stationIndex)
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"FileListen GetTestLogTableName Error:{ex.Message};ProjectName:{tmpField("ProjectName")};StationName:{tmpField("StationName")}")
|
||||
Continue While
|
||||
End Try
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Begin CreateTestLogTable!")
|
||||
|
||||
Try '本地表格新建
|
||||
DbConnector.UtsCreateTestLogTableToLocal(db, tableName)
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"FileListen CreateTestLogTable Error:{ex.Message}")
|
||||
Continue While
|
||||
End Try
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Begin CreateTestLogTable Success!")
|
||||
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Begin Filter Db Filed!")
|
||||
|
||||
|
||||
Dim fields As New Dictionary(Of String, String) '入库字段
|
||||
For Each valuePair As KeyValuePair(Of String, String) In tmpField
|
||||
If String.IsNullOrWhiteSpace(valuePair.Key) Then Continue For
|
||||
If String.Compare(valuePair.Key, "ProjectName", True) = 0 Then Continue For
|
||||
If String.Compare(valuePair.Key, "StationName", True) = 0 Then Continue For
|
||||
|
||||
If String.Compare(valuePair.Key, "ProductionLineID", True) = 0 Then
|
||||
If String.IsNullOrWhiteSpace(valuePair.Value) Then Continue For
|
||||
End If
|
||||
|
||||
If String.Compare(valuePair.Key, "OrderID", True) = 0 Then
|
||||
If String.IsNullOrWhiteSpace(valuePair.Value) Then Continue For
|
||||
End If
|
||||
|
||||
If String.Compare(valuePair.Key, "ServiceID", True) = 0 Then
|
||||
If String.IsNullOrWhiteSpace(valuePair.Value) Then Continue For
|
||||
End If
|
||||
|
||||
If String.Compare(valuePair.Key, "UserID", True) = 0 Then
|
||||
If String.IsNullOrWhiteSpace(valuePair.Value) Then Continue For
|
||||
End If
|
||||
|
||||
fields.Add(valuePair.Key, valuePair.Value) '过滤字段,保留有效字段
|
||||
Next
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Begin Filter Db Filed Success!")
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen SaveTestRecord!")
|
||||
Try '存储
|
||||
DbConnector.UtsInsertToLocal(db, UTS_Core.UTSModule.UtsDb.RemotePrivateDb, tableName, fields)
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"FileListen SaveTestRecord Error:{ex.Message}")
|
||||
Continue While
|
||||
End Try
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen SaveTestRecord Success!")
|
||||
End While
|
||||
|
||||
reader.Close()
|
||||
End Using
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Begin Clear!")
|
||||
|
||||
File.WriteAllText(path, String.Empty) '清空文件内容,由于多地同时写的原因,有可能会失败
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Success!")
|
||||
|
||||
Return True
|
||||
End Function
|
||||
End Class
|
||||
162
AUTS_DataService/ServiceTask/ListenJsonFileServiceTask.vb
Normal file
162
AUTS_DataService/ServiceTask/ListenJsonFileServiceTask.vb
Normal file
@@ -0,0 +1,162 @@
|
||||
Imports System.Threading
|
||||
Imports System.Xml.Serialization
|
||||
Imports UTS_Core.UTSModule.Service
|
||||
|
||||
<XmlInclude(GetType(ListenJsonFileServiceTask))>
|
||||
Public Class ListenJsonFileServiceTask
|
||||
Inherits ServiceTask
|
||||
|
||||
Private ReadOnly _jsonFile As JsonFileListen
|
||||
|
||||
Sub New()
|
||||
TaskType = ServiceTaskTypeEnum.ListenJsonFile
|
||||
TaskStatus = ServiceTaskStatusEnum.Stop
|
||||
TaskName = "ListenJsonFile"
|
||||
|
||||
_jsonFile = New JsonFileListen()
|
||||
End Sub
|
||||
|
||||
Sub New(name As String)
|
||||
TaskType = ServiceTaskTypeEnum.ListenJsonFile
|
||||
TaskStatus = ServiceTaskStatusEnum.Stop
|
||||
TaskName = name
|
||||
|
||||
_jsonFile = New JsonFileListen()
|
||||
End Sub
|
||||
|
||||
Sub New(name As String, param As Dictionary(Of String, String))
|
||||
TaskType = ServiceTaskTypeEnum.ListenJsonFile
|
||||
TaskStatus = ServiceTaskStatusEnum.Stop
|
||||
TaskName = name
|
||||
|
||||
_jsonFile = New JsonFileListen()
|
||||
|
||||
SetParams(param)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 具体的执行过程
|
||||
''' </summary>
|
||||
''' <param name="stat">状态值,暂未启用</param>
|
||||
Private Sub StartCallback(stat As Object)
|
||||
While TaskStatus = ServiceTaskStatusEnum.Start
|
||||
ServiceLog.WriteInfoLog($"SyncTask Wait Timeout.")
|
||||
|
||||
'等待任务
|
||||
Dim lastTime As DateTime = Now
|
||||
While (Now - lastTime).TotalMinutes < Interval
|
||||
If TaskStatus = ServiceTaskStatusEnum.Stop Then
|
||||
Return
|
||||
End If
|
||||
|
||||
Thread.Sleep(1000)
|
||||
End While
|
||||
|
||||
|
||||
Using localDb As New UTS_Core.Database.DbExecutor(UTS_Core.UTSModule.UtsDb.LocalDbType, UTS_Core.UTSModule.UtsDb.LocalConnString) '连接本地字符串
|
||||
localDb.Open()
|
||||
localDb.BeginTransaction()
|
||||
Try
|
||||
_jsonFile.ReadFile(localDb, FilePath)
|
||||
Catch ex As Exception
|
||||
ServiceLog.WriteErrorLog($"_jsonFile.ReadFile TaskName:{TaskName},ListenJsonFile Error:{ex.Message}")
|
||||
End Try
|
||||
localDb.CommitTransaction()
|
||||
localDb.Close()
|
||||
End Using
|
||||
End While
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub Start()
|
||||
ServiceLog.WriteInfoLog($"FileListen Befor StartCallback")
|
||||
|
||||
TaskStatus = ServiceTaskStatusEnum.Start
|
||||
|
||||
If _syncThread IsNot Nothing AndAlso _syncThread.IsAlive Then
|
||||
ServiceLog.WriteInfoLog($"FileListenThread IsAlive!")
|
||||
Return
|
||||
End If
|
||||
|
||||
_syncThread = New Thread(AddressOf StartCallback)
|
||||
_syncThread.IsBackground = True
|
||||
_syncThread.Start()
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen After StartCallback")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub [Stop]()
|
||||
ServiceLog.WriteInfoLog($"FileListen Befor Stop!")
|
||||
TaskStatus = ServiceTaskStatusEnum.Stop
|
||||
|
||||
Dim lastTime As DateTime = Now
|
||||
While _syncThread IsNot Nothing AndAlso _syncThread.IsAlive
|
||||
If (Now - lastTime).TotalMilliseconds > 10000 Then
|
||||
_syncThread.Abort()
|
||||
End If
|
||||
|
||||
Thread.Sleep(10)
|
||||
End While
|
||||
|
||||
ServiceLog.WriteInfoLog($"FileListen Stop!")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub Restart()
|
||||
ServiceLog.WriteInfoLog($"FileListen Befor Restart!")
|
||||
If _syncThread IsNot Nothing AndAlso _syncThread.IsAlive Then
|
||||
[Stop]()
|
||||
|
||||
End If
|
||||
|
||||
Start()
|
||||
ServiceLog.WriteInfoLog($"FileListen Restart!")
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Sub SetParams(params As Dictionary(Of String, String))
|
||||
Dim tmpStatus As ServiceTaskStatusEnum
|
||||
Dim tmpInterval As Integer
|
||||
Dim tmpPath As String = String.Empty
|
||||
|
||||
'将转换后的数据填充至临时缓存,一遍设置失败时可以保留上一次数据
|
||||
For Each param As KeyValuePair(Of String, String) In params
|
||||
Select Case param.Key
|
||||
Case "Interval"
|
||||
If Integer.TryParse(param.Value, tmpInterval) = False Then
|
||||
Throw New Exception($"Error Interval :{param.Value}")
|
||||
End If
|
||||
Case "Path"
|
||||
tmpPath = param.Value
|
||||
Case "Status", "Type", "Name" '不处理的字段
|
||||
End Select
|
||||
Next
|
||||
|
||||
TaskStatus = tmpStatus
|
||||
Interval = tmpInterval
|
||||
FilePath = tmpPath
|
||||
End Sub
|
||||
|
||||
|
||||
Public Overrides Function GetParams() As Dictionary(Of String, String)
|
||||
Dim params As New Dictionary(Of String, String) From {
|
||||
{"Type", TaskType.ToString()},
|
||||
{"Name", TaskName},
|
||||
{"Status", TaskStatus.ToString()},
|
||||
{"Interval", Interval.ToString()},
|
||||
{"Path", FilePath}
|
||||
}
|
||||
Return params
|
||||
End Function
|
||||
|
||||
|
||||
Public Property Interval() As Integer
|
||||
|
||||
Public Property FilePath() As String
|
||||
|
||||
Private _syncThread As Thread
|
||||
End Class
|
||||
88
AUTS_DataService/ServiceTask/ServiceTask.vb
Normal file
88
AUTS_DataService/ServiceTask/ServiceTask.vb
Normal file
@@ -0,0 +1,88 @@
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
|
||||
<Serializable>
|
||||
<XmlInclude(GetType(DbSyncServiceTask))>
|
||||
<XmlInclude(GetType(ListenJsonFileServiceTask))>
|
||||
Public MustInherit Class ServiceTask
|
||||
Implements IServiceTask
|
||||
|
||||
''' <summary>
|
||||
''' 服务任务类型枚举集合
|
||||
''' </summary>
|
||||
Enum ServiceTaskTypeEnum
|
||||
''' <summary>
|
||||
''' 数据库同步
|
||||
''' </summary>
|
||||
DbSync
|
||||
|
||||
''' <summary>
|
||||
''' 监听Json文件
|
||||
''' </summary>
|
||||
ListenJsonFile
|
||||
End Enum
|
||||
|
||||
''' <summary>
|
||||
''' 服务任务状态枚举值
|
||||
''' </summary>
|
||||
Enum ServiceTaskStatusEnum
|
||||
''' <summary>
|
||||
''' 启动状态
|
||||
''' </summary>
|
||||
Start
|
||||
|
||||
''' <summary>
|
||||
''' 停止状态
|
||||
''' </summary>
|
||||
[Stop]
|
||||
End Enum
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 服务任务类型
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property TaskType() As ServiceTaskTypeEnum
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 服务任务名,服务任务的唯一索引
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property TaskName() As String
|
||||
|
||||
''' <summary>
|
||||
''' 服务任务的状态
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property TaskStatus() As ServiceTaskStatusEnum
|
||||
|
||||
''' <summary>
|
||||
''' 任务开启
|
||||
''' </summary>
|
||||
Public MustOverride Sub Start() Implements IServiceTask.Start
|
||||
|
||||
''' <summary>
|
||||
''' 任务停止
|
||||
''' </summary>
|
||||
Public MustOverride Sub [Stop]() Implements IServiceTask.[Stop]
|
||||
|
||||
''' <summary>
|
||||
''' 任务重启
|
||||
''' </summary>
|
||||
Public MustOverride Sub Restart() Implements IServiceTask.Restart
|
||||
|
||||
''' <summary>
|
||||
''' 任务参数集合设置
|
||||
''' </summary>
|
||||
''' <param name="params">任务参数键值对</param>
|
||||
Public MustOverride Sub SetParams(params As Dictionary(Of String, String)) Implements IServiceTask.SetParams
|
||||
|
||||
''' <summary>
|
||||
''' 任务参数集合获取
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public MustOverride Function GetParams() As Dictionary(Of String, String) Implements IServiceTask.GetParams
|
||||
|
||||
End Class
|
||||
230
AUTS_DataService/ServiceTask/ServiceTasks.vb
Normal file
230
AUTS_DataService/ServiceTask/ServiceTasks.vb
Normal file
@@ -0,0 +1,230 @@
|
||||
Imports UTS_Core.UTSModule.Service
|
||||
|
||||
''' <summary>
|
||||
''' 服务任务列表,管理服务的所有任务
|
||||
''' </summary>
|
||||
Public Class ServiceTasks
|
||||
Private ReadOnly _tasks As Dictionary(Of String, ServiceTask)
|
||||
|
||||
Public Event AddTask(task As Dictionary(Of String, String))
|
||||
Public Event UpdateTask(task As Dictionary(Of String, String))
|
||||
Public Event DelTask(task As String)
|
||||
Public Event ClearTask()
|
||||
|
||||
|
||||
|
||||
Sub New()
|
||||
_tasks = New Dictionary(Of String, ServiceTask)()
|
||||
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 任务总数
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function Count() As Integer
|
||||
Return _tasks.Count
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 获取所有的服务任务
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function GetAllServiceTasks() As List(Of ServiceTask)
|
||||
Return _tasks.Values.ToList()
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 添加任务,默认开启任务
|
||||
''' </summary>
|
||||
Public Sub Add(task As ServiceTask, Optional start As Boolean = True)
|
||||
If String.IsNullOrEmpty(task.TaskName) Then '无效的任务名
|
||||
Throw New Exception($"TaskName {task.TaskName} is invalid!")
|
||||
End If
|
||||
|
||||
If _tasks.ContainsKey(task.TaskName) Then '已存在的任务名
|
||||
Throw New Exception($"TaskName {task.TaskName} already exists!")
|
||||
End If
|
||||
|
||||
_tasks.Add(task.TaskName, task)
|
||||
If start Then task.Start() '默认添加任务时,开启任务
|
||||
RaiseEvent AddTask(task.GetParams())
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 添加任务,默认开启服务
|
||||
''' </summary>
|
||||
Public Sub Add(taskInfo As Dictionary(Of String, String), Optional start As Boolean = True)
|
||||
If taskInfo.ContainsKey("Type") AndAlso taskInfo.ContainsKey("Name") Then
|
||||
Dim task As ServiceTask
|
||||
Select Case taskInfo("Type")'根据类型进行不同任务的初始化
|
||||
Case $"{ ServiceTask.ServiceTaskTypeEnum.DbSync}"
|
||||
task = New DbSyncServiceTask(taskInfo("Name"), taskInfo)
|
||||
Add(task, start)
|
||||
ServiceLog.WriteInfoLog($"taskParam:{task.TaskName} {task.TaskStatus} {task.TaskType}")
|
||||
Case $"{ ServiceTask.ServiceTaskTypeEnum.ListenJsonFile}"
|
||||
task = New ListenJsonFileServiceTask(taskInfo("Name"), taskInfo)
|
||||
Add(task, start)
|
||||
Case Else
|
||||
Throw New Exception($"Unknown Type:{taskInfo("Type")}")
|
||||
End Select
|
||||
Else
|
||||
Throw New Exception($"AddTask Invalid TaskInfo")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 添加任务列表
|
||||
''' </summary>
|
||||
''' <param name="tasks"></param>
|
||||
Public Sub AddRange(tasks As List(Of ServiceTask), Optional start As Boolean = True)
|
||||
For Each task As ServiceTask In tasks
|
||||
Add(task, start)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 移除指定的服务任务
|
||||
''' </summary>
|
||||
''' <param name="task"></param>
|
||||
Sub Remove(task As ServiceTask)
|
||||
If _tasks.ContainsKey(task.TaskName) Then
|
||||
task.Stop()
|
||||
RaiseEvent DelTask(task.TaskName)
|
||||
_tasks.Remove(task.TaskName)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 移除指定名称的服务任务
|
||||
''' </summary>
|
||||
Sub RemoveAt(taskName As String)
|
||||
If _tasks.ContainsKey(taskName) Then
|
||||
Remove(_tasks.Item(taskName))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 清空所有的服务任务
|
||||
''' </summary>
|
||||
Sub Clear()
|
||||
'关闭所有任务
|
||||
For Each task As KeyValuePair(Of String, ServiceTask) In _tasks
|
||||
task.Value.Stop()
|
||||
Next
|
||||
|
||||
'清空任务列表
|
||||
_tasks.Clear()
|
||||
RaiseEvent ClearTask()
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 设置指定任务的任务参数
|
||||
''' </summary>
|
||||
''' <param name="taskName"></param>
|
||||
''' <param name="param"></param>
|
||||
Public Sub SetTaskParams(taskName As String, param As Dictionary(Of String, String))
|
||||
If _tasks.ContainsKey(taskName) = False Then '不存在的任务
|
||||
Throw New Exception($"TaskName {taskName} is nonexistent!")
|
||||
End If
|
||||
_tasks.Item(taskName).SetParams(param)
|
||||
RaiseEvent UpdateTask(_tasks.Item(taskName).GetParams())
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 返回指定任务名称的任务参数
|
||||
''' </summary>
|
||||
''' <param name="taskName"></param>
|
||||
''' <returns></returns>
|
||||
Public Function GetTaskParams(taskName As String) As Dictionary(Of String, String)
|
||||
If _tasks.ContainsKey(taskName) = False Then '不存在的任务
|
||||
Throw New Exception($"TaskName {taskName} is nonexistent!")
|
||||
End If
|
||||
Return _tasks.Item(taskName).GetParams()
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 获取所有任务的参数信息
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function GetAllTasksParam() As List(Of Dictionary(Of String, String))
|
||||
Dim allParams As New List(Of Dictionary(Of String, String))
|
||||
For Each task As KeyValuePair(Of String, ServiceTask) In _tasks
|
||||
allParams.Add(task.Value.GetParams())
|
||||
Next
|
||||
Return allParams
|
||||
End Function
|
||||
|
||||
Public Sub StartTask(taskName As String)
|
||||
If _tasks.ContainsKey(taskName) = False Then '不存在的任务
|
||||
Throw New Exception($"TaskName {taskName} is nonexistent!")
|
||||
End If
|
||||
|
||||
_tasks.Item(taskName).Start()
|
||||
RaiseEvent UpdateTask(_tasks.Item(taskName).GetParams())
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
'''开启所有任务
|
||||
''' </summary>
|
||||
Public Sub StartAllTasks()
|
||||
For Each task As KeyValuePair(Of String, ServiceTask) In _tasks
|
||||
task.Value.Start()
|
||||
RaiseEvent UpdateTask(task.Value.GetParams())
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 结束休眠,立即执行任务
|
||||
''' </summary>
|
||||
''' <param name="taskName"></param>
|
||||
Public Sub RestartTask(taskName As String)
|
||||
If _tasks.ContainsKey(taskName) = False Then '不存在的任务
|
||||
Throw New Exception($"TaskName {taskName} is nonexistent!")
|
||||
End If
|
||||
|
||||
_tasks.Item(taskName).Restart()
|
||||
RaiseEvent UpdateTask(_tasks.Item(taskName).GetParams())
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
'''开启所有任务
|
||||
''' </summary>
|
||||
Public Sub RestartAllTasks()
|
||||
For Each task As KeyValuePair(Of String, ServiceTask) In _tasks
|
||||
task.Value.Restart()
|
||||
RaiseEvent UpdateTask(task.Value.GetParams())
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 停止指定任务名的任务
|
||||
''' </summary>
|
||||
''' <param name="taskName"></param>
|
||||
Public Sub StopTask(taskName As String)
|
||||
If _tasks.ContainsKey(taskName) = False Then '不存在的任务
|
||||
Throw New Exception($"TaskName {taskName} is nonexistent!")
|
||||
End If
|
||||
|
||||
_tasks.Item(taskName).Stop()
|
||||
RaiseEvent UpdateTask(_tasks.Item(taskName).GetParams())
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
'''停止所有任务
|
||||
''' </summary>
|
||||
Public Sub StopAllTasks()
|
||||
For Each task As KeyValuePair(Of String, ServiceTask) In _tasks
|
||||
task.Value.Stop()
|
||||
RaiseEvent UpdateTask(task.Value.GetParams())
|
||||
Next
|
||||
End Sub
|
||||
End Class
|
||||
55
AUTS_DataService/UtsApp/UtsApp.vb
Normal file
55
AUTS_DataService/UtsApp/UtsApp.vb
Normal file
@@ -0,0 +1,55 @@
|
||||
Imports System.Net.Sockets
|
||||
Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Converters
|
||||
Imports UTS_Core.UTSModule.Test.StatusMonitor
|
||||
Public Class UtsApp
|
||||
Public Property Name As String
|
||||
|
||||
Public Property ProjectName As String
|
||||
|
||||
Public Property StationName As String
|
||||
|
||||
Public Property TestPlan As String
|
||||
|
||||
Public Property Version As String
|
||||
|
||||
<JsonConverter(GetType(StringEnumConverter))>
|
||||
Public Property Status As AppStatus
|
||||
|
||||
<JsonIgnore>
|
||||
Public Property UtsStatus As ComportStatusMonitor.ComPortConnectStatusEnum
|
||||
|
||||
<JsonIgnore>
|
||||
Public Property TestStatus As TestCommandStatusMonitor.TestCommandStatusEnum
|
||||
|
||||
<JsonIgnore>
|
||||
Public Property Client As TcpClient
|
||||
|
||||
|
||||
|
||||
Sub New()
|
||||
Name = String.Empty
|
||||
ProjectName = String.Empty
|
||||
StationName = String.Empty
|
||||
TestPlan = String.Empty
|
||||
Version = String.Empty
|
||||
|
||||
UtsStatus = ComportStatusMonitor.ComPortConnectStatusEnum.UnConnected
|
||||
TestStatus = TestCommandStatusMonitor.TestCommandStatusEnum.None
|
||||
Status = AppStatus.Closed
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Enum AppStatus
|
||||
''' <summary>
|
||||
''' 已启动
|
||||
''' </summary>
|
||||
Started
|
||||
''' <summary>
|
||||
''' 已关闭
|
||||
''' </summary>
|
||||
Closed
|
||||
End Enum
|
||||
End Class
|
||||
83
AUTS_DataService/UtsApp/UtsAppManager.vb
Normal file
83
AUTS_DataService/UtsApp/UtsAppManager.vb
Normal file
@@ -0,0 +1,83 @@
|
||||
Public Class UtsAppManager
|
||||
''' <summary>
|
||||
''' 设备运行APP列表,键为APP名称,值为App对象
|
||||
''' </summary>
|
||||
Private _appDic As Dictionary(Of String, UtsApp)
|
||||
|
||||
Private _clientDic As Dictionary(Of Net.Sockets.TcpClient, UtsApp)
|
||||
|
||||
Sub New()
|
||||
_appDic = New Dictionary(Of String, UtsApp)
|
||||
_clientDic = New Dictionary(Of Net.Sockets.TcpClient, UtsApp)
|
||||
End Sub
|
||||
|
||||
Public Sub AddApp(app As UtsApp)
|
||||
If _appDic.ContainsKey(app.Name) = False Then
|
||||
_appDic.Add(app.Name, app)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 判断App是否存在队列中
|
||||
''' </summary>
|
||||
''' <param name="appName"></param>
|
||||
''' <returns></returns>
|
||||
Public Function AppExists(appName As String) As Boolean
|
||||
Return _appDic.ContainsKey(appName)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 获取UtsApp对象,没有则添加对象至队列后再返回
|
||||
''' </summary>
|
||||
''' <param name="appName"></param>
|
||||
''' <returns></returns>
|
||||
Public Function GetApp(appName As String) As UtsApp
|
||||
Static lock As New Object
|
||||
|
||||
SyncLock lock
|
||||
If _appDic.ContainsKey(appName) = False Then
|
||||
ServiceLog.WriteDebugLog($"{appName} Add!")
|
||||
_appDic.Add(appName, New UtsApp())
|
||||
End If
|
||||
End SyncLock
|
||||
|
||||
Return _appDic(appName)
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 获取当前App列表
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function GetAllApps() As List(Of UtsApp)
|
||||
Return _appDic.Values.ToList()
|
||||
End Function
|
||||
|
||||
Public Function GetClientBindApp(client As Net.Sockets.TcpClient) As UtsApp
|
||||
If _clientDic.ContainsKey(client) Then
|
||||
Return _clientDic(client)
|
||||
Else
|
||||
Return Nothing
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Sub BindClientAndApp(client As Net.Sockets.TcpClient, app As UtsApp)
|
||||
Static lock As New Object
|
||||
|
||||
SyncLock lock
|
||||
If _clientDic.ContainsKey(client) = False Then
|
||||
_clientDic.Add(client, app)
|
||||
ServiceLog.WriteDebugLog($"{_clientDic(client).Name} Connect!")
|
||||
End If
|
||||
End SyncLock
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub CancelClientBind(client As Net.Sockets.TcpClient)
|
||||
If _clientDic.ContainsKey(client) Then
|
||||
ServiceLog.WriteDebugLog($"{_clientDic(client).Name} Disconnect!")
|
||||
_clientDic(client).Status = UtsApp.AppStatus.Closed
|
||||
_clientDic(client).Client = Nothing
|
||||
_clientDic.Remove(client)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
31
AUTS_DataService/UtsGroup/ServiceGroup.vb
Normal file
31
AUTS_DataService/UtsGroup/ServiceGroup.vb
Normal file
@@ -0,0 +1,31 @@
|
||||
Public Class ServiceGroup
|
||||
Sub New()
|
||||
'Fileds = New Dictionary(Of String, String)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 当前服务所属子网组
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property ServiceGroup As String
|
||||
|
||||
''' <summary>
|
||||
''' 当前服务索引
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property ServiceIndex As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 当前命令类型
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Type As String
|
||||
|
||||
''' <summary>
|
||||
''' 当前包号
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Index As Integer
|
||||
|
||||
Public Property GroupInfo As New Dictionary(Of String, String)
|
||||
End Class
|
||||
116
AUTS_DataService/UtsGroup/ServiceGroupManager.vb
Normal file
116
AUTS_DataService/UtsGroup/ServiceGroupManager.vb
Normal file
@@ -0,0 +1,116 @@
|
||||
Imports System.Text
|
||||
|
||||
Public Class ServiceGroupManager
|
||||
''' <summary>历史通讯数据服务集合</summary>
|
||||
Private _groupService As Dictionary(Of Integer, OtherService)
|
||||
|
||||
Sub New()
|
||||
_groupService = New Dictionary(Of Integer, OtherService)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 添加网上邻居,已存在则更新存活时间与状态
|
||||
''' </summary>
|
||||
''' <param name="other"></param>
|
||||
Public Sub Add(other As OtherService)
|
||||
If _groupService.ContainsKey(other.ServiceIndex) Then
|
||||
_groupService(other.ServiceIndex).LastTime = Now
|
||||
_groupService(other.ServiceIndex).IsAlive = True
|
||||
Else
|
||||
_groupService.Add(other.ServiceIndex, other)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 校验其他服务的当前发送包索引是否与上一包索引重复,相同返回True,不相同返回False
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function CheckServiceSendIndex(serviceId As Integer, sendId As Integer) As Boolean
|
||||
If _groupService.ContainsKey(serviceId) Then
|
||||
If _groupService(serviceId).LastPacketIndex = sendId Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 校验服务是否存活
|
||||
''' </summary>
|
||||
Public Sub CheckAliveService()
|
||||
For Each other As KeyValuePair(Of Integer, OtherService) In _groupService
|
||||
If (Now - other.Value.LastTime).TotalSeconds > 30 Then
|
||||
other.Value.IsAlive = False
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 获取存活状态的所有网上邻居的索引字符串,以逗号分割
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Function GetAliveServiceIndexString() As String
|
||||
'排序后输出
|
||||
Dim sb As New StringBuilder
|
||||
Dim bt() As Integer = _groupService.Keys.ToArray()
|
||||
Array.Sort(bt)
|
||||
For i As Integer = 0 To bt.Length - 1
|
||||
If _groupService(bt(i)).IsAlive = False Then Continue For
|
||||
If sb.Length = 0 Then
|
||||
sb.Append(bt(i))
|
||||
Else
|
||||
sb.Append("," & bt(i))
|
||||
End If
|
||||
Next
|
||||
|
||||
Return sb.ToString
|
||||
|
||||
|
||||
'原来的顺序输出
|
||||
'For Each other As KeyValuePair(Of Integer, OtherService) In _groupService
|
||||
' If other.Value.IsAlive = False Then Continue For
|
||||
' If sb.Length = 0 Then
|
||||
' sb.Append(other.Key)
|
||||
' Else
|
||||
' sb.Append("," & other.Key)
|
||||
' End If
|
||||
'Next
|
||||
End Function
|
||||
End Class
|
||||
|
||||
|
||||
Public Class OtherService
|
||||
Sub New(index As Integer, packetIndex As Integer)
|
||||
ServiceIndex = index
|
||||
LastPacketIndex = packetIndex
|
||||
LastTime = Now
|
||||
IsAlive = True
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 最后通讯时间
|
||||
''' </summary>
|
||||
Public Property LastTime As DateTime
|
||||
|
||||
''' <summary>
|
||||
''' 最后通讯包ID
|
||||
''' </summary>
|
||||
Public Property LastPacketIndex As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 服务索引
|
||||
''' </summary>
|
||||
Public Property ServiceIndex As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 是否判定为在线
|
||||
''' </summary>
|
||||
Public Property IsAlive As Boolean
|
||||
|
||||
|
||||
End Class
|
||||
18
AUTS_DataService/UtsWeb/CheckSum.vb
Normal file
18
AUTS_DataService/UtsWeb/CheckSum.vb
Normal file
@@ -0,0 +1,18 @@
|
||||
Public Class CheckSum
|
||||
''' <summary>
|
||||
''' 获取数据包的和校验
|
||||
''' </summary>
|
||||
''' <param name="packet">数据包的内容</param>
|
||||
''' <returns></returns>
|
||||
Public Shared Function GetPacketCheck(packet() As Byte) As Byte
|
||||
Dim result As Integer
|
||||
|
||||
'当packet的相加综合超过INT_MAX则会异常
|
||||
For Each b As Byte In packet
|
||||
result += b
|
||||
Next
|
||||
|
||||
Return CByte(&HFF - (result And &HFF))
|
||||
End Function
|
||||
|
||||
End Class
|
||||
5
AUTS_DataService/UtsWeb/IDataPacket.vb
Normal file
5
AUTS_DataService/UtsWeb/IDataPacket.vb
Normal file
@@ -0,0 +1,5 @@
|
||||
Public Interface IDataPacket
|
||||
Function FillPacket(cmd As Byte, param() As Byte) As Byte()
|
||||
Function CheckPacket(packet() As Byte) As Boolean
|
||||
|
||||
End Interface
|
||||
194
AUTS_DataService/UtsWeb/UtsWebPacket.vb
Normal file
194
AUTS_DataService/UtsWeb/UtsWebPacket.vb
Normal file
@@ -0,0 +1,194 @@
|
||||
Imports System.Net
|
||||
|
||||
Public Class UtsWebPacket
|
||||
Implements IDataPacket
|
||||
|
||||
Private _packetSn As Integer
|
||||
|
||||
Sub New()
|
||||
_packetSn = 0
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function FillPacket(cmd As Byte) As Byte()
|
||||
Dim packet(PacketBits.Command) As Byte
|
||||
packet(PacketBits.Head) = &HAA
|
||||
packet(PacketBits.SerialNumber) = CByte(_packetSn)
|
||||
packet(PacketBits.ParamLength) = &H0
|
||||
packet(PacketBits.ParamLength + 1) = &H0
|
||||
packet(PacketBits.CheckValue) = &H0
|
||||
packet(PacketBits.Command) = cmd
|
||||
packet(PacketBits.CheckValue) = CheckSum.GetPacketCheck(packet)
|
||||
|
||||
_packetSn += 1
|
||||
If _packetSn > &HFF Then _packetSn = 0
|
||||
Return packet
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 用于填充发送包
|
||||
''' </summary>
|
||||
''' <param name="cmd">发送包命令</param>
|
||||
''' <param name="param">发送包参数</param>
|
||||
''' <returns></returns>
|
||||
Public Function FillPacket(cmd As Byte, param() As Byte) As Byte() Implements IDataPacket.FillPacket
|
||||
Dim packet(PacketBits.Command + param.Length) As Byte
|
||||
packet(PacketBits.Head) = &HAA
|
||||
packet(PacketBits.SerialNumber) = CByte(_packetSn)
|
||||
Array.Copy(BitConverter.GetBytes(CShort(param.Length)), 0, packet, PacketBits.ParamLength, 2)
|
||||
packet(PacketBits.CheckValue) = &H0
|
||||
packet(PacketBits.Command) = cmd
|
||||
|
||||
Array.Copy(param, 0, packet, PacketBits.Param, param.Length)
|
||||
packet(PacketBits.CheckValue) = CheckSum.GetPacketCheck(packet)
|
||||
|
||||
_packetSn += 1
|
||||
If _packetSn > &HFF Then _packetSn = 0
|
||||
Return packet
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 一般用于填充回复包
|
||||
''' </summary>
|
||||
''' <param name="sn">接收包序号</param>
|
||||
''' <param name="cmd">接收包命令</param>
|
||||
''' <param name="param">回复包参数</param>
|
||||
''' <returns></returns>
|
||||
Public Function FillPacket(sn As Byte, cmd As Byte, param() As Byte) As Byte()
|
||||
Dim packet(PacketBits.Command + param.Length) As Byte
|
||||
packet(PacketBits.Head) = &HAA
|
||||
packet(PacketBits.SerialNumber) = sn
|
||||
Array.Copy(BitConverter.GetBytes(CShort(param.Length)), 0, packet, PacketBits.ParamLength, 2)
|
||||
packet(PacketBits.CheckValue) = &H0
|
||||
packet(PacketBits.Command) = cmd
|
||||
|
||||
Array.Copy(param, 0, packet, PacketBits.Param, param.Length)
|
||||
|
||||
packet(PacketBits.CheckValue) = CheckSum.GetPacketCheck(packet)
|
||||
|
||||
Return packet
|
||||
End Function
|
||||
|
||||
|
||||
Public Function CheckPacket(packet() As Byte) As Boolean Implements IDataPacket.CheckPacket
|
||||
If packet(PacketBits.Head) <> &HAA Then
|
||||
Throw New Exception($"Invalid Packet Head!Src:{packet(PacketBits.Head)} Dest:{&HAA}")
|
||||
End If
|
||||
|
||||
'If packet(PacketBits.SerialNumber) <> _packetSn Then
|
||||
' Throw New Exception($"Invalid Packet Sn!Src: {packet(PacketBits.SerialNumber)} Dest:{_packetSn}")
|
||||
'End If
|
||||
|
||||
Dim destLength As Integer = packet.Length - PacketBits.Param
|
||||
|
||||
If BitConverter.ToInt16(packet, PacketBits.ParamLength) <> destLength Then
|
||||
Throw New Exception($"Invalid Packet Lengnt!Src:{packet(PacketBits.ParamLength)} Dest:{destLength}")
|
||||
End If
|
||||
|
||||
If CheckSum.GetPacketCheck(packet) <> &H0 Then
|
||||
Throw New Exception($"Invalid Packet CheckValue!Src:{BitConverter.ToString(packet)}")
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
Enum PacketBits
|
||||
''' <summary>包头</summary>
|
||||
Head
|
||||
|
||||
''' <summary>序号</summary>
|
||||
SerialNumber
|
||||
|
||||
''' <summary>包长,两位,小端模式</summary>
|
||||
ParamLength
|
||||
|
||||
''' <summary>校验</summary>
|
||||
CheckValue = ParamLength + 2
|
||||
|
||||
''' <summary>命令</summary>
|
||||
Command
|
||||
|
||||
''' <summary>参数</summary>
|
||||
Param
|
||||
End Enum
|
||||
|
||||
|
||||
<Flags>
|
||||
Enum Commands
|
||||
''' <summary>心跳包</summary>
|
||||
Heartbeat = &H1
|
||||
|
||||
|
||||
''' <summary>设置日志上报</summary>
|
||||
SetLogType = &H2
|
||||
|
||||
''' <summary>读取日志上报</summary>
|
||||
GetLogType = &H3
|
||||
|
||||
|
||||
''' <summary>服务任务状态变化时,主动上报状态</summary>
|
||||
UploadTaskStatus = &H10
|
||||
|
||||
''' <summary>增加服务任务</summary>
|
||||
AddServiceTask = &H11
|
||||
|
||||
''' <summary>删除服务任务</summary>
|
||||
DelServiceTask = &H12
|
||||
|
||||
''' <summary>获取服务任务</summary>
|
||||
GetServiceTask = &H13
|
||||
|
||||
''' <summary>设置服务任务</summary>
|
||||
SetServiceTask = &H14
|
||||
|
||||
''' <summary>开启服务任务</summary>
|
||||
StartServiceTask = &H15
|
||||
|
||||
''' <summary>停止服务任务</summary>
|
||||
StopServiceTask = &H16
|
||||
|
||||
''' <summary>重启服务任务</summary>
|
||||
RestartServiceTask = &H17
|
||||
|
||||
|
||||
''' <summary>上传文件</summary>
|
||||
UploadFile = &H21
|
||||
|
||||
''' <summary>读取指定文件大小</summary>
|
||||
ReadFileSize = &H22
|
||||
|
||||
|
||||
''' <summary>App状态变化时,主动上报状态</summary>
|
||||
UploadAppStatus = &H30
|
||||
|
||||
''' <summary>获取App状态</summary>
|
||||
GetAppStatus = &H31
|
||||
|
||||
''' <summary>设置App状态</summary>
|
||||
SetAppStatus = &H32
|
||||
|
||||
End Enum
|
||||
|
||||
|
||||
Public Class PublicIpChangedEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Sub New(ip As IPAddress)
|
||||
PublicIP = ip
|
||||
End Sub
|
||||
|
||||
Public Property PublicIP As IPAddress
|
||||
End Class
|
||||
|
||||
Public Class AddTaskEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Sub New(jsonString As String)
|
||||
Me.JsonString = jsonString
|
||||
End Sub
|
||||
|
||||
Public Property JsonString As String
|
||||
End Class
|
||||
End Class
|
||||
248
AUTS_DataService/WebService.vb
Normal file
248
AUTS_DataService/WebService.vb
Normal file
@@ -0,0 +1,248 @@
|
||||
'Imports System.Net
|
||||
'Imports System.Net.Sockets
|
||||
|
||||
'Public Class WebService
|
||||
' Implements IDisposable
|
||||
|
||||
' Enum PacketDataEnum
|
||||
' Head
|
||||
' SerialNumber
|
||||
' ParamLength
|
||||
' CheckValue
|
||||
' Command
|
||||
' Param
|
||||
' End Enum
|
||||
|
||||
' <Flags()>
|
||||
' Enum PacketSendCmdEnum
|
||||
' Heartbeat = &H1
|
||||
|
||||
' End Enum
|
||||
|
||||
' <Flags()>
|
||||
' Enum PacketReceiveCmdEnum
|
||||
' Heartbeat = &HA1
|
||||
|
||||
' End Enum
|
||||
|
||||
' Private _localPublicIp As String
|
||||
|
||||
' Private ReadOnly _udpClient As UdpClient
|
||||
|
||||
' Private _sendPacketSn As Integer
|
||||
|
||||
' Private ReadOnly _hostName As String
|
||||
|
||||
' Private ReadOnly _remotePort As Integer
|
||||
|
||||
' Private _online As Boolean
|
||||
|
||||
' Private _failCount As Integer
|
||||
|
||||
' Sub New(hostName As String, port As Integer)
|
||||
' _hostName = hostName
|
||||
' _remotePort = port
|
||||
|
||||
' _udpClient = New UdpClient()
|
||||
' _sendPacketSn = 0
|
||||
|
||||
' RetryCount = 2
|
||||
' RetryInterval = 5
|
||||
' WaitRelayTimeout = 2000
|
||||
|
||||
' _online = False
|
||||
' _localPublicIp = String.Empty
|
||||
' End Sub
|
||||
|
||||
|
||||
' Public ReadOnly Property LocalPublicIp() As String
|
||||
' Get
|
||||
' Return _localPublicIp
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
|
||||
' Public ReadOnly Property Online() As Boolean
|
||||
' Get
|
||||
' Return _online
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' ''' <summary>
|
||||
' ''' 重试次数,不包含第一次发送次数,默认值2
|
||||
' ''' </summary>
|
||||
' ''' <returns></returns>
|
||||
' Public Property RetryCount() As Integer
|
||||
|
||||
' ''' <summary>
|
||||
' ''' 重试间隔,单位ms,默认5ms
|
||||
' ''' </summary>
|
||||
' ''' <returns></returns>
|
||||
' Public Property RetryInterval() As Integer
|
||||
|
||||
' ''' <summary>
|
||||
' ''' 等待接收超时时间,单位ms,默认2000ms
|
||||
' ''' </summary>
|
||||
' ''' <returns></returns>
|
||||
' Public Property WaitRelayTimeout() As Integer
|
||||
|
||||
|
||||
' Public Sub SendHeartbeatPacket(serviceIndex As Integer)
|
||||
' Dim sendByte() As Byte = FillPacket(CByte(PacketSendCmdEnum.Heartbeat), BitConverter.GetBytes(serviceIndex))
|
||||
|
||||
' Send(sendByte)
|
||||
' End Sub
|
||||
|
||||
|
||||
' Public Function FillPacket(cmd As Byte, param() As Byte) As Byte()
|
||||
' Dim result(PacketDataEnum.Command + param.Length) As Byte
|
||||
' result(PacketDataEnum.Head) = &HAA
|
||||
' result(PacketDataEnum.SerialNumber) = CByte(_sendPacketSn)
|
||||
' result(PacketDataEnum.ParamLength) = CByte(param.Length)
|
||||
' result(PacketDataEnum.CheckValue) = &H0
|
||||
' result(PacketDataEnum.Command) = cmd
|
||||
|
||||
' Array.Copy(param, 0, result, PacketDataEnum.Param, param.Length)
|
||||
' result(PacketDataEnum.CheckValue) = GetCheckSum(result)
|
||||
|
||||
' Return result
|
||||
' End Function
|
||||
|
||||
|
||||
' Public Sub Send(packet() As Byte)
|
||||
' Static receivedReply As Boolean = False
|
||||
' Static waitReplyStartTime As DateTime
|
||||
|
||||
' receivedReply = False
|
||||
' For i As Integer = 0 To RetryCount
|
||||
' _udpClient.Send(packet, packet.Length, _hostName, _remotePort)
|
||||
' waitReplyStartTime = Now
|
||||
|
||||
|
||||
' While receivedReply = False AndAlso (Now - waitReplyStartTime).TotalMilliseconds < WaitRelayTimeout
|
||||
' If _udpClient.Available <= 0 Then
|
||||
' Threading.Thread.Sleep(50)
|
||||
' Continue While
|
||||
' End If
|
||||
|
||||
' Dim ep As IPEndPoint = Nothing
|
||||
' Dim receiveByte() As Byte = _udpClient.Receive(ep)
|
||||
|
||||
' '校验
|
||||
' Try
|
||||
' CheckPacket(receiveByte)
|
||||
' Catch ex As Exception
|
||||
' ApplicationLog.WriteErrorLog($"Check Receive Data Error:{ex.Message}")
|
||||
' Continue While
|
||||
' End Try
|
||||
|
||||
|
||||
' '处理
|
||||
' Try
|
||||
' DealPacket(receiveByte)
|
||||
' Catch ex As Exception
|
||||
' ApplicationLog.WriteErrorLog($"Deal Receive Data Error:{ex.Message}")
|
||||
' Continue While
|
||||
' End Try
|
||||
|
||||
' receivedReply = True
|
||||
' End While
|
||||
|
||||
' If receivedReply Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Threading.Thread.Sleep(RetryInterval)
|
||||
' Next
|
||||
|
||||
' If _sendPacketSn + 1 >= 256 Then
|
||||
' _sendPacketSn = 0
|
||||
' Else
|
||||
' _sendPacketSn += 1
|
||||
' End If
|
||||
|
||||
' If receivedReply = False Then
|
||||
' _failCount += 1
|
||||
' If _failCount >= 3 Then
|
||||
' _failCount = 3
|
||||
' _online = False
|
||||
' End If
|
||||
' Else
|
||||
' _failCount = 0
|
||||
' _online = True
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
|
||||
' Private Sub CheckPacket(packet() As Byte)
|
||||
' If packet(PacketDataEnum.Head) <> &HAA Then
|
||||
' Throw New Exception($"Invalid Packet Head!Src:{packet(PacketDataEnum.Head)} Dest:{&HAA}")
|
||||
' End If
|
||||
|
||||
' If packet(PacketDataEnum.SerialNumber) <> _sendPacketSn Then
|
||||
' Throw New Exception($"Invalid Packet Sn!Src: {packet(PacketDataEnum.SerialNumber)} Dest:{_sendPacketSn}")
|
||||
' End If
|
||||
|
||||
' Dim destLength As Integer = packet.Length - PacketDataEnum.Param
|
||||
' If packet(PacketDataEnum.ParamLength) <> destLength Then
|
||||
' Throw New Exception($"Invalid Packet Lengnt!Src:{packet(PacketDataEnum.ParamLength)} Dest:{destLength}")
|
||||
' End If
|
||||
|
||||
' If GetBytesSum(packet) <> &HFF Then
|
||||
' Throw New Exception($"Invalid Packet CheckValue!Src:{BitConverter.ToString(packet)}")
|
||||
' End If
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
' Private Function GetCheckSum(packet() As Byte) As Byte
|
||||
' Dim result As Integer
|
||||
|
||||
' For Each b As Byte In packet
|
||||
' result += b
|
||||
' result = result And &HFF
|
||||
' Next
|
||||
|
||||
' Return CByte(&HFF - result)
|
||||
' End Function
|
||||
|
||||
|
||||
' Private Function GetBytesSum(packet() As Byte) As Byte
|
||||
' Dim result As Integer
|
||||
|
||||
' For Each b As Byte In packet
|
||||
' result += b
|
||||
' result = result And &HFF
|
||||
' Next
|
||||
|
||||
' Return CByte(result)
|
||||
' End Function
|
||||
|
||||
|
||||
' Public Sub DealPacket(packet() As Byte)
|
||||
' Select Case packet(PacketDataEnum.Command)
|
||||
' Case CByte(PacketReceiveCmdEnum.Heartbeat)
|
||||
' DealHeartbeatPacket(packet)
|
||||
' Case Else
|
||||
' Throw New Exception($"Unknown Command:{packet(PacketDataEnum.Command)}")
|
||||
' End Select
|
||||
|
||||
' End Sub
|
||||
|
||||
|
||||
' Private Sub DealHeartbeatPacket(packet() As Byte)
|
||||
' Dim tmpIp As String
|
||||
' tmpIp = $"{packet(PacketDataEnum.Param)}.{packet(PacketDataEnum.Param + 1)}.{packet(PacketDataEnum.Param + 2)}.{packet(PacketDataEnum.Param + 3)}"
|
||||
|
||||
' If String.Compare(LocalPublicIp,tmpIp) <> 0 Then
|
||||
' _localPublicIp = tmpIp
|
||||
' End If
|
||||
|
||||
' End Sub
|
||||
|
||||
' Public Sub Dispose() Implements IDisposable.Dispose
|
||||
' _udpClient.Dispose()
|
||||
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
105
AUTS_DataService/版本说明.txt
Normal file
105
AUTS_DataService/版本说明.txt
Normal file
@@ -0,0 +1,105 @@
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
1<><31><EFBFBD>ƶ˽<C6B6><CBBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ⣺Weistech
|
||||
<20><><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>SW-430-BattTestTool
|
||||
|
||||
2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺ţ<CBBA>sa
|
||||
<20><>¼<EFBFBD><C2BC><EFBFBD>룺%*UgFTR#SW*kj?n
|
||||
Զ<><D4B6>IP<49><50>122.152.232.170
|
||||
<20><><EFBFBD>ʶ˿<CAB6>:2233
|
||||
|
||||
3<><33><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1>ֶΣ<D6B6>
|
||||
Device:<3A><><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
||||
FW<46><57><EFBFBD>̼<EFBFBD><CCBC>汾<EFBFBD><E6B1BE>
|
||||
SN<53><4E><EFBFBD><EFBFBD><EFBFBD>к<EFBFBD> <20><>ͨ<EFBFBD><CDA8>ɨ<EFBFBD><C9A8>ǹɨ<C7B9><C9A8><EFBFBD><EFBFBD><EFBFBD>룩
|
||||
DateTime_1st<73><74><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
BattLevel_1st<73><74><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC>ʱ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>
|
||||
DateTime_2nd<6E><64><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>
|
||||
BattLevel_2nd<6E><64><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD>¼<EFBFBD><C2BC>ʱ<EFBFBD>ĵ<EFBFBD><C4B5><EFBFBD>
|
||||
|
||||
TimeDiff<66><66><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD>
|
||||
BattDiff<66><66><EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD>
|
||||
|
||||
4<><34>ʹ<EFBFBD><CAB9>ʱ<EFBFBD><CAB1><EFBFBD>û<EFBFBD><C3BB>ȸ<EFBFBD><C8B8><EFBFBD>Ʒ<EFBFBD><C6B7><EFBFBD>ϵ磬Ȼ<E7A3AC><C8BB><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD>롣
|
||||
<20><>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><F3A3ACBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>죬Ȼ<ECA3AC><C8BB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еڶ<D0B5><DAB6><EFBFBD>¼<EFBFBD>롣
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܾ<EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD><DDB2><EFBFBD>ʾ<EFBFBD>û<EFBFBD><C3BB><EFBFBD>
|
||||
1<><31><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>100%
|
||||
2<><32><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD>¼<EFBFBD><C2BC>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF>в<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
3<><33><EFBFBD><EFBFBD><EFBFBD>ͱ<EFBFBD><CDB1>Ų<EFBFBD><C5B2>Ի<EFBFBD>FW<46>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD>
|
||||
|
||||
5<><35><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֻ<EFBFBD><D6BB>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2BFAABA>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB>ͣ<EFBFBD><CDA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD>Ҫд<D2AA><D0B4><EFBFBD>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD>ݿ<EFBFBD>
|
||||
6<><36><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>кŲ<D0BA>ѯ<EFBFBD><D1AF><EFBFBD>ݼ<EFBFBD>¼
|
||||
|
||||
|
||||
V1.0.0: 2020-06-19 Momo/QiZhengBiao Frist Released
|
||||
|
||||
V2.0.0: 2020-7-20 Momo
|
||||
1<><31><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD>룬ԭ<EBA3AC><EFBFBD><DEB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ100%<25><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>90~100%֮<>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD>С<EFBFBD><D0A1>100%<25><>
|
||||
|
||||
V2.1.0: 2020-7-27 Momo
|
||||
1<><31><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD>룬<EFBFBD><EBA3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>30~99%֮<>䡣
|
||||
2<><32><EFBFBD><EFBFBD>FW<46>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>V1_36<33><36>
|
||||
|
||||
V2.2.0<EFBFBD><EFBFBD>2020-8-21 Qizhenbiao
|
||||
1<><31><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEB6>ģ<DEB8>30~95%֮<>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ܾ<F3B2A2BE>¼<EFBFBD><C2BC>
|
||||
2<><32><EFBFBD>ڶ<EFBFBD><DAB6>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD>С<EFBFBD>ڵ<EFBFBD><DAB5>ڵ<EFBFBD>һ<EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ܾ<F3B2A2BE>¼<EFBFBD><C2BC>
|
||||
3<><33><EFBFBD>ڶ<EFBFBD><DAB6>ε<EFBFBD><CEB5><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>48~144Сʱ<D0A1><CAB1>2~6<>죩֮<ECA3A9>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ܾ<F3B2A2BE>¼<EFBFBD><C2BC>
|
||||
4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ǰ<EFBFBD><C7B0><EFBFBD>£<EFBFBD><C2A3><EFBFBD><EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>-5%~0%֮<>䣬<EFBFBD><E4A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>룬<EFBFBD>ж<EFBFBD>Ϊʧ<CEAA>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ժ<EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ,<2C><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>PASS<53><53>FAIL<49><4C>ʾ<EFBFBD><CABE>
|
||||
5<><35><EFBFBD>ڼ<EFBFBD><DABC>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>յ<EFBFBD>4<EFBFBD><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
6<><36><EFBFBD>ڼ<EFBFBD><DABC>ز<EFBFBD><D8B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0%<25><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ժ<EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD>ֱ<EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
7<><37><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˫<EFBFBD><CBAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2A3ACB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
8<><38>״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڶ<EFBFBD><DAB6><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD><CAA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD>
|
||||
|
||||
V2.2.1.1<EFBFBD><EFBFBD>2020-8-21 Qizhenbiao
|
||||
1<><31>ָ<EFBFBD><D6B8>Sn<53><6E>ѯʱ<D1AF><CAB1>Ӧ<EFBFBD><D3A6>ȫ<EFBFBD><C8AB><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF>ͳ<EFBFBD>ƹ<EFBFBD><C6B9>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ʾ<EFBFBD><CABE>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ɫ<EFBFBD><C9AB>δ<EFBFBD><CEB4><EFBFBD>ɲ<EFBFBD><C9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>ɫ<EFBFBD><C9AB>
|
||||
2<><32>Sn<53><6E>ѯ֧<D1AF><D6A7>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD>룬<EFBFBD><EBA3AC><EFBFBD><EFBFBD>ѯһ<D1AF><D2BB><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD>ַ<EFBFBD>Χ<EFBFBD><CEA7><EFBFBD>ݲ<EFBFBD>ѯ<EFBFBD><D1AF>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯʱ<D1AF><CAB1><EFBFBD>꽹<EFBFBD><EABDB9><EFBFBD>Զ<EFBFBD><D4B6>ص<EFBFBD>SN<53><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><F2A3ACB2>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫѡ<C8AB><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8>ǹɨ<C7B9><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
3<><33><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯʱ<D1AF><CAB1>pass<73><73>fail<69><6C>ʾ<EFBFBD><CABE>ɫ<EFBFBD><C9AB>ͬʱ<CDAC><CAB1><EFBFBD>Ͻ<EFBFBD>״̬<D7B4><CCAC><EFBFBD><EFBFBD>ʾPASS<53><53>FAIL<49><4C><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>в<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE>---<2D><><EFBFBD><EFBFBD>
|
||||
4, ÿ<>γ<EFBFBD><CEB3><EFBFBD><EFBFBD>ر<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݲ<EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>xls<6C><73>ʽ<EFBFBD>ı<EFBFBD><C4B1>ݡ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> app.path\DATA\BAK\ Ŀ¼<C4BF>£<EFBFBD><C2A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>DAT_BAK_20200827_111606<30><36>
|
||||
|
||||
V2.2.2.0<EFBFBD><EFBFBD>2020-8-21 Qizhenbiao
|
||||
1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>зǿ<D0B7><C7BF>жϣ<D0B6><CFA3><EFBFBD><DEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ʱ<EFBFBD><CAB1><EFBFBD>µ<EFBFBD><C2B5>쳣<EFBFBD><ECB3A3>
|
||||
|
||||
|
||||
V2.3.0.0<EFBFBD><EFBFBD>2020-9-10 MomoWen
|
||||
1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ԭ2~6<>죬<EFBFBD><ECA3AC>Ϊ8~12<31>졣
|
||||
2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԭС<D4AD>ڵ<EFBFBD><DAB5><EFBFBD>5%<25><><EFBFBD><EFBFBD>ΪС<CEAA><D0A1>5%<25><>
|
||||
3<><33>ÿ<EFBFBD>ιرճ<D8B1><D5B3><EFBFBD><F2A3ACB1><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||
|
||||
V2.4.0.0<EFBFBD><EFBFBD>2020-9-15 QiZhengbiao
|
||||
1<><31><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>һ<EFBFBD>Ρ<EFBFBD><CEA1>ڶ<EFBFBD><DAB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݶ<EFBFBD><DDB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㣬ֱ<E3A3AC>ӱȽϵ<C8BD><CFB5><EFBFBD>ֵ<EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=50%Ϊpass<73><73>
|
||||
2<><32>load<61><64><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>β<EFBFBD><CEB2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><C7B2><EFBFBD><EFBFBD><EFBFBD>pass<73><73>fail<69>ж<EFBFBD>
|
||||
3<><33>load<61><64><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>Ե<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD><DDBC><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>жϣ<D0B6>С<EFBFBD><D0A1>8<EFBFBD><38><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>12<31><32><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD><C3B5><EFBFBD>ɫ<EFBFBD><C9AB>ɫ<EFBFBD><C9AB>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>pass<73><73>fail<69><6C><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>
|
||||
4<><34><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>һ<EFBFBD>㣬<EFBFBD><E3A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD>
|
||||
|
||||
V2.5.0.0:2020-11-02 Qizengbiao
|
||||
1.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>UTS_Core<72><65><EFBFBD><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
V2.5.1.0:2020-12-09 Qizengbiao
|
||||
1.<2E><><EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC><EFBFBD>ԭ8~12<31>죬<EFBFBD><EFBFBD>Ϊ6~12<31><32>
|
||||
|
||||
V2.5.3.0:2020-12-10 Qizengbiao
|
||||
1.<2E>ϴ<EFBFBD><CFB4><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪDevSN<53>ֶ<EFBFBD>
|
||||
2.<2E><>һ<EFBFBD><D2BB>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>Ӽ<EFBFBD>¼UserID<49><44>StartTime
|
||||
3.<2E>ڶ<EFBFBD><DAB6><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>Ӽ<EFBFBD>¼TestResult
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
140
AUTS_ProductEntry/AUTS_ProductEntry.vbproj
Normal file
140
AUTS_ProductEntry/AUTS_ProductEntry.vbproj
Normal file
@@ -0,0 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8FC266CE-FD61-4622-8B3C-9F6FFFD09A0C}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>AUTS_ProductEntry.My.MyApplication</StartupObject>
|
||||
<RootNamespace>AUTS_ProductEntry</RootNamespace>
|
||||
<AssemblyName>AUTS_ProductEntry</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>AUTS_ProductEntry.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>AUTS_ProductEntry.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>iconfinder_60_973992.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.112.1, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="FrmMain.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmMain.Designer.vb">
|
||||
<DependentUpon>FrmMain.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="FrmMain.resx">
|
||||
<DependentUpon>FrmMain.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="iconfinder_60_973992.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
|
||||
<Project>{33c6456c-f00d-41ac-a6fb-db0601495c6a}</Project>
|
||||
<Name>UTS_Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
44
AUTS_ProductEntry/App.config
Normal file
44
AUTS_ProductEntry/App.config
Normal file
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="AUTS_ProductEntry.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.30.1.0" newVersion="3.30.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<userSettings>
|
||||
<AUTS_ProductEntry.My.MySettings>
|
||||
<setting name="ProductionLine" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="Project" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="ProcessStation" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</AUTS_ProductEntry.My.MySettings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
278
AUTS_ProductEntry/FrmMain.Designer.vb
generated
Normal file
278
AUTS_ProductEntry/FrmMain.Designer.vb
generated
Normal file
@@ -0,0 +1,278 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FrmMain
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Windows 窗体设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||
'可以使用 Windows 窗体设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmMain))
|
||||
Me.lab_Result = New System.Windows.Forms.Label()
|
||||
Me.lab_ModelName = New System.Windows.Forms.Label()
|
||||
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||
Me.RtxLog = New System.Windows.Forms.RichTextBox()
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.TssLblProductionLine = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblStaion = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TsLblCheckSum = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblInvalidCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblValidCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblPassCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblFailCount = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.TssLblYield = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
|
||||
Me.CboProductionLines = New System.Windows.Forms.ComboBox()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.TxtFirstRecord = New System.Windows.Forms.TextBox()
|
||||
Me.btn_OpenProject = New System.Windows.Forms.Button()
|
||||
Me.btn_StartProgramming = New System.Windows.Forms.Button()
|
||||
Me.GroupBox3.SuspendLayout
|
||||
Me.StatusStrip1.SuspendLayout
|
||||
Me.GroupBox4.SuspendLayout
|
||||
Me.GroupBox1.SuspendLayout
|
||||
Me.SuspendLayout
|
||||
'
|
||||
'lab_Result
|
||||
'
|
||||
Me.lab_Result.BackColor = System.Drawing.Color.Black
|
||||
Me.lab_Result.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
|
||||
Me.lab_Result.Font = New System.Drawing.Font("Consolas", 48!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||
Me.lab_Result.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(0,Byte),Integer))
|
||||
Me.lab_Result.Location = New System.Drawing.Point(0, 95)
|
||||
Me.lab_Result.Name = "lab_Result"
|
||||
Me.lab_Result.Size = New System.Drawing.Size(404, 201)
|
||||
Me.lab_Result.TabIndex = 13
|
||||
Me.lab_Result.Text = "PASS"
|
||||
Me.lab_Result.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'lab_ModelName
|
||||
'
|
||||
Me.lab_ModelName.BackColor = System.Drawing.SystemColors.ActiveCaption
|
||||
Me.lab_ModelName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
|
||||
Me.lab_ModelName.Font = New System.Drawing.Font("Consolas", 27.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||
Me.lab_ModelName.Location = New System.Drawing.Point(0, -1)
|
||||
Me.lab_ModelName.Name = "lab_ModelName"
|
||||
Me.lab_ModelName.Size = New System.Drawing.Size(404, 85)
|
||||
Me.lab_ModelName.TabIndex = 12
|
||||
Me.lab_ModelName.Text = "SW-570"
|
||||
Me.lab_ModelName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox3.Controls.Add(Me.RtxLog)
|
||||
Me.GroupBox3.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(0, 302)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(740, 257)
|
||||
Me.GroupBox3.TabIndex = 17
|
||||
Me.GroupBox3.TabStop = false
|
||||
Me.GroupBox3.Text = "录入记录"
|
||||
'
|
||||
'RtxLog
|
||||
'
|
||||
Me.RtxLog.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxLog.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxLog.Location = New System.Drawing.Point(3, 22)
|
||||
Me.RtxLog.Name = "RtxLog"
|
||||
Me.RtxLog.Size = New System.Drawing.Size(734, 232)
|
||||
Me.RtxLog.TabIndex = 0
|
||||
Me.RtxLog.Text = ""
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TssLblProductionLine, Me.TssLblStaion, Me.TsLblCheckSum, Me.TssLblInvalidCount, Me.TssLblValidCount, Me.TssLblPassCount, Me.TssLblFailCount, Me.TssLblYield})
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 563)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(742, 22)
|
||||
Me.StatusStrip1.TabIndex = 19
|
||||
Me.StatusStrip1.Text = "StatusStrip1"
|
||||
'
|
||||
'TssLblProductionLine
|
||||
'
|
||||
Me.TssLblProductionLine.ForeColor = System.Drawing.Color.Black
|
||||
Me.TssLblProductionLine.Name = "TssLblProductionLine"
|
||||
Me.TssLblProductionLine.Size = New System.Drawing.Size(44, 17)
|
||||
Me.TssLblProductionLine.Text = "A-Line"
|
||||
'
|
||||
'TssLblStaion
|
||||
'
|
||||
Me.TssLblStaion.ForeColor = System.Drawing.Color.Black
|
||||
Me.TssLblStaion.Name = "TssLblStaion"
|
||||
Me.TssLblStaion.Size = New System.Drawing.Size(68, 17)
|
||||
Me.TssLblStaion.Text = "BLV-12 A1"
|
||||
'
|
||||
'TsLblCheckSum
|
||||
'
|
||||
Me.TsLblCheckSum.Name = "TsLblCheckSum"
|
||||
Me.TsLblCheckSum.Size = New System.Drawing.Size(64, 17)
|
||||
Me.TsLblCheckSum.Text = "Sum:0000"
|
||||
'
|
||||
'TssLblInvalidCount
|
||||
'
|
||||
Me.TssLblInvalidCount.Name = "TssLblInvalidCount"
|
||||
Me.TssLblInvalidCount.Size = New System.Drawing.Size(77, 17)
|
||||
Me.TssLblInvalidCount.Text = "Invalid:0000"
|
||||
'
|
||||
'TssLblValidCount
|
||||
'
|
||||
Me.TssLblValidCount.Name = "TssLblValidCount"
|
||||
Me.TssLblValidCount.Size = New System.Drawing.Size(68, 17)
|
||||
Me.TssLblValidCount.Text = "Valid:0000"
|
||||
'
|
||||
'TssLblPassCount
|
||||
'
|
||||
Me.TssLblPassCount.Name = "TssLblPassCount"
|
||||
Me.TssLblPassCount.Size = New System.Drawing.Size(65, 17)
|
||||
Me.TssLblPassCount.Text = "Pass:0000"
|
||||
'
|
||||
'TssLblFailCount
|
||||
'
|
||||
Me.TssLblFailCount.Name = "TssLblFailCount"
|
||||
Me.TssLblFailCount.Size = New System.Drawing.Size(58, 17)
|
||||
Me.TssLblFailCount.Text = "Fail:0000"
|
||||
'
|
||||
'TssLblYield
|
||||
'
|
||||
Me.TssLblYield.Name = "TssLblYield"
|
||||
Me.TssLblYield.Size = New System.Drawing.Size(81, 17)
|
||||
Me.TssLblYield.Text = "Yield:00.00%"
|
||||
'
|
||||
'GroupBox4
|
||||
'
|
||||
Me.GroupBox4.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox4.Controls.Add(Me.CboProductionLines)
|
||||
Me.GroupBox4.Font = New System.Drawing.Font("微软雅黑", 18!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.GroupBox4.Location = New System.Drawing.Point(410, -1)
|
||||
Me.GroupBox4.Name = "GroupBox4"
|
||||
Me.GroupBox4.Size = New System.Drawing.Size(320, 85)
|
||||
Me.GroupBox4.TabIndex = 23
|
||||
Me.GroupBox4.TabStop = false
|
||||
Me.GroupBox4.Text = "产线"
|
||||
'
|
||||
'CboProductionLines
|
||||
'
|
||||
Me.CboProductionLines.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.CboProductionLines.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboProductionLines.Font = New System.Drawing.Font("Consolas", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||
Me.CboProductionLines.ForeColor = System.Drawing.Color.Gray
|
||||
Me.CboProductionLines.FormattingEnabled = true
|
||||
Me.CboProductionLines.Items.AddRange(New Object() {"Q1", "Q2", "Q3", "Q4"})
|
||||
Me.CboProductionLines.Location = New System.Drawing.Point(3, 35)
|
||||
Me.CboProductionLines.Name = "CboProductionLines"
|
||||
Me.CboProductionLines.Size = New System.Drawing.Size(314, 40)
|
||||
Me.CboProductionLines.TabIndex = 0
|
||||
Me.CboProductionLines.TabStop = false
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox1.Controls.Add(Me.TxtFirstRecord)
|
||||
Me.GroupBox1.Font = New System.Drawing.Font("微软雅黑", 18!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(410, 81)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(320, 112)
|
||||
Me.GroupBox1.TabIndex = 22
|
||||
Me.GroupBox1.TabStop = false
|
||||
Me.GroupBox1.Text = "成品序号"
|
||||
'
|
||||
'TxtFirstRecord
|
||||
'
|
||||
Me.TxtFirstRecord.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TxtFirstRecord.Font = New System.Drawing.Font("Consolas", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0,Byte))
|
||||
Me.TxtFirstRecord.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtFirstRecord.Location = New System.Drawing.Point(3, 35)
|
||||
Me.TxtFirstRecord.Name = "TxtFirstRecord"
|
||||
Me.TxtFirstRecord.Size = New System.Drawing.Size(314, 39)
|
||||
Me.TxtFirstRecord.TabIndex = 1
|
||||
Me.TxtFirstRecord.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'btn_OpenProject
|
||||
'
|
||||
Me.btn_OpenProject.Font = New System.Drawing.Font("微软雅黑", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.btn_OpenProject.Location = New System.Drawing.Point(410, 204)
|
||||
Me.btn_OpenProject.Name = "btn_OpenProject"
|
||||
Me.btn_OpenProject.Size = New System.Drawing.Size(140, 92)
|
||||
Me.btn_OpenProject.TabIndex = 21
|
||||
Me.btn_OpenProject.Text = "选择项目"
|
||||
Me.btn_OpenProject.UseVisualStyleBackColor = true
|
||||
'
|
||||
'btn_StartProgramming
|
||||
'
|
||||
Me.btn_StartProgramming.Font = New System.Drawing.Font("微软雅黑", 24!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.btn_StartProgramming.ForeColor = System.Drawing.Color.Blue
|
||||
Me.btn_StartProgramming.Location = New System.Drawing.Point(571, 204)
|
||||
Me.btn_StartProgramming.Name = "btn_StartProgramming"
|
||||
Me.btn_StartProgramming.Size = New System.Drawing.Size(159, 92)
|
||||
Me.btn_StartProgramming.TabIndex = 20
|
||||
Me.btn_StartProgramming.Text = "开始录入"
|
||||
Me.btn_StartProgramming.UseVisualStyleBackColor = true
|
||||
'
|
||||
'FrmMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 12!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(742, 585)
|
||||
Me.Controls.Add(Me.GroupBox4)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.Controls.Add(Me.btn_OpenProject)
|
||||
Me.Controls.Add(Me.btn_StartProgramming)
|
||||
Me.Controls.Add(Me.StatusStrip1)
|
||||
Me.Controls.Add(Me.GroupBox3)
|
||||
Me.Controls.Add(Me.lab_Result)
|
||||
Me.Controls.Add(Me.lab_ModelName)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"),System.Drawing.Icon)
|
||||
Me.Name = "FrmMain"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Form1"
|
||||
Me.GroupBox3.ResumeLayout(false)
|
||||
Me.StatusStrip1.ResumeLayout(false)
|
||||
Me.StatusStrip1.PerformLayout
|
||||
Me.GroupBox4.ResumeLayout(false)
|
||||
Me.GroupBox1.ResumeLayout(false)
|
||||
Me.GroupBox1.PerformLayout
|
||||
Me.ResumeLayout(false)
|
||||
Me.PerformLayout
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents lab_Result As Label
|
||||
Friend WithEvents lab_ModelName As Label
|
||||
Friend WithEvents GroupBox3 As GroupBox
|
||||
Friend WithEvents RtxLog As RichTextBox
|
||||
Friend WithEvents StatusStrip1 As StatusStrip
|
||||
Friend WithEvents TssLblProductionLine As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblStaion As ToolStripStatusLabel
|
||||
Friend WithEvents TsLblCheckSum As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblInvalidCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblValidCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblPassCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblFailCount As ToolStripStatusLabel
|
||||
Friend WithEvents TssLblYield As ToolStripStatusLabel
|
||||
Friend WithEvents GroupBox4 As GroupBox
|
||||
Friend WithEvents CboProductionLines As ComboBox
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents TxtFirstRecord As TextBox
|
||||
Friend WithEvents btn_OpenProject As Button
|
||||
Friend WithEvents btn_StartProgramming As Button
|
||||
End Class
|
||||
6296
AUTS_ProductEntry/FrmMain.resx
Normal file
6296
AUTS_ProductEntry/FrmMain.resx
Normal file
File diff suppressed because it is too large
Load Diff
207
AUTS_ProductEntry/FrmMain.vb
Normal file
207
AUTS_ProductEntry/FrmMain.vb
Normal file
@@ -0,0 +1,207 @@
|
||||
Imports UTS_Core.UTSModule
|
||||
Imports UTS_Core.UTSModule.Test
|
||||
|
||||
Public Class FrmMain
|
||||
Implements IProcessStation
|
||||
Implements IProductionLine
|
||||
|
||||
Private _utsApp As UtsAppForm
|
||||
|
||||
Public Sub ProductionLineChanged() Implements IProductionLine.ProductionLineChanged
|
||||
TssLblProductionLine.Text = CboProductionLines.Text
|
||||
|
||||
My.Settings.ProductionLine = CboProductionLines.Text
|
||||
End Sub
|
||||
|
||||
Public Sub StationChanged() Implements IProcessStation.StationChanged
|
||||
My.Settings.Project = _utsApp.ProcessStation.ParentProject.Name
|
||||
My.Settings.ProcessStation = _utsApp.ProcessStation.Name
|
||||
|
||||
UpdateStation(_utsApp.ProcessStation.ParentProject.Name, _utsApp.ProcessStation.Name)
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateStation(projectName As String, stationName As String)
|
||||
If String.IsNullOrWhiteSpace(projectName) OrElse
|
||||
String.IsNullOrWhiteSpace(stationName) Then
|
||||
TssLblStaion.Text = $"Invalid Station"
|
||||
Else
|
||||
TssLblStaion.Text = $"{projectName} - {stationName}"
|
||||
lab_ModelName.Text = $"{projectName} - {stationName}"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
'自动保存设置
|
||||
My.Application.SaveMySettingsOnExit = True
|
||||
|
||||
'初始化UTS窗体信息,失败则关闭窗体
|
||||
If InitializeUtsApp() = False Then Return
|
||||
|
||||
'初始化界面信息
|
||||
InitializeForm()
|
||||
End Sub
|
||||
|
||||
Private Function InitializeUtsApp() As Boolean
|
||||
|
||||
_utsApp = UtsAppForm.CreateSingleton
|
||||
|
||||
Try
|
||||
If _utsApp.IsInitialized = False Then
|
||||
_utsApp.AddStatisticsObserver(Me)
|
||||
_utsApp.Initialize()
|
||||
_utsApp.LoadStation(My.Settings.Project, My.Settings.ProcessStation)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox($"Initialize UTSForm Error:{ex.Message}")
|
||||
Close()
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub InitializeForm()
|
||||
CboProductionLines.Items.Clear()
|
||||
CboProductionLines.Items.AddRange(_utsApp.ProductionLines.GetLineNames())
|
||||
CboProductionLines.SelectedIndex = CboProductionLines.Items.IndexOf(My.Settings.ProductionLine)
|
||||
|
||||
TxtFirstRecord.Clear()
|
||||
RtxLog.Clear()
|
||||
|
||||
Text = $"{Application.ProductName} {Application.ProductVersion} User:{_utsApp.Account.UserName}"
|
||||
End Sub
|
||||
|
||||
Private Sub CboProductionLine_DropDown(sender As Object, e As EventArgs) Handles CboProductionLines.DropDown
|
||||
'填充内容
|
||||
CboProductionLines.Items.Clear()
|
||||
CboProductionLines.Items.AddRange(_utsApp.ProductionLines.GetLineNames())
|
||||
End Sub
|
||||
|
||||
Private Sub CboProductionLines_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboProductionLines.SelectedIndexChanged
|
||||
ProductionLineChanged()
|
||||
End Sub
|
||||
|
||||
Private Sub Btn_OpenProject_Click(sender As Object, e As EventArgs) Handles btn_OpenProject.Click
|
||||
Try
|
||||
_utsApp.ChangeStation()
|
||||
Catch ex As Exception
|
||||
MsgBox($"ChangeStation Error:{ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Tb_FirstRecord_KeyDown(sender As Object, e As KeyEventArgs) Handles TxtFirstRecord.KeyDown
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
SaveTestResult()
|
||||
|
||||
e.SuppressKeyPress = True
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Btn_StartProgramming_Click(sender As Object, e As EventArgs) Handles btn_StartProgramming.Click
|
||||
SaveTestResult()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub SaveTestResult()
|
||||
If _utsApp.ProcessStation Is Nothing Then
|
||||
MsgBox($"请选择项目与测试站后再尝试录入!")
|
||||
Return
|
||||
End If
|
||||
|
||||
If String.IsNullOrWhiteSpace(CboProductionLines.Text) Then
|
||||
MsgBox($"请选择生产线后再尝试录入!")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim barcodeString As String = TxtFirstRecord.Text
|
||||
If String.IsNullOrWhiteSpace(barcodeString) Then
|
||||
MsgBox($"请输入PCB序号!")
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim saveDb As Boolean
|
||||
Try
|
||||
FillTestResult(barcodeString)
|
||||
_utsApp.CommitTestResult(uniqueRecord:=True)
|
||||
saveDb = True
|
||||
Catch ex As Exception
|
||||
MessageBox.Show($"测试结果录入失败:{ex.Message}", $"录入异常", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
|
||||
saveDb = False
|
||||
End Try
|
||||
|
||||
Static inputCount As Integer = 0
|
||||
inputCount += 1 : If inputCount > 9999 Then inputCount = 0
|
||||
RtxLog.SelectionStart = 0
|
||||
RtxLog.SelectionLength = RtxLog.TextLength
|
||||
RtxLog.SelectionColor = Color.Gray
|
||||
|
||||
If saveDb Then
|
||||
lab_Result.ForeColor = Color.Green
|
||||
lab_Result.Text = $"{barcodeString}{vbCrLf}Pass"
|
||||
|
||||
RtxLog.SelectionStart = RtxLog.TextLength
|
||||
RtxLog.SelectionColor = Color.Green
|
||||
AppendRecord($"{inputCount:D4}.BarcodeSn:{barcodeString},录入成功!")
|
||||
Else
|
||||
lab_Result.ForeColor = Color.Red
|
||||
lab_Result.Text = $"{barcodeString}{vbCrLf}Fail"
|
||||
|
||||
RtxLog.SelectionStart = RtxLog.TextLength
|
||||
RtxLog.SelectionColor = Color.Red
|
||||
AppendRecord($"{inputCount:D4}.BarcodeSn:{barcodeString},录入失败!")
|
||||
End If
|
||||
|
||||
TxtFirstRecord.Focus()
|
||||
TxtFirstRecord.SelectAll()
|
||||
End Sub
|
||||
|
||||
Public Sub AppendRecord(logString As String)
|
||||
If RtxLog.InvokeRequired Then '判断是否需要开委托
|
||||
RtxLog.Invoke(New Action(Of String)(AddressOf AppendRecord), New Object() {logString})
|
||||
Return
|
||||
End If
|
||||
|
||||
With RtxLog
|
||||
If .Lines.Length > 256 Then '超过上限则移除最初行内容
|
||||
.ReadOnly = False
|
||||
.SelectionStart = 0
|
||||
.SelectionLength = .GetFirstCharIndexFromLine(1)
|
||||
.SelectedText = String.Empty
|
||||
.ReadOnly = True
|
||||
.SelectionStart = .TextLength
|
||||
End If
|
||||
|
||||
.AppendText($"{Now:yyyy:MM:dd HH:mm:ss} - {logString}{vbNewLine}")
|
||||
|
||||
.ScrollToCaret()
|
||||
End With
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 填充测试记录内容,每个应用程序这个部分有所差异
|
||||
''' </summary>
|
||||
Public Sub FillTestResult(barcodeString As String)
|
||||
_utsApp.TestResult.ResetTestResult()
|
||||
|
||||
'产线索引
|
||||
Dim lineID As Integer = _utsApp.ProductionLines(CboProductionLines.Text).ID
|
||||
_utsApp.TestResult.ProductionLineID = lineID
|
||||
|
||||
|
||||
'测试开始时间
|
||||
_utsApp.TestResult.StartTime = Now
|
||||
_utsApp.TestResult.DUT_SN = barcodeString
|
||||
_utsApp.TestResult.TestResult = TestResult.TestResultEnum.Pass
|
||||
End Sub
|
||||
|
||||
Private Sub lab_ModelName_Click(sender As Object, e As EventArgs) Handles lab_ModelName.Click
|
||||
Try
|
||||
DbConnect.DbConnector.SaveTestLogToRemote(UtsDb.RemotePrivateDb, "", Nothing, Nothing)
|
||||
Catch ex As Exception
|
||||
Console.WriteLine($"Save Error:{ex.Message}")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
38
AUTS_ProductEntry/My Project/Application.Designer.vb
generated
Normal file
38
AUTS_ProductEntry/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'注意:此文件是自动生成的;请勿直接进行修改。若要更改,
|
||||
' 或者如果您在此文件中遇到生成错误,请转至项目设计器
|
||||
' (转至“项目属性”或在解决方案资源管理器中双击“我的项目”节点),
|
||||
' 然后在“应用程序”选项卡中进行更改。
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.AUTS_ProductEntry.FrmMain
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
AUTS_ProductEntry/My Project/Application.myapp
Normal file
10
AUTS_ProductEntry/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>FrmMain</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
AUTS_ProductEntry/My Project/AssemblyInfo.vb
Normal file
35
AUTS_ProductEntry/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' 有关程序集的一般信息由以下
|
||||
' 控制。更改这些特性值可修改
|
||||
' 与程序集关联的信息。
|
||||
|
||||
'查看程序集特性的值
|
||||
|
||||
<Assembly: AssemblyTitle("AUTS_ProductEntry")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("AUTS_ProductEntry")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2021")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||
<Assembly: Guid("26fb9525-133d-47eb-9ba1-0f1bb96eb661")>
|
||||
|
||||
' 程序集的版本信息由下列四个值组成:
|
||||
'
|
||||
' 主版本
|
||||
' 次版本
|
||||
' 生成号
|
||||
' 修订号
|
||||
'
|
||||
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
'通过使用 "*",如下所示:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
63
AUTS_ProductEntry/My Project/Resources.Designer.vb
generated
Normal file
63
AUTS_ProductEntry/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'此类是由 StronglyTypedResourceBuilder
|
||||
'类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
'若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
'(以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
'''<summary>
|
||||
''' 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' 返回此类使用的缓存的 ResourceManager 实例。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AUTS_ProductEntry.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 重写当前线程的 CurrentUICulture 属性,对
|
||||
''' 使用此强类型资源类的所有资源查找执行重写。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
117
AUTS_ProductEntry/My Project/Resources.resx
Normal file
117
AUTS_ProductEntry/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
109
AUTS_ProductEntry/My Project/Settings.Designer.vb
generated
Normal file
109
AUTS_ProductEntry/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,109 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings 自动保存功能"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property ProductionLine() As String
|
||||
Get
|
||||
Return CType(Me("ProductionLine"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("ProductionLine") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property Project() As String
|
||||
Get
|
||||
Return CType(Me("Project"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("Project") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.UserScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("")> _
|
||||
Public Property ProcessStation() As String
|
||||
Get
|
||||
Return CType(Me("ProcessStation"),String)
|
||||
End Get
|
||||
Set
|
||||
Me("ProcessStation") = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.AUTS_ProductEntry.My.MySettings
|
||||
Get
|
||||
Return Global.AUTS_ProductEntry.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
15
AUTS_ProductEntry/My Project/Settings.settings
Normal file
15
AUTS_ProductEntry/My Project/Settings.settings
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="ProductionLine" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="Project" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ProcessStation" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
BIN
AUTS_ProductEntry/iconfinder_60_973992.ico
Normal file
BIN
AUTS_ProductEntry/iconfinder_60_973992.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 361 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 361 KiB |
194
AUTS_Repair/AUTS_Repair.vbproj
Normal file
194
AUTS_Repair/AUTS_Repair.vbproj
Normal file
@@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{DA8F65CE-2AE0-41F5-9BA8-27BAFDA270F8}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>AUTS_Repair.My.MyApplication</StartupObject>
|
||||
<RootNamespace>AUTS_Repair</RootNamespace>
|
||||
<AssemblyName>AUTS_Repair</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>AUTS_Repair.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>AUTS_Repair.xml</DocumentationFile>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>On</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>Off</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>1287509_tools_configuration_control_options_repair_icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FlexCell, Version=4.7.0.0, Culture=neutral, PublicKeyToken=6f86587eb70ee309, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files (x86)\FlexCell Technologies\FlexCell.NET4\bin\FlexCell.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FluentFTP, Version=33.0.3.0, Culture=neutral, PublicKeyToken=f4af092b1d8df44f, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\FluentFTP.33.0.3\lib\net45\FluentFTP.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.6.0\lib\net462\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Drawing.Common.6.0.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="TeeChart, Version=4.1.2017.2153, Culture=neutral, PublicKeyToken=9c8126276c77bdb7, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>bin\Debug\TeeChart.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.vb">
|
||||
<DependentUpon>Form1.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmCheckLog.Designer.vb">
|
||||
<DependentUpon>FrmCheckLog.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmCheckLog.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmImage.Designer.vb">
|
||||
<DependentUpon>FrmImage.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmImage.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmCheckLog.resx">
|
||||
<DependentUpon>FrmCheckLog.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmImage.resx">
|
||||
<DependentUpon>FrmImage.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="1287509_tools_configuration_control_options_repair_icon.ico" />
|
||||
<None Include="bin\Debug\RepairImage\NoImg40_30.png" />
|
||||
<None Include="Resources\NoImagePreview.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\UTS_Core\UTS_Core.vbproj">
|
||||
<Project>{33C6456C-F00D-41AC-A6FB-DB0601495C6A}</Project>
|
||||
<Name>UTS_Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
</Project>
|
||||
26
AUTS_Repair/App.config
Normal file
26
AUTS_Repair/App.config
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.30.1.0" newVersion="3.30.1.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
933
AUTS_Repair/Form1.Designer.vb
generated
Normal file
933
AUTS_Repair/Form1.Designer.vb
generated
Normal file
@@ -0,0 +1,933 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class FrmMain
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Windows 窗体设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||
'可以使用 Windows 窗体设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmMain))
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.TabRepairSource = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage8 = New System.Windows.Forms.TabPage()
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.TxtDevSn = New System.Windows.Forms.TextBox()
|
||||
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||
Me.TvwTestLog = New System.Windows.Forms.TreeView()
|
||||
Me.lblPassFailDisplay = New System.Windows.Forms.Label()
|
||||
Me.TabPage9 = New System.Windows.Forms.TabPage()
|
||||
Me.GroupBox5 = New System.Windows.Forms.GroupBox()
|
||||
Me.TvwTestLog_Request = New System.Windows.Forms.TreeView()
|
||||
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
|
||||
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
||||
Me.TvwRepairRequest = New System.Windows.Forms.TreeView()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.TxtMarketSn = New System.Windows.Forms.TextBox()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.GrpTestLog = New System.Windows.Forms.GroupBox()
|
||||
Me.BtnCheckTest = New System.Windows.Forms.Button()
|
||||
Me.TabControl2 = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage6 = New System.Windows.Forms.TabPage()
|
||||
Me.GrdSnRecord = New FlexCell.Grid()
|
||||
Me.TabPage3 = New System.Windows.Forms.TabPage()
|
||||
Me.GrdAllRecord = New FlexCell.Grid()
|
||||
Me.TabPage4 = New System.Windows.Forms.TabPage()
|
||||
Me.GrdPassRecord = New FlexCell.Grid()
|
||||
Me.TabPage5 = New System.Windows.Forms.TabPage()
|
||||
Me.GrdFailRecord = New FlexCell.Grid()
|
||||
Me.GrpRepairLog = New System.Windows.Forms.GroupBox()
|
||||
Me.BtnCheckRepair = New System.Windows.Forms.Button()
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage7 = New System.Windows.Forms.TabPage()
|
||||
Me.GrdSnRepair = New FlexCell.Grid()
|
||||
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
||||
Me.GrdTestPlan = New FlexCell.Grid()
|
||||
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
||||
Me.GrdErrCode = New FlexCell.Grid()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
Me.CboRepairScheme = New System.Windows.Forms.ComboBox()
|
||||
Me.CboRepairReason = New System.Windows.Forms.ComboBox()
|
||||
Me.CboRepairType = New System.Windows.Forms.ComboBox()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.CboRepairResult = New System.Windows.Forms.ComboBox()
|
||||
Me.ToolStrip2 = New System.Windows.Forms.ToolStrip()
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.TsmiCopy = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TsmiPaste = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TsmiDelete = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.完整图像ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TsBtnImg0 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnImg1 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnImg2 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnImg3 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.BtnCommit = New System.Windows.Forms.Button()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
Me.TabRepairSource.SuspendLayout()
|
||||
Me.TabPage8.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
Me.GroupBox3.SuspendLayout()
|
||||
Me.TabPage9.SuspendLayout()
|
||||
Me.GroupBox5.SuspendLayout()
|
||||
Me.GroupBox4.SuspendLayout()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||
Me.SplitContainer2.Panel2.SuspendLayout()
|
||||
Me.SplitContainer2.SuspendLayout()
|
||||
Me.GrpTestLog.SuspendLayout()
|
||||
Me.TabControl2.SuspendLayout()
|
||||
Me.TabPage6.SuspendLayout()
|
||||
Me.TabPage3.SuspendLayout()
|
||||
Me.TabPage4.SuspendLayout()
|
||||
Me.TabPage5.SuspendLayout()
|
||||
Me.GrpRepairLog.SuspendLayout()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage7.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.TabPage2.SuspendLayout()
|
||||
Me.ToolStrip2.SuspendLayout()
|
||||
Me.ContextMenuStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 679)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(798, 22)
|
||||
Me.StatusStrip1.TabIndex = 2
|
||||
Me.StatusStrip1.Text = "StatusStrip1"
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.TabRepairSource)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.Label7)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.CboRepairScheme)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.CboRepairReason)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.CboRepairType)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.Label5)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.Label4)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.Label3)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.CboRepairResult)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.ToolStrip2)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.Label2)
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.BtnCommit)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(798, 679)
|
||||
Me.SplitContainer1.SplitterDistance = 296
|
||||
Me.SplitContainer1.TabIndex = 3
|
||||
'
|
||||
'TabRepairSource
|
||||
'
|
||||
Me.TabRepairSource.Controls.Add(Me.TabPage8)
|
||||
Me.TabRepairSource.Controls.Add(Me.TabPage9)
|
||||
Me.TabRepairSource.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TabRepairSource.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TabRepairSource.Name = "TabRepairSource"
|
||||
Me.TabRepairSource.SelectedIndex = 0
|
||||
Me.TabRepairSource.Size = New System.Drawing.Size(296, 679)
|
||||
Me.TabRepairSource.TabIndex = 6
|
||||
'
|
||||
'TabPage8
|
||||
'
|
||||
Me.TabPage8.Controls.Add(Me.GroupBox2)
|
||||
Me.TabPage8.Controls.Add(Me.GroupBox3)
|
||||
Me.TabPage8.Controls.Add(Me.lblPassFailDisplay)
|
||||
Me.TabPage8.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage8.Name = "TabPage8"
|
||||
Me.TabPage8.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage8.Size = New System.Drawing.Size(288, 653)
|
||||
Me.TabPage8.TabIndex = 0
|
||||
Me.TabPage8.Text = "生产返修"
|
||||
Me.TabPage8.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Controls.Add(Me.TxtDevSn)
|
||||
Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.GroupBox2.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(3, 3)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(282, 51)
|
||||
Me.GroupBox2.TabIndex = 2
|
||||
Me.GroupBox2.TabStop = False
|
||||
Me.GroupBox2.Text = "产品条码"
|
||||
'
|
||||
'TxtDevSn
|
||||
'
|
||||
Me.TxtDevSn.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TxtDevSn.BackColor = System.Drawing.Color.White
|
||||
Me.TxtDevSn.Font = New System.Drawing.Font("黑体", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TxtDevSn.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtDevSn.Location = New System.Drawing.Point(3, 15)
|
||||
Me.TxtDevSn.Name = "TxtDevSn"
|
||||
Me.TxtDevSn.Size = New System.Drawing.Size(273, 31)
|
||||
Me.TxtDevSn.TabIndex = 0
|
||||
Me.TxtDevSn.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox3.Controls.Add(Me.TvwTestLog)
|
||||
Me.GroupBox3.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(2, 140)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(283, 510)
|
||||
Me.GroupBox3.TabIndex = 3
|
||||
Me.GroupBox3.TabStop = False
|
||||
Me.GroupBox3.Text = "测试历史"
|
||||
'
|
||||
'TvwTestLog
|
||||
'
|
||||
Me.TvwTestLog.BackColor = System.Drawing.SystemColors.InactiveBorder
|
||||
Me.TvwTestLog.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TvwTestLog.ItemHeight = 20
|
||||
Me.TvwTestLog.Location = New System.Drawing.Point(3, 21)
|
||||
Me.TvwTestLog.Name = "TvwTestLog"
|
||||
Me.TvwTestLog.Size = New System.Drawing.Size(277, 486)
|
||||
Me.TvwTestLog.TabIndex = 1
|
||||
'
|
||||
'lblPassFailDisplay
|
||||
'
|
||||
Me.lblPassFailDisplay.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblPassFailDisplay.BackColor = System.Drawing.SystemColors.ActiveCaptionText
|
||||
Me.lblPassFailDisplay.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.lblPassFailDisplay.Font = New System.Drawing.Font("Calibri", 48.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblPassFailDisplay.ForeColor = System.Drawing.Color.White
|
||||
Me.lblPassFailDisplay.Location = New System.Drawing.Point(4, 57)
|
||||
Me.lblPassFailDisplay.Name = "lblPassFailDisplay"
|
||||
Me.lblPassFailDisplay.Size = New System.Drawing.Size(279, 80)
|
||||
Me.lblPassFailDisplay.TabIndex = 5
|
||||
Me.lblPassFailDisplay.Text = "No Test"
|
||||
Me.lblPassFailDisplay.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'TabPage9
|
||||
'
|
||||
Me.TabPage9.Controls.Add(Me.GroupBox5)
|
||||
Me.TabPage9.Controls.Add(Me.GroupBox4)
|
||||
Me.TabPage9.Controls.Add(Me.GroupBox1)
|
||||
Me.TabPage9.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage9.Name = "TabPage9"
|
||||
Me.TabPage9.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage9.Size = New System.Drawing.Size(288, 653)
|
||||
Me.TabPage9.TabIndex = 1
|
||||
Me.TabPage9.Text = "市场返修"
|
||||
Me.TabPage9.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox5
|
||||
'
|
||||
Me.GroupBox5.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox5.Controls.Add(Me.TvwTestLog_Request)
|
||||
Me.GroupBox5.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox5.Location = New System.Drawing.Point(3, 52)
|
||||
Me.GroupBox5.Name = "GroupBox5"
|
||||
Me.GroupBox5.Size = New System.Drawing.Size(282, 255)
|
||||
Me.GroupBox5.TabIndex = 5
|
||||
Me.GroupBox5.TabStop = False
|
||||
Me.GroupBox5.Text = "测试历史"
|
||||
'
|
||||
'TvwTestLog_Request
|
||||
'
|
||||
Me.TvwTestLog_Request.BackColor = System.Drawing.SystemColors.InactiveBorder
|
||||
Me.TvwTestLog_Request.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TvwTestLog_Request.ItemHeight = 20
|
||||
Me.TvwTestLog_Request.Location = New System.Drawing.Point(3, 21)
|
||||
Me.TvwTestLog_Request.Name = "TvwTestLog_Request"
|
||||
Me.TvwTestLog_Request.Size = New System.Drawing.Size(276, 231)
|
||||
Me.TvwTestLog_Request.TabIndex = 1
|
||||
'
|
||||
'GroupBox4
|
||||
'
|
||||
Me.GroupBox4.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox4.Controls.Add(Me.PictureBox1)
|
||||
Me.GroupBox4.Controls.Add(Me.TvwRepairRequest)
|
||||
Me.GroupBox4.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox4.Location = New System.Drawing.Point(0, 307)
|
||||
Me.GroupBox4.Name = "GroupBox4"
|
||||
Me.GroupBox4.Size = New System.Drawing.Size(285, 343)
|
||||
Me.GroupBox4.TabIndex = 4
|
||||
Me.GroupBox4.TabStop = False
|
||||
Me.GroupBox4.Text = "报修信息"
|
||||
'
|
||||
'PictureBox1
|
||||
'
|
||||
Me.PictureBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.PictureBox1.Location = New System.Drawing.Point(6, 242)
|
||||
Me.PictureBox1.Name = "PictureBox1"
|
||||
Me.PictureBox1.Size = New System.Drawing.Size(276, 101)
|
||||
Me.PictureBox1.TabIndex = 5
|
||||
Me.PictureBox1.TabStop = False
|
||||
'
|
||||
'TvwRepairRequest
|
||||
'
|
||||
Me.TvwRepairRequest.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TvwRepairRequest.BackColor = System.Drawing.SystemColors.InactiveBorder
|
||||
Me.TvwRepairRequest.ItemHeight = 20
|
||||
Me.TvwRepairRequest.Location = New System.Drawing.Point(6, 21)
|
||||
Me.TvwRepairRequest.Name = "TvwRepairRequest"
|
||||
Me.TvwRepairRequest.Size = New System.Drawing.Size(276, 223)
|
||||
Me.TvwRepairRequest.TabIndex = 1
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.TxtMarketSn)
|
||||
Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.GroupBox1.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(282, 51)
|
||||
Me.GroupBox1.TabIndex = 3
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "产品条码"
|
||||
'
|
||||
'TxtMarketSn
|
||||
'
|
||||
Me.TxtMarketSn.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TxtMarketSn.BackColor = System.Drawing.Color.White
|
||||
Me.TxtMarketSn.Font = New System.Drawing.Font("黑体", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TxtMarketSn.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.TxtMarketSn.Location = New System.Drawing.Point(3, 15)
|
||||
Me.TxtMarketSn.Name = "TxtMarketSn"
|
||||
Me.TxtMarketSn.Size = New System.Drawing.Size(273, 31)
|
||||
Me.TxtMarketSn.TabIndex = 0
|
||||
Me.TxtMarketSn.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'SplitContainer2
|
||||
'
|
||||
Me.SplitContainer2.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.SplitContainer2.Location = New System.Drawing.Point(3, 3)
|
||||
Me.SplitContainer2.Name = "SplitContainer2"
|
||||
Me.SplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer2.Panel1
|
||||
'
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.GrpTestLog)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.GrpRepairLog)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(490, 552)
|
||||
Me.SplitContainer2.SplitterDistance = 276
|
||||
Me.SplitContainer2.TabIndex = 17
|
||||
'
|
||||
'GrpTestLog
|
||||
'
|
||||
Me.GrpTestLog.Controls.Add(Me.BtnCheckTest)
|
||||
Me.GrpTestLog.Controls.Add(Me.TabControl2)
|
||||
Me.GrpTestLog.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrpTestLog.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrpTestLog.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrpTestLog.Name = "GrpTestLog"
|
||||
Me.GrpTestLog.Size = New System.Drawing.Size(490, 276)
|
||||
Me.GrpTestLog.TabIndex = 7
|
||||
Me.GrpTestLog.TabStop = False
|
||||
Me.GrpTestLog.Text = "测试记录"
|
||||
'
|
||||
'BtnCheckTest
|
||||
'
|
||||
Me.BtnCheckTest.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.BtnCheckTest.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.BtnCheckTest.Location = New System.Drawing.Point(404, 16)
|
||||
Me.BtnCheckTest.Name = "BtnCheckTest"
|
||||
Me.BtnCheckTest.Size = New System.Drawing.Size(82, 28)
|
||||
Me.BtnCheckTest.TabIndex = 1
|
||||
Me.BtnCheckTest.Text = "筛选"
|
||||
Me.BtnCheckTest.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TabControl2
|
||||
'
|
||||
Me.TabControl2.Controls.Add(Me.TabPage6)
|
||||
Me.TabControl2.Controls.Add(Me.TabPage3)
|
||||
Me.TabControl2.Controls.Add(Me.TabPage4)
|
||||
Me.TabControl2.Controls.Add(Me.TabPage5)
|
||||
Me.TabControl2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TabControl2.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TabControl2.HotTrack = True
|
||||
Me.TabControl2.Location = New System.Drawing.Point(3, 21)
|
||||
Me.TabControl2.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabControl2.Name = "TabControl2"
|
||||
Me.TabControl2.SelectedIndex = 0
|
||||
Me.TabControl2.Size = New System.Drawing.Size(484, 252)
|
||||
Me.TabControl2.TabIndex = 7
|
||||
'
|
||||
'TabPage6
|
||||
'
|
||||
Me.TabPage6.Controls.Add(Me.GrdSnRecord)
|
||||
Me.TabPage6.Location = New System.Drawing.Point(4, 26)
|
||||
Me.TabPage6.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabPage6.Name = "TabPage6"
|
||||
Me.TabPage6.Size = New System.Drawing.Size(476, 222)
|
||||
Me.TabPage6.TabIndex = 3
|
||||
Me.TabPage6.Text = "本条码记录"
|
||||
Me.TabPage6.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GrdSnRecord
|
||||
'
|
||||
Me.GrdSnRecord.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdSnRecord.CheckedImage = Nothing
|
||||
Me.GrdSnRecord.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdSnRecord.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdSnRecord.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdSnRecord.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdSnRecord.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdSnRecord.Name = "GrdSnRecord"
|
||||
Me.GrdSnRecord.Size = New System.Drawing.Size(476, 222)
|
||||
Me.GrdSnRecord.TabIndex = 2
|
||||
Me.GrdSnRecord.UncheckedImage = Nothing
|
||||
'
|
||||
'TabPage3
|
||||
'
|
||||
Me.TabPage3.Controls.Add(Me.GrdAllRecord)
|
||||
Me.TabPage3.Location = New System.Drawing.Point(4, 26)
|
||||
Me.TabPage3.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabPage3.Name = "TabPage3"
|
||||
Me.TabPage3.Size = New System.Drawing.Size(476, 222)
|
||||
Me.TabPage3.TabIndex = 0
|
||||
Me.TabPage3.Text = "全部记录"
|
||||
Me.TabPage3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GrdAllRecord
|
||||
'
|
||||
Me.GrdAllRecord.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdAllRecord.CheckedImage = Nothing
|
||||
Me.GrdAllRecord.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdAllRecord.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdAllRecord.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdAllRecord.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdAllRecord.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdAllRecord.Name = "GrdAllRecord"
|
||||
Me.GrdAllRecord.Size = New System.Drawing.Size(476, 222)
|
||||
Me.GrdAllRecord.TabIndex = 0
|
||||
Me.GrdAllRecord.UncheckedImage = Nothing
|
||||
'
|
||||
'TabPage4
|
||||
'
|
||||
Me.TabPage4.Controls.Add(Me.GrdPassRecord)
|
||||
Me.TabPage4.Location = New System.Drawing.Point(4, 26)
|
||||
Me.TabPage4.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabPage4.Name = "TabPage4"
|
||||
Me.TabPage4.Size = New System.Drawing.Size(476, 222)
|
||||
Me.TabPage4.TabIndex = 1
|
||||
Me.TabPage4.Text = "成功记录"
|
||||
Me.TabPage4.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GrdPassRecord
|
||||
'
|
||||
Me.GrdPassRecord.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdPassRecord.CheckedImage = Nothing
|
||||
Me.GrdPassRecord.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdPassRecord.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdPassRecord.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdPassRecord.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdPassRecord.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdPassRecord.Name = "GrdPassRecord"
|
||||
Me.GrdPassRecord.Size = New System.Drawing.Size(476, 222)
|
||||
Me.GrdPassRecord.TabIndex = 1
|
||||
Me.GrdPassRecord.UncheckedImage = Nothing
|
||||
'
|
||||
'TabPage5
|
||||
'
|
||||
Me.TabPage5.Controls.Add(Me.GrdFailRecord)
|
||||
Me.TabPage5.Location = New System.Drawing.Point(4, 26)
|
||||
Me.TabPage5.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabPage5.Name = "TabPage5"
|
||||
Me.TabPage5.Size = New System.Drawing.Size(476, 222)
|
||||
Me.TabPage5.TabIndex = 2
|
||||
Me.TabPage5.Text = "失败记录"
|
||||
Me.TabPage5.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GrdFailRecord
|
||||
'
|
||||
Me.GrdFailRecord.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdFailRecord.CheckedImage = Nothing
|
||||
Me.GrdFailRecord.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdFailRecord.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdFailRecord.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdFailRecord.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdFailRecord.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdFailRecord.Name = "GrdFailRecord"
|
||||
Me.GrdFailRecord.Size = New System.Drawing.Size(476, 222)
|
||||
Me.GrdFailRecord.TabIndex = 2
|
||||
Me.GrdFailRecord.UncheckedImage = Nothing
|
||||
'
|
||||
'GrpRepairLog
|
||||
'
|
||||
Me.GrpRepairLog.Controls.Add(Me.BtnCheckRepair)
|
||||
Me.GrpRepairLog.Controls.Add(Me.TabControl1)
|
||||
Me.GrpRepairLog.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrpRepairLog.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrpRepairLog.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrpRepairLog.Name = "GrpRepairLog"
|
||||
Me.GrpRepairLog.Size = New System.Drawing.Size(490, 272)
|
||||
Me.GrpRepairLog.TabIndex = 6
|
||||
Me.GrpRepairLog.TabStop = False
|
||||
Me.GrpRepairLog.Text = "维修记录"
|
||||
'
|
||||
'BtnCheckRepair
|
||||
'
|
||||
Me.BtnCheckRepair.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.BtnCheckRepair.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.BtnCheckRepair.Location = New System.Drawing.Point(401, 15)
|
||||
Me.BtnCheckRepair.Name = "BtnCheckRepair"
|
||||
Me.BtnCheckRepair.Size = New System.Drawing.Size(82, 28)
|
||||
Me.BtnCheckRepair.TabIndex = 8
|
||||
Me.BtnCheckRepair.Text = "筛选"
|
||||
Me.BtnCheckRepair.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TabControl1
|
||||
'
|
||||
Me.TabControl1.Controls.Add(Me.TabPage7)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage1)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage2)
|
||||
Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TabControl1.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TabControl1.HotTrack = True
|
||||
Me.TabControl1.Location = New System.Drawing.Point(3, 21)
|
||||
Me.TabControl1.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabControl1.Name = "TabControl1"
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
Me.TabControl1.Size = New System.Drawing.Size(484, 248)
|
||||
Me.TabControl1.TabIndex = 7
|
||||
'
|
||||
'TabPage7
|
||||
'
|
||||
Me.TabPage7.Controls.Add(Me.GrdSnRepair)
|
||||
Me.TabPage7.Location = New System.Drawing.Point(4, 26)
|
||||
Me.TabPage7.Name = "TabPage7"
|
||||
Me.TabPage7.Size = New System.Drawing.Size(476, 218)
|
||||
Me.TabPage7.TabIndex = 2
|
||||
Me.TabPage7.Text = "本条码记录"
|
||||
Me.TabPage7.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GrdSnRepair
|
||||
'
|
||||
Me.GrdSnRepair.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdSnRepair.CheckedImage = Nothing
|
||||
Me.GrdSnRepair.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdSnRepair.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdSnRepair.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdSnRepair.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdSnRepair.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdSnRepair.Name = "GrdSnRepair"
|
||||
Me.GrdSnRepair.Size = New System.Drawing.Size(476, 218)
|
||||
Me.GrdSnRepair.TabIndex = 2
|
||||
Me.GrdSnRepair.UncheckedImage = Nothing
|
||||
'
|
||||
'TabPage1
|
||||
'
|
||||
Me.TabPage1.Controls.Add(Me.GrdTestPlan)
|
||||
Me.TabPage1.Location = New System.Drawing.Point(4, 26)
|
||||
Me.TabPage1.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabPage1.Name = "TabPage1"
|
||||
Me.TabPage1.Size = New System.Drawing.Size(476, 218)
|
||||
Me.TabPage1.TabIndex = 0
|
||||
Me.TabPage1.Text = "相同失败步骤"
|
||||
Me.TabPage1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GrdTestPlan
|
||||
'
|
||||
Me.GrdTestPlan.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdTestPlan.CheckedImage = Nothing
|
||||
Me.GrdTestPlan.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdTestPlan.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdTestPlan.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdTestPlan.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdTestPlan.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdTestPlan.Name = "GrdTestPlan"
|
||||
Me.GrdTestPlan.Size = New System.Drawing.Size(476, 218)
|
||||
Me.GrdTestPlan.TabIndex = 0
|
||||
Me.GrdTestPlan.UncheckedImage = Nothing
|
||||
'
|
||||
'TabPage2
|
||||
'
|
||||
Me.TabPage2.Controls.Add(Me.GrdErrCode)
|
||||
Me.TabPage2.Location = New System.Drawing.Point(4, 26)
|
||||
Me.TabPage2.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.TabPage2.Name = "TabPage2"
|
||||
Me.TabPage2.Size = New System.Drawing.Size(476, 218)
|
||||
Me.TabPage2.TabIndex = 1
|
||||
Me.TabPage2.Text = "相同错误码"
|
||||
Me.TabPage2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GrdErrCode
|
||||
'
|
||||
Me.GrdErrCode.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdErrCode.CheckedImage = Nothing
|
||||
Me.GrdErrCode.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdErrCode.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdErrCode.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdErrCode.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdErrCode.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdErrCode.Name = "GrdErrCode"
|
||||
Me.GrdErrCode.Size = New System.Drawing.Size(476, 218)
|
||||
Me.GrdErrCode.TabIndex = 1
|
||||
Me.GrdErrCode.UncheckedImage = Nothing
|
||||
'
|
||||
'Label7
|
||||
'
|
||||
Me.Label7.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label7.AutoSize = True
|
||||
Me.Label7.Location = New System.Drawing.Point(10, 644)
|
||||
Me.Label7.Name = "Label7"
|
||||
Me.Label7.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label7.TabIndex = 16
|
||||
Me.Label7.Text = "故障图像"
|
||||
'
|
||||
'CboRepairScheme
|
||||
'
|
||||
Me.CboRepairScheme.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.CboRepairScheme.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
|
||||
Me.CboRepairScheme.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource
|
||||
Me.CboRepairScheme.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CboRepairScheme.FormattingEnabled = True
|
||||
Me.CboRepairScheme.Location = New System.Drawing.Point(66, 592)
|
||||
Me.CboRepairScheme.Name = "CboRepairScheme"
|
||||
Me.CboRepairScheme.Size = New System.Drawing.Size(427, 25)
|
||||
Me.CboRepairScheme.TabIndex = 0
|
||||
'
|
||||
'CboRepairReason
|
||||
'
|
||||
Me.CboRepairReason.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.CboRepairReason.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboRepairReason.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CboRepairReason.FormattingEnabled = True
|
||||
Me.CboRepairReason.Location = New System.Drawing.Point(228, 561)
|
||||
Me.CboRepairReason.Name = "CboRepairReason"
|
||||
Me.CboRepairReason.Size = New System.Drawing.Size(102, 25)
|
||||
Me.CboRepairReason.TabIndex = 0
|
||||
'
|
||||
'CboRepairType
|
||||
'
|
||||
Me.CboRepairType.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.CboRepairType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboRepairType.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CboRepairType.FormattingEnabled = True
|
||||
Me.CboRepairType.Location = New System.Drawing.Point(66, 561)
|
||||
Me.CboRepairType.Name = "CboRepairType"
|
||||
Me.CboRepairType.Size = New System.Drawing.Size(102, 25)
|
||||
Me.CboRepairType.TabIndex = 0
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Location = New System.Drawing.Point(173, 568)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label5.TabIndex = 13
|
||||
Me.Label5.Text = "返修原因"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(10, 567)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label4.TabIndex = 12
|
||||
Me.Label4.Text = "返修类型"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(10, 598)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label3.TabIndex = 11
|
||||
Me.Label3.Text = "返修方案"
|
||||
'
|
||||
'CboRepairResult
|
||||
'
|
||||
Me.CboRepairResult.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.CboRepairResult.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboRepairResult.Font = New System.Drawing.Font("微软雅黑", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CboRepairResult.FormattingEnabled = True
|
||||
Me.CboRepairResult.Location = New System.Drawing.Point(387, 561)
|
||||
Me.CboRepairResult.Name = "CboRepairResult"
|
||||
Me.CboRepairResult.Size = New System.Drawing.Size(106, 25)
|
||||
Me.CboRepairResult.TabIndex = 0
|
||||
'
|
||||
'ToolStrip2
|
||||
'
|
||||
Me.ToolStrip2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.ToolStrip2.ContextMenuStrip = Me.ContextMenuStrip1
|
||||
Me.ToolStrip2.Dock = System.Windows.Forms.DockStyle.None
|
||||
Me.ToolStrip2.ImageScalingSize = New System.Drawing.Size(60, 45)
|
||||
Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsBtnImg0, Me.TsBtnImg1, Me.TsBtnImg2, Me.TsBtnImg3})
|
||||
Me.ToolStrip2.Location = New System.Drawing.Point(66, 624)
|
||||
Me.ToolStrip2.Name = "ToolStrip2"
|
||||
Me.ToolStrip2.Size = New System.Drawing.Size(252, 48)
|
||||
Me.ToolStrip2.TabIndex = 0
|
||||
Me.ToolStrip2.Text = "ToolStrip2"
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsmiCopy, Me.TsmiPaste, Me.TsmiDelete, Me.ToolStripSeparator1, Me.完整图像ToolStripMenuItem})
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(125, 98)
|
||||
'
|
||||
'TsmiCopy
|
||||
'
|
||||
Me.TsmiCopy.Name = "TsmiCopy"
|
||||
Me.TsmiCopy.Size = New System.Drawing.Size(124, 22)
|
||||
Me.TsmiCopy.Text = "复制图像"
|
||||
'
|
||||
'TsmiPaste
|
||||
'
|
||||
Me.TsmiPaste.Name = "TsmiPaste"
|
||||
Me.TsmiPaste.Size = New System.Drawing.Size(124, 22)
|
||||
Me.TsmiPaste.Text = "粘贴图像"
|
||||
'
|
||||
'TsmiDelete
|
||||
'
|
||||
Me.TsmiDelete.Name = "TsmiDelete"
|
||||
Me.TsmiDelete.Size = New System.Drawing.Size(124, 22)
|
||||
Me.TsmiDelete.Text = "删除图像"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(121, 6)
|
||||
'
|
||||
'完整图像ToolStripMenuItem
|
||||
'
|
||||
Me.完整图像ToolStripMenuItem.Name = "完整图像ToolStripMenuItem"
|
||||
Me.完整图像ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.完整图像ToolStripMenuItem.Text = "完整图像"
|
||||
'
|
||||
'TsBtnImg0
|
||||
'
|
||||
Me.TsBtnImg0.AutoSize = False
|
||||
Me.TsBtnImg0.Checked = True
|
||||
Me.TsBtnImg0.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.TsBtnImg0.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TsBtnImg0.Image = Global.AUTS_Repair.My.Resources.Resources.NoImg40_30
|
||||
Me.TsBtnImg0.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnImg0.Name = "TsBtnImg0"
|
||||
Me.TsBtnImg0.Size = New System.Drawing.Size(60, 45)
|
||||
Me.TsBtnImg0.Tag = "0"
|
||||
Me.TsBtnImg0.Text = "图1"
|
||||
Me.TsBtnImg0.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay
|
||||
'
|
||||
'TsBtnImg1
|
||||
'
|
||||
Me.TsBtnImg1.AutoSize = False
|
||||
Me.TsBtnImg1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.TsBtnImg1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TsBtnImg1.Image = Global.AUTS_Repair.My.Resources.Resources.NoImg40_30
|
||||
Me.TsBtnImg1.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnImg1.Name = "TsBtnImg1"
|
||||
Me.TsBtnImg1.Size = New System.Drawing.Size(60, 45)
|
||||
Me.TsBtnImg1.Tag = "1"
|
||||
Me.TsBtnImg1.Text = "图2"
|
||||
Me.TsBtnImg1.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay
|
||||
'
|
||||
'TsBtnImg2
|
||||
'
|
||||
Me.TsBtnImg2.AutoSize = False
|
||||
Me.TsBtnImg2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.TsBtnImg2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TsBtnImg2.Image = Global.AUTS_Repair.My.Resources.Resources.NoImg40_30
|
||||
Me.TsBtnImg2.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnImg2.Name = "TsBtnImg2"
|
||||
Me.TsBtnImg2.Size = New System.Drawing.Size(60, 45)
|
||||
Me.TsBtnImg2.Tag = "2"
|
||||
Me.TsBtnImg2.Text = "图3"
|
||||
Me.TsBtnImg2.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay
|
||||
'
|
||||
'TsBtnImg3
|
||||
'
|
||||
Me.TsBtnImg3.AutoSize = False
|
||||
Me.TsBtnImg3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
|
||||
Me.TsBtnImg3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.TsBtnImg3.Image = Global.AUTS_Repair.My.Resources.Resources.NoImg40_30
|
||||
Me.TsBtnImg3.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnImg3.Name = "TsBtnImg3"
|
||||
Me.TsBtnImg3.Size = New System.Drawing.Size(60, 45)
|
||||
Me.TsBtnImg3.Tag = "3"
|
||||
Me.TsBtnImg3.Text = "图4"
|
||||
Me.TsBtnImg3.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(333, 568)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label2.TabIndex = 10
|
||||
Me.Label2.Text = "返修结果"
|
||||
'
|
||||
'BtnCommit
|
||||
'
|
||||
Me.BtnCommit.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.BtnCommit.Font = New System.Drawing.Font("微软雅黑", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.BtnCommit.ForeColor = System.Drawing.Color.Green
|
||||
Me.BtnCommit.Location = New System.Drawing.Point(371, 623)
|
||||
Me.BtnCommit.Name = "BtnCommit"
|
||||
Me.BtnCommit.Size = New System.Drawing.Size(122, 49)
|
||||
Me.BtnCommit.TabIndex = 2
|
||||
Me.BtnCommit.Text = "提交"
|
||||
Me.BtnCommit.UseVisualStyleBackColor = True
|
||||
'
|
||||
'FrmMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(798, 701)
|
||||
Me.Controls.Add(Me.SplitContainer1)
|
||||
Me.Controls.Add(Me.StatusStrip1)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.KeyPreview = True
|
||||
Me.Name = "FrmMain"
|
||||
Me.Text = "RepairStation"
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.PerformLayout()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.TabRepairSource.ResumeLayout(False)
|
||||
Me.TabPage8.ResumeLayout(False)
|
||||
Me.GroupBox2.ResumeLayout(False)
|
||||
Me.GroupBox2.PerformLayout()
|
||||
Me.GroupBox3.ResumeLayout(False)
|
||||
Me.TabPage9.ResumeLayout(False)
|
||||
Me.GroupBox5.ResumeLayout(False)
|
||||
Me.GroupBox4.ResumeLayout(False)
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.GroupBox1.PerformLayout()
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer2.ResumeLayout(False)
|
||||
Me.GrpTestLog.ResumeLayout(False)
|
||||
Me.TabControl2.ResumeLayout(False)
|
||||
Me.TabPage6.ResumeLayout(False)
|
||||
Me.TabPage3.ResumeLayout(False)
|
||||
Me.TabPage4.ResumeLayout(False)
|
||||
Me.TabPage5.ResumeLayout(False)
|
||||
Me.GrpRepairLog.ResumeLayout(False)
|
||||
Me.TabControl1.ResumeLayout(False)
|
||||
Me.TabPage7.ResumeLayout(False)
|
||||
Me.TabPage1.ResumeLayout(False)
|
||||
Me.TabPage2.ResumeLayout(False)
|
||||
Me.ToolStrip2.ResumeLayout(False)
|
||||
Me.ToolStrip2.PerformLayout()
|
||||
Me.ContextMenuStrip1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents StatusStrip1 As StatusStrip
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents TxtDevSn As TextBox
|
||||
Friend WithEvents ToolStrip2 As ToolStrip
|
||||
Friend WithEvents TsBtnImg0 As ToolStripButton
|
||||
Friend WithEvents GroupBox3 As GroupBox
|
||||
Friend WithEvents TvwTestLog As TreeView
|
||||
Friend WithEvents GroupBox2 As GroupBox
|
||||
Friend WithEvents BtnCommit As Button
|
||||
Friend WithEvents TsBtnImg1 As ToolStripButton
|
||||
Friend WithEvents TsBtnImg2 As ToolStripButton
|
||||
Friend WithEvents TsBtnImg3 As ToolStripButton
|
||||
Friend WithEvents lblPassFailDisplay As Label
|
||||
Friend WithEvents CboRepairType As ComboBox
|
||||
Friend WithEvents CboRepairScheme As ComboBox
|
||||
Friend WithEvents CboRepairReason As ComboBox
|
||||
Friend WithEvents GrpTestLog As GroupBox
|
||||
Friend WithEvents TabControl2 As TabControl
|
||||
Friend WithEvents TabPage3 As TabPage
|
||||
Friend WithEvents GrdAllRecord As FlexCell.Grid
|
||||
Friend WithEvents TabPage4 As TabPage
|
||||
Friend WithEvents GrdPassRecord As FlexCell.Grid
|
||||
Friend WithEvents GrpRepairLog As GroupBox
|
||||
Friend WithEvents TabControl1 As TabControl
|
||||
Friend WithEvents TabPage1 As TabPage
|
||||
Friend WithEvents GrdTestPlan As FlexCell.Grid
|
||||
Friend WithEvents TabPage2 As TabPage
|
||||
Friend WithEvents GrdErrCode As FlexCell.Grid
|
||||
Friend WithEvents CboRepairResult As ComboBox
|
||||
Friend WithEvents TabPage5 As TabPage
|
||||
Friend WithEvents GrdFailRecord As FlexCell.Grid
|
||||
Friend WithEvents TabPage6 As TabPage
|
||||
Friend WithEvents GrdSnRecord As FlexCell.Grid
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label7 As Label
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
|
||||
Friend WithEvents TsmiCopy As ToolStripMenuItem
|
||||
Friend WithEvents TsmiPaste As ToolStripMenuItem
|
||||
Friend WithEvents TsmiDelete As ToolStripMenuItem
|
||||
Friend WithEvents TabPage7 As TabPage
|
||||
Friend WithEvents GrdSnRepair As FlexCell.Grid
|
||||
Friend WithEvents TabRepairSource As TabControl
|
||||
Friend WithEvents TabPage8 As TabPage
|
||||
Friend WithEvents TabPage9 As TabPage
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents TxtMarketSn As TextBox
|
||||
Friend WithEvents GroupBox4 As GroupBox
|
||||
Friend WithEvents TvwRepairRequest As TreeView
|
||||
Friend WithEvents ToolStripSeparator1 As ToolStripSeparator
|
||||
Friend WithEvents 完整图像ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents BtnCheckTest As Button
|
||||
Friend WithEvents BtnCheckRepair As Button
|
||||
Friend WithEvents PictureBox1 As PictureBox
|
||||
Friend WithEvents GroupBox5 As GroupBox
|
||||
Friend WithEvents TvwTestLog_Request As TreeView
|
||||
End Class
|
||||
6305
AUTS_Repair/Form1.resx
Normal file
6305
AUTS_Repair/Form1.resx
Normal file
File diff suppressed because it is too large
Load Diff
1124
AUTS_Repair/Form1.vb
Normal file
1124
AUTS_Repair/Form1.vb
Normal file
File diff suppressed because it is too large
Load Diff
78
AUTS_Repair/FrmCheckLog.Designer.vb
generated
Normal file
78
AUTS_Repair/FrmCheckLog.Designer.vb
generated
Normal file
@@ -0,0 +1,78 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FrmCheckLog
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Windows 窗体设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||
'可以使用 Windows 窗体设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.Grid1 = New FlexCell.Grid()
|
||||
Me.BtnOk = New System.Windows.Forms.Button()
|
||||
Me.BtnCencel = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Grid1
|
||||
'
|
||||
Me.Grid1.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.Grid1.CheckedImage = Nothing
|
||||
Me.Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Grid1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Grid1.Name = "Grid1"
|
||||
Me.Grid1.Size = New System.Drawing.Size(303, 405)
|
||||
Me.Grid1.TabIndex = 0
|
||||
Me.Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'BtnOk
|
||||
'
|
||||
Me.BtnOk.Location = New System.Drawing.Point(143, 423)
|
||||
Me.BtnOk.Name = "BtnOk"
|
||||
Me.BtnOk.Size = New System.Drawing.Size(64, 22)
|
||||
Me.BtnOk.TabIndex = 1
|
||||
Me.BtnOk.Text = "确定"
|
||||
Me.BtnOk.UseVisualStyleBackColor = True
|
||||
'
|
||||
'BtnCencel
|
||||
'
|
||||
Me.BtnCencel.Location = New System.Drawing.Point(216, 422)
|
||||
Me.BtnCencel.Name = "BtnCencel"
|
||||
Me.BtnCencel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.BtnCencel.TabIndex = 2
|
||||
Me.BtnCencel.Text = "取消"
|
||||
Me.BtnCencel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'FrmCheckLog
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(303, 450)
|
||||
Me.Controls.Add(Me.BtnCencel)
|
||||
Me.Controls.Add(Me.BtnOk)
|
||||
Me.Controls.Add(Me.Grid1)
|
||||
Me.Name = "FrmCheckLog"
|
||||
Me.Text = "FrmCheckLog"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents Grid1 As FlexCell.Grid
|
||||
Friend WithEvents BtnOk As Button
|
||||
Friend WithEvents BtnCencel As Button
|
||||
End Class
|
||||
120
AUTS_Repair/FrmCheckLog.resx
Normal file
120
AUTS_Repair/FrmCheckLog.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
46
AUTS_Repair/FrmCheckLog.vb
Normal file
46
AUTS_Repair/FrmCheckLog.vb
Normal file
@@ -0,0 +1,46 @@
|
||||
Public Class FrmCheckLog
|
||||
Private Sub FrmCheckLog_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Text = "选择显示列"
|
||||
InitGrid()
|
||||
End Sub
|
||||
|
||||
|
||||
Public CheckRows As Dictionary(Of String, String)
|
||||
|
||||
Private Sub InitGrid()
|
||||
With Grid1
|
||||
.AutoRedraw = False
|
||||
.DisplayRowNumber = True
|
||||
|
||||
.Cols = 3
|
||||
.Rows = CheckRows.Count + 1
|
||||
.ExtendLastCol = True
|
||||
|
||||
.Column(1).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
|
||||
For i As Integer = 0 To CheckRows.Count - 1
|
||||
.Cell(i + 1, 1).Text = CheckRows.Values(i)
|
||||
.Cell(i + 1, 2).Text = CheckRows.Keys(i)
|
||||
Next
|
||||
|
||||
.AutoRedraw = True
|
||||
.Refresh()
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub BtnOk_Click(sender As Object, e As EventArgs) Handles BtnOk.Click
|
||||
DialogResult = DialogResult.OK
|
||||
|
||||
For i As Integer = 1 To Grid1.Rows - 1
|
||||
If Grid1.Cell(i, 1).BooleanValue Then
|
||||
CheckRows(Grid1.Cell(i, 2).Text) = "1"
|
||||
Else
|
||||
CheckRows(Grid1.Cell(i, 2).Text) = "0"
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub BtnCencel_Click(sender As Object, e As EventArgs) Handles BtnCencel.Click
|
||||
DialogResult = DialogResult.Cancel
|
||||
End Sub
|
||||
End Class
|
||||
57
AUTS_Repair/FrmImage.Designer.vb
generated
Normal file
57
AUTS_Repair/FrmImage.Designer.vb
generated
Normal file
@@ -0,0 +1,57 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FrmImage
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Windows 窗体设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||
'可以使用 Windows 窗体设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'PictureBox1
|
||||
'
|
||||
Me.PictureBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.PictureBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PictureBox1.Name = "PictureBox1"
|
||||
Me.PictureBox1.Size = New System.Drawing.Size(584, 441)
|
||||
Me.PictureBox1.TabIndex = 0
|
||||
Me.PictureBox1.TabStop = False
|
||||
'
|
||||
'FrmImage
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(584, 441)
|
||||
Me.Controls.Add(Me.PictureBox1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
|
||||
Me.Name = "FrmImage"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Frm"
|
||||
Me.TopMost = True
|
||||
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents PictureBox1 As PictureBox
|
||||
End Class
|
||||
120
AUTS_Repair/FrmImage.resx
Normal file
120
AUTS_Repair/FrmImage.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
13
AUTS_Repair/FrmImage.vb
Normal file
13
AUTS_Repair/FrmImage.vb
Normal file
@@ -0,0 +1,13 @@
|
||||
Public Class FrmImage
|
||||
Public Shadows Function ShowImage(img As Image) As DialogResult
|
||||
Using frm As New FrmImage
|
||||
frm.PictureBox1.Image = img
|
||||
Return frm.ShowDialog()
|
||||
End Using
|
||||
End Function
|
||||
|
||||
Private Sub FrmImage_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
PictureBox1.SizeMode = PictureBoxSizeMode.Zoom
|
||||
Text = $"Image"
|
||||
End Sub
|
||||
End Class
|
||||
38
AUTS_Repair/My Project/Application.Designer.vb
generated
Normal file
38
AUTS_Repair/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'注意:此文件是自动生成的;请勿直接进行修改。若要更改,
|
||||
' 或者如果您在此文件中遇到生成错误,请转至项目设计器
|
||||
' (转至“项目属性”或在解决方案资源管理器中双击“我的项目”节点),
|
||||
' 然后在“应用程序”选项卡中进行更改。
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.AUTS_Repair.FrmMain
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
10
AUTS_Repair/My Project/Application.myapp
Normal file
10
AUTS_Repair/My Project/Application.myapp
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>FrmMain</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
AUTS_Repair/My Project/AssemblyInfo.vb
Normal file
35
AUTS_Repair/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' 有关程序集的一般信息由以下
|
||||
' 控制。更改这些特性值可修改
|
||||
' 与程序集关联的信息。
|
||||
|
||||
'查看程序集特性的值
|
||||
|
||||
<Assembly: AssemblyTitle("AUTS_Repair")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("AUTS_Repair")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2021")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID
|
||||
<Assembly: Guid("dc7139a5-4f3a-4173-836f-b35f0054e739")>
|
||||
|
||||
' 程序集的版本信息由下列四个值组成:
|
||||
'
|
||||
' 主版本
|
||||
' 次版本
|
||||
' 生成号
|
||||
' 修订号
|
||||
'
|
||||
'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
'通过使用 "*",如下所示:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.1.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.1.0.0")>
|
||||
73
AUTS_Repair/My Project/Resources.Designer.vb
generated
Normal file
73
AUTS_Repair/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'此类是由 StronglyTypedResourceBuilder
|
||||
'类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
'若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
'(以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
'''<summary>
|
||||
''' 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' 返回此类使用的缓存的 ResourceManager 实例。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("AUTS_Repair.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 重写当前线程的 CurrentUICulture 属性,对
|
||||
''' 使用此强类型资源类的所有资源查找执行重写。
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
'''</summary>
|
||||
Friend ReadOnly Property NoImg40_30() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("NoImg40_30", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
124
AUTS_Repair/My Project/Resources.resx
Normal file
124
AUTS_Repair/My Project/Resources.resx
Normal file
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: 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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<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:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="NoImg40_30" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\bin\Debug\RepairImage\NoImg40_30.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
73
AUTS_Repair/My Project/Settings.Designer.vb
generated
Normal file
73
AUTS_Repair/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.AUTS_Repair.My.MySettings
|
||||
Get
|
||||
Return Global.AUTS_Repair.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user