mirror of
https://github.com/romanlryji/EventLogLoader.git
synced 2024-11-24 08:32:52 +02:00
first
This commit is contained in:
parent
3c7778976b
commit
b21cd623bf
102
EventLogLoader.sln
Normal file
102
EventLogLoader.sln
Normal file
@ -0,0 +1,102 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EventLogLoaderDebug", "EventLogLoader\EventLogLoaderDebug.vbproj", "{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EventLogLoaderManager", "EventLogLoaderManager\EventLogLoaderManager.vbproj", "{AF261326-5435-43E2-8407-4F0DFAED7B29}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "IniFile", "IniFile\IniFile.vbproj", "{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "EventLogLoaderService", "EventLogLoaderService\EventLogLoaderService.vbproj", "{F7EF5930-B310-4697-B522-2325EAF247F2}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Installer", "Installer\Installer.vbproj", "{593952E2-6C95-4496-BFD5-C8C64DF78DE5}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Service1C", "Service1C\Service1C.vbproj", "{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Parser", "Parser\Parser.vbproj", "{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Debug|x86.Build.0 = Debug|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Release|x86.ActiveCfg = Release|x86
|
||||
{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}.Release|x86.Build.0 = Release|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Debug|x86.Build.0 = Debug|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Release|x86.ActiveCfg = Release|x86
|
||||
{AF261326-5435-43E2-8407-4F0DFAED7B29}.Release|x86.Build.0 = Release|x86
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Debug|x86.Build.0 = Debug|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Release|x86.ActiveCfg = Release|x86
|
||||
{F7EF5930-B310-4697-B522-2325EAF247F2}.Release|x86.Build.0 = Release|x86
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{593952E2-6C95-4496-BFD5-C8C64DF78DE5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
|
||||
{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
194
EventLogLoader/EventLogLoaderDebug.vbproj
Normal file
194
EventLogLoader/EventLogLoaderDebug.vbproj
Normal file
@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>
|
||||
</SchemaVersion>
|
||||
<ProjectGuid>{2CE569B2-834D-4FE6-A23F-ACC68E8BDA9E}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<StartupObject>EventLogLoader.Module1</StartupObject>
|
||||
<RootNamespace>EventLogLoader</RootNamespace>
|
||||
<AssemblyName>EventLogLoader</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<NuGetPackageImportStamp>16534656</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>2</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EventLogLoader.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EventLogLoader.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>
|
||||
<ManifestCertificateThumbprint>17E4189A329B39D04AE2328FA93DF0C1D42D4D8B</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestKeyFile>EventLogLoaderDebug_2_TemporaryKey.pfx</ManifestKeyFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\MySql.Data.6.9.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.94.0\lib\net20\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SQLite.Linq">
|
||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.94.1\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Xml" />
|
||||
</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Module1.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</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="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="EventLogLoaderDebug_1_TemporaryKey.pfx" />
|
||||
<None Include="EventLogLoaderDebug_2_TemporaryKey.pfx" />
|
||||
<None Include="EventLogLoaderDebug_TemporaryKey.pfx" />
|
||||
<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="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EventLogLoaderManager\EventLogLoaderManager.vbproj">
|
||||
<Project>{AF261326-5435-43E2-8407-4F0DFAED7B29}</Project>
|
||||
<Name>EventLogLoaderManager</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\EventLogLoaderService\EventLogLoaderService.vbproj">
|
||||
<Project>{F7EF5930-B310-4697-B522-2325EAF247F2}</Project>
|
||||
<Name>EventLogLoaderService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\IniFile\IniFile.vbproj">
|
||||
<Project>{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}</Project>
|
||||
<Name>IniFile</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Установщик Windows 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
385
EventLogLoader/IniFile.vb
Normal file
385
EventLogLoader/IniFile.vb
Normal file
@ -0,0 +1,385 @@
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
|
||||
Public Class IniFile
|
||||
' List of IniSection objects keeps track of all the sections in the INI file
|
||||
Private m_sections As Hashtable
|
||||
|
||||
' Public constructor
|
||||
Public Sub New()
|
||||
m_sections = New Hashtable(StringComparer.InvariantCultureIgnoreCase)
|
||||
End Sub
|
||||
|
||||
' Loads the Reads the data in the ini file into the IniFile object
|
||||
Public Sub Load(ByVal sFileName As String, Optional ByVal bMerge As Boolean = False)
|
||||
If Not bMerge Then
|
||||
RemoveAllSections()
|
||||
End If
|
||||
' Clear the object...
|
||||
Dim tempsection As IniSection = Nothing
|
||||
Dim oReader As New StreamReader(sFileName)
|
||||
Dim regexcomment As New Regex("^([\s]*#.*)", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
' Broken but left for history
|
||||
'Dim regexsection As New Regex("\[[\s]*([^\[\s].*[^\s\]])[\s]*\]", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
Dim regexsection As New Regex("^[\s]*\[[\s]*([^\[\s].*[^\s\]])[\s]*\][\s]*$", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
Dim regexkey As New Regex("^\s*([^=\s]*)[^=]*=(.*)", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
While Not oReader.EndOfStream
|
||||
Dim line As String = oReader.ReadLine()
|
||||
If line <> String.Empty Then
|
||||
Dim m As Match = Nothing
|
||||
If regexcomment.Match(line).Success Then
|
||||
m = regexcomment.Match(line)
|
||||
Trace.WriteLine(String.Format("Skipping Comment: {0}", m.Groups(0).Value))
|
||||
ElseIf regexsection.Match(line).Success Then
|
||||
m = regexsection.Match(line)
|
||||
Trace.WriteLine(String.Format("Adding section [{0}]", m.Groups(1).Value))
|
||||
tempsection = AddSection(m.Groups(1).Value)
|
||||
ElseIf regexkey.Match(line).Success AndAlso tempsection IsNot Nothing Then
|
||||
m = regexkey.Match(line)
|
||||
Trace.WriteLine(String.Format("Adding Key [{0}]=[{1}]", m.Groups(1).Value, m.Groups(2).Value))
|
||||
tempsection.AddKey(m.Groups(1).Value).Value = m.Groups(2).Value
|
||||
ElseIf tempsection IsNot Nothing Then
|
||||
' Handle Key without value
|
||||
Trace.WriteLine(String.Format("Adding Key [{0}]", line))
|
||||
tempsection.AddKey(line)
|
||||
Else
|
||||
' This should not occur unless the tempsection is not created yet...
|
||||
Trace.WriteLine(String.Format("Skipping unknown type of data: {0}", line))
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
oReader.Close()
|
||||
End Sub
|
||||
|
||||
' Used to save the data back to the file or your choice
|
||||
Public Sub Save(ByVal sFileName As String)
|
||||
Dim oWriter As New StreamWriter(sFileName, False)
|
||||
For Each s As IniSection In Sections
|
||||
Trace.WriteLine(String.Format("Writing Section: [{0}]", s.Name))
|
||||
oWriter.WriteLine(String.Format("[{0}]", s.Name))
|
||||
For Each k As IniSection.IniKey In s.Keys
|
||||
If k.Value <> String.Empty Then
|
||||
Trace.WriteLine(String.Format("Writing Key: {0}={1}", k.Name, k.Value))
|
||||
oWriter.WriteLine(String.Format("{0}={1}", k.Name, k.Value))
|
||||
Else
|
||||
Trace.WriteLine(String.Format("Writing Key: {0}", k.Name))
|
||||
oWriter.WriteLine(String.Format("{0}", k.Name))
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
oWriter.Close()
|
||||
End Sub
|
||||
|
||||
' Gets all the sections
|
||||
Public ReadOnly Property Sections() As System.Collections.ICollection
|
||||
Get
|
||||
Return m_sections.Values
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Adds a section to the IniFile object, returns a IniSection object to the new or existing object
|
||||
Public Function AddSection(ByVal sSection As String) As IniSection
|
||||
Dim s As IniSection = Nothing
|
||||
sSection = sSection.Trim()
|
||||
' Trim spaces
|
||||
If m_sections.ContainsKey(sSection) Then
|
||||
s = DirectCast(m_sections(sSection), IniSection)
|
||||
Else
|
||||
s = New IniSection(Me, sSection)
|
||||
m_sections(sSection) = s
|
||||
End If
|
||||
Return s
|
||||
End Function
|
||||
|
||||
' Removes a section by its name sSection, returns trus on success
|
||||
Public Function RemoveSection(ByVal sSection As String) As Boolean
|
||||
sSection = sSection.Trim()
|
||||
Return RemoveSection(GetSection(sSection))
|
||||
End Function
|
||||
|
||||
' Removes section by object, returns trus on success
|
||||
Public Function RemoveSection(ByVal Section As IniSection) As Boolean
|
||||
If Section IsNot Nothing Then
|
||||
Try
|
||||
m_sections.Remove(Section.Name)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Removes all existing sections, returns trus on success
|
||||
Public Function RemoveAllSections() As Boolean
|
||||
m_sections.Clear()
|
||||
Return (m_sections.Count = 0)
|
||||
End Function
|
||||
|
||||
' Returns an IniSection to the section by name, NULL if it was not found
|
||||
Public Function GetSection(ByVal sSection As String) As IniSection
|
||||
sSection = sSection.Trim()
|
||||
' Trim spaces
|
||||
If m_sections.ContainsKey(sSection) Then
|
||||
Return DirectCast(m_sections(sSection), IniSection)
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Returns a KeyValue in a certain section
|
||||
Public Function GetKeyValue(ByVal sSection As String, ByVal sKey As String) As String
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.GetKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
Return k.Value
|
||||
End If
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
' Sets a KeyValuePair in a certain section
|
||||
Public Function SetKeyValue(ByVal sSection As String, ByVal sKey As String, ByVal sValue As String) As Boolean
|
||||
Dim s As IniSection = AddSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.AddKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
k.Value = sValue
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Renames an existing section returns true on success, false if the section didn't exist or there was another section with the same sNewSection
|
||||
Public Function RenameSection(ByVal sSection As String, ByVal sNewSection As String) As Boolean
|
||||
' Note string trims are done in lower calls.
|
||||
Dim bRval As Boolean = False
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
bRval = s.SetName(sNewSection)
|
||||
End If
|
||||
Return bRval
|
||||
End Function
|
||||
|
||||
' Renames an existing key returns true on success, false if the key didn't exist or there was another section with the same sNewKey
|
||||
Public Function RenameKey(ByVal sSection As String, ByVal sKey As String, ByVal sNewKey As String) As Boolean
|
||||
' Note string trims are done in lower calls.
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.GetKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
Return k.SetName(sNewKey)
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Remove a key by section name and key name
|
||||
Public Function RemoveKey(ByVal sSection As String, ByVal sKey As String) As Boolean
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Return s.RemoveKey(sKey)
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' IniSection class
|
||||
Public Class IniSection
|
||||
' IniFile IniFile object instance
|
||||
Private m_pIniFile As IniFile
|
||||
' Name of the section
|
||||
Private m_sSection As String
|
||||
' List of IniKeys in the section
|
||||
Private m_keys As Hashtable
|
||||
|
||||
' Constuctor so objects are internally managed
|
||||
Protected Friend Sub New(ByVal parent As IniFile, ByVal sSection As String)
|
||||
m_pIniFile = parent
|
||||
m_sSection = sSection
|
||||
m_keys = New Hashtable(StringComparer.InvariantCultureIgnoreCase)
|
||||
End Sub
|
||||
|
||||
' Returns all the keys in a section
|
||||
Public ReadOnly Property Keys() As System.Collections.ICollection
|
||||
Get
|
||||
Return m_keys.Values
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Returns the section name
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return m_sSection
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Adds a key to the IniSection object, returns a IniKey object to the new or existing object
|
||||
Public Function AddKey(ByVal sKey As String) As IniKey
|
||||
sKey = sKey.Trim()
|
||||
Dim k As IniSection.IniKey = Nothing
|
||||
If sKey.Length <> 0 Then
|
||||
If m_keys.ContainsKey(sKey) Then
|
||||
k = DirectCast(m_keys(sKey), IniKey)
|
||||
Else
|
||||
k = New IniSection.IniKey(Me, sKey)
|
||||
m_keys(sKey) = k
|
||||
End If
|
||||
End If
|
||||
Return k
|
||||
End Function
|
||||
|
||||
' Removes a single key by string
|
||||
Public Function RemoveKey(ByVal sKey As String) As Boolean
|
||||
Return RemoveKey(GetKey(sKey))
|
||||
End Function
|
||||
|
||||
' Removes a single key by IniKey object
|
||||
Public Function RemoveKey(ByVal Key As IniKey) As Boolean
|
||||
If Key IsNot Nothing Then
|
||||
Try
|
||||
m_keys.Remove(Key.Name)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Removes all the keys in the section
|
||||
Public Function RemoveAllKeys() As Boolean
|
||||
m_keys.Clear()
|
||||
Return (m_keys.Count = 0)
|
||||
End Function
|
||||
|
||||
' Returns a IniKey object to the key by name, NULL if it was not found
|
||||
Public Function GetKey(ByVal sKey As String) As IniKey
|
||||
sKey = sKey.Trim()
|
||||
If m_keys.ContainsKey(sKey) Then
|
||||
Return DirectCast(m_keys(sKey), IniKey)
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Sets the section name, returns true on success, fails if the section
|
||||
' name sSection already exists
|
||||
Public Function SetName(ByVal sSection As String) As Boolean
|
||||
sSection = sSection.Trim()
|
||||
If sSection.Length <> 0 Then
|
||||
' Get existing section if it even exists...
|
||||
Dim s As IniSection = m_pIniFile.GetSection(sSection)
|
||||
If s IsNot Me AndAlso s IsNot Nothing Then
|
||||
Return False
|
||||
End If
|
||||
Try
|
||||
' Remove the current section
|
||||
m_pIniFile.m_sections.Remove(m_sSection)
|
||||
' Set the new section name to this object
|
||||
m_pIniFile.m_sections(sSection) = Me
|
||||
' Set the new section name
|
||||
m_sSection = sSection
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Returns the section name
|
||||
Public Function GetName() As String
|
||||
Return m_sSection
|
||||
End Function
|
||||
|
||||
' IniKey class
|
||||
Public Class IniKey
|
||||
' Name of the Key
|
||||
Private m_sKey As String
|
||||
' Value associated
|
||||
Private m_sValue As String
|
||||
' Pointer to the parent CIniSection
|
||||
Private m_section As IniSection
|
||||
|
||||
' Constuctor so objects are internally managed
|
||||
Protected Friend Sub New(ByVal parent As IniSection, ByVal sKey As String)
|
||||
m_section = parent
|
||||
m_sKey = sKey
|
||||
End Sub
|
||||
|
||||
' Returns the name of the Key
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return m_sKey
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Sets or Gets the value of the key
|
||||
Public Property Value() As String
|
||||
Get
|
||||
Return m_sValue
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_sValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Sets the value of the key
|
||||
Public Sub SetValue(ByVal sValue As String)
|
||||
m_sValue = sValue
|
||||
End Sub
|
||||
' Returns the value of the Key
|
||||
Public Function GetValue() As String
|
||||
Return m_sValue
|
||||
End Function
|
||||
|
||||
' Sets the key name
|
||||
' Returns true on success, fails if the section name sKey already exists
|
||||
Public Function SetName(ByVal sKey As String) As Boolean
|
||||
sKey = sKey.Trim()
|
||||
If sKey.Length <> 0 Then
|
||||
Dim k As IniKey = m_section.GetKey(sKey)
|
||||
If k IsNot Me AndAlso k IsNot Nothing Then
|
||||
Return False
|
||||
End If
|
||||
Try
|
||||
' Remove the current key
|
||||
m_section.m_keys.Remove(m_sKey)
|
||||
' Set the new key name to this object
|
||||
m_section.m_keys(sKey) = Me
|
||||
' Set the new key name
|
||||
m_sKey = sKey
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Returns the name of the Key
|
||||
Public Function GetName() As String
|
||||
Return m_sKey
|
||||
End Function
|
||||
End Class
|
||||
' End of IniKey class
|
||||
End Class
|
||||
|
||||
Public Function RestoreIniValue(Param As IniFile, SectionText As String, KeyText As String) As String
|
||||
Dim Section As IniFile.IniSection = Param.GetSection(SectionText)
|
||||
If Not Section Is Nothing Then
|
||||
Dim Key As IniFile.IniSection.IniKey = Section.GetKey(KeyText)
|
||||
If Not Key Is Nothing Then
|
||||
RestoreIniValue = Key.Value
|
||||
Else
|
||||
RestoreIniValue = ""
|
||||
End If
|
||||
Else
|
||||
RestoreIniValue = ""
|
||||
End If
|
||||
End Function
|
||||
' End of IniSection class
|
||||
End Class
|
||||
|
||||
|
16
EventLogLoader/Module1.vb
Normal file
16
EventLogLoader/Module1.vb
Normal file
@ -0,0 +1,16 @@
|
||||
|
||||
Module Module1
|
||||
|
||||
Sub Main()
|
||||
|
||||
Dim Service = New EventLogLoaderService.EventLogLoaderService
|
||||
Service.SubStart()
|
||||
Console.WriteLine("Служба запущена")
|
||||
Console.ReadKey()
|
||||
|
||||
Service.SubStop()
|
||||
Console.WriteLine("Служба остановлена")
|
||||
|
||||
End Sub
|
||||
|
||||
End Module
|
13
EventLogLoader/My Project/Application.Designer.vb
generated
Normal file
13
EventLogLoader/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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
|
||||
|
10
EventLogLoader/My Project/Application.myapp
Normal file
10
EventLogLoader/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>2</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
35
EventLogLoader/My Project/AssemblyInfo.vb
Normal file
35
EventLogLoader/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Общие сведения об этой сборке предоставляются следующим набором
|
||||
' атрибутов. Отредактируйте значения этих атрибутов, чтобы изменить
|
||||
' общие сведения об этой сборке.
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("EventLogLoader")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("EventLogLoader")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
<Assembly: Guid("344c4609-fdbc-4477-847c-41af1a2ccd79")>
|
||||
|
||||
' Сведения о версии сборки состоят из следующих четырех значений:
|
||||
'
|
||||
' Основной номер версии
|
||||
' Дополнительный номер версии
|
||||
' Номер построения
|
||||
' Редакция
|
||||
'
|
||||
' Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
62
EventLogLoader/My Project/Resources.Designer.vb
generated
Normal file
62
EventLogLoader/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</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("EventLogLoader.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
117
EventLogLoader/My Project/Resources.resx
Normal file
117
EventLogLoader/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>
|
73
EventLogLoader/My Project/Settings.Designer.vb
generated
Normal file
73
EventLogLoader/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.17626
|
||||
'
|
||||
' 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", "10.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.EventLogLoader.My.MySettings
|
||||
Get
|
||||
Return Global.EventLogLoader.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
7
EventLogLoader/My Project/Settings.settings
Normal file
7
EventLogLoader/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
8
EventLogLoader/app.config
Normal file
8
EventLogLoader/app.config
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
|
||||
<remove invariant="MySql.Data.MySqlClient" /><add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /></DbProviderFactories>
|
||||
</system.data>
|
||||
</configuration>
|
7
EventLogLoader/packages.config
Normal file
7
EventLogLoader/packages.config
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MySql.Data" version="6.9.5" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.94.1" targetFramework="net20" />
|
||||
</packages>
|
176
EventLogLoaderManager/AboutBox.Designer.vb
generated
Normal file
176
EventLogLoaderManager/AboutBox.Designer.vb
generated
Normal file
@ -0,0 +1,176 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class AboutBox
|
||||
Inherits System.Windows.Forms.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
|
||||
|
||||
Friend WithEvents TableLayoutPanel As System.Windows.Forms.TableLayoutPanel
|
||||
Friend WithEvents LogoPictureBox As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents LabelProductName As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelVersion As System.Windows.Forms.Label
|
||||
Friend WithEvents LabelCompanyName As System.Windows.Forms.Label
|
||||
Friend WithEvents TextBoxDescription As System.Windows.Forms.TextBox
|
||||
Friend WithEvents OKButton As System.Windows.Forms.Button
|
||||
Friend WithEvents LabelCopyright As System.Windows.Forms.Label
|
||||
|
||||
'Является обязательной для конструктора форм Windows Forms
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Примечание: следующая процедура является обязательной для конструктора форм Windows Forms
|
||||
'Для ее изменения используйте конструктор форм Windows Form.
|
||||
'Не изменяйте ее в редакторе исходного кода.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.TableLayoutPanel = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.LogoPictureBox = New System.Windows.Forms.PictureBox()
|
||||
Me.LabelProductName = New System.Windows.Forms.Label()
|
||||
Me.LabelVersion = New System.Windows.Forms.Label()
|
||||
Me.LabelCopyright = New System.Windows.Forms.Label()
|
||||
Me.LabelCompanyName = New System.Windows.Forms.Label()
|
||||
Me.TextBoxDescription = New System.Windows.Forms.TextBox()
|
||||
Me.OKButton = New System.Windows.Forms.Button()
|
||||
Me.TableLayoutPanel.SuspendLayout()
|
||||
CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'TableLayoutPanel
|
||||
'
|
||||
Me.TableLayoutPanel.ColumnCount = 2
|
||||
Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.0!))
|
||||
Me.TableLayoutPanel.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67.0!))
|
||||
Me.TableLayoutPanel.Controls.Add(Me.LogoPictureBox, 0, 0)
|
||||
Me.TableLayoutPanel.Controls.Add(Me.LabelProductName, 1, 0)
|
||||
Me.TableLayoutPanel.Controls.Add(Me.LabelVersion, 1, 1)
|
||||
Me.TableLayoutPanel.Controls.Add(Me.LabelCopyright, 1, 2)
|
||||
Me.TableLayoutPanel.Controls.Add(Me.LabelCompanyName, 1, 3)
|
||||
Me.TableLayoutPanel.Controls.Add(Me.TextBoxDescription, 1, 4)
|
||||
Me.TableLayoutPanel.Controls.Add(Me.OKButton, 1, 5)
|
||||
Me.TableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TableLayoutPanel.Location = New System.Drawing.Point(9, 9)
|
||||
Me.TableLayoutPanel.Name = "TableLayoutPanel"
|
||||
Me.TableLayoutPanel.RowCount = 6
|
||||
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
|
||||
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
|
||||
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
|
||||
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
|
||||
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
Me.TableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10.0!))
|
||||
Me.TableLayoutPanel.Size = New System.Drawing.Size(396, 258)
|
||||
Me.TableLayoutPanel.TabIndex = 0
|
||||
'
|
||||
'LogoPictureBox
|
||||
'
|
||||
Me.LogoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LogoPictureBox.Location = New System.Drawing.Point(3, 3)
|
||||
Me.LogoPictureBox.Name = "LogoPictureBox"
|
||||
Me.TableLayoutPanel.SetRowSpan(Me.LogoPictureBox, 6)
|
||||
Me.LogoPictureBox.Size = New System.Drawing.Size(124, 252)
|
||||
Me.LogoPictureBox.TabIndex = 0
|
||||
Me.LogoPictureBox.TabStop = False
|
||||
'
|
||||
'LabelProductName
|
||||
'
|
||||
Me.LabelProductName.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LabelProductName.Location = New System.Drawing.Point(136, 0)
|
||||
Me.LabelProductName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||
Me.LabelProductName.MaximumSize = New System.Drawing.Size(0, 17)
|
||||
Me.LabelProductName.Name = "LabelProductName"
|
||||
Me.LabelProductName.Size = New System.Drawing.Size(257, 17)
|
||||
Me.LabelProductName.TabIndex = 0
|
||||
Me.LabelProductName.Text = "Имя продукта"
|
||||
Me.LabelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'LabelVersion
|
||||
'
|
||||
Me.LabelVersion.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LabelVersion.Location = New System.Drawing.Point(136, 25)
|
||||
Me.LabelVersion.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||
Me.LabelVersion.MaximumSize = New System.Drawing.Size(0, 17)
|
||||
Me.LabelVersion.Name = "LabelVersion"
|
||||
Me.LabelVersion.Size = New System.Drawing.Size(257, 17)
|
||||
Me.LabelVersion.TabIndex = 0
|
||||
Me.LabelVersion.Text = "Версия"
|
||||
Me.LabelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'LabelCopyright
|
||||
'
|
||||
Me.LabelCopyright.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LabelCopyright.Location = New System.Drawing.Point(136, 50)
|
||||
Me.LabelCopyright.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||
Me.LabelCopyright.MaximumSize = New System.Drawing.Size(0, 17)
|
||||
Me.LabelCopyright.Name = "LabelCopyright"
|
||||
Me.LabelCopyright.Size = New System.Drawing.Size(257, 17)
|
||||
Me.LabelCopyright.TabIndex = 0
|
||||
Me.LabelCopyright.Text = "Авторские права"
|
||||
Me.LabelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'LabelCompanyName
|
||||
'
|
||||
Me.LabelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.LabelCompanyName.Location = New System.Drawing.Point(136, 75)
|
||||
Me.LabelCompanyName.Margin = New System.Windows.Forms.Padding(6, 0, 3, 0)
|
||||
Me.LabelCompanyName.MaximumSize = New System.Drawing.Size(0, 17)
|
||||
Me.LabelCompanyName.Name = "LabelCompanyName"
|
||||
Me.LabelCompanyName.Size = New System.Drawing.Size(257, 17)
|
||||
Me.LabelCompanyName.TabIndex = 0
|
||||
Me.LabelCompanyName.Text = "Название организации"
|
||||
Me.LabelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'TextBoxDescription
|
||||
'
|
||||
Me.TextBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TextBoxDescription.Location = New System.Drawing.Point(136, 103)
|
||||
Me.TextBoxDescription.Margin = New System.Windows.Forms.Padding(6, 3, 3, 3)
|
||||
Me.TextBoxDescription.Multiline = True
|
||||
Me.TextBoxDescription.Name = "TextBoxDescription"
|
||||
Me.TextBoxDescription.ReadOnly = True
|
||||
Me.TextBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both
|
||||
Me.TextBoxDescription.Size = New System.Drawing.Size(257, 123)
|
||||
Me.TextBoxDescription.TabIndex = 0
|
||||
Me.TextBoxDescription.TabStop = False
|
||||
Me.TextBoxDescription.Text = "Описание:" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(Во время выполнения текст подписи будет заменен информацией о сборк" & _
|
||||
"е приложения." & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "Настроить эту информацию можно в области "
|
||||
'
|
||||
'OKButton
|
||||
'
|
||||
Me.OKButton.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.OKButton.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.OKButton.Location = New System.Drawing.Point(318, 232)
|
||||
Me.OKButton.Name = "OKButton"
|
||||
Me.OKButton.Size = New System.Drawing.Size(75, 23)
|
||||
Me.OKButton.TabIndex = 0
|
||||
Me.OKButton.Text = "&ОК"
|
||||
'
|
||||
'AboutBox
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.CancelButton = Me.OKButton
|
||||
Me.ClientSize = New System.Drawing.Size(414, 276)
|
||||
Me.Controls.Add(Me.TableLayoutPanel)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "AboutBox"
|
||||
Me.Padding = New System.Windows.Forms.Padding(9)
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "AboutBox1"
|
||||
Me.TableLayoutPanel.ResumeLayout(False)
|
||||
Me.TableLayoutPanel.PerformLayout()
|
||||
CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
120
EventLogLoaderManager/AboutBox.resx
Normal file
120
EventLogLoaderManager/AboutBox.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=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>
|
26
EventLogLoaderManager/AboutBox.vb
Normal file
26
EventLogLoaderManager/AboutBox.vb
Normal file
@ -0,0 +1,26 @@
|
||||
Public NotInheritable Class AboutBox
|
||||
|
||||
Private Sub AboutBox1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
||||
' Установить заголовок формы.
|
||||
Dim ApplicationTitle As String
|
||||
If My.Application.Info.Title <> "" Then
|
||||
ApplicationTitle = My.Application.Info.Title
|
||||
Else
|
||||
ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
|
||||
End If
|
||||
Me.Text = String.Format("О программе {0}", ApplicationTitle)
|
||||
' Инициализировать текст, отображаемый в окне "О программе".
|
||||
' TODO: настроить сведения о сборке приложения в области "Приложение" диалогового окна
|
||||
' свойств проекта (в меню "Проект").
|
||||
Me.LabelProductName.Text = My.Application.Info.ProductName
|
||||
Me.LabelVersion.Text = String.Format("Версия {0}", My.Application.Info.Version.ToString)
|
||||
Me.LabelCopyright.Text = My.Application.Info.Copyright
|
||||
Me.LabelCompanyName.Text = My.Application.Info.CompanyName
|
||||
Me.TextBoxDescription.Text = My.Application.Info.Description
|
||||
End Sub
|
||||
|
||||
Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
180
EventLogLoaderManager/AddPath.Designer.vb
generated
Normal file
180
EventLogLoaderManager/AddPath.Designer.vb
generated
Normal file
@ -0,0 +1,180 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class AddPath
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<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
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.IBName = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Description = New System.Windows.Forms.TextBox()
|
||||
Me.IBGUID = New System.Windows.Forms.TextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Path = New System.Windows.Forms.TextBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.FolderBrowserDialog = New System.Windows.Forms.FolderBrowserDialog()
|
||||
Me.ButtonChoosePath = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'IBName
|
||||
'
|
||||
Me.IBName.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.IBName.Location = New System.Drawing.Point(145, 12)
|
||||
Me.IBName.Name = "IBName"
|
||||
Me.IBName.Size = New System.Drawing.Size(268, 20)
|
||||
Me.IBName.TabIndex = 0
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(12, 15)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(126, 13)
|
||||
Me.Label1.TabIndex = 1
|
||||
Me.Label1.Text = "Краткое наименование"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(12, 40)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(57, 13)
|
||||
Me.Label2.TabIndex = 1
|
||||
Me.Label2.Text = "Описание"
|
||||
'
|
||||
'Description
|
||||
'
|
||||
Me.Description.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Description.Location = New System.Drawing.Point(145, 37)
|
||||
Me.Description.Name = "Description"
|
||||
Me.Description.Size = New System.Drawing.Size(268, 20)
|
||||
Me.Description.TabIndex = 0
|
||||
'
|
||||
'IBGUID
|
||||
'
|
||||
Me.IBGUID.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.IBGUID.Location = New System.Drawing.Point(145, 62)
|
||||
Me.IBGUID.Name = "IBGUID"
|
||||
Me.IBGUID.ReadOnly = True
|
||||
Me.IBGUID.Size = New System.Drawing.Size(268, 20)
|
||||
Me.IBGUID.TabIndex = 0
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(12, 65)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(34, 13)
|
||||
Me.Label3.TabIndex = 1
|
||||
Me.Label3.Text = "GUID"
|
||||
'
|
||||
'Path
|
||||
'
|
||||
Me.Path.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Path.Location = New System.Drawing.Point(145, 88)
|
||||
Me.Path.Name = "Path"
|
||||
Me.Path.Size = New System.Drawing.Size(244, 20)
|
||||
Me.Path.TabIndex = 0
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(12, 91)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(119, 13)
|
||||
Me.Label4.TabIndex = 1
|
||||
Me.Label4.Text = "Каталог хранения ЖР"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
|
||||
Me.Button1.Location = New System.Drawing.Point(12, 114)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(200, 43)
|
||||
Me.Button1.TabIndex = 2
|
||||
Me.Button1.Text = "ОК"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
|
||||
Me.Button2.Location = New System.Drawing.Point(218, 114)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(200, 43)
|
||||
Me.Button2.TabIndex = 2
|
||||
Me.Button2.Text = "Отмена"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'FolderBrowserDialog
|
||||
'
|
||||
Me.FolderBrowserDialog.ShowNewFolderButton = False
|
||||
'
|
||||
'ButtonChoosePath
|
||||
'
|
||||
Me.ButtonChoosePath.Location = New System.Drawing.Point(391, 88)
|
||||
Me.ButtonChoosePath.Name = "ButtonChoosePath"
|
||||
Me.ButtonChoosePath.Size = New System.Drawing.Size(24, 20)
|
||||
Me.ButtonChoosePath.TabIndex = 3
|
||||
Me.ButtonChoosePath.Text = "..."
|
||||
Me.ButtonChoosePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'AddPath
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(425, 163)
|
||||
Me.Controls.Add(Me.ButtonChoosePath)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Path)
|
||||
Me.Controls.Add(Me.IBGUID)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.Description)
|
||||
Me.Controls.Add(Me.IBName)
|
||||
Me.Name = "AddPath"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Добавление\изменение каталога ЖР вручную"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents IBName As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
Friend WithEvents Description As System.Windows.Forms.TextBox
|
||||
Friend WithEvents IBGUID As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||
Friend WithEvents Path As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
Friend WithEvents FolderBrowserDialog As System.Windows.Forms.FolderBrowserDialog
|
||||
Friend WithEvents ButtonChoosePath As System.Windows.Forms.Button
|
||||
End Class
|
123
EventLogLoaderManager/AddPath.resx
Normal file
123
EventLogLoaderManager/AddPath.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?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=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>
|
||||
<metadata name="FolderBrowserDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
29
EventLogLoaderManager/AddPath.vb
Normal file
29
EventLogLoaderManager/AddPath.vb
Normal file
@ -0,0 +1,29 @@
|
||||
Public Class AddPath
|
||||
|
||||
Public Success As Boolean = False
|
||||
Public ExistedRow As Boolean = False
|
||||
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Success = True
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub AddPath_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
If String.IsNullOrEmpty(IBGUID.Text) Then
|
||||
IBGUID.Text = Guid.NewGuid.ToString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ButtonChoosePath_Click(sender As Object, e As EventArgs) Handles ButtonChoosePath.Click
|
||||
FolderBrowserDialog.ShowDialog()
|
||||
|
||||
If Not String.IsNullOrEmpty(FolderBrowserDialog.SelectedPath) Then
|
||||
Path.Text = FolderBrowserDialog.SelectedPath
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
6
EventLogLoaderManager/App.config
Normal file
6
EventLogLoaderManager/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v2.0.50727" />
|
||||
</startup>
|
||||
</configuration>
|
211
EventLogLoaderManager/EventLogLoaderManager.vbproj
Normal file
211
EventLogLoaderManager/EventLogLoaderManager.vbproj
Normal file
@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{AF261326-5435-43E2-8407-4F0DFAED7B29}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>EventLogLoaderManager.My.MyApplication</StartupObject>
|
||||
<RootNamespace>EventLogLoaderManager</RootNamespace>
|
||||
<AssemblyName>EventLogLoaderManager</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<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>
|
||||
<NuGetPackageImportStamp>c6eed167</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderManager.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderManager.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Text</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Untitled - 5.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\MySql.Data.6.9.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<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" />
|
||||
</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AboutBox.Designer.vb">
|
||||
<DependentUpon>AboutBox.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AboutBox.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="AddPath.Designer.vb">
|
||||
<DependentUpon>AddPath.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="AddPath.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.vb">
|
||||
<DependentUpon>Form1.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>
|
||||
</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="AboutBox.resx">
|
||||
<DependentUpon>AboutBox.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="AddPath.resx">
|
||||
<DependentUpon>AddPath.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EventLogLoaderService\EventLogLoaderService.vbproj">
|
||||
<Project>{F7EF5930-B310-4697-B522-2325EAF247F2}</Project>
|
||||
<Name>EventLogLoaderService</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\IniFile\IniFile.vbproj">
|
||||
<Project>{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}</Project>
|
||||
<Name>IniFile</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Installer\Installer.vbproj">
|
||||
<Project>{593952E2-6C95-4496-BFD5-C8C64DF78DE5}</Project>
|
||||
<Name>Installer</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Service1C\Service1C.vbproj">
|
||||
<Project>{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}</Project>
|
||||
<Name>Service1C</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\info.png" />
|
||||
<None Include="Resources\edit_add_3860.png" />
|
||||
<None Include="Resources\edit-delete_5986.png" />
|
||||
<None Include="Resources\save_all.png" />
|
||||
<None Include="Resources\logo_main_new.gif" />
|
||||
<Content Include="Untitled - 5.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
329
EventLogLoaderManager/Form1.Designer.vb
generated
Normal file
329
EventLogLoaderManager/Form1.Designer.vb
generated
Normal file
@ -0,0 +1,329 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class Form1
|
||||
Inherits System.Windows.Forms.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 Forms
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Примечание: следующая процедура является обязательной для конструктора форм Windows Forms
|
||||
'Для ее изменения используйте конструктор форм Windows Form.
|
||||
'Не изменяйте ее в редакторе исходного кода.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
|
||||
Me.ListView = New System.Windows.Forms.ListView()
|
||||
Me.InfobaseName = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.InfobaseGUID = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.InfobaseDescription = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.IBEvLogSize = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.InfobaseLogPath = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ConnectionStringBox = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Button4 = New System.Windows.Forms.Button()
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||
Me.TabPage2 = New System.Windows.Forms.TabPage()
|
||||
Me.DBType = New System.Windows.Forms.ComboBox()
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.ButtonAddPath = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.RepeatTime = New System.Windows.Forms.TextBox()
|
||||
Me.TabPage1 = New System.Windows.Forms.TabPage()
|
||||
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TabPage2.SuspendLayout()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.TabPage1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ListView
|
||||
'
|
||||
Me.ListView.CheckBoxes = True
|
||||
Me.ListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.InfobaseName, Me.InfobaseGUID, Me.InfobaseDescription, Me.IBEvLogSize, Me.InfobaseLogPath})
|
||||
Me.ListView.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.ListView.FullRowSelect = True
|
||||
Me.ListView.GridLines = True
|
||||
Me.ListView.Location = New System.Drawing.Point(3, 20)
|
||||
Me.ListView.Name = "ListView"
|
||||
Me.ListView.Size = New System.Drawing.Size(755, 241)
|
||||
Me.ListView.TabIndex = 1
|
||||
Me.ListView.UseCompatibleStateImageBehavior = False
|
||||
Me.ListView.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'InfobaseName
|
||||
'
|
||||
Me.InfobaseName.Text = "Имя базы"
|
||||
Me.InfobaseName.Width = 200
|
||||
'
|
||||
'InfobaseGUID
|
||||
'
|
||||
Me.InfobaseGUID.Text = "Идентификатор базы"
|
||||
Me.InfobaseGUID.Width = 0
|
||||
'
|
||||
'InfobaseDescription
|
||||
'
|
||||
Me.InfobaseDescription.Text = "Описание"
|
||||
Me.InfobaseDescription.Width = 225
|
||||
'
|
||||
'IBEvLogSize
|
||||
'
|
||||
Me.IBEvLogSize.Text = "Размер ЖР (Мб)"
|
||||
Me.IBEvLogSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
Me.IBEvLogSize.Width = 129
|
||||
'
|
||||
'InfobaseLogPath
|
||||
'
|
||||
Me.InfobaseLogPath.Text = "Каталог ЖР"
|
||||
Me.InfobaseLogPath.Width = 300
|
||||
'
|
||||
'ConnectionStringBox
|
||||
'
|
||||
Me.ConnectionStringBox.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.ConnectionStringBox.Location = New System.Drawing.Point(127, 29)
|
||||
Me.ConnectionStringBox.Name = "ConnectionStringBox"
|
||||
Me.ConnectionStringBox.Size = New System.Drawing.Size(561, 20)
|
||||
Me.ConnectionStringBox.TabIndex = 2
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
|
||||
Me.Label1.ForeColor = System.Drawing.Color.Maroon
|
||||
Me.Label1.Location = New System.Drawing.Point(8, 9)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(507, 17)
|
||||
Me.Label1.TabIndex = 3
|
||||
Me.Label1.Text = "Строка соединения с базой данных MS SQL для записи событий ЖР"
|
||||
'
|
||||
'Button4
|
||||
'
|
||||
Me.Button4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button4.Location = New System.Drawing.Point(691, 27)
|
||||
Me.Button4.Name = "Button4"
|
||||
Me.Button4.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button4.TabIndex = 4
|
||||
Me.Button4.Text = "Проверить"
|
||||
Me.Button4.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TabControl1
|
||||
'
|
||||
Me.TabControl1.Controls.Add(Me.TabPage2)
|
||||
Me.TabControl1.Controls.Add(Me.TabPage1)
|
||||
Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TabControl1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.TabControl1.Name = "TabControl1"
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
Me.TabControl1.Size = New System.Drawing.Size(783, 424)
|
||||
Me.TabControl1.TabIndex = 5
|
||||
'
|
||||
'TabPage2
|
||||
'
|
||||
Me.TabPage2.Controls.Add(Me.DBType)
|
||||
Me.TabPage2.Controls.Add(Me.Button6)
|
||||
Me.TabPage2.Controls.Add(Me.GroupBox1)
|
||||
Me.TabPage2.Controls.Add(Me.Label2)
|
||||
Me.TabPage2.Controls.Add(Me.Label1)
|
||||
Me.TabPage2.Controls.Add(Me.Button1)
|
||||
Me.TabPage2.Controls.Add(Me.Button3)
|
||||
Me.TabPage2.Controls.Add(Me.Button4)
|
||||
Me.TabPage2.Controls.Add(Me.ButtonAddPath)
|
||||
Me.TabPage2.Controls.Add(Me.Button2)
|
||||
Me.TabPage2.Controls.Add(Me.RepeatTime)
|
||||
Me.TabPage2.Controls.Add(Me.ConnectionStringBox)
|
||||
Me.TabPage2.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage2.Name = "TabPage2"
|
||||
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage2.Size = New System.Drawing.Size(775, 398)
|
||||
Me.TabPage2.TabIndex = 1
|
||||
Me.TabPage2.Text = "Настройка параметров"
|
||||
Me.TabPage2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'DBType
|
||||
'
|
||||
Me.DBType.FormattingEnabled = True
|
||||
Me.DBType.Items.AddRange(New Object() {"MS SQL Server", "MySQL"})
|
||||
Me.DBType.Location = New System.Drawing.Point(9, 29)
|
||||
Me.DBType.Name = "DBType"
|
||||
Me.DBType.Size = New System.Drawing.Size(112, 21)
|
||||
Me.DBType.TabIndex = 8
|
||||
'
|
||||
'Button6
|
||||
'
|
||||
Me.Button6.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button6.Image = Global.EventLogLoaderManager.My.Resources.Resources.info
|
||||
Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button6.Location = New System.Drawing.Point(644, 348)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Size = New System.Drawing.Size(123, 48)
|
||||
Me.Button6.TabIndex = 7
|
||||
Me.Button6.Text = "О программе"
|
||||
Me.Button6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button6.UseVisualStyleBackColor = True
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.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.GroupBox1.Controls.Add(Me.ListView)
|
||||
Me.GroupBox1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
|
||||
Me.GroupBox1.ForeColor = System.Drawing.Color.Maroon
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(8, 78)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(761, 264)
|
||||
Me.GroupBox1.TabIndex = 5
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Обнаруженные информационные базы 1С"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
|
||||
Me.Label2.ForeColor = System.Drawing.Color.Maroon
|
||||
Me.Label2.Location = New System.Drawing.Point(8, 52)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(439, 17)
|
||||
Me.Label2.TabIndex = 3
|
||||
Me.Label2.Text = "Интервал между циклами чтения событий из ЖР (секунд)"
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button1.Image = Global.EventLogLoaderManager.My.Resources.Resources.save_all
|
||||
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button1.Location = New System.Drawing.Point(475, 348)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(163, 47)
|
||||
Me.Button1.TabIndex = 0
|
||||
Me.Button1.Text = "Сохранить параметры"
|
||||
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button3.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_delete_5986
|
||||
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button3.Location = New System.Drawing.Point(330, 348)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(139, 47)
|
||||
Me.Button3.TabIndex = 0
|
||||
Me.Button3.Text = "Удалить службу"
|
||||
Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ButtonAddPath
|
||||
'
|
||||
Me.ButtonAddPath.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.ButtonAddPath.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_add_3860
|
||||
Me.ButtonAddPath.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.ButtonAddPath.Location = New System.Drawing.Point(9, 348)
|
||||
Me.ButtonAddPath.Name = "ButtonAddPath"
|
||||
Me.ButtonAddPath.Size = New System.Drawing.Size(162, 47)
|
||||
Me.ButtonAddPath.TabIndex = 0
|
||||
Me.ButtonAddPath.Text = "Добавить путь вручную"
|
||||
Me.ButtonAddPath.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.ButtonAddPath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.Button2.Image = Global.EventLogLoaderManager.My.Resources.Resources.edit_add_3860
|
||||
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.Button2.Location = New System.Drawing.Point(177, 348)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(147, 47)
|
||||
Me.Button2.TabIndex = 0
|
||||
Me.Button2.Text = "Установить службу"
|
||||
Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RepeatTime
|
||||
'
|
||||
Me.RepeatTime.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.RepeatTime.Location = New System.Drawing.Point(453, 52)
|
||||
Me.RepeatTime.Name = "RepeatTime"
|
||||
Me.RepeatTime.Size = New System.Drawing.Size(235, 20)
|
||||
Me.RepeatTime.TabIndex = 2
|
||||
'
|
||||
'TabPage1
|
||||
'
|
||||
Me.TabPage1.Controls.Add(Me.RichTextBox1)
|
||||
Me.TabPage1.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TabPage1.Name = "TabPage1"
|
||||
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage1.Size = New System.Drawing.Size(775, 398)
|
||||
Me.TabPage1.TabIndex = 0
|
||||
Me.TabPage1.Text = "Описание"
|
||||
Me.TabPage1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RichTextBox1
|
||||
'
|
||||
Me.RichTextBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RichTextBox1.Font = New System.Drawing.Font("Tahoma", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(204, Byte))
|
||||
Me.RichTextBox1.ForeColor = System.Drawing.Color.Maroon
|
||||
Me.RichTextBox1.Location = New System.Drawing.Point(3, 3)
|
||||
Me.RichTextBox1.Name = "RichTextBox1"
|
||||
Me.RichTextBox1.Size = New System.Drawing.Size(769, 392)
|
||||
Me.RichTextBox1.TabIndex = 0
|
||||
Me.RichTextBox1.Text = resources.GetString("RichTextBox1.Text")
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(783, 424)
|
||||
Me.Controls.Add(Me.TabControl1)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Name = "Form1"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Form1"
|
||||
Me.TabControl1.ResumeLayout(False)
|
||||
Me.TabPage2.ResumeLayout(False)
|
||||
Me.TabPage2.PerformLayout()
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.TabPage1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents Button1 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button2 As System.Windows.Forms.Button
|
||||
Friend WithEvents Button3 As System.Windows.Forms.Button
|
||||
Friend WithEvents ListView As System.Windows.Forms.ListView
|
||||
Friend WithEvents InfobaseName As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents InfobaseGUID As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents InfobaseDescription As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents IBEvLogSize As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents ConnectionStringBox As System.Windows.Forms.TextBox
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents Button4 As System.Windows.Forms.Button
|
||||
Friend WithEvents TabControl1 As System.Windows.Forms.TabControl
|
||||
Friend WithEvents TabPage1 As System.Windows.Forms.TabPage
|
||||
Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox
|
||||
Friend WithEvents TabPage2 As System.Windows.Forms.TabPage
|
||||
Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents Button6 As System.Windows.Forms.Button
|
||||
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||
Friend WithEvents RepeatTime As System.Windows.Forms.TextBox
|
||||
Friend WithEvents InfobaseLogPath As System.Windows.Forms.ColumnHeader
|
||||
Friend WithEvents DBType As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents ButtonAddPath As System.Windows.Forms.Button
|
||||
|
||||
End Class
|
1759
EventLogLoaderManager/Form1.resx
Normal file
1759
EventLogLoaderManager/Form1.resx
Normal file
File diff suppressed because it is too large
Load Diff
497
EventLogLoaderManager/Form1.vb
Normal file
497
EventLogLoaderManager/Form1.vb
Normal file
@ -0,0 +1,497 @@
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.IO
|
||||
Imports System.Management
|
||||
Imports System.Data.SqlClient
|
||||
Imports MySql.Data.MySqlClient
|
||||
|
||||
Public Class Form1
|
||||
|
||||
Dim ArrayServices() As Service1C.ServiceDescriptionClass
|
||||
Dim PathIniFile = Path.Combine(My.Application.Info.DirectoryPath, "setting.ini")
|
||||
Dim IniFile As IniFile.IniFileClass = New IniFile.IniFileClass
|
||||
Dim GroupExtraPath As ListViewGroup
|
||||
|
||||
Structure InfobaseParams
|
||||
Dim Guid As String
|
||||
Dim Name As String
|
||||
Dim CatalogEventlog As String
|
||||
Dim Found As Boolean
|
||||
End Structure
|
||||
|
||||
Dim ArrayInfoBaseParamSaved As List(Of InfobaseParams) = New List(Of InfobaseParams)
|
||||
|
||||
Sub LoadFromIniFile()
|
||||
|
||||
If My.Computer.FileSystem.FileExists(PathIniFile) Then
|
||||
IniFile.Load(PathIniFile)
|
||||
|
||||
|
||||
Dim s = IniFile.RestoreIniValue(IniFile, "GlobalValues", "ConnectionString")
|
||||
If Not s = "" Then
|
||||
ConnectionStringBox.Text = s
|
||||
End If
|
||||
|
||||
s = IniFile.RestoreIniValue(IniFile, "GlobalValues", "DBType")
|
||||
If Not s = "" Then
|
||||
DBType.Text = s
|
||||
End If
|
||||
|
||||
Try
|
||||
s = IniFile.RestoreIniValue(IniFile, "GlobalValues", "RepeatTime")
|
||||
If Not s = "" Then
|
||||
RepeatTime.Text = Convert.ToInt32(s).ToString
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RepeatTime.Text = 60
|
||||
End Try
|
||||
|
||||
Dim i = 0
|
||||
s = IniFile.RestoreIniValue(IniFile, "GlobalValues", "DatabaseCount")
|
||||
If Not s = "" Then
|
||||
i = Convert.ToInt32(s)
|
||||
End If
|
||||
|
||||
For j = 1 To i
|
||||
|
||||
Dim IB = New InfobaseParams
|
||||
IB.Guid = IniFile.RestoreIniValue(IniFile, "Databases", "DatabaseID" + j.ToString)
|
||||
IB.Name = IniFile.RestoreIniValue(IniFile, "Databases", "DatabaseName" + j.ToString)
|
||||
IB.CatalogEventlog = IniFile.RestoreIniValue(IniFile, "Databases", "DatabaseCatalog" + j.ToString)
|
||||
|
||||
ArrayInfoBaseParamSaved.Add(IB)
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Function FindInfobase(Guid As String) As Service1C.ServiceDescriptionClass.Infobases
|
||||
|
||||
FindInfobase = New Service1C.ServiceDescriptionClass.Infobases
|
||||
|
||||
For Each Srv In ArrayServices
|
||||
If Not Srv.ArrayInfobases Is Nothing Then
|
||||
For Each IB In Srv.ArrayInfobases
|
||||
If IB.GUID = Guid Then
|
||||
|
||||
Return IB
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
End Function
|
||||
|
||||
Function FindInfobaseInSavedParams(Guid As String) As Boolean
|
||||
|
||||
FindInfobaseInSavedParams = False
|
||||
|
||||
For i = 0 To ArrayInfoBaseParamSaved.Count - 1
|
||||
Dim IB = ArrayInfoBaseParamSaved(i)
|
||||
If IB.Guid = Guid Then
|
||||
IB.Found = True
|
||||
ArrayInfoBaseParamSaved(i) = IB
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
'For Each Ib In ArrayInfoBaseParamSaved
|
||||
' If Ib.Guid = Guid Then
|
||||
' Ib.Found = True
|
||||
' Return True
|
||||
' End If
|
||||
'Next
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
|
||||
|
||||
If My.Computer.FileSystem.FileExists(PathIniFile) Then
|
||||
IniFile.Load(PathIniFile)
|
||||
IniFile.RemoveAllSections()
|
||||
End If
|
||||
|
||||
IniFile.AddSection("GlobalValues").AddKey("ConnectionString").Value = ConnectionStringBox.Text.Trim
|
||||
IniFile.AddSection("GlobalValues").AddKey("DBType").Value = DBType.Text.Trim
|
||||
|
||||
Dim i = 0
|
||||
For Each Item As ListViewItem In ListView.Items
|
||||
If Item.Checked Then
|
||||
|
||||
i = i + 1
|
||||
|
||||
IniFile.AddSection("Databases").AddKey("DatabaseID" + i.ToString).Value = Item.SubItems(1).Text
|
||||
IniFile.AddSection("Databases").AddKey("DatabaseName" + i.ToString).Value = Item.SubItems(0).Text
|
||||
IniFile.AddSection("Databases").AddKey("DatabaseCatalog" + i.ToString).Value = Item.SubItems(4).Text
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
IniFile.AddSection("GlobalValues").AddKey("DatabaseCount").Value = i
|
||||
|
||||
Dim Rep = Convert.ToInt32(RepeatTime.Text)
|
||||
|
||||
IniFile.AddSection("GlobalValues").AddKey("RepeatTime").Value = IIf(Rep = 0, 60, Rep)
|
||||
|
||||
IniFile.Save(PathIniFile)
|
||||
|
||||
Dim sc = New System.ServiceProcess.ServiceController("EventLog loader service")
|
||||
Try
|
||||
If sc.Status = ServiceProcess.ServiceControllerStatus.Running Then
|
||||
If MsgBox("Параметры успешно изменены, но служба в настоящий момент работает." + _
|
||||
vbNewLine + "Перезапустить службу для применения изменений?", MsgBoxStyle.YesNo, Text) = MsgBoxResult.Yes Then
|
||||
sc.Stop()
|
||||
sc.WaitForStatus(ServiceProcess.ServiceControllerStatus.Stopped)
|
||||
sc.Start()
|
||||
sc.WaitForStatus(ServiceProcess.ServiceControllerStatus.Running)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
|
||||
|
||||
Dim PathName = Path.Combine(My.Application.Info.DirectoryPath, "EventLogLoaderService.exe")
|
||||
Dim ServName = "EventLog loader service"
|
||||
Dim DisplayName = "EventLog loader service"
|
||||
Dim lpDependencies = "Tcpip"
|
||||
Dim User = "LocalSystem"
|
||||
Dim Pwd = ""
|
||||
|
||||
If Not Installer.ObjTec.Services.ServiceInstaller.InstallService(PathName, ServName, DisplayName, lpDependencies, User, Pwd) Then
|
||||
|
||||
Dim ErrorCode = Marshal.GetLastWin32Error()
|
||||
MsgBox("Ошибка установки службы Windows: " + Installer.ObjTec.Services.ServiceInstaller.GetErrorDescription(ErrorCode), , Text)
|
||||
|
||||
Else
|
||||
|
||||
MsgBox("Служба Windows успешно установлена!")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
|
||||
|
||||
Dim ServName = "EventLog loader service"
|
||||
|
||||
If Not Installer.ObjTec.Services.ServiceInstaller.UninstallService(ServName) Then
|
||||
|
||||
Dim ErrorCode = Marshal.GetLastWin32Error()
|
||||
MsgBox("Ошибка удаления службы Windows: " + Installer.ObjTec.Services.ServiceInstaller.GetErrorDescription(ErrorCode), , Text)
|
||||
|
||||
Else
|
||||
|
||||
MsgBox("Служба Windows успешно удалена")
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
|
||||
Text = My.Application.Info.ProductName + " / " + My.Application.Info.Copyright
|
||||
|
||||
LoadFromIniFile()
|
||||
|
||||
RefreshInfobaseList()
|
||||
|
||||
If RepeatTime.Text = String.Empty Then
|
||||
RepeatTime.Text = 60
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub RefreshInfobaseList()
|
||||
|
||||
ListView.Items.Clear()
|
||||
|
||||
Dim search As New ManagementObjectSearcher("SELECT * FROM Win32_Service WHERE PathName like '%ragent.exe%'")
|
||||
|
||||
'Dim info
|
||||
|
||||
Dim i = 0
|
||||
For Each info As ManagementObject In search.Get()
|
||||
|
||||
Dim PathName As String = info("PathName")
|
||||
Dim DisplayName As String = info("DisplayName")
|
||||
|
||||
Dim Serv = New Service1C.ServiceDescriptionClass
|
||||
Serv.Name = info("Name")
|
||||
Serv.DisplayName = info("DisplayName")
|
||||
Serv.Description = info("Description")
|
||||
Serv.PathName = info("PathName")
|
||||
Serv.ParsePath()
|
||||
Serv.GetInfobases()
|
||||
|
||||
ReDim Preserve ArrayServices(i)
|
||||
ArrayServices(i) = Serv
|
||||
i = i + 1
|
||||
|
||||
Dim Group = New ListViewGroup(Serv.DisplayName + " (порт " + Serv.PortAgent.ToString + ")")
|
||||
ListView.Groups.Add(Group)
|
||||
|
||||
If Not Serv.ArrayInfobases Is Nothing Then
|
||||
For Each a In Serv.ArrayInfobases
|
||||
|
||||
Dim item1 = New ListViewItem(a.Name, Group)
|
||||
item1.Checked = FindInfobaseInSavedParams(a.GUID)
|
||||
item1.SubItems.Add(a.GUID)
|
||||
item1.SubItems.Add(a.Description)
|
||||
item1.SubItems.Add(a.SizeEventLog.ToString)
|
||||
item1.SubItems.Add(a.CatalogEventLog)
|
||||
|
||||
ListView.Items.Add(item1)
|
||||
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
'Загрузим файловые базы
|
||||
Dim FileIbases = LoadFileInfobasesList()
|
||||
If Not FileIbases Is Nothing Then
|
||||
Dim Group = New ListViewGroup("Файловые базы данных текущего пользователя")
|
||||
ListView.Groups.Add(Group)
|
||||
|
||||
For Each a In FileIbases
|
||||
|
||||
Dim item1 = New ListViewItem(a.Name, Group)
|
||||
item1.Checked = FindInfobaseInSavedParams(a.GUID)
|
||||
item1.SubItems.Add(a.GUID)
|
||||
item1.SubItems.Add(a.Description)
|
||||
item1.SubItems.Add(a.SizeEventLog.ToString)
|
||||
item1.SubItems.Add(a.CatalogEventLog)
|
||||
|
||||
ListView.Items.Add(item1)
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
GroupExtraPath = New ListViewGroup("Дополнительные пути для загрузки событий из ЖР")
|
||||
ListView.Groups.Add(GroupExtraPath)
|
||||
|
||||
|
||||
For Each Ib In ArrayInfoBaseParamSaved
|
||||
If Not Ib.Found Then
|
||||
|
||||
Dim item1 = New ListViewItem(Ib.Name, GroupExtraPath)
|
||||
item1.Checked = True
|
||||
item1.SubItems.Add(Ib.Guid)
|
||||
item1.SubItems.Add("")
|
||||
item1.SubItems.Add(CalcullateFolderSize(Ib.CatalogEventlog))
|
||||
item1.SubItems.Add(Ib.CatalogEventlog)
|
||||
|
||||
ListView.Items.Add(item1)
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function LoadFileInfobasesList() As List(Of Service1C.ServiceDescriptionClass.Infobases)
|
||||
|
||||
Dim Result As List(Of Service1C.ServiceDescriptionClass.Infobases) = New List(Of Service1C.ServiceDescriptionClass.Infobases)
|
||||
|
||||
'Try
|
||||
|
||||
Dim IbasesListPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "1C\1CEStart\ibases.v8i")
|
||||
|
||||
If My.Computer.FileSystem.FileExists(IbasesListPath) Then
|
||||
|
||||
Dim reader As StreamReader = My.Computer.FileSystem.OpenTextFileReader(IbasesListPath)
|
||||
Dim aa As String = ""
|
||||
Dim Infobase As Service1C.ServiceDescriptionClass.Infobases = Nothing
|
||||
|
||||
Try
|
||||
Do
|
||||
|
||||
|
||||
Dim a = aa.Trim
|
||||
|
||||
Try
|
||||
If a.StartsWith("[") And a.EndsWith("]") Then
|
||||
If Not Infobase.GUID = Nothing And _
|
||||
Not Infobase.CatalogEventLog Is Nothing Then
|
||||
Result.Add(Infobase)
|
||||
End If
|
||||
|
||||
Infobase = New Service1C.ServiceDescriptionClass.Infobases
|
||||
Infobase.Name = a.Substring(1, a.Length - 2)
|
||||
ElseIf a.StartsWith("Connect=File=") Then
|
||||
'Connect=File="C:\Users\Alex\Documents\AS";
|
||||
|
||||
Dim BaseDir = a.Substring(14, a.Length - 16)
|
||||
If My.Computer.FileSystem.DirectoryExists(BaseDir) Then
|
||||
Infobase.CatalogEventLog = Path.Combine(BaseDir, "1Cv8Log")
|
||||
Try
|
||||
Dim SizeLog As UInt64 = 0
|
||||
If My.Computer.FileSystem.DirectoryExists(Infobase.CatalogEventLog) Then
|
||||
For Each File In My.Computer.FileSystem.GetFiles(Infobase.CatalogEventLog)
|
||||
Dim FI = My.Computer.FileSystem.GetFileInfo(File)
|
||||
SizeLog = SizeLog + FI.Length
|
||||
Next
|
||||
Infobase.SizeEventLog = Math.Round(SizeLog / 1024 / 1024, 2)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
ElseIf a.StartsWith("ID=") Then
|
||||
'ID=f3e16c18-e4ff-4ac9-9ee7-2f0a37d196d9
|
||||
Infobase.GUID = a.Substring(3)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Infobase = New Service1C.ServiceDescriptionClass.Infobases
|
||||
End Try
|
||||
|
||||
aa = reader.ReadLine
|
||||
|
||||
Loop Until aa Is Nothing
|
||||
Catch ex As Exception
|
||||
Dim aaa = ex.Message
|
||||
End Try
|
||||
|
||||
|
||||
If Not Infobase.GUID = Nothing And Not Infobase.CatalogEventLog Is Nothing Then
|
||||
Result.Add(Infobase)
|
||||
End If
|
||||
|
||||
reader.Close()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Return Result
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
|
||||
|
||||
Try
|
||||
If DBType.Text = "MySQL" Then
|
||||
Dim objConn As New MySqlConnection(ConnectionStringBox.Text.Trim)
|
||||
objConn.Open()
|
||||
Dim command As New MySqlCommand("SELECT 1", objConn)
|
||||
command.ExecuteReader()
|
||||
Else
|
||||
Dim objConn As New SqlConnection(ConnectionStringBox.Text.Trim)
|
||||
objConn.Open()
|
||||
Dim command As New SqlCommand("SELECT 1", objConn)
|
||||
command.ExecuteReader()
|
||||
End If
|
||||
|
||||
MsgBox("Подключение выполнено успешно!", , Text)
|
||||
Catch ex As Exception
|
||||
MsgBox("Ошибка при подключении: " + ex.Message, , Text)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
|
||||
|
||||
Dim About = New AboutBox
|
||||
About.ShowDialog()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Label2_Click(sender As System.Object, e As System.EventArgs) Handles Label2.Click
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RepeatTime_Leave(sender As System.Object, e As System.EventArgs) Handles RepeatTime.Leave
|
||||
Try
|
||||
Dim a = Convert.ToInt32(RepeatTime.Text)
|
||||
Catch ex As Exception
|
||||
RepeatTime.Text = "60"
|
||||
MsgBox("Было указано неправильное значение паузы." + vbNewLine + "Установлено значение по умолчанию - 60 секунд.", , Text)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Function CalcullateFolderSize(CatalogEventLog) As String
|
||||
|
||||
Try
|
||||
Dim SizeLog As UInt64 = 0
|
||||
If My.Computer.FileSystem.DirectoryExists(CatalogEventLog) Then
|
||||
For Each File In My.Computer.FileSystem.GetFiles(CatalogEventLog)
|
||||
Dim FI = My.Computer.FileSystem.GetFileInfo(File)
|
||||
SizeLog = SizeLog + FI.Length
|
||||
Next
|
||||
Return Math.Round(SizeLog / 1024 / 1024, 2).ToString
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
Return ""
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub ButtonAddPath_Click(sender As Object, e As EventArgs) Handles ButtonAddPath.Click
|
||||
|
||||
Dim AddPath = New AddPath
|
||||
AddPath.ShowDialog()
|
||||
|
||||
If AddPath.Success Then
|
||||
|
||||
Dim item1 = New ListViewItem(AddPath.IBName.Text, GroupExtraPath)
|
||||
item1.Checked = True
|
||||
item1.SubItems.Add(AddPath.IBGUID.Text)
|
||||
item1.SubItems.Add(AddPath.Description.Text)
|
||||
item1.SubItems.Add(CalcullateFolderSize(AddPath.Path.Text))
|
||||
item1.SubItems.Add(AddPath.Path.Text)
|
||||
|
||||
ListView.Items.Add(item1)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub ListView_DoubleClick(sender As Object, e As EventArgs) Handles ListView.DoubleClick
|
||||
|
||||
Dim item As ListViewItem = sender.SelectedItems(0)
|
||||
|
||||
If item.Group Is GroupExtraPath Then
|
||||
Dim AddPath = New AddPath
|
||||
AddPath.IBName.Text = item.Text
|
||||
AddPath.IBGUID.Text = item.SubItems(1).Text
|
||||
AddPath.Description.Text = item.SubItems(2).Text
|
||||
AddPath.Path.Text = item.SubItems(4).Text
|
||||
AddPath.ExistedRow = True
|
||||
AddPath.ShowDialog()
|
||||
|
||||
If AddPath.Success Then
|
||||
item.SubItems.Clear()
|
||||
|
||||
item.Text = AddPath.IBName.Text
|
||||
item.SubItems.Add(AddPath.IBGUID.Text)
|
||||
item.SubItems.Add(AddPath.Description.Text)
|
||||
item.SubItems.Add(CalcullateFolderSize(AddPath.Path.Text))
|
||||
item.SubItems.Add(AddPath.Path.Text)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
38
EventLogLoaderManager/My Project/Application.Designer.vb
generated
Normal file
38
EventLogLoaderManager/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
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.EventLogLoaderManager.Form1
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
11
EventLogLoaderManager/My Project/Application.myapp
Normal file
11
EventLogLoaderManager/My Project/Application.myapp
Normal file
@ -0,0 +1,11 @@
|
||||
<?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>Form1</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>0</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
37
EventLogLoaderManager/My Project/AssemblyInfo.vb
Normal file
37
EventLogLoaderManager/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,37 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Общие сведения об этой сборке предоставляются следующим набором
|
||||
' атрибутов. Отредактируйте значения этих атрибутов, чтобы изменить
|
||||
' общие сведения об этой сборке.
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("Загрузчик файлов ЖР в СУБД")>
|
||||
<Assembly: AssemblyDescription("Загрузчик файлов журналов регистрации в БД MS SQL Server или MySQL" + _
|
||||
vbNewLine + "" + _
|
||||
vbNewLine + "Обнаруженные ошибки, а также предложения оставляйте в комментариях к публикации на Инфостарте http://infostart.ru/public/182820/. ")>
|
||||
<Assembly: AssemblyCompany("Aleksey Bochkov")>
|
||||
<Assembly: AssemblyProduct("Загрузчик файлов ЖР в СУБД")>
|
||||
<Assembly: AssemblyCopyright("Copyright © Aleksey Bochkov, 2015")>
|
||||
<Assembly: AssemblyTrademark("Aleksey Bochkov")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
<Assembly: Guid("e5075ead-dc12-4b01-a1ca-f5beb4a45ff9")>
|
||||
|
||||
' Сведения о версии сборки состоят из следующих четырех значений:
|
||||
'
|
||||
' Основной номер версии
|
||||
' Дополнительный номер версии
|
||||
' Номер построения
|
||||
' Редакция
|
||||
'
|
||||
' Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.1.2.1")>
|
||||
<Assembly: AssemblyFileVersion("1.1.2.1")>
|
113
EventLogLoaderManager/My Project/Resources.Designer.vb
generated
Normal file
113
EventLogLoaderManager/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,113 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' Этот код создан программой.
|
||||
' Исполняемая версия:4.0.30319.18034
|
||||
'
|
||||
' Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
|
||||
' повторной генерации кода.
|
||||
' </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", "4.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("EventLogLoaderManager.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 edit_add_3860() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("edit_add_3860", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property edit_delete_5986() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("edit-delete_5986", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property info() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("info", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property logo_main_new() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("logo_main_new", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Поиск локализованного ресурса типа System.Drawing.Bitmap.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property save_all() As System.Drawing.Bitmap
|
||||
Get
|
||||
Dim obj As Object = ResourceManager.GetObject("save_all", resourceCulture)
|
||||
Return CType(obj,System.Drawing.Bitmap)
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
137
EventLogLoaderManager/My Project/Resources.resx
Normal file
137
EventLogLoaderManager/My Project/Resources.resx
Normal file
@ -0,0 +1,137 @@
|
||||
<?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=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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="save_all" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\save_all.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="edit-delete_5986" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\edit-delete_5986.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="info" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\info.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="edit_add_3860" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\edit_add_3860.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="logo_main_new" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\logo_main_new.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
73
EventLogLoaderManager/My Project/Settings.Designer.vb
generated
Normal file
73
EventLogLoaderManager/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.17626
|
||||
'
|
||||
' 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", "10.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.EventLogLoaderManager.My.MySettings
|
||||
Get
|
||||
Return Global.EventLogLoaderManager.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
7
EventLogLoaderManager/My Project/Settings.settings
Normal file
7
EventLogLoaderManager/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
BIN
EventLogLoaderManager/Resources/edit-delete_5986.png
Normal file
BIN
EventLogLoaderManager/Resources/edit-delete_5986.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
EventLogLoaderManager/Resources/edit_add_3860.png
Normal file
BIN
EventLogLoaderManager/Resources/edit_add_3860.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
EventLogLoaderManager/Resources/info.png
Normal file
BIN
EventLogLoaderManager/Resources/info.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
EventLogLoaderManager/Resources/logo_main_new.gif
Normal file
BIN
EventLogLoaderManager/Resources/logo_main_new.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
BIN
EventLogLoaderManager/Resources/save_all.png
Normal file
BIN
EventLogLoaderManager/Resources/save_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
EventLogLoaderManager/Untitled - 5.ico
Normal file
BIN
EventLogLoaderManager/Untitled - 5.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 95 KiB |
7
EventLogLoaderManager/packages.config
Normal file
7
EventLogLoaderManager/packages.config
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MySql.Data" version="6.9.5" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.94.1" targetFramework="net20" />
|
||||
</packages>
|
200
EventLogLoaderService/EventLogLoaderService.vbproj
Normal file
200
EventLogLoaderService/EventLogLoaderService.vbproj
Normal file
@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>
|
||||
</SchemaVersion>
|
||||
<ProjectGuid>{F7EF5930-B310-4697-B522-2325EAF247F2}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>EventLogLoaderService.EventLogLoaderService</StartupObject>
|
||||
<RootNamespace>EventLogLoaderService</RootNamespace>
|
||||
<AssemblyName>EventLogLoaderService</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Console</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<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>
|
||||
<NuGetPackageImportStamp>a0f3464e</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderService.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>EventLogLoaderService.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>
|
||||
<ApplicationManifest>My Project\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\MySql.Data.6.9.5\lib\net20\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files (x86)\NLog\.NET Framework 2.0\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration.Install" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.SQLite">
|
||||
<HintPath>..\packages\System.Data.SQLite.Core.1.0.94.0\lib\net20\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data.SQLite.Linq">
|
||||
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.94.1\lib\net20\System.Data.SQLite.Linq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
<Reference Include="System.Xml" />
|
||||
</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</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>
|
||||
</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>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="My Project\app.manifest" />
|
||||
<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="Nlog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IniFile\IniFile.vbproj">
|
||||
<Project>{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}</Project>
|
||||
<Name>IniFile</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Parser\Parser.vbproj">
|
||||
<Project>{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}</Project>
|
||||
<Name>Parser</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Клиентский профиль .NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Установщик Windows 3.1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Import Project="..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets" Condition="Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.94.0\build\net20\System.Data.SQLite.Core.targets'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
13
EventLogLoaderService/My Project/Application.Designer.vb
generated
Normal file
13
EventLogLoaderService/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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
|
||||
|
10
EventLogLoaderService/My Project/Application.myapp
Normal file
10
EventLogLoaderService/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
EventLogLoaderService/My Project/AssemblyInfo.vb
Normal file
35
EventLogLoaderService/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Общие сведения об этой сборке предоставляются следующим набором
|
||||
' атрибутов. Отредактируйте значения этих атрибутов, чтобы изменить
|
||||
' общие сведения об этой сборке.
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("EventLogLoaderService")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("EventLogLoaderService")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
<Assembly: Guid("316c9921-32a4-425e-89f1-f78dfa75a098")>
|
||||
|
||||
' Сведения о версии сборки состоят из следующих четырех значений:
|
||||
'
|
||||
' Основной номер версии
|
||||
' Дополнительный номер версии
|
||||
' Номер построения
|
||||
' Редакция
|
||||
'
|
||||
' Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
62
EventLogLoaderService/My Project/Resources.Designer.vb
generated
Normal file
62
EventLogLoaderService/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</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("EventLogLoaderService.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
117
EventLogLoaderService/My Project/Resources.resx
Normal file
117
EventLogLoaderService/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>
|
73
EventLogLoaderService/My Project/Settings.Designer.vb
generated
Normal file
73
EventLogLoaderService/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.17626
|
||||
'
|
||||
' 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", "10.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.EventLogLoaderService.My.MySettings
|
||||
Get
|
||||
Return Global.EventLogLoaderService.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
7
EventLogLoaderService/My Project/Settings.settings
Normal file
7
EventLogLoaderService/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
48
EventLogLoaderService/My Project/app.manifest
Normal file
48
EventLogLoaderService/My Project/app.manifest
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- Параметры манифеста UAC
|
||||
При необходимости изменить уровень управления учетными записями Windows замените
|
||||
узел requestedExecutionLevel одним из следующих значений.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
При указании узла requestedExecutionLevel виртуализация файлов и реестра будет отключена.
|
||||
Если вы хотите использовать виртуализацию файлов и реестра для обратной
|
||||
совместимости, удалите узел requestedExecutionLevel.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Список версий Windows, для работы с которыми предназначено данное приложение. Windows будет автоматически выбирать наиболее совместимую среду.-->
|
||||
|
||||
<!-- Если ваше приложение предназначено для работы с Windows 7, раскомментируйте следующий узел supportedOS-->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Включите темы для наиболее общих элементов управления и диалоговых окон Windows (Windows XP и последующие версии) -->
|
||||
<!-- <dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>-->
|
||||
|
||||
</asmv1:assembly>
|
34
EventLogLoaderService/Nlog.config
Normal file
34
EventLogLoaderService/Nlog.config
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<variable name="logDir" value="./log"/>
|
||||
<variable name="shortLayout" value="${date:format=HH\:mm\:ss} (${level:uppercase=true}): ${message}"/>
|
||||
<variable name="commonLayout" value="${date:format=dd.MM.yyyy HH\:mm\:ss} (${level:uppercase=true}): ${message}"/>
|
||||
<variable name="detailedLayout" value="${date:format=dd.MM.yyyy HH\:mm\:ss} (${level:uppercase=true}): ${message}. ${exception:format=ToString}"/>
|
||||
<targets>
|
||||
<target
|
||||
name="consoleLog"
|
||||
xsi:type="Console"
|
||||
layout="${shortLayout}" />
|
||||
<target
|
||||
name="shortLog"
|
||||
xsi:type="File"
|
||||
fileName="${logDir}/${date:format=yyyy-MM-dd}-short.log"
|
||||
layout="${commonLayout}" />
|
||||
<target
|
||||
name="fullLog"
|
||||
xsi:type="File"
|
||||
fileName="${logDir}/${date:format=yyyy-MM-dd}-full.log"
|
||||
layout="${detailedLayout}" />
|
||||
<target
|
||||
name="systemLog"
|
||||
xsi:type="EventLog"
|
||||
layout="${detailedLayout}" />
|
||||
</targets>
|
||||
<rules>
|
||||
<logger name="*" minlevel="Trace" writeTo="fullLog" />
|
||||
<logger name="*" minlevel="Info" writeTo="shortLog" />
|
||||
<logger name="*" minlevel="Info" writeTo="consoleLog" />
|
||||
<logger name="*" minlevel="Info" writeTo="systemLog"/>
|
||||
</rules>
|
||||
</nlog>
|
44
EventLogLoaderService/ProjectInstaller.Designer.vb
generated
Normal file
44
EventLogLoaderService/ProjectInstaller.Designer.vb
generated
Normal file
@ -0,0 +1,44 @@
|
||||
<System.ComponentModel.RunInstaller(True)> Partial Class ProjectInstaller
|
||||
Inherits System.Configuration.Install.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.Password = Nothing
|
||||
Me.ServiceProcessInstaller1.Username = Nothing
|
||||
'
|
||||
'ServiceInstaller1
|
||||
'
|
||||
Me.ServiceInstaller1.ServiceName = "EventLog loader service"
|
||||
'
|
||||
'ProjectInstaller
|
||||
'
|
||||
Me.Installers.AddRange(New System.Configuration.Install.Installer() {Me.ServiceProcessInstaller1, Me.ServiceInstaller1})
|
||||
|
||||
End Sub
|
||||
Friend WithEvents ServiceProcessInstaller1 As System.ServiceProcess.ServiceProcessInstaller
|
||||
Friend WithEvents ServiceInstaller1 As System.ServiceProcess.ServiceInstaller
|
||||
|
||||
End Class
|
129
EventLogLoaderService/ProjectInstaller.resx
Normal file
129
EventLogLoaderService/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=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>
|
||||
<metadata name="ServiceProcessInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ServiceInstaller1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>197, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
16
EventLogLoaderService/ProjectInstaller.vb
Normal file
16
EventLogLoaderService/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
EventLogLoaderService/Service1.Designer.vb
generated
Normal file
48
EventLogLoaderService/Service1.Designer.vb
generated
Normal file
@ -0,0 +1,48 @@
|
||||
Imports System.ServiceProcess
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class EventLogLoaderService
|
||||
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 EventLogLoaderService}
|
||||
|
||||
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 = "EventLog loader service"
|
||||
End Sub
|
||||
|
||||
End Class
|
1759
EventLogLoaderService/Service1.vb
Normal file
1759
EventLogLoaderService/Service1.vb
Normal file
File diff suppressed because it is too large
Load Diff
8
EventLogLoaderService/app.config
Normal file
8
EventLogLoaderService/app.config
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<system.data>
|
||||
<DbProviderFactories>
|
||||
<add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
|
||||
<remove invariant="MySql.Data.MySqlClient" /><add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /></DbProviderFactories>
|
||||
</system.data>
|
||||
</configuration>
|
7
EventLogLoaderService/packages.config
Normal file
7
EventLogLoaderService/packages.config
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MySql.Data" version="6.9.5" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite" version="1.0.94.1" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Core" version="1.0.94.0" targetFramework="net20" />
|
||||
<package id="System.Data.SQLite.Linq" version="1.0.94.1" targetFramework="net20" />
|
||||
</packages>
|
386
IniFile/Class1.vb
Normal file
386
IniFile/Class1.vb
Normal file
@ -0,0 +1,386 @@
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
|
||||
Public Class IniFileClass
|
||||
' List of IniSection objects keeps track of all the sections in the INI file
|
||||
Private m_sections As Hashtable
|
||||
|
||||
' Public constructor
|
||||
Public Sub New()
|
||||
m_sections = New Hashtable(StringComparer.InvariantCultureIgnoreCase)
|
||||
End Sub
|
||||
|
||||
' Loads the Reads the data in the ini file into the IniFile object
|
||||
Public Sub Load(ByVal sFileName As String, Optional ByVal bMerge As Boolean = False)
|
||||
If Not bMerge Then
|
||||
RemoveAllSections()
|
||||
End If
|
||||
' Clear the object...
|
||||
Dim tempsection As IniSection = Nothing
|
||||
Dim oReader As New StreamReader(sFileName)
|
||||
Dim regexcomment As New Regex("^([\s]*#.*)", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
' Broken but left for history
|
||||
'Dim regexsection As New Regex("\[[\s]*([^\[\s].*[^\s\]])[\s]*\]", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
Dim regexsection As New Regex("^[\s]*\[[\s]*([^\[\s].*[^\s\]])[\s]*\][\s]*$", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
Dim regexkey As New Regex("^\s*([^=\s]*)[^=]*=(.*)", (RegexOptions.Singleline Or RegexOptions.IgnoreCase))
|
||||
While Not oReader.EndOfStream
|
||||
Dim line As String = oReader.ReadLine()
|
||||
If line <> String.Empty Then
|
||||
Dim m As Match = Nothing
|
||||
If regexcomment.Match(line).Success Then
|
||||
m = regexcomment.Match(line)
|
||||
Trace.WriteLine(String.Format("Skipping Comment: {0}", m.Groups(0).Value))
|
||||
ElseIf regexsection.Match(line).Success Then
|
||||
m = regexsection.Match(line)
|
||||
Trace.WriteLine(String.Format("Adding section [{0}]", m.Groups(1).Value))
|
||||
tempsection = AddSection(m.Groups(1).Value)
|
||||
ElseIf regexkey.Match(line).Success AndAlso tempsection IsNot Nothing Then
|
||||
m = regexkey.Match(line)
|
||||
Trace.WriteLine(String.Format("Adding Key [{0}]=[{1}]", m.Groups(1).Value, m.Groups(2).Value))
|
||||
tempsection.AddKey(m.Groups(1).Value).Value = m.Groups(2).Value
|
||||
ElseIf tempsection IsNot Nothing Then
|
||||
' Handle Key without value
|
||||
Trace.WriteLine(String.Format("Adding Key [{0}]", line))
|
||||
tempsection.AddKey(line)
|
||||
Else
|
||||
' This should not occur unless the tempsection is not created yet...
|
||||
Trace.WriteLine(String.Format("Skipping unknown type of data: {0}", line))
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
oReader.Close()
|
||||
End Sub
|
||||
|
||||
' Used to save the data back to the file or your choice
|
||||
Public Sub Save(ByVal sFileName As String)
|
||||
Dim oWriter As New StreamWriter(sFileName, False)
|
||||
For Each s As IniSection In Sections
|
||||
Trace.WriteLine(String.Format("Writing Section: [{0}]", s.Name))
|
||||
oWriter.WriteLine(String.Format("[{0}]", s.Name))
|
||||
For Each k As IniSection.IniKey In s.Keys
|
||||
If k.Value <> String.Empty Then
|
||||
Trace.WriteLine(String.Format("Writing Key: {0}={1}", k.Name, k.Value))
|
||||
oWriter.WriteLine(String.Format("{0}={1}", k.Name, k.Value))
|
||||
Else
|
||||
Trace.WriteLine(String.Format("Writing Key: {0}", k.Name))
|
||||
oWriter.WriteLine(String.Format("{0}", k.Name))
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
oWriter.Close()
|
||||
End Sub
|
||||
|
||||
' Gets all the sections
|
||||
Public ReadOnly Property Sections() As System.Collections.ICollection
|
||||
Get
|
||||
Return m_sections.Values
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Adds a section to the IniFile object, returns a IniSection object to the new or existing object
|
||||
Public Function AddSection(ByVal sSection As String) As IniSection
|
||||
Dim s As IniSection = Nothing
|
||||
sSection = sSection.Trim()
|
||||
' Trim spaces
|
||||
If m_sections.ContainsKey(sSection) Then
|
||||
s = DirectCast(m_sections(sSection), IniSection)
|
||||
Else
|
||||
s = New IniSection(Me, sSection)
|
||||
m_sections(sSection) = s
|
||||
End If
|
||||
Return s
|
||||
End Function
|
||||
|
||||
' Removes a section by its name sSection, returns trus on success
|
||||
Public Function RemoveSection(ByVal sSection As String) As Boolean
|
||||
sSection = sSection.Trim()
|
||||
Return RemoveSection(GetSection(sSection))
|
||||
End Function
|
||||
|
||||
' Removes section by object, returns trus on success
|
||||
Public Function RemoveSection(ByVal Section As IniSection) As Boolean
|
||||
If Section IsNot Nothing Then
|
||||
Try
|
||||
m_sections.Remove(Section.Name)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Removes all existing sections, returns trus on success
|
||||
Public Function RemoveAllSections() As Boolean
|
||||
m_sections.Clear()
|
||||
Return (m_sections.Count = 0)
|
||||
End Function
|
||||
|
||||
' Returns an IniSection to the section by name, NULL if it was not found
|
||||
Public Function GetSection(ByVal sSection As String) As IniSection
|
||||
sSection = sSection.Trim()
|
||||
' Trim spaces
|
||||
If m_sections.ContainsKey(sSection) Then
|
||||
Return DirectCast(m_sections(sSection), IniSection)
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Returns a KeyValue in a certain section
|
||||
Public Function GetKeyValue(ByVal sSection As String, ByVal sKey As String) As String
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.GetKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
Return k.Value
|
||||
End If
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
' Sets a KeyValuePair in a certain section
|
||||
Public Function SetKeyValue(ByVal sSection As String, ByVal sKey As String, ByVal sValue As String) As Boolean
|
||||
Dim s As IniSection = AddSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.AddKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
k.Value = sValue
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Renames an existing section returns true on success, false if the section didn't exist or there was another section with the same sNewSection
|
||||
Public Function RenameSection(ByVal sSection As String, ByVal sNewSection As String) As Boolean
|
||||
' Note string trims are done in lower calls.
|
||||
Dim bRval As Boolean = False
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
bRval = s.SetName(sNewSection)
|
||||
End If
|
||||
Return bRval
|
||||
End Function
|
||||
|
||||
' Renames an existing key returns true on success, false if the key didn't exist or there was another section with the same sNewKey
|
||||
Public Function RenameKey(ByVal sSection As String, ByVal sKey As String, ByVal sNewKey As String) As Boolean
|
||||
' Note string trims are done in lower calls.
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Dim k As IniSection.IniKey = s.GetKey(sKey)
|
||||
If k IsNot Nothing Then
|
||||
Return k.SetName(sNewKey)
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Remove a key by section name and key name
|
||||
Public Function RemoveKey(ByVal sSection As String, ByVal sKey As String) As Boolean
|
||||
Dim s As IniSection = GetSection(sSection)
|
||||
If s IsNot Nothing Then
|
||||
Return s.RemoveKey(sKey)
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' IniSection class
|
||||
Public Class IniSection
|
||||
' IniFile IniFile object instance
|
||||
Private m_pIniFile As IniFileClass
|
||||
' Name of the section
|
||||
Private m_sSection As String
|
||||
' List of IniKeys in the section
|
||||
Private m_keys As Hashtable
|
||||
|
||||
' Constuctor so objects are internally managed
|
||||
Protected Friend Sub New(ByVal parent As IniFileClass, ByVal sSection As String)
|
||||
m_pIniFile = parent
|
||||
m_sSection = sSection
|
||||
m_keys = New Hashtable(StringComparer.InvariantCultureIgnoreCase)
|
||||
End Sub
|
||||
|
||||
' Returns all the keys in a section
|
||||
Public ReadOnly Property Keys() As System.Collections.ICollection
|
||||
Get
|
||||
Return m_keys.Values
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Returns the section name
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return m_sSection
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Adds a key to the IniSection object, returns a IniKey object to the new or existing object
|
||||
Public Function AddKey(ByVal sKey As String) As IniKey
|
||||
sKey = sKey.Trim()
|
||||
Dim k As IniSection.IniKey = Nothing
|
||||
If sKey.Length <> 0 Then
|
||||
If m_keys.ContainsKey(sKey) Then
|
||||
k = DirectCast(m_keys(sKey), IniKey)
|
||||
Else
|
||||
k = New IniSection.IniKey(Me, sKey)
|
||||
m_keys(sKey) = k
|
||||
End If
|
||||
End If
|
||||
Return k
|
||||
End Function
|
||||
|
||||
' Removes a single key by string
|
||||
Public Function RemoveKey(ByVal sKey As String) As Boolean
|
||||
Return RemoveKey(GetKey(sKey))
|
||||
End Function
|
||||
|
||||
' Removes a single key by IniKey object
|
||||
Public Function RemoveKey(ByVal Key As IniKey) As Boolean
|
||||
If Key IsNot Nothing Then
|
||||
Try
|
||||
m_keys.Remove(Key.Name)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Removes all the keys in the section
|
||||
Public Function RemoveAllKeys() As Boolean
|
||||
m_keys.Clear()
|
||||
Return (m_keys.Count = 0)
|
||||
End Function
|
||||
|
||||
' Returns a IniKey object to the key by name, NULL if it was not found
|
||||
Public Function GetKey(ByVal sKey As String) As IniKey
|
||||
sKey = sKey.Trim()
|
||||
If m_keys.ContainsKey(sKey) Then
|
||||
Return DirectCast(m_keys(sKey), IniKey)
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Sets the section name, returns true on success, fails if the section
|
||||
' name sSection already exists
|
||||
Public Function SetName(ByVal sSection As String) As Boolean
|
||||
sSection = sSection.Trim()
|
||||
If sSection.Length <> 0 Then
|
||||
' Get existing section if it even exists...
|
||||
Dim s As IniSection = m_pIniFile.GetSection(sSection)
|
||||
If s IsNot Me AndAlso s IsNot Nothing Then
|
||||
Return False
|
||||
End If
|
||||
Try
|
||||
' Remove the current section
|
||||
m_pIniFile.m_sections.Remove(m_sSection)
|
||||
' Set the new section name to this object
|
||||
m_pIniFile.m_sections(sSection) = Me
|
||||
' Set the new section name
|
||||
m_sSection = sSection
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Returns the section name
|
||||
Public Function GetName() As String
|
||||
Return m_sSection
|
||||
End Function
|
||||
|
||||
' IniKey class
|
||||
Public Class IniKey
|
||||
' Name of the Key
|
||||
Private m_sKey As String
|
||||
' Value associated
|
||||
Private m_sValue As String
|
||||
' Pointer to the parent CIniSection
|
||||
Private m_section As IniSection
|
||||
|
||||
' Constuctor so objects are internally managed
|
||||
Protected Friend Sub New(ByVal parent As IniSection, ByVal sKey As String)
|
||||
m_section = parent
|
||||
m_sKey = sKey
|
||||
End Sub
|
||||
|
||||
' Returns the name of the Key
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return m_sKey
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Sets or Gets the value of the key
|
||||
Public Property Value() As String
|
||||
Get
|
||||
Return m_sValue
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
m_sValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Sets the value of the key
|
||||
Public Sub SetValue(ByVal sValue As String)
|
||||
m_sValue = sValue
|
||||
End Sub
|
||||
' Returns the value of the Key
|
||||
Public Function GetValue() As String
|
||||
Return m_sValue
|
||||
End Function
|
||||
|
||||
' Sets the key name
|
||||
' Returns true on success, fails if the section name sKey already exists
|
||||
Public Function SetName(ByVal sKey As String) As Boolean
|
||||
sKey = sKey.Trim()
|
||||
If sKey.Length <> 0 Then
|
||||
Dim k As IniKey = m_section.GetKey(sKey)
|
||||
If k IsNot Me AndAlso k IsNot Nothing Then
|
||||
Return False
|
||||
End If
|
||||
Try
|
||||
' Remove the current key
|
||||
m_section.m_keys.Remove(m_sKey)
|
||||
' Set the new key name to this object
|
||||
m_section.m_keys(sKey) = Me
|
||||
' Set the new key name
|
||||
m_sKey = sKey
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Trace.WriteLine(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Returns the name of the Key
|
||||
Public Function GetName() As String
|
||||
Return m_sKey
|
||||
End Function
|
||||
End Class
|
||||
' End of IniKey class
|
||||
|
||||
End Class
|
||||
|
||||
Public Function RestoreIniValue(Param As IniFileClass, SectionText As String, KeyText As String) As String
|
||||
Dim Section As IniFileClass.IniSection = Param.GetSection(SectionText)
|
||||
If Not Section Is Nothing Then
|
||||
Dim Key As IniFileClass.IniSection.IniKey = Section.GetKey(KeyText)
|
||||
If Not Key Is Nothing Then
|
||||
RestoreIniValue = Key.Value
|
||||
Else
|
||||
RestoreIniValue = ""
|
||||
End If
|
||||
Else
|
||||
RestoreIniValue = ""
|
||||
End If
|
||||
End Function
|
||||
' End of IniSection class
|
||||
End Class
|
||||
|
||||
|
106
IniFile/IniFile.vbproj
Normal file
106
IniFile/IniFile.vbproj
Normal file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>
|
||||
</SchemaVersion>
|
||||
<ProjectGuid>{8119A1A1-E5D6-4269-9A5C-0F49E039E72D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>IniFile</RootNamespace>
|
||||
<AssemblyName>IniFile</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>IniFile.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>IniFile.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>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</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="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>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
13
IniFile/My Project/Application.Designer.vb
generated
Normal file
13
IniFile/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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
|
||||
|
10
IniFile/My Project/Application.myapp
Normal file
10
IniFile/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>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
35
IniFile/My Project/AssemblyInfo.vb
Normal file
35
IniFile/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Общие сведения об этой сборке предоставляются следующим набором
|
||||
' атрибутов. Отредактируйте значения этих атрибутов, чтобы изменить
|
||||
' общие сведения об этой сборке.
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("IniFile")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("IniFile")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
<Assembly: Guid("204c055a-37ab-4eeb-a0d1-93682284d65b")>
|
||||
|
||||
' Сведения о версии сборки состоят из следующих четырех значений:
|
||||
'
|
||||
' Основной номер версии
|
||||
' Дополнительный номер версии
|
||||
' Номер построения
|
||||
' Редакция
|
||||
'
|
||||
' Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
62
IniFile/My Project/Resources.Designer.vb
generated
Normal file
62
IniFile/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</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("IniFile.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
117
IniFile/My Project/Resources.resx
Normal file
117
IniFile/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>
|
73
IniFile/My Project/Settings.Designer.vb
generated
Normal file
73
IniFile/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.17626
|
||||
'
|
||||
' 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", "10.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.IniFile.My.MySettings
|
||||
Get
|
||||
Return Global.IniFile.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
7
IniFile/My Project/Settings.settings
Normal file
7
IniFile/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
220
Installer/Class1.vb
Normal file
220
Installer/Class1.vb
Normal file
@ -0,0 +1,220 @@
|
||||
Imports System
|
||||
Imports System.Runtime.InteropServices
|
||||
Namespace ObjTec.Services
|
||||
Friend Class NativeMethods
|
||||
Private Sub New()
|
||||
End Sub
|
||||
<DllImport("advapi32.dll", EntryPoint:="OpenSCManagerW", ExactSpelling:=True, CharSet:=CharSet.Unicode, SetLastError:=True)> _
|
||||
Friend Shared Function OpenSCManager(machineName As String, databaseName As String, dwAccess As UInteger) As IntPtr
|
||||
End Function
|
||||
<DllImport("advapi32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Friend Shared Function CreateService(hSCManager As IntPtr, lpServiceName As String, lpDisplayName As String, dwDesiredAccess As UInteger, dwServiceType As UInteger, dwStartType As UInteger, _
|
||||
dwErrorControl As UInteger, lpBinaryPathName As String, lpLoadOrderGroup As String, lpdwTagId As UInteger, lpDependencies As String, lpServiceStartName As String, _
|
||||
lpPassword As String) As IntPtr
|
||||
End Function
|
||||
<DllImport("advapi32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Friend Shared Function ChangeServiceConfig(hService As IntPtr, dwServiceType As UInteger, dwStartType As UInteger, dwErrorControl As UInteger, _
|
||||
lpBinaryPathName As String, lpLoadOrderGroup As String, lpdwTagId As UInteger, lpDependencies As String, lpServiceStartName As String, _
|
||||
lpPassword As String, lpDisplayName As String) As IntPtr
|
||||
End Function
|
||||
<DllImport("advapi32.dll")> _
|
||||
Friend Shared Function CloseServiceHandle(scHandle As IntPtr) As <MarshalAs(UnmanagedType.Bool)> Boolean
|
||||
End Function
|
||||
<DllImport("advapi32", SetLastError:=True)> _
|
||||
Friend Shared Function StartService(hService As IntPtr, dwNumServiceArgs As Integer, lpServiceArgVectors As String()) As <MarshalAs(UnmanagedType.Bool)> Boolean
|
||||
End Function
|
||||
<DllImport("advapi32.dll", SetLastError:=True)> _
|
||||
Friend Shared Function OpenService(scHandle As IntPtr, lpSvcName As String, dwNumServiceArgs As Integer) As IntPtr
|
||||
End Function
|
||||
<DllImport("advapi32.dll")> _
|
||||
Friend Shared Function DeleteService(svHandle As IntPtr) As Integer
|
||||
End Function
|
||||
End Class
|
||||
Public Class ServiceInstaller
|
||||
Public Shared Function InstallService(svcPath As String, svcName As String, svcDispName As String, lpDependencies As String, User As String, Password As String) As Boolean
|
||||
Dim SC_MANAGER_CREATE_SERVICE As UInteger = &H2
|
||||
Dim SC_MANAGER_ALL_ACCESS As UInteger = &HF003F
|
||||
Dim SERVICE_WIN32_OWN_PROCESS As UInteger = &H10
|
||||
Dim SERVICE_ERROR_NORMAL As UInteger = &H1
|
||||
Dim STANDARD_RIGHTS_REQUIRED As UInteger = &HF0000
|
||||
Dim SERVICE_QUERY_CONFIG As UInteger = &H1
|
||||
Dim SERVICE_CHANGE_CONFIG As UInteger = &H2
|
||||
Dim SERVICE_QUERY_STATUS As UInteger = &H4
|
||||
Dim SERVICE_ENUMERATE_DEPENDENTS As UInteger = &H8
|
||||
Dim SERVICE_START As UInteger = &H10
|
||||
Dim SERVICE_STOP As UInteger = &H20
|
||||
Dim SERVICE_PAUSE_CONTINUE As UInteger = &H40
|
||||
Dim SERVICE_INTERROGATE As UInteger = &H80
|
||||
Dim SERVICE_USER_DEFINED_CONTROL As UInteger = &H100
|
||||
Dim SERVICE_ALL_ACCESS As UInteger = (STANDARD_RIGHTS_REQUIRED Or SERVICE_QUERY_CONFIG Or SERVICE_CHANGE_CONFIG Or SERVICE_QUERY_STATUS Or SERVICE_ENUMERATE_DEPENDENTS Or SERVICE_START Or SERVICE_STOP Or SERVICE_PAUSE_CONTINUE Or SERVICE_INTERROGATE Or SERVICE_USER_DEFINED_CONTROL)
|
||||
Dim SERVICE_AUTO_START As UInteger = &H2
|
||||
Dim sc_handle As IntPtr = NativeMethods.OpenSCManager(Nothing, Nothing, SC_MANAGER_ALL_ACCESS)
|
||||
If Not sc_handle.Equals(IntPtr.Zero) Then
|
||||
Dim sv_handle As IntPtr = NativeMethods.CreateService(sc_handle, svcName, svcDispName, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, _
|
||||
SERVICE_ERROR_NORMAL, svcPath, Nothing, 0, lpDependencies, User, IIf(Password = "", Nothing, Password))
|
||||
If sv_handle.Equals(IntPtr.Zero) Then
|
||||
'Console.WriteLine(Marshal.GetLastWin32Error())
|
||||
NativeMethods.CloseServiceHandle(sv_handle)
|
||||
NativeMethods.CloseServiceHandle(sc_handle)
|
||||
Return False
|
||||
Else
|
||||
'Dim test As Boolean = NativeMethods.StartService(sv_handle, 0, Nothing)
|
||||
NativeMethods.CloseServiceHandle(sv_handle)
|
||||
'If Not test Then
|
||||
' Return False
|
||||
'End If
|
||||
NativeMethods.CloseServiceHandle(sc_handle)
|
||||
Return True
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function TestConnection() As Boolean
|
||||
|
||||
Dim SC_MANAGER_CREATE_SERVICE As UInteger = &H2
|
||||
Dim SC_MANAGER_ALL_ACCESS As UInteger = &HF003F
|
||||
Dim SERVICE_WIN32_OWN_PROCESS As UInteger = &H10
|
||||
Dim SERVICE_ERROR_NORMAL As UInteger = &H1
|
||||
Dim STANDARD_RIGHTS_REQUIRED As UInteger = &HF0000
|
||||
Dim SERVICE_QUERY_CONFIG As UInteger = &H1
|
||||
Dim SERVICE_CHANGE_CONFIG As UInteger = &H2
|
||||
Dim SERVICE_QUERY_STATUS As UInteger = &H4
|
||||
Dim SERVICE_ENUMERATE_DEPENDENTS As UInteger = &H8
|
||||
Dim SERVICE_START As UInteger = &H10
|
||||
Dim SERVICE_STOP As UInteger = &H20
|
||||
Dim SERVICE_PAUSE_CONTINUE As UInteger = &H40
|
||||
Dim SERVICE_INTERROGATE As UInteger = &H80
|
||||
Dim SERVICE_USER_DEFINED_CONTROL As UInteger = &H100
|
||||
Dim SERVICE_ALL_ACCESS As UInteger = (STANDARD_RIGHTS_REQUIRED Or SERVICE_QUERY_CONFIG Or SERVICE_CHANGE_CONFIG Or SERVICE_QUERY_STATUS Or SERVICE_ENUMERATE_DEPENDENTS Or SERVICE_START Or SERVICE_STOP Or SERVICE_PAUSE_CONTINUE Or SERVICE_INTERROGATE Or SERVICE_USER_DEFINED_CONTROL)
|
||||
Dim SERVICE_AUTO_START As UInteger = &H2
|
||||
Dim sc_handle As IntPtr = NativeMethods.OpenSCManager(Nothing, Nothing, SC_MANAGER_ALL_ACCESS)
|
||||
|
||||
If Not sc_handle.Equals(IntPtr.Zero) Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function ChangeServiceParameters(svcPath As String, svcName As String, svcDispName As String, lpDependencies As String, User As String, Password As String) As Boolean
|
||||
Dim SC_MANAGER_CREATE_SERVICE As UInteger = &H2
|
||||
Dim SC_MANAGER_ALL_ACCESS As UInteger = &HF003F
|
||||
Dim SERVICE_WIN32_OWN_PROCESS As UInteger = &H10
|
||||
Dim SERVICE_ERROR_NORMAL As UInteger = &H1
|
||||
Dim STANDARD_RIGHTS_REQUIRED As UInteger = &HF0000
|
||||
Dim SERVICE_QUERY_CONFIG As UInteger = &H1
|
||||
Dim SERVICE_CHANGE_CONFIG As UInteger = &H2
|
||||
Dim SERVICE_QUERY_STATUS As UInteger = &H4
|
||||
Dim SERVICE_ENUMERATE_DEPENDENTS As UInteger = &H8
|
||||
Dim SERVICE_START As UInteger = &H10
|
||||
Dim SERVICE_STOP As UInteger = &H20
|
||||
Dim SERVICE_PAUSE_CONTINUE As UInteger = &H40
|
||||
Dim SERVICE_INTERROGATE As UInteger = &H80
|
||||
Dim SERVICE_USER_DEFINED_CONTROL As UInteger = &H100
|
||||
Dim SERVICE_ALL_ACCESS As UInteger = (STANDARD_RIGHTS_REQUIRED Or SERVICE_QUERY_CONFIG Or SERVICE_CHANGE_CONFIG Or SERVICE_QUERY_STATUS Or SERVICE_ENUMERATE_DEPENDENTS Or SERVICE_START Or SERVICE_STOP Or SERVICE_PAUSE_CONTINUE Or SERVICE_INTERROGATE Or SERVICE_USER_DEFINED_CONTROL)
|
||||
Dim SERVICE_AUTO_START As UInteger = &H2
|
||||
|
||||
|
||||
Dim GENERIC_WRITE As UInteger = &H40000000
|
||||
Dim sc_hndl As IntPtr = NativeMethods.OpenSCManager(Nothing, Nothing, GENERIC_WRITE)
|
||||
If sc_hndl.ToInt32() <> 0 Then
|
||||
Dim svc_hndl As IntPtr = NativeMethods.OpenService(sc_hndl, svcName, SC_MANAGER_ALL_ACCESS)
|
||||
If svc_hndl.ToInt32() <> 0 Then
|
||||
|
||||
Dim i As Integer = NativeMethods.ChangeServiceConfig(svc_hndl, SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, _
|
||||
SERVICE_ERROR_NORMAL, svcPath, Nothing, 0, lpDependencies, User, IIf(Password = "", Nothing, Password), svcDispName)
|
||||
''ErrorCode = i
|
||||
NativeMethods.CloseServiceHandle(svc_hndl)
|
||||
If i <> 0 Then
|
||||
NativeMethods.CloseServiceHandle(sc_hndl)
|
||||
Return True
|
||||
Else
|
||||
NativeMethods.CloseServiceHandle(sc_hndl)
|
||||
Return False
|
||||
End If
|
||||
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
Public Shared Function UninstallService(svcName As String) As Boolean
|
||||
Dim GENERIC_WRITE As UInteger = &H40000000
|
||||
Dim sc_hndl As IntPtr = NativeMethods.OpenSCManager(Nothing, Nothing, GENERIC_WRITE)
|
||||
If sc_hndl.ToInt32() <> 0 Then
|
||||
Dim DELETE As Integer = &H10000
|
||||
Dim svc_hndl As IntPtr = NativeMethods.OpenService(sc_hndl, svcName, DELETE)
|
||||
If svc_hndl.ToInt32() <> 0 Then
|
||||
Dim i As Integer = NativeMethods.DeleteService(svc_hndl)
|
||||
NativeMethods.CloseServiceHandle(svc_hndl)
|
||||
If i <> 0 Then
|
||||
NativeMethods.CloseServiceHandle(sc_hndl)
|
||||
Return True
|
||||
Else
|
||||
NativeMethods.CloseServiceHandle(sc_hndl)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function GetErrorDescription(ErrorNumber As Integer) As String
|
||||
|
||||
Dim Desc = ""
|
||||
|
||||
'If Procedure = "DeleteService" Then ' OpenService OpenSCManager ChangeServiceConfig CreateService
|
||||
|
||||
'End If
|
||||
|
||||
If ErrorNumber = 5 Then
|
||||
'ERROR_ACCESS_DENIED
|
||||
Desc = "The handle does not have access to the service."
|
||||
ElseIf ErrorNumber = 1059 Then
|
||||
'ERROR_CIRCULAR_DEPENDENCY
|
||||
Desc = "A circular service dependency was specified."
|
||||
ElseIf ErrorNumber = 1065 Then
|
||||
'ERROR_DATABASE_DOES_NOT_EXIST
|
||||
Desc = "The specified database does not exist."
|
||||
ElseIf ErrorNumber = 1078 Then
|
||||
'ERROR_DUPLICATE_SERVICE_NAME
|
||||
Desc = "The display name already exists in the service control manager database either as a service name or as another display name."
|
||||
ElseIf ErrorNumber = 6 Then
|
||||
'ERROR_INVALID_HANDLE ---------------
|
||||
Desc = "The handle to the specified service control manager database is invalid."
|
||||
ElseIf ErrorNumber = 123 Then
|
||||
'ERROR_INVALID_NAME
|
||||
Desc = "The specified service name is invalid."
|
||||
ElseIf ErrorNumber = 87 Then
|
||||
'ERROR_INVALID_PARAMETER
|
||||
Desc = "A parameter that was specified is invalid."
|
||||
ElseIf ErrorNumber = 1057 Then
|
||||
'ERROR_INVALID_SERVICE_ACCOUNT
|
||||
Desc = "The account name does not exist, or a service is specified to share the same binary file as an already installed service but with an account name that is not the same as the installed service."
|
||||
ElseIf ErrorNumber = 1060 Then
|
||||
'ERROR_SERVICE_DOES_NOT_EXIST
|
||||
Desc = "The specified service does not exist."
|
||||
ElseIf ErrorNumber = 1072 Then
|
||||
'ERROR_SERVICE_MARKED_FOR_DELETE
|
||||
Desc = "The service has been marked for deletion."
|
||||
ElseIf ErrorNumber = 1073 Then
|
||||
'ERROR_SERVICE_EXISTS
|
||||
Desc = "The specified service already exists in this database."
|
||||
End If
|
||||
|
||||
GetErrorDescription = "№ " + ErrorNumber.ToString + " - " + Desc
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
106
Installer/Installer.vbproj
Normal file
106
Installer/Installer.vbproj
Normal file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>
|
||||
</SchemaVersion>
|
||||
<ProjectGuid>{593952E2-6C95-4496-BFD5-C8C64DF78DE5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Installer</RootNamespace>
|
||||
<AssemblyName>Installer</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Installer.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Installer.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>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</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="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>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
13
Installer/My Project/Application.Designer.vb
generated
Normal file
13
Installer/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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
|
||||
|
10
Installer/My Project/Application.myapp
Normal file
10
Installer/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>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
35
Installer/My Project/AssemblyInfo.vb
Normal file
35
Installer/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Общие сведения об этой сборке предоставляются следующим набором
|
||||
' атрибутов. Отредактируйте значения этих атрибутов, чтобы изменить
|
||||
' общие сведения об этой сборке.
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("Installer")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("Installer")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
<Assembly: Guid("7c4d2059-209b-4ff2-a762-597578e731ef")>
|
||||
|
||||
' Сведения о версии сборки состоят из следующих четырех значений:
|
||||
'
|
||||
' Основной номер версии
|
||||
' Дополнительный номер версии
|
||||
' Номер построения
|
||||
' Редакция
|
||||
'
|
||||
' Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
62
Installer/My Project/Resources.Designer.vb
generated
Normal file
62
Installer/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</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("Installer.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
117
Installer/My Project/Resources.resx
Normal file
117
Installer/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>
|
73
Installer/My Project/Settings.Designer.vb
generated
Normal file
73
Installer/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.17626
|
||||
'
|
||||
' 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", "10.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.Installer.My.MySettings
|
||||
Get
|
||||
Return Global.Installer.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
7
Installer/My Project/Settings.settings
Normal file
7
Installer/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
191
Parser/Class1.vb
Normal file
191
Parser/Class1.vb
Normal file
@ -0,0 +1,191 @@
|
||||
Namespace ParserServices
|
||||
|
||||
Public Class ParsesClass
|
||||
|
||||
Public Shared Function ParseString(Text As String)
|
||||
|
||||
Dim Array(0)
|
||||
|
||||
If Not Text = "" Then
|
||||
|
||||
Dim RowArr(2)
|
||||
|
||||
Dim j = 0
|
||||
Dim OpenBlock = False
|
||||
Dim Level = 0
|
||||
|
||||
For i = 0 To Text.Length - 1
|
||||
|
||||
Dim Simb = Text.Substring(i, 1)
|
||||
Dim SubStr = ""
|
||||
|
||||
If OpenBlock Then
|
||||
If Simb = """" Then
|
||||
OpenBlock = False
|
||||
End If
|
||||
Else
|
||||
If Simb = "{" Then
|
||||
Level = Level + 1
|
||||
SubStr = "НачалоУровня"
|
||||
ElseIf Simb = "}" Then
|
||||
Level = Level - 1
|
||||
SubStr = "ОкончаниеУровня"
|
||||
ElseIf Simb = """" Then
|
||||
OpenBlock = True
|
||||
ElseIf Simb = "," Then
|
||||
SubStr = "Разделитель"
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not SubStr = "" Then
|
||||
ReDim Preserve Array(j)
|
||||
ReDim RowArr(2)
|
||||
RowArr(0) = i
|
||||
RowArr(1) = SubStr
|
||||
RowArr(2) = Level
|
||||
|
||||
Array(j) = RowArr
|
||||
j = j + 1
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim ArrayBases(0)
|
||||
Dim ArrayRow(2)
|
||||
Dim ArrayLines(0)
|
||||
|
||||
If Array.Length > 1 Then
|
||||
|
||||
Dim ArrayLevel(10) As Integer
|
||||
Dim ArrayValue(0)
|
||||
|
||||
Dim Level = 0
|
||||
' Dim CountLines = 0
|
||||
Dim LastVal = 0
|
||||
Dim StrLevel = ""
|
||||
|
||||
For Each a In Array
|
||||
|
||||
Select Case a(1)
|
||||
Case "НачалоУровня"
|
||||
|
||||
If Not StrLevel = "" Then
|
||||
ArrayValue(0) = StrLevel
|
||||
ArrayLines(ArrayLines.Length - 1) = ArrayValue
|
||||
ReDim Preserve ArrayLines(ArrayLines.Length)
|
||||
End If
|
||||
|
||||
|
||||
' CountLines = CountLines + 1
|
||||
ArrayLevel(Level) = ArrayLevel(Level) + 1
|
||||
Level = Level + 1
|
||||
|
||||
StrLevel = ""
|
||||
For j = 0 To Level - 1
|
||||
StrLevel = IIf(StrLevel = "", "", StrLevel + ".") + ArrayLevel(j).ToString
|
||||
Next
|
||||
|
||||
ReDim ArrayValue(0)
|
||||
|
||||
Case "ОкончаниеУровня"
|
||||
|
||||
Dim TextStr = Text.Substring(LastVal + 1, a(0) - LastVal - 1)
|
||||
TextStr = TextStr.Replace("""""", """")
|
||||
If TextStr = """" Then TextStr = ""
|
||||
|
||||
If TextStr.StartsWith("""") And TextStr.EndsWith("""") Then
|
||||
TextStr = TextStr.Substring(1, TextStr.Length - 2)
|
||||
End If
|
||||
'If Not TextStr = "" Then
|
||||
ReDim Preserve ArrayValue(ArrayValue.Length)
|
||||
ArrayValue(ArrayValue.Length - 1) = TextStr
|
||||
'End If
|
||||
|
||||
|
||||
ArrayValue(0) = StrLevel
|
||||
ArrayLines(ArrayLines.Length - 1) = ArrayValue
|
||||
ReDim Preserve ArrayLines(ArrayLines.Length)
|
||||
|
||||
'ArrayLevel(Level) = ArrayLevel(Level) - 1
|
||||
ArrayLevel(Level) = 0
|
||||
Level = Level - 1
|
||||
|
||||
ReDim ArrayValue(0)
|
||||
|
||||
StrLevel = ""
|
||||
For j = 0 To Level - 1
|
||||
StrLevel = IIf(StrLevel = "", "", StrLevel + ".") + ArrayLevel(j).ToString
|
||||
Next
|
||||
|
||||
|
||||
Case "Разделитель"
|
||||
|
||||
Dim TextStr = Text.Substring(LastVal + 1, a(0) - LastVal - 1)
|
||||
TextStr = TextStr.Replace("""""", """")
|
||||
If TextStr = """" Then TextStr = ""
|
||||
|
||||
If TextStr.StartsWith("""") And TextStr.EndsWith("""") Then
|
||||
TextStr = TextStr.Substring(1, TextStr.Length - 2)
|
||||
End If
|
||||
|
||||
'If Not TextStr = "" Then
|
||||
ReDim Preserve ArrayValue(ArrayValue.Length)
|
||||
ArrayValue(ArrayValue.Length - 1) = TextStr
|
||||
'End If
|
||||
|
||||
End Select
|
||||
|
||||
LastVal = a(0)
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
Return ArrayLines
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function ParseEventlogString(Text As String)
|
||||
|
||||
Dim ArrayLines(0)
|
||||
|
||||
Dim Text2 = Text.Substring(1, IIf(Text.EndsWith(","), Text.Length - 3, Text.Length - 2)) + ","
|
||||
|
||||
Dim Str = ""
|
||||
|
||||
Dim Delim = Text2.IndexOf(",")
|
||||
Dim i = 0
|
||||
|
||||
While Delim > 0
|
||||
Str = Str + Text2.Substring(0, Delim)
|
||||
Text2 = Text2.Substring(Delim + 1)
|
||||
|
||||
If CountSubstringInString(Str, "{") = CountSubstringInString(Str, "}") _
|
||||
And Math.IEEERemainder(CountSubstringInString(Str, """"), 2) = 0 Then
|
||||
|
||||
ReDim Preserve ArrayLines(i)
|
||||
ArrayLines(i) = Str.Trim
|
||||
i = i + 1
|
||||
Str = ""
|
||||
Else
|
||||
Str = Str + ","
|
||||
End If
|
||||
|
||||
Delim = Text2.IndexOf(",")
|
||||
|
||||
End While
|
||||
|
||||
Return ArrayLines
|
||||
|
||||
End Function
|
||||
|
||||
Shared Function CountSubstringInString(Str As String, SubStr As String)
|
||||
|
||||
CountSubstringInString = (Str.Length - Str.Replace(SubStr, "").Length) / SubStr.Length
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
13
Parser/My Project/Application.Designer.vb
generated
Normal file
13
Parser/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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
|
||||
|
10
Parser/My Project/Application.myapp
Normal file
10
Parser/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>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
35
Parser/My Project/AssemblyInfo.vb
Normal file
35
Parser/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Общие сведения об этой сборке предоставляются следующим набором
|
||||
' атрибутов. Отредактируйте значения этих атрибутов, чтобы изменить
|
||||
' общие сведения об этой сборке.
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("Parser")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("Parser")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
<Assembly: Guid("025b759e-d7dd-4524-957a-c14b44b6dbcc")>
|
||||
|
||||
' Сведения о версии сборки состоят из следующих четырех значений:
|
||||
'
|
||||
' Основной номер версии
|
||||
' Дополнительный номер версии
|
||||
' Номер построения
|
||||
' Редакция
|
||||
'
|
||||
' Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
62
Parser/My Project/Resources.Designer.vb
generated
Normal file
62
Parser/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</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("Parser.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
117
Parser/My Project/Resources.resx
Normal file
117
Parser/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>
|
73
Parser/My Project/Settings.Designer.vb
generated
Normal file
73
Parser/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.17626
|
||||
'
|
||||
' 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", "10.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.Parser.My.MySettings
|
||||
Get
|
||||
Return Global.Parser.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
7
Parser/My Project/Settings.settings
Normal file
7
Parser/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
106
Parser/Parser.vbproj
Normal file
106
Parser/Parser.vbproj
Normal file
@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>
|
||||
</SchemaVersion>
|
||||
<ProjectGuid>{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Parser</RootNamespace>
|
||||
<AssemblyName>Parser</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Parser.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Parser.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>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</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="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>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
247
Service1C/Class1.vb
Normal file
247
Service1C/Class1.vb
Normal file
@ -0,0 +1,247 @@
|
||||
Imports System.IO
|
||||
|
||||
Public Class ServiceDescriptionClass
|
||||
Public Name As String
|
||||
Public DisplayName As String
|
||||
Public Description As String
|
||||
Public PathName As String
|
||||
Public User As String
|
||||
|
||||
Public Debug As Boolean = False
|
||||
Public ExeFile As String = ""
|
||||
Public ClusterFiles As String = ""
|
||||
Public PortAgent As Integer = 1540
|
||||
Public PortMngr As Integer = 1541
|
||||
Public PortProcessBegin As Integer = 1560
|
||||
Public PortProcessEnd As Integer = 1591
|
||||
|
||||
Public Structure Infobases
|
||||
Dim Name As String
|
||||
Dim Description As String
|
||||
Dim GUID As String
|
||||
Dim SizeEventLog As Integer
|
||||
Dim CatalogEventLog As String
|
||||
End Structure
|
||||
|
||||
Public ArrayInfobases() As Infobases
|
||||
|
||||
Sub ParsePath()
|
||||
|
||||
Dim PathNameTemp = PathName.ToLower
|
||||
|
||||
If PathNameTemp.Contains("-debug") _
|
||||
Or PathNameTemp.Contains("/debug") Then
|
||||
|
||||
Debug = True
|
||||
|
||||
PathNameTemp = PathNameTemp.Replace("-debug", "")
|
||||
PathNameTemp = PathNameTemp.Replace("/debug", "")
|
||||
|
||||
End If
|
||||
|
||||
Dim Ind = PathNameTemp.IndexOf("ragent.exe")
|
||||
If Ind > 0 Then
|
||||
ExeFile = PathNameTemp.Substring(0, Ind + 10)
|
||||
ExeFile = ExeFile.Replace("""", "")
|
||||
|
||||
PathNameTemp = PathNameTemp.Substring(Ind + 11)
|
||||
End If
|
||||
|
||||
Ind = PathNameTemp.IndexOf("-regport")
|
||||
If Ind > 0 Then
|
||||
|
||||
Dim PortStr = ""
|
||||
Dim i = 0
|
||||
Dim Simb = PathNameTemp.Substring(Ind + 8 + i, 1)
|
||||
|
||||
While "0123456789 ".Contains(Simb)
|
||||
|
||||
PortStr = PortStr + Simb
|
||||
i = i + 1
|
||||
Simb = PathNameTemp.Substring(Ind + 8 + i, 1)
|
||||
|
||||
End While
|
||||
|
||||
Try
|
||||
PortMngr = Convert.ToInt32(PortStr)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Ind = PathNameTemp.IndexOf("-port")
|
||||
If Ind > 0 Then
|
||||
|
||||
Dim PortStr = ""
|
||||
Dim i = 0
|
||||
Dim Simb = PathNameTemp.Substring(Ind + 5 + i, 1)
|
||||
|
||||
While "0123456789 ".Contains(Simb)
|
||||
|
||||
PortStr = PortStr + Simb
|
||||
i = i + 1
|
||||
Simb = PathNameTemp.Substring(Ind + 5 + i, 1)
|
||||
|
||||
End While
|
||||
|
||||
Try
|
||||
PortAgent = Convert.ToInt32(PortStr)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Ind = PathNameTemp.IndexOf("-range")
|
||||
If Ind > 0 Then
|
||||
|
||||
Dim PortStr = ""
|
||||
Dim i = 0
|
||||
Dim Simb = PathNameTemp.Substring(Ind + 6 + i, 1)
|
||||
|
||||
While "0123456789 :".Contains(Simb)
|
||||
|
||||
PortStr = PortStr + Simb
|
||||
i = i + 1
|
||||
Simb = PathNameTemp.Substring(Ind + 6 + i, 1)
|
||||
|
||||
End While
|
||||
|
||||
Try
|
||||
|
||||
Ind = PortStr.IndexOf(":")
|
||||
PortProcessBegin = Convert.ToInt32(PortStr.Substring(0, Ind))
|
||||
PortProcessEnd = Convert.ToInt32(PortStr.Substring(Ind + 1))
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
End If
|
||||
|
||||
Ind = PathNameTemp.IndexOf("-d")
|
||||
If Ind > 0 Then
|
||||
|
||||
Dim PathStr = PathNameTemp.Substring(Ind + 2)
|
||||
Dim Simb = PathStr.Substring(0, 1)
|
||||
|
||||
While " """.Contains(Simb)
|
||||
|
||||
PathStr = PathStr.Substring(2)
|
||||
Simb = PathStr.Substring(1, 1)
|
||||
|
||||
End While
|
||||
|
||||
Ind = PathStr.IndexOf("""")
|
||||
If Ind > 0 Then
|
||||
ClusterFiles = PathStr.Substring(0, Ind)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'А теперь финт ушами - ищем полученные строки в иходной строке и вырезаем оттуда с корректным регистром
|
||||
Ind = PathName.ToLower.IndexOf(ExeFile)
|
||||
If Ind > 0 Then
|
||||
ExeFile = PathName.Substring(Ind, ExeFile.Length)
|
||||
End If
|
||||
|
||||
Ind = PathName.ToLower.IndexOf(ClusterFiles)
|
||||
If Ind > 0 Then
|
||||
ClusterFiles = PathName.Substring(Ind, ClusterFiles.Length)
|
||||
End If
|
||||
|
||||
'"C:\Program Files\1cv82\8.2.17.153\bin\ragent.exe" -debug -srvc -agent
|
||||
'-regport 2541 -port 2540 -range 2560:2591 -d "C:\Program Files\1cv82\srvinfo"
|
||||
|
||||
End Sub
|
||||
|
||||
Sub GetInfobases()
|
||||
|
||||
Try
|
||||
Dim Catalog = Path.Combine(ClusterFiles, "reg_" + PortMngr.ToString)
|
||||
|
||||
Dim TMP = My.Computer.FileSystem.GetTempFileName()
|
||||
|
||||
'8.2
|
||||
Dim ConfFilePath As String = Path.Combine(Catalog, "1CV8Reg.lst")
|
||||
If My.Computer.FileSystem.FileExists(ConfFilePath) Then
|
||||
My.Computer.FileSystem.CopyFile(ConfFilePath, TMP, True)
|
||||
|
||||
End If
|
||||
|
||||
'8.3
|
||||
ConfFilePath = Path.Combine(Catalog, "1CV8Clst.lst")
|
||||
If My.Computer.FileSystem.FileExists(ConfFilePath) Then
|
||||
My.Computer.FileSystem.CopyFile(ConfFilePath, TMP, True)
|
||||
End If
|
||||
|
||||
Dim Text = My.Computer.FileSystem.ReadAllText(TMP)
|
||||
My.Computer.FileSystem.DeleteFile(TMP)
|
||||
|
||||
Dim Array = Parser.ParserServices.ParsesClass.ParseString(Text)
|
||||
|
||||
Dim i = 0
|
||||
|
||||
For Each a In Array
|
||||
If Not a Is Nothing Then
|
||||
If a.Length = 11 And a(0).StartsWith("1.2.") Then
|
||||
|
||||
Dim IB = New Infobases
|
||||
IB.Name = a(2).ToString
|
||||
IB.GUID = a(1).ToString
|
||||
IB.Description = a(3).ToString
|
||||
IB.SizeEventLog = 0
|
||||
|
||||
Try
|
||||
|
||||
Dim SizeLog As UInt64 = 0
|
||||
Dim CatalogEventLog = Path.Combine(Path.Combine(Catalog, IB.GUID), "1Cv8Log\")
|
||||
|
||||
IB.CatalogEventLog = CatalogEventLog
|
||||
|
||||
If My.Computer.FileSystem.DirectoryExists(CatalogEventLog) Then
|
||||
|
||||
|
||||
|
||||
For Each File In My.Computer.FileSystem.GetFiles(CatalogEventLog)
|
||||
Dim FI = My.Computer.FileSystem.GetFileInfo(File)
|
||||
SizeLog = SizeLog + FI.Length
|
||||
Next
|
||||
|
||||
IB.SizeEventLog = Math.Round(SizeLog / 1024 / 1024, 2)
|
||||
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
ReDim Preserve ArrayInfobases(i)
|
||||
ArrayInfobases(i) = IB
|
||||
|
||||
i = i + 1
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
System.Array.Sort(ArrayInfobases)
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
13
Service1C/My Project/Application.Designer.vb
generated
Normal file
13
Service1C/My Project/Application.Designer.vb
generated
Normal file
@ -0,0 +1,13 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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
|
||||
|
10
Service1C/My Project/Application.myapp
Normal file
10
Service1C/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>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
35
Service1C/My Project/AssemblyInfo.vb
Normal file
35
Service1C/My Project/AssemblyInfo.vb
Normal file
@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' Общие сведения об этой сборке предоставляются следующим набором
|
||||
' атрибутов. Отредактируйте значения этих атрибутов, чтобы изменить
|
||||
' общие сведения об этой сборке.
|
||||
|
||||
' Проверьте значения атрибутов сборки
|
||||
|
||||
<Assembly: AssemblyTitle("Service1C")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("Service1C")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
|
||||
<Assembly: Guid("a5928e4f-33db-4280-9082-ed138f746ea1")>
|
||||
|
||||
' Сведения о версии сборки состоят из следующих четырех значений:
|
||||
'
|
||||
' Основной номер версии
|
||||
' Дополнительный номер версии
|
||||
' Номер построения
|
||||
' Редакция
|
||||
'
|
||||
' Можно задать все значения или принять номер построения и номер редакции по умолчанию,
|
||||
' используя "*", как показано ниже:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
62
Service1C/My Project/Resources.Designer.vb
generated
Normal file
62
Service1C/My Project/Resources.Designer.vb
generated
Normal file
@ -0,0 +1,62 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.17626
|
||||
'
|
||||
' 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.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</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("Service1C.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set(ByVal value As Global.System.Globalization.CultureInfo)
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
117
Service1C/My Project/Resources.resx
Normal file
117
Service1C/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>
|
73
Service1C/My Project/Settings.Designer.vb
generated
Normal file
73
Service1C/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.17626
|
||||
'
|
||||
' 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", "10.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.Service1C.My.MySettings
|
||||
Get
|
||||
Return Global.Service1C.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
7
Service1C/My Project/Settings.settings
Normal file
7
Service1C/My Project/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
112
Service1C/Service1C.vbproj
Normal file
112
Service1C/Service1C.vbproj
Normal file
@ -0,0 +1,112 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>
|
||||
</SchemaVersion>
|
||||
<ProjectGuid>{7261F9CC-9B2F-4FA5-ADD3-9FCF4948623F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Service1C</RootNamespace>
|
||||
<AssemblyName>Service1C</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>Service1C.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>Service1C.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>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</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" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</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="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>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Parser\Parser.vbproj">
|
||||
<Project>{3164BFA8-8AC5-4BC2-965A-15D40B6316AA}</Project>
|
||||
<Name>Parser</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user