initial commit
This commit is contained in:
20
ArinClassV2.sln
Normal file
20
ArinClassV2.sln
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
|
# Visual Studio 2010
|
||||||
|
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ArinClassV2", "ArinClassV2\ArinClassV2.vbproj", "{FC8D5F6B-9892-48A4-BD90-4FA6F427567C}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{FC8D5F6B-9892-48A4-BD90-4FA6F427567C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FC8D5F6B-9892-48A4-BD90-4FA6F427567C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FC8D5F6B-9892-48A4-BD90-4FA6F427567C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FC8D5F6B-9892-48A4-BD90-4FA6F427567C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
BIN
ArinClassV2.suo
Normal file
BIN
ArinClassV2.suo
Normal file
Binary file not shown.
163
ArinClassV2/ArinClassV2.vbproj
Normal file
163
ArinClassV2/ArinClassV2.vbproj
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProductVersion>9.0.30729</ProductVersion>
|
||||||
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
|
<ProjectGuid>{FC8D5F6B-9892-48A4-BD90-4FA6F427567C}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<RootNamespace>ACC</RootNamespace>
|
||||||
|
<AssemblyName>ACC</AssemblyName>
|
||||||
|
<MyType>Windows</MyType>
|
||||||
|
<SignAssembly>false</SignAssembly>
|
||||||
|
<AssemblyOriginatorKeyFile>test.pfx</AssemblyOriginatorKeyFile>
|
||||||
|
<IsWebBootstrapper>true</IsWebBootstrapper>
|
||||||
|
<PublishUrl>http://localhost/CommonClassv2/</PublishUrl>
|
||||||
|
<Install>true</Install>
|
||||||
|
<InstallFrom>Web</InstallFrom>
|
||||||
|
<UpdateEnabled>true</UpdateEnabled>
|
||||||
|
<UpdateMode>Foreground</UpdateMode>
|
||||||
|
<UpdateInterval>7</UpdateInterval>
|
||||||
|
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||||
|
<UpdatePeriodically>false</UpdatePeriodically>
|
||||||
|
<UpdateRequired>false</UpdateRequired>
|
||||||
|
<MapFileExtensions>true</MapFileExtensions>
|
||||||
|
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||||
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
|
<StartupObject>
|
||||||
|
</StartupObject>
|
||||||
|
<DelaySign>true</DelaySign>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
<OldToolsVersion>3.5</OldToolsVersion>
|
||||||
|
<ApplicationRevision>0</ApplicationRevision>
|
||||||
|
<UpgradeBackupLocation>
|
||||||
|
</UpgradeBackupLocation>
|
||||||
|
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||||
|
<TargetFrameworkProfile />
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<DefineDebug>true</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DocumentationFile>
|
||||||
|
</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DefineDebug>false</DefineDebug>
|
||||||
|
<DefineTrace>true</DefineTrace>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\debug\</OutputPath>
|
||||||
|
<DocumentationFile>
|
||||||
|
</DocumentationFile>
|
||||||
|
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355</NoWarn>
|
||||||
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
|
<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.Diagnostics" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Arintool.vb" />
|
||||||
|
<Compile Include="Class1.vb" />
|
||||||
|
<Compile Include="EnDec.vb" />
|
||||||
|
<Compile Include="MyDate.vb" />
|
||||||
|
<Compile Include="Frm_SendMail.Designer.vb">
|
||||||
|
<DependentUpon>Frm_SendMail.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Frm_SendMail.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MailForm.designer.vb">
|
||||||
|
<DependentUpon>MailForm.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MailForm.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Application.myapp</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Resources.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DesignTime>True</DesignTime>
|
||||||
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="My Project\Settings.Designer.vb">
|
||||||
|
<AutoGen>True</AutoGen>
|
||||||
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MyAuth.vb" />
|
||||||
|
<Compile Include="MYGDI.vb" />
|
||||||
|
<Compile Include="MyINI.vb" />
|
||||||
|
<Compile Include="MyMail.vb" />
|
||||||
|
<Compile Include="MyNet.vb" />
|
||||||
|
<Compile Include="MyParser.vb" />
|
||||||
|
<Compile Include="MyPath.vb" />
|
||||||
|
<Compile Include="MyProcess.vb" />
|
||||||
|
<Compile Include="MyReg.vb" />
|
||||||
|
<Compile Include="MyString.vb" />
|
||||||
|
<Compile Include="MyXml.vb" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="Frm_SendMail.resx">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<DependentUpon>Frm_SendMail.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="MailForm.resx">
|
||||||
|
<DependentUpon>MailForm.vb</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</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="app.config" />
|
||||||
|
<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="test.pfx" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||||
|
<Visible>False</Visible>
|
||||||
|
<ProductName>.NET Framework 2.0</ProductName>
|
||||||
|
<Install>true</Install>
|
||||||
|
</BootstrapperPackage>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\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>
|
||||||
140
ArinClassV2/Arintool.vb
Normal file
140
ArinClassV2/Arintool.vb
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
Public Class Arintool
|
||||||
|
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
|
||||||
|
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpDownFileName As String) As Integer
|
||||||
|
|
||||||
|
Structure UserINfo
|
||||||
|
Dim Auth As Boolean
|
||||||
|
Dim Name As String
|
||||||
|
Dim IP As String
|
||||||
|
Dim Mac As String
|
||||||
|
Dim OverDate As Date
|
||||||
|
Dim Level As Short
|
||||||
|
Dim Admin As Boolean
|
||||||
|
End Structure
|
||||||
|
|
||||||
|
Public CurIP As String
|
||||||
|
Public CurMac As String
|
||||||
|
Public AuthInfo As String
|
||||||
|
Public AuthUser As UserINfo
|
||||||
|
|
||||||
|
Public Function GetAuthInfo() As UserINfo
|
||||||
|
Try
|
||||||
|
Dim UserInfo() As String = GetAuth().Split("%") '//인증정보를 얻어옵니다
|
||||||
|
|
||||||
|
'MsgBox("getauthuinfo text")
|
||||||
|
|
||||||
|
AuthUser.Auth = CBool(UserInfo(0))
|
||||||
|
AuthUser.Name = UserInfo(1)
|
||||||
|
AuthUser.IP = UserInfo(2)
|
||||||
|
AuthUser.Mac = UserInfo(3)
|
||||||
|
AuthUser.OverDate = UserInfo(4)
|
||||||
|
AuthUser.Level = CShort(UserInfo(5))
|
||||||
|
'AuthUser.Level = 1
|
||||||
|
AuthUser.Admin = CBool(UserInfo(6))
|
||||||
|
Return AuthUser
|
||||||
|
Catch
|
||||||
|
AuthUser.IP = CurIP
|
||||||
|
AuthUser.Mac = CurMac
|
||||||
|
AuthUser.Auth = False
|
||||||
|
AuthUser.Name = "정보없음"
|
||||||
|
AuthUser.Level = 0
|
||||||
|
AuthUser.Admin = False
|
||||||
|
Return AuthUser
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetAuth() As String
|
||||||
|
Dim Result As String
|
||||||
|
Dim TargetFn As String = My.Application.Info.DirectoryPath & "\temp\TempDat.dat"
|
||||||
|
CurIP = MyNet.GetLocalHostIP() '//IP도 보내준다.
|
||||||
|
CurMac = MyNet.GetMacAddr() '//현재 맥주소를 가져온다
|
||||||
|
If Not DownAuthInfo() Then Return vbNullString '//파일이 다운되었다면 인증을 체크한다
|
||||||
|
If Not PROC_AUTH() Then Return vbNullString
|
||||||
|
If Not Check_UserAuth() Then Return vbNullString
|
||||||
|
System.IO.File.Delete(TargetFn)
|
||||||
|
Result = AuthUser.Auth & "%" & AuthUser.Name & "%" & AuthUser.IP & "%" & AuthUser.Mac & "%" & AuthUser.OverDate _
|
||||||
|
& "%" & AuthUser.Level & "%" & AuthUser.Admin
|
||||||
|
'MsgBox(Result)
|
||||||
|
|
||||||
|
Return Result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function Check_UserAuth() As Boolean
|
||||||
|
Dim CurDate As Date = Now.Date
|
||||||
|
Dim Result As Boolean
|
||||||
|
'AuthUser.Auth = False
|
||||||
|
Result = IIf(AuthUser.Auth = True AndAlso AuthUser.OverDate >= CurDate AndAlso AuthUser.Level > 0, True, False)
|
||||||
|
Return Result
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function DownAuthInfo(Optional ByVal DnAddress As String = "http://myhome.naver.com/tindevil/NEWPART2.DAT") As Boolean
|
||||||
|
'Dim DnAddress As String = "http://myhome.naver.com/tindevil/NEWPART2.DAT" '//파일명이거 대소문자 가리네;;-_-;
|
||||||
|
Dim TargetFn As String = My.Application.Info.DirectoryPath & "\temp\TempDat.dat"
|
||||||
|
Dim NetDown As New System.Net.WebClient
|
||||||
|
If Not FileIO.FileSystem.DirectoryExists(My.Application.Info.DirectoryPath & "\temp") Then FileIO.FileSystem.CreateDirectory(My.Application.Info.DirectoryPath & "\temp")
|
||||||
|
Try
|
||||||
|
NetDown.DownloadFile(DnAddress, TargetFn)
|
||||||
|
Return FileIO.FileSystem.FileExists(TargetFn)
|
||||||
|
Catch
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function PROC_AUTH() As Boolean '//인증과정
|
||||||
|
Dim TargetFn As String = My.Application.Info.DirectoryPath & "\temp\TempDat.dat"
|
||||||
|
Dim BUF As String
|
||||||
|
Dim Cnt As Integer = 0
|
||||||
|
Dim FH As Short
|
||||||
|
|
||||||
|
FH = FreeFile()
|
||||||
|
FileOpen(FH, TargetFn, OpenMode.Input)
|
||||||
|
Do While Not EOF(FH)
|
||||||
|
Cnt = Cnt + 1
|
||||||
|
BUF = LineInput(FH)
|
||||||
|
|
||||||
|
If Cnt = 1 AndAlso BUF <> "#ARANTOOLAUTH" Then '//첫줄은 제대로된 파일인지를 검사합니다
|
||||||
|
'MsgBox("첫줄실패")
|
||||||
|
FileClose(FH)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not (BUF.Trim = "" OrElse BUF.Substring(0, 1) = "#") Then
|
||||||
|
If CHECK_AUTH(BUF) Then
|
||||||
|
FileClose(FH)
|
||||||
|
'MsgBox("인증완료됨")
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Loop
|
||||||
|
FileClose(FH)
|
||||||
|
' MsgBox("사용자없음")
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function CHECK_AUTH(ByVal INBUF As String) As Boolean
|
||||||
|
Dim TempVar() As String = INBUF.Split("|")
|
||||||
|
|
||||||
|
If (TempVar Is Nothing) Or (TempVar.GetUpperBound(0) < 3) Then Return False
|
||||||
|
If CurMac Is vbNullString Then Return False
|
||||||
|
|
||||||
|
Try
|
||||||
|
If CurMac.ToUpper = TempVar(1).ToUpper Then
|
||||||
|
AuthUser.Auth = True
|
||||||
|
AuthUser.IP = CurIP
|
||||||
|
AuthUser.Mac = CurMac
|
||||||
|
AuthUser.Name = TempVar(2)
|
||||||
|
AuthUser.OverDate = CType(TempVar(3), Date)
|
||||||
|
AuthUser.Level = CShort(TempVar(4))
|
||||||
|
If AuthUser.Level = 10 Then AuthUser.Admin = True
|
||||||
|
'AuthUser.Level = 1
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Catch
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
458
ArinClassV2/Class1.vb
Normal file
458
ArinClassV2/Class1.vb
Normal file
@@ -0,0 +1,458 @@
|
|||||||
|
Imports Microsoft.Win32
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Net.NetworkInformation
|
||||||
|
Imports System.Net
|
||||||
|
Imports System.Net.Dns
|
||||||
|
Imports System.net.Mail
|
||||||
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
|
Public Class ARINCLASS
|
||||||
|
Structure s_userinfo
|
||||||
|
Dim uid As Short
|
||||||
|
Dim id As String
|
||||||
|
Dim pass As String
|
||||||
|
Dim name As String
|
||||||
|
Dim tel As String
|
||||||
|
Dim email As String
|
||||||
|
End Structure
|
||||||
|
|
||||||
|
|
||||||
|
Public Shared Sub SaveLoad_FrmSetting(ByVal Frm As Form, Optional ByVal Save As Boolean = False, Optional ByVal RestoreStatus As Boolean = False)
|
||||||
|
'//폼의 상태를 저장합니다.
|
||||||
|
'If Frm.FormBorderStyle <> FormBorderStyle.Sizable AndAlso Frm.FormBorderStyle <> FormBorderStyle.SizableToolWindow Then Return
|
||||||
|
|
||||||
|
Dim Width As Short
|
||||||
|
Dim Height As Short
|
||||||
|
Dim State As Short
|
||||||
|
Dim Left, Top As Short
|
||||||
|
If Save Then
|
||||||
|
Dim INI As New MyINI(My.Application.Info.DirectoryPath & "\Frm_Setting.ini")
|
||||||
|
INI.Write(Frm.Name, "state", Frm.WindowState)
|
||||||
|
INI.Write(Frm.Name, "width", Frm.Width)
|
||||||
|
INI.Write(Frm.Name, "height", Frm.Height)
|
||||||
|
INI.Write(Frm.Name, "left", Frm.Left)
|
||||||
|
INI.Write(Frm.Name, "top", Frm.Top)
|
||||||
|
Else
|
||||||
|
Dim INI As New MyINI(My.Application.Info.DirectoryPath & "\Frm_Setting.ini")
|
||||||
|
If Frm.WindowState = FormWindowState.Normal Then
|
||||||
|
Width = INI.Read(Frm.Name, "width", 0)
|
||||||
|
Height = INI.Read(Frm.Name, "height", 0)
|
||||||
|
State = INI.Read(Frm.Name, "state", -1)
|
||||||
|
Left = INI.Read(Frm.Name, "left", 0)
|
||||||
|
Top = INI.Read(Frm.Name, "top", 0)
|
||||||
|
If Width <> 0 Then Frm.Width = Width
|
||||||
|
If Height <> 0 Then Frm.Height = Height
|
||||||
|
If RestoreStatus Then If State <> -1 Then Frm.WindowState = State
|
||||||
|
If Left <> 0 Then Frm.Left = Left
|
||||||
|
If Top <> 0 Then Frm.Top = Top
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Function GetMacAddr() As String '//MAC주소를 볼수있다.
|
||||||
|
Dim computerProperties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
|
||||||
|
Dim nics As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
|
||||||
|
Dim 출력용 As String = vbNullString
|
||||||
|
Dim 카드타입 As String = vbNullString
|
||||||
|
Dim 맥주소 As String = vbNullString
|
||||||
|
Dim 임시맥주소 As String = vbNullString
|
||||||
|
|
||||||
|
For Each Adp As NetworkInterface In nics
|
||||||
|
카드타입 = Adp.NetworkInterfaceType.ToString.ToUpper.Trim
|
||||||
|
맥주소 = Adp.GetPhysicalAddress.ToString.ToUpper.Trim
|
||||||
|
If 카드타입 = "ETHERNET" Then
|
||||||
|
If 임시맥주소 = "" Then
|
||||||
|
임시맥주소 = 맥주소
|
||||||
|
End If
|
||||||
|
If 임시맥주소 <> "" AndAlso 임시맥주소.Substring(0, 11) <> "005056C0000" Then
|
||||||
|
출력용 = 임시맥주소
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If 출력용 = vbNullString And 맥주소 = vbNullString Then
|
||||||
|
Return "UNKNOWN"
|
||||||
|
ElseIf 출력용 <> vbNullString Then
|
||||||
|
Return (출력용)
|
||||||
|
Else
|
||||||
|
Return (임시맥주소)
|
||||||
|
End If
|
||||||
|
End Function 'DisplayTypeAndAddress
|
||||||
|
|
||||||
|
Public Function GetLocalHostIP() As String '//ip주소보기
|
||||||
|
Dim objAddress() As IPAddress
|
||||||
|
Dim IA As IPAddress
|
||||||
|
Dim B(15) As Byte
|
||||||
|
Dim sAns As String = vbNullString
|
||||||
|
Try
|
||||||
|
objAddress = Dns.GetHostEntry(GetHostName).AddressList
|
||||||
|
|
||||||
|
For Each IA In objAddress '//모든 ip를 테스트한다.리얼아이피를 찾는다.
|
||||||
|
If IA.ToString.IndexOf(":") = -1 AndAlso IA.ToString.Substring(0, 3) <> "192" AndAlso _
|
||||||
|
IA.ToString.Substring(0, 3) <> "168" AndAlso _
|
||||||
|
IA.ToString.Substring(0, 3) <> "127" Then
|
||||||
|
sAns = IA.ToString
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If sAns = vbNullString Then
|
||||||
|
For Each IA In objAddress '//모든 ip를 테스트한다.리얼아이피를 찾는다.
|
||||||
|
If IA.ToString.IndexOf(":") = -1 Then
|
||||||
|
sAns = IA.ToString
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
sAns = vbNullString
|
||||||
|
End Try
|
||||||
|
Return sAns
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function OpenFile(Optional ByVal IniFile As String = "", Optional ByVal ExtFilter As String = "모든파일|*.*") As String
|
||||||
|
Dim OD As New OpenFileDialog
|
||||||
|
'OD.InitialDirectory = IIf(IniFile = "", My.Application.Info.DirectoryPath, INitdir)
|
||||||
|
OD.FileName = IniFile
|
||||||
|
OD.Filter = ExtFilter
|
||||||
|
OD.FilterIndex = 0
|
||||||
|
|
||||||
|
If OD.ShowDialog <> DialogResult.OK Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return OD.FileName
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Sub NOTICE(ByVal MSG As String, ByVal Src As Object)
|
||||||
|
On Error Resume Next
|
||||||
|
If Src.GetType.Name.ToUpper = "TOOLSTRIPSTATUSLABEL" Then
|
||||||
|
CType(Src, Windows.Forms.ToolStripStatusLabel).Text = "▶ " & MSG & Space(1)
|
||||||
|
ElseIf Src.GetType.Name.ToUpper = "LABEL" Then
|
||||||
|
CType(Src, Windows.Forms.Label).Text = "▶ " & MSG & Space(1)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Public Shared Sub NOTICE(ByVal MSG As String, ByVal FCOLOR As Drawing.Color, ByVal Src As Windows.Forms.ToolStripStatusLabel)
|
||||||
|
Src.Text = "▶ " & MSG & Space(1)
|
||||||
|
Src.ForeColor = FCOLOR
|
||||||
|
End Sub
|
||||||
|
Public Shared Sub NOTICE(ByVal MSG As String, ByVal Src As Windows.Forms.ToolStripStatusLabel, ByVal FCOLOR As Drawing.Color)
|
||||||
|
Src.Text = "▶ " & MSG & Space(1) & "[" & Format(Now, "HH시mm분ss초") & "]"
|
||||||
|
Src.ForeColor = FCOLOR
|
||||||
|
If FCOLOR = Drawing.Color.Red Then My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 폼을 표시합니다.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="fForm"></param>
|
||||||
|
''' <param name="MdiMainForm"></param>
|
||||||
|
''' <param name="MODALFORM"></param>
|
||||||
|
''' <param name="Fstate"></param>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Shared Sub ShowForm(ByVal fForm As System.Windows.Forms.Form, ByVal MdiMainForm As System.Windows.Forms.Form, Optional ByVal MODALFORM As Boolean = False, Optional ByVal Fstate As System.Windows.Forms.FormWindowState = System.Windows.Forms.FormWindowState.Normal)
|
||||||
|
Dim objForms As System.Windows.Forms.Form
|
||||||
|
Dim ALREADY As Boolean = False
|
||||||
|
|
||||||
|
If MdiMainForm Is Nothing Then
|
||||||
|
If MODALFORM Then
|
||||||
|
fForm.ShowDialog()
|
||||||
|
Else
|
||||||
|
fForm.Show()
|
||||||
|
End If
|
||||||
|
fForm.Activate()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
Try
|
||||||
|
For Each objForms In MdiMainForm.MdiChildren
|
||||||
|
If objForms.Name = fForm.Name Then
|
||||||
|
ALREADY = True
|
||||||
|
'fForm.Dispose()
|
||||||
|
'fForm = Nothing
|
||||||
|
objForms.Focus()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Catch ex As Exception
|
||||||
|
|
||||||
|
End Try
|
||||||
|
|
||||||
|
If ALREADY = False Then
|
||||||
|
With fForm
|
||||||
|
If MdiMainForm Is Nothing Then
|
||||||
|
MsgBox("MDI 부모폼이 존재하지않습니다", MsgBoxStyle.Critical, "error")
|
||||||
|
Else
|
||||||
|
If Not MdiMainForm Is Nothing Then
|
||||||
|
.MdiParent = MdiMainForm
|
||||||
|
'.StartPosition = FormStartPosition.CenterParent
|
||||||
|
End If
|
||||||
|
.WindowState = Fstate
|
||||||
|
If MODALFORM Then
|
||||||
|
.ShowDialog()
|
||||||
|
Else
|
||||||
|
.Show()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End With
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 동일한 프로세스가 존재하는지 확인합니다.
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function PrevInstance() As Boolean
|
||||||
|
If UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 메세지박스입니다. 내부메세지중 \n 과 \N 을 줄바꿈으로 처리합니다
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="prompt"></param>
|
||||||
|
''' <param name="but"></param>
|
||||||
|
''' <param name="title"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Shared Function MSG(ByVal prompt As Object, Optional ByVal but As Microsoft.VisualBasic.MsgBoxStyle = MsgBoxStyle.OkOnly, Optional ByVal title As Object = Nothing) As MsgBoxResult
|
||||||
|
prompt = prompt.ToString.Replace("\n", vbCrLf)
|
||||||
|
prompt = prompt.ToString.Replace("\N", vbCrLf)
|
||||||
|
Return MsgBox(prompt, but, title)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function SendErrMaili(ByVal msg As String, ByVal type As String, ByVal info As Arintool.UserINfo) As Boolean
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim mailobj As New MailMessage
|
||||||
|
Dim A As New Text.StringBuilder
|
||||||
|
A.AppendLine("===============")
|
||||||
|
A.AppendLine("USER:" & info.Name)
|
||||||
|
A.AppendLine("IP:" & info.IP)
|
||||||
|
A.AppendLine("MAC:" & info.Mac)
|
||||||
|
A.AppendLine("LEVEL:" & info.Level)
|
||||||
|
A.AppendLine("Date:" & info.OverDate)
|
||||||
|
|
||||||
|
mailobj = New MailMessage("tinsky82.cafe24.com", "deviltin@xt.to")
|
||||||
|
mailobj.Body = msg & vbCrLf & A.ToString
|
||||||
|
mailobj.Subject = "◆ 처리되지않은예외 ◆ : " & type
|
||||||
|
mailobj.IsBodyHtml = True
|
||||||
|
|
||||||
|
If type.ToUpper = "GSFEDITOR" Then PrepareAttach(mailobj) '//이게에러나면 스트럭쳐폴더를 보낸다.
|
||||||
|
|
||||||
|
Dim c As New SmtpClient("mail.xtto.net")
|
||||||
|
c.Send(mailobj)
|
||||||
|
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
'MsgBox(ex.Message.ToString)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Private Function PrepareAttach(ByVal Obj As MailMessage) As Boolean
|
||||||
|
Try
|
||||||
|
Dim A As New DirectoryInfo(My.Application.Info.DirectoryPath & "\structure")
|
||||||
|
Dim NMA As Net.Mail.Attachment
|
||||||
|
Dim FI As FileInfo()
|
||||||
|
Dim FIS As FileInfo
|
||||||
|
If A.Exists = False Then Return False
|
||||||
|
FI = A.GetFiles("*.*")
|
||||||
|
For Each FIS In FI
|
||||||
|
If FIS.Exists Then
|
||||||
|
'MsgBox(FIS.FullName)
|
||||||
|
NMA = New Net.Mail.Attachment(FIS.FullName)
|
||||||
|
Obj.Attachments.Add(NMA)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
Catch
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Function GetRealScriptPath(ByVal OrgPath As String) As String
|
||||||
|
Dim Aran As New MyPath
|
||||||
|
Dim RealPath As String = OrgPath.ToUpper
|
||||||
|
|
||||||
|
If (RealPath.IndexOf("[APP]")) > -1 Then
|
||||||
|
RealPath = RealPath.Replace("[APP]", My.Application.Info.DirectoryPath)
|
||||||
|
ElseIf (RealPath.IndexOf("[SYSTEM]")) > -1 Then
|
||||||
|
RealPath = RealPath.Replace("[SYSTEM]", Aran.System32)
|
||||||
|
ElseIf (RealPath.IndexOf("[DESKTOP]")) > -1 Then
|
||||||
|
RealPath = RealPath.Replace("[DESKTOP]", Aran.DesktopPath)
|
||||||
|
ElseIf (RealPath.IndexOf("[MYDOCUMENT]")) > -1 Then
|
||||||
|
RealPath = RealPath.Replace("[MYDOCUMENT]", Aran.Mydocument)
|
||||||
|
ElseIf (RealPath.IndexOf("[WINDOWS]")) > -1 Then
|
||||||
|
RealPath = RealPath.Replace("[WINDOWS]", Aran.Windows)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return RealPath
|
||||||
|
End Function
|
||||||
|
Public Sub WLog(ByVal msg As String, ByVal fname As String)
|
||||||
|
'//로그를 기록합니다.
|
||||||
|
Dim FD As String = My.Application.Info.DirectoryPath & "\LOG"
|
||||||
|
If Not Directory.Exists(FD) Then Directory.CreateDirectory(FD)
|
||||||
|
Dim FS As FileStream = New FileStream(FD & fname, FileMode.Append)
|
||||||
|
Dim SW As StreamWriter = New StreamWriter(FS, System.Text.Encoding.Default)
|
||||||
|
SW.WriteLine(Now.TimeOfDay.ToString & ":" & msg)
|
||||||
|
SW.Flush()
|
||||||
|
SW.Close()
|
||||||
|
FS.Close()
|
||||||
|
End Sub
|
||||||
|
Public Sub WLog2(ByVal enable As Boolean, ByVal msg As String, ByVal fname As String)
|
||||||
|
'//로그를 기록합니다.
|
||||||
|
If Not enable Then Return
|
||||||
|
Dim FD As String = My.Application.Info.DirectoryPath & "\LOG"
|
||||||
|
If Not Directory.Exists(FD) Then Directory.CreateDirectory(FD)
|
||||||
|
Dim FS As FileStream = New FileStream(FD & fname, FileMode.Append)
|
||||||
|
Dim SW As StreamWriter = New StreamWriter(FS, System.Text.Encoding.Default)
|
||||||
|
SW.WriteLine(Now.TimeOfDay.ToString & ":" & msg)
|
||||||
|
SW.Flush()
|
||||||
|
SW.Close()
|
||||||
|
FS.Close()
|
||||||
|
End Sub
|
||||||
|
Shared Sub Log(ByVal msg As String)
|
||||||
|
'//로그를 기록합니다.
|
||||||
|
Dim FD As String = My.Application.Info.DirectoryPath & "\LOG"
|
||||||
|
If Not Directory.Exists(FD) Then Directory.CreateDirectory(FD)
|
||||||
|
Dim FS As FileStream = New FileStream(FD & "\log.txt", FileMode.Append)
|
||||||
|
Dim SW As StreamWriter = New StreamWriter(FS, System.Text.Encoding.Default)
|
||||||
|
SW.WriteLine(Now.TimeOfDay.ToString & ":" & msg)
|
||||||
|
SW.Flush()
|
||||||
|
SW.Close()
|
||||||
|
FS.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function TextEnc(ByVal SrcText As String) As String
|
||||||
|
If SrcText = "" Then Return ""
|
||||||
|
|
||||||
|
Dim Ec As New System.Text.UnicodeEncoding
|
||||||
|
Dim Msg1 As New System.Text.StringBuilder
|
||||||
|
For Each bi As Byte In Ec.GetBytes(SrcText)
|
||||||
|
Msg1.Append(bi.ToString & ",")
|
||||||
|
Next
|
||||||
|
Msg1.Remove(Msg1.Length - 1, 1)
|
||||||
|
Return Msg1.ToString
|
||||||
|
End Function
|
||||||
|
Public Function TextDec(ByVal srctext As String) As String
|
||||||
|
Dim Ec As New System.Text.UnicodeEncoding
|
||||||
|
Dim Z(srctext.Split(",").GetUpperBound(0)) As Byte
|
||||||
|
Dim i As Int16 = 0
|
||||||
|
For Each aa As String In srctext.ToString.Split(",")
|
||||||
|
Z(i) = CType(aa, Byte)
|
||||||
|
i += 1
|
||||||
|
Next
|
||||||
|
Return Ec.GetString(Z)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub Run_MyScript(ByVal ScriptFile As String)
|
||||||
|
Dim strtemp As String = New String(Chr(0), 200) 'ini파일의 임시 변수
|
||||||
|
If Not File.Exists(ScriptFile) Then Exit Sub
|
||||||
|
|
||||||
|
Dim FS As FileStream = New FileStream(ScriptFile, FileMode.Open)
|
||||||
|
Dim SR As StreamReader = New StreamReader(FS)
|
||||||
|
|
||||||
|
While SR.Peek > -1
|
||||||
|
Parse_MyScript(SR.ReadLine)
|
||||||
|
End While
|
||||||
|
SR.Close()
|
||||||
|
FS.Close()
|
||||||
|
|
||||||
|
File.Delete(ScriptFile)
|
||||||
|
End Sub
|
||||||
|
Private Sub Parse_MyScript(ByVal SCript As String)
|
||||||
|
Dim 임시버퍼() As String = SCript.Split("/")
|
||||||
|
Dim 임시문자열버퍼(3) As String
|
||||||
|
Dim PARAM1 As String = vbNullString
|
||||||
|
Dim PARAM2 As String = vbNullString
|
||||||
|
Dim PARAM3 As String = vbNullString
|
||||||
|
Dim PARAM4 As String = vbNullString
|
||||||
|
Dim J As Short
|
||||||
|
Dim Aran As New MyReG
|
||||||
|
Dim AranPrc As New MyProcess
|
||||||
|
|
||||||
|
Select Case 임시버퍼(0).ToUpper
|
||||||
|
Case "MBOX"
|
||||||
|
For J = 0 To Len(임시버퍼(1)) - 1
|
||||||
|
임시문자열버퍼(0) = IIf(임시버퍼(1).Substring(J, 1) <> "\", 임시문자열버퍼(0) & 임시버퍼(1).Substring(J, 1), 임시문자열버퍼(0) & vbCrLf)
|
||||||
|
Next J
|
||||||
|
MsgBox(임시문자열버퍼(0), MsgBoxStyle.Information, "알림")
|
||||||
|
|
||||||
|
Case "RUN" '//파일실행 스크립트(완료)
|
||||||
|
PARAM1 = GetRealScriptPath(임시버퍼(1))
|
||||||
|
If Not AranPrc.RunProcess(PARAM1) Then
|
||||||
|
'MsgBox("실행할 파일이 존재하지 않습니다", MsgBoxStyle.Critical, "스크립트실패")
|
||||||
|
Else
|
||||||
|
AranPrc.RunProcess(PARAM1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "COPY" '//파일복사(완료)
|
||||||
|
|
||||||
|
PARAM1 = GetRealScriptPath(임시버퍼(1))
|
||||||
|
PARAM2 = GetRealScriptPath(임시버퍼(2))
|
||||||
|
|
||||||
|
If Not File.Exists(PARAM1) Then
|
||||||
|
'MsgBox("복사할PARAM1이 존재하지 않습니다", MsgBoxStyle.Critical, "스크립트실패")
|
||||||
|
|
||||||
|
Else
|
||||||
|
File.Copy(PARAM1, PARAM2, True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "DEL" '//파일삭제(완료)
|
||||||
|
PARAM1 = GetRealScriptPath(임시버퍼(1))
|
||||||
|
|
||||||
|
If Not File.Exists(PARAM1) Then
|
||||||
|
'MsgBox("삭제할 파일이 존재하지않습니다", MsgBoxStyle.Critical, "스크립트실패")
|
||||||
|
Else
|
||||||
|
File.Delete(PARAM1)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "MOVE" '//파일이동
|
||||||
|
PARAM1 = GetRealScriptPath(임시버퍼(1))
|
||||||
|
PARAM2 = GetRealScriptPath(임시버퍼(2))
|
||||||
|
|
||||||
|
If File.Exists(PARAM2) Then File.Delete(PARAM2) '//대상파일이 있으면 삭제한다.
|
||||||
|
|
||||||
|
If File.Exists(PARAM1) Then
|
||||||
|
File.Move(PARAM1, PARAM2)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "REGWRITE"
|
||||||
|
PARAM1 = (임시버퍼(1))
|
||||||
|
PARAM2 = (임시버퍼(2))
|
||||||
|
PARAM3 = (임시버퍼(3))
|
||||||
|
PARAM4 = (임시버퍼(4))
|
||||||
|
If IsNumeric(PARAM4) = True Then
|
||||||
|
Aran.Write(PARAM1, PARAM2, PARAM3, CInt(PARAM4))
|
||||||
|
Else
|
||||||
|
Aran.Write(PARAM1, PARAM2, PARAM3, PARAM4)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "REGDELKEY" '//키삭제 하위키까지 모조리삭제
|
||||||
|
PARAM1 = (임시버퍼(1))
|
||||||
|
PARAM2 = (임시버퍼(2))
|
||||||
|
Aran.DeleteKey(PARAM1, PARAM2)
|
||||||
|
|
||||||
|
Case "REGDELVAL" '//값 삭제
|
||||||
|
PARAM1 = (임시버퍼(1))
|
||||||
|
PARAM2 = (임시버퍼(2))
|
||||||
|
PARAM3 = (임시버퍼(3))
|
||||||
|
Aran.DeleteVal(PARAM1, PARAM2, PARAM3)
|
||||||
|
Case Else
|
||||||
|
'MsgBox("알수없는 스크립트:" & SCript)
|
||||||
|
'Me.WLog("알수없는스크립트:" & SCript, "\script.txt")
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
137
ArinClassV2/EnDec.vb
Normal file
137
ArinClassV2/EnDec.vb
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
Imports System.Security.Cryptography
|
||||||
|
|
||||||
|
Public Class EnDec
|
||||||
|
|
||||||
|
Private TripleDes As New TripleDESCryptoServiceProvider
|
||||||
|
Sub New(ByVal key As String)
|
||||||
|
' Initialize the crypto provider.
|
||||||
|
TripleDes.Key = TruncateHash(key, TripleDes.KeySize \ 8)
|
||||||
|
TripleDes.IV = TruncateHash("", TripleDes.BlockSize \ 8)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function TruncateHash( _
|
||||||
|
ByVal key As String, _
|
||||||
|
ByVal length As Integer) _
|
||||||
|
As Byte()
|
||||||
|
|
||||||
|
Dim sha1 As New SHA1CryptoServiceProvider
|
||||||
|
|
||||||
|
' Hash the key.
|
||||||
|
Dim keyBytes() As Byte = _
|
||||||
|
System.Text.Encoding.Unicode.GetBytes(key)
|
||||||
|
Dim hash() As Byte = sha1.ComputeHash(keyBytes)
|
||||||
|
|
||||||
|
' Truncate or pad the hash.
|
||||||
|
ReDim Preserve hash(length - 1)
|
||||||
|
Return hash
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 문자열의 암호화
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="plaintext"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function EncryptData( _
|
||||||
|
ByVal plaintext As String) _
|
||||||
|
As String
|
||||||
|
|
||||||
|
' Convert the plaintext string to a byte array.
|
||||||
|
Dim plaintextBytes() As Byte = _
|
||||||
|
System.Text.Encoding.Unicode.GetBytes(plaintext)
|
||||||
|
|
||||||
|
' Create the stream.
|
||||||
|
Dim ms As New System.IO.MemoryStream
|
||||||
|
' Create the encoder to write to the stream.
|
||||||
|
Dim encStream As New CryptoStream(ms, _
|
||||||
|
TripleDes.CreateEncryptor(), _
|
||||||
|
System.Security.Cryptography.CryptoStreamMode.Write)
|
||||||
|
|
||||||
|
' Use the crypto stream to write the byte array to the stream.
|
||||||
|
encStream.Write(plaintextBytes, 0, plaintextBytes.Length)
|
||||||
|
encStream.FlushFinalBlock()
|
||||||
|
|
||||||
|
' Convert the encrypted stream to a printable string.
|
||||||
|
Return Convert.ToBase64String(ms.ToArray)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 복호화'
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="encryptedtext"></param>
|
||||||
|
''' <returns></returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function DecryptData( _
|
||||||
|
ByVal encryptedtext As String) _
|
||||||
|
As String
|
||||||
|
|
||||||
|
' Convert the encrypted text string to a byte array.
|
||||||
|
Dim encryptedBytes() As Byte = Convert.FromBase64String(encryptedtext)
|
||||||
|
|
||||||
|
' Create the stream.
|
||||||
|
Dim ms As New System.IO.MemoryStream
|
||||||
|
' Create the decoder to write to the stream.
|
||||||
|
Dim decStream As New CryptoStream(ms, _
|
||||||
|
TripleDes.CreateDecryptor(), _
|
||||||
|
System.Security.Cryptography.CryptoStreamMode.Write)
|
||||||
|
|
||||||
|
' Use the crypto stream to write the byte array to the stream.
|
||||||
|
decStream.Write(encryptedBytes, 0, encryptedBytes.Length)
|
||||||
|
decStream.FlushFinalBlock()
|
||||||
|
|
||||||
|
' Convert the plaintext stream to a string.
|
||||||
|
Return System.Text.Encoding.Unicode.GetString(ms.ToArray, 0, ms.Length)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 파일로부터 문자열을 읽어옵니다.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Filename"></param>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function Read_STring(ByVal Filename As String) As String
|
||||||
|
Dim FI As New System.IO.FileInfo(Filename)
|
||||||
|
If FI.Exists = False Then
|
||||||
|
MsgBox("필수파일이 존재하지않습니다", MsgBoxStyle.Critical, "확인")
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim FS As New System.IO.FileStream(FI.FullName, IO.FileMode.Open)
|
||||||
|
Dim SR As New System.IO.StreamReader(FS, System.Text.Encoding.Default)
|
||||||
|
|
||||||
|
Dim cipherText As String = SR.ReadToEnd
|
||||||
|
SR.Close()
|
||||||
|
FS.Close()
|
||||||
|
|
||||||
|
' DecryptData throws if the wrong password is used.
|
||||||
|
Try
|
||||||
|
Dim plainText As String = DecryptData(cipherText)
|
||||||
|
Return plainText
|
||||||
|
'MsgBox("해독값은? " & plainText)
|
||||||
|
Catch ex As System.Security.Cryptography.CryptographicException
|
||||||
|
Return ""
|
||||||
|
MsgBox("암호화키가 일치하지않거나 기타 오류입니다")
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 파일에 해당 문자열을 기록합니다.
|
||||||
|
''' </summary>
|
||||||
|
''' <param name="Filename"></param>
|
||||||
|
''' <param name="Contents"></param>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Sub Write_String(ByVal Filename As String, ByVal Contents As String)
|
||||||
|
Dim cipherText As String = EncryptData(Contents)
|
||||||
|
|
||||||
|
Dim FI As New System.IO.FileInfo(Filename)
|
||||||
|
Dim FS As New System.IO.FileStream(FI.FullName, IO.FileMode.Create)
|
||||||
|
Dim SW As New System.IO.StreamWriter(FS, System.Text.Encoding.Default)
|
||||||
|
'MsgBox("암호화된값은? " & cipherText)
|
||||||
|
SW.Write(cipherText)
|
||||||
|
SW.Flush()
|
||||||
|
SW.Close()
|
||||||
|
FS.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
86
ArinClassV2/Frm_SendMail.Designer.vb
generated
Normal file
86
ArinClassV2/Frm_SendMail.Designer.vb
generated
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class Frm_SendMail
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
'Form은 Dispose를 재정의하여 구성 요소 목록을 정리합니다.
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
Try
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
Finally
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Windows Form 디자이너에 필요합니다.
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
|
||||||
|
'수정하려면 Windows Form 디자이너를 사용하십시오.
|
||||||
|
'코드 편집기를 사용하여 수정하지 마십시오.
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Frm_SendMail))
|
||||||
|
Me.PictureBox1 = New System.Windows.Forms.PictureBox
|
||||||
|
Me.Label1 = New System.Windows.Forms.Label
|
||||||
|
Me.Label2 = New System.Windows.Forms.Label
|
||||||
|
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'PictureBox1
|
||||||
|
'
|
||||||
|
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
|
||||||
|
Me.PictureBox1.Location = New System.Drawing.Point(0, -7)
|
||||||
|
Me.PictureBox1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
|
||||||
|
Me.PictureBox1.Name = "PictureBox1"
|
||||||
|
Me.PictureBox1.Size = New System.Drawing.Size(128, 128)
|
||||||
|
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
|
||||||
|
Me.PictureBox1.TabIndex = 0
|
||||||
|
Me.PictureBox1.TabStop = False
|
||||||
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
Me.Label1.AutoSize = True
|
||||||
|
Me.Label1.Font = New System.Drawing.Font("맑은 고딕", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||||
|
Me.Label1.Location = New System.Drawing.Point(157, 26)
|
||||||
|
Me.Label1.Name = "Label1"
|
||||||
|
Me.Label1.Size = New System.Drawing.Size(138, 15)
|
||||||
|
Me.Label1.TabIndex = 1
|
||||||
|
Me.Label1.Text = "메일을 보내고 있습니다."
|
||||||
|
'
|
||||||
|
'Label2
|
||||||
|
'
|
||||||
|
Me.Label2.AutoSize = True
|
||||||
|
Me.Label2.Font = New System.Drawing.Font("맑은 고딕", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||||
|
Me.Label2.Location = New System.Drawing.Point(157, 58)
|
||||||
|
Me.Label2.Name = "Label2"
|
||||||
|
Me.Label2.Size = New System.Drawing.Size(119, 15)
|
||||||
|
Me.Label2.TabIndex = 2
|
||||||
|
Me.Label2.Text = "잠시만 기다려주세요"
|
||||||
|
'
|
||||||
|
'Frm_SendMail
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(346, 105)
|
||||||
|
Me.Controls.Add(Me.Label2)
|
||||||
|
Me.Controls.Add(Me.Label1)
|
||||||
|
Me.Controls.Add(Me.PictureBox1)
|
||||||
|
Me.Font = New System.Drawing.Font("맑은 고딕", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||||
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
|
||||||
|
Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
|
||||||
|
Me.Name = "Frm_SendMail"
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
|
Me.Text = "SendMail"
|
||||||
|
Me.TopMost = True
|
||||||
|
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
|
||||||
|
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||||
|
End Class
|
||||||
198
ArinClassV2/Frm_SendMail.resx
Normal file
198
ArinClassV2/Frm_SendMail.resx
Normal file
@@ -0,0 +1,198 @@
|
|||||||
|
<?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.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="PictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
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
|
||||||
|
SUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
11
ArinClassV2/Frm_SendMail.vb
Normal file
11
ArinClassV2/Frm_SendMail.vb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Public Class Frm_SendMail
|
||||||
|
|
||||||
|
Private Sub Frm_SendMail_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
|
||||||
|
Me.Update()
|
||||||
|
Me.Validate()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Frm_SendMail_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
31
ArinClassV2/MYGDI.vb
Normal file
31
ArinClassV2/MYGDI.vb
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
Imports System.Drawing
|
||||||
|
Imports System.Drawing.Drawing2D
|
||||||
|
|
||||||
|
|
||||||
|
Public Class MYGDI
|
||||||
|
|
||||||
|
Public Shared Function GetRoundedRectPath(ByVal rect As Rectangle, ByVal radius As Integer) As GraphicsPath
|
||||||
|
|
||||||
|
Dim diameter As Integer = 2 * radius
|
||||||
|
Dim arcRect As New Rectangle(rect.Location, New Size(diameter, diameter))
|
||||||
|
Dim path As GraphicsPath = New GraphicsPath()
|
||||||
|
path.AddArc(arcRect, 180, 90)
|
||||||
|
|
||||||
|
arcRect.X = rect.Right - diameter
|
||||||
|
path.AddArc(arcRect, 270, 90)
|
||||||
|
|
||||||
|
arcRect.Y = rect.Bottom - diameter
|
||||||
|
path.AddArc(arcRect, 0, 90)
|
||||||
|
|
||||||
|
arcRect.X = rect.Left
|
||||||
|
path.AddArc(arcRect, 90, 90)
|
||||||
|
|
||||||
|
path.CloseFigure()
|
||||||
|
|
||||||
|
Return path
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
327
ArinClassV2/MailForm.designer.vb
generated
Normal file
327
ArinClassV2/MailForm.designer.vb
generated
Normal file
@@ -0,0 +1,327 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class MailForm
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
'Form은 Dispose를 재정의하여 구성 요소 목록을 정리합니다.
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Windows Form 디자이너에 필요합니다.
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'참고: 다음 프로시저는 Windows Form 디자이너에 필요합니다.
|
||||||
|
'수정하려면 Windows Form 디자이너를 사용하십시오.
|
||||||
|
'코드 편집기를 사용하여 수정하지 마십시오.
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(MailForm))
|
||||||
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
|
Me.TB_FROM = New System.Windows.Forms.TextBox()
|
||||||
|
Me.RadioButton4 = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.RadioButton2 = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.RadioButton1 = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.TB_SUBJECT = New System.Windows.Forms.TextBox()
|
||||||
|
Me.TB_BODY = New System.Windows.Forms.TextBox()
|
||||||
|
Me.tb_errbody = New System.Windows.Forms.TextBox()
|
||||||
|
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||||
|
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
|
||||||
|
Me.bt_cancel = New System.Windows.Forms.ToolStripButton()
|
||||||
|
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
|
Me.lb_msg = New System.Windows.Forms.ToolStripLabel()
|
||||||
|
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
|
||||||
|
Me.Panel2 = New System.Windows.Forms.Panel()
|
||||||
|
Me.Panel3 = New System.Windows.Forms.Panel()
|
||||||
|
Me.Label2 = New System.Windows.Forms.Label()
|
||||||
|
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||||
|
Me.tb_pgno = New System.Windows.Forms.TextBox()
|
||||||
|
Me.Label3 = New System.Windows.Forms.Label()
|
||||||
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
|
Me.tb_to = New System.Windows.Forms.TextBox()
|
||||||
|
Me.ToolStrip1.SuspendLayout()
|
||||||
|
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.Panel2.SuspendLayout()
|
||||||
|
Me.Panel3.SuspendLayout()
|
||||||
|
Me.Panel1.SuspendLayout()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
Me.Label1.AutoSize = True
|
||||||
|
Me.Label1.Location = New System.Drawing.Point(86, 13)
|
||||||
|
Me.Label1.Name = "Label1"
|
||||||
|
Me.Label1.Size = New System.Drawing.Size(67, 15)
|
||||||
|
Me.Label1.TabIndex = 0
|
||||||
|
Me.Label1.Text = "보내는사람"
|
||||||
|
'
|
||||||
|
'TB_FROM
|
||||||
|
'
|
||||||
|
Me.TB_FROM.ImeMode = System.Windows.Forms.ImeMode.Alpha
|
||||||
|
Me.TB_FROM.Location = New System.Drawing.Point(155, 10)
|
||||||
|
Me.TB_FROM.Name = "TB_FROM"
|
||||||
|
Me.TB_FROM.Size = New System.Drawing.Size(219, 21)
|
||||||
|
Me.TB_FROM.TabIndex = 0
|
||||||
|
Me.TB_FROM.Text = "help@tindevil.com"
|
||||||
|
Me.TB_FROM.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||||
|
'
|
||||||
|
'RadioButton4
|
||||||
|
'
|
||||||
|
Me.RadioButton4.AutoSize = True
|
||||||
|
Me.RadioButton4.Location = New System.Drawing.Point(298, 92)
|
||||||
|
Me.RadioButton4.Name = "RadioButton4"
|
||||||
|
Me.RadioButton4.Size = New System.Drawing.Size(49, 19)
|
||||||
|
Me.RadioButton4.TabIndex = 5
|
||||||
|
Me.RadioButton4.TabStop = True
|
||||||
|
Me.RadioButton4.Text = "기타"
|
||||||
|
Me.RadioButton4.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'RadioButton2
|
||||||
|
'
|
||||||
|
Me.RadioButton2.AutoSize = True
|
||||||
|
Me.RadioButton2.Location = New System.Drawing.Point(226, 92)
|
||||||
|
Me.RadioButton2.Name = "RadioButton2"
|
||||||
|
Me.RadioButton2.Size = New System.Drawing.Size(73, 19)
|
||||||
|
Me.RadioButton2.TabIndex = 3
|
||||||
|
Me.RadioButton2.TabStop = True
|
||||||
|
Me.RadioButton2.Text = "에러보고"
|
||||||
|
Me.RadioButton2.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'RadioButton1
|
||||||
|
'
|
||||||
|
Me.RadioButton1.AutoSize = True
|
||||||
|
Me.RadioButton1.Location = New System.Drawing.Point(155, 91)
|
||||||
|
Me.RadioButton1.Name = "RadioButton1"
|
||||||
|
Me.RadioButton1.Size = New System.Drawing.Size(73, 19)
|
||||||
|
Me.RadioButton1.TabIndex = 2
|
||||||
|
Me.RadioButton1.TabStop = True
|
||||||
|
Me.RadioButton1.Text = "인증요청"
|
||||||
|
Me.RadioButton1.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'TB_SUBJECT
|
||||||
|
'
|
||||||
|
Me.TB_SUBJECT.ImeMode = System.Windows.Forms.ImeMode.Hangul
|
||||||
|
Me.TB_SUBJECT.Location = New System.Drawing.Point(44, 7)
|
||||||
|
Me.TB_SUBJECT.Name = "TB_SUBJECT"
|
||||||
|
Me.TB_SUBJECT.Size = New System.Drawing.Size(330, 21)
|
||||||
|
Me.TB_SUBJECT.TabIndex = 2
|
||||||
|
'
|
||||||
|
'TB_BODY
|
||||||
|
'
|
||||||
|
Me.TB_BODY.ImeMode = System.Windows.Forms.ImeMode.Hangul
|
||||||
|
Me.TB_BODY.Location = New System.Drawing.Point(44, 34)
|
||||||
|
Me.TB_BODY.Multiline = True
|
||||||
|
Me.TB_BODY.Name = "TB_BODY"
|
||||||
|
Me.TB_BODY.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||||
|
Me.TB_BODY.Size = New System.Drawing.Size(330, 292)
|
||||||
|
Me.TB_BODY.TabIndex = 3
|
||||||
|
'
|
||||||
|
'tb_errbody
|
||||||
|
'
|
||||||
|
Me.tb_errbody.BackColor = System.Drawing.Color.Gainsboro
|
||||||
|
Me.tb_errbody.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||||
|
Me.tb_errbody.Location = New System.Drawing.Point(405, 11)
|
||||||
|
Me.tb_errbody.Multiline = True
|
||||||
|
Me.tb_errbody.Name = "tb_errbody"
|
||||||
|
Me.tb_errbody.ReadOnly = True
|
||||||
|
Me.tb_errbody.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||||
|
Me.tb_errbody.Size = New System.Drawing.Size(146, 465)
|
||||||
|
Me.tb_errbody.TabIndex = 7
|
||||||
|
'
|
||||||
|
'ToolStrip1
|
||||||
|
'
|
||||||
|
Me.ToolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||||
|
Me.ToolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
|
||||||
|
Me.ToolStrip1.ImageScalingSize = New System.Drawing.Size(32, 32)
|
||||||
|
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton1, Me.bt_cancel, Me.ToolStripSeparator1, Me.lb_msg})
|
||||||
|
Me.ToolStrip1.Location = New System.Drawing.Point(0, 484)
|
||||||
|
Me.ToolStrip1.Name = "ToolStrip1"
|
||||||
|
Me.ToolStrip1.Size = New System.Drawing.Size(565, 25)
|
||||||
|
Me.ToolStrip1.TabIndex = 4
|
||||||
|
Me.ToolStrip1.Text = "ToolStrip1"
|
||||||
|
'
|
||||||
|
'ToolStripButton1
|
||||||
|
'
|
||||||
|
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||||
|
Me.ToolStripButton1.Font = New System.Drawing.Font("굴림", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||||
|
Me.ToolStripButton1.Image = CType(resources.GetObject("ToolStripButton1.Image"), System.Drawing.Image)
|
||||||
|
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
|
Me.ToolStripButton1.Name = "ToolStripButton1"
|
||||||
|
Me.ToolStripButton1.Size = New System.Drawing.Size(103, 22)
|
||||||
|
Me.ToolStripButton1.Text = "메일보내기(&S)"
|
||||||
|
'
|
||||||
|
'bt_cancel
|
||||||
|
'
|
||||||
|
Me.bt_cancel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||||
|
Me.bt_cancel.Font = New System.Drawing.Font("굴림", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||||
|
Me.bt_cancel.Image = CType(resources.GetObject("bt_cancel.Image"), System.Drawing.Image)
|
||||||
|
Me.bt_cancel.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||||
|
Me.bt_cancel.Name = "bt_cancel"
|
||||||
|
Me.bt_cancel.Size = New System.Drawing.Size(61, 22)
|
||||||
|
Me.bt_cancel.Text = "취소(&C)"
|
||||||
|
'
|
||||||
|
'ToolStripSeparator1
|
||||||
|
'
|
||||||
|
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||||
|
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
|
||||||
|
'
|
||||||
|
'lb_msg
|
||||||
|
'
|
||||||
|
Me.lb_msg.Name = "lb_msg"
|
||||||
|
Me.lb_msg.Size = New System.Drawing.Size(23, 22)
|
||||||
|
Me.lb_msg.Text = ">>"
|
||||||
|
'
|
||||||
|
'PictureBox1
|
||||||
|
'
|
||||||
|
Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
|
||||||
|
Me.PictureBox1.Location = New System.Drawing.Point(23, 25)
|
||||||
|
Me.PictureBox1.Name = "PictureBox1"
|
||||||
|
Me.PictureBox1.Size = New System.Drawing.Size(48, 48)
|
||||||
|
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
|
||||||
|
Me.PictureBox1.TabIndex = 9
|
||||||
|
Me.PictureBox1.TabStop = False
|
||||||
|
'
|
||||||
|
'Panel2
|
||||||
|
'
|
||||||
|
Me.Panel2.BackColor = System.Drawing.Color.White
|
||||||
|
Me.Panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||||
|
Me.Panel2.Controls.Add(Me.Panel3)
|
||||||
|
Me.Panel2.Controls.Add(Me.Panel1)
|
||||||
|
Me.Panel2.Controls.Add(Me.tb_errbody)
|
||||||
|
Me.Panel2.Controls.Add(Me.ToolStrip1)
|
||||||
|
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||||
|
Me.Panel2.Location = New System.Drawing.Point(0, 0)
|
||||||
|
Me.Panel2.Name = "Panel2"
|
||||||
|
Me.Panel2.Size = New System.Drawing.Size(567, 511)
|
||||||
|
Me.Panel2.TabIndex = 11
|
||||||
|
'
|
||||||
|
'Panel3
|
||||||
|
'
|
||||||
|
Me.Panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||||
|
Me.Panel3.Controls.Add(Me.TB_SUBJECT)
|
||||||
|
Me.Panel3.Controls.Add(Me.Label2)
|
||||||
|
Me.Panel3.Controls.Add(Me.TB_BODY)
|
||||||
|
Me.Panel3.Location = New System.Drawing.Point(11, 139)
|
||||||
|
Me.Panel3.Name = "Panel3"
|
||||||
|
Me.Panel3.Size = New System.Drawing.Size(388, 337)
|
||||||
|
Me.Panel3.TabIndex = 13
|
||||||
|
'
|
||||||
|
'Label2
|
||||||
|
'
|
||||||
|
Me.Label2.AutoSize = True
|
||||||
|
Me.Label2.Location = New System.Drawing.Point(9, 10)
|
||||||
|
Me.Label2.Name = "Label2"
|
||||||
|
Me.Label2.Size = New System.Drawing.Size(31, 15)
|
||||||
|
Me.Label2.TabIndex = 10
|
||||||
|
Me.Label2.Text = "제목"
|
||||||
|
'
|
||||||
|
'Panel1
|
||||||
|
'
|
||||||
|
Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||||
|
Me.Panel1.Controls.Add(Me.PictureBox1)
|
||||||
|
Me.Panel1.Controls.Add(Me.tb_pgno)
|
||||||
|
Me.Panel1.Controls.Add(Me.RadioButton2)
|
||||||
|
Me.Panel1.Controls.Add(Me.Label3)
|
||||||
|
Me.Panel1.Controls.Add(Me.RadioButton1)
|
||||||
|
Me.Panel1.Controls.Add(Me.Label1)
|
||||||
|
Me.Panel1.Controls.Add(Me.Label4)
|
||||||
|
Me.Panel1.Controls.Add(Me.RadioButton4)
|
||||||
|
Me.Panel1.Controls.Add(Me.TB_FROM)
|
||||||
|
Me.Panel1.Controls.Add(Me.tb_to)
|
||||||
|
Me.Panel1.Location = New System.Drawing.Point(11, 11)
|
||||||
|
Me.Panel1.Name = "Panel1"
|
||||||
|
Me.Panel1.Size = New System.Drawing.Size(388, 122)
|
||||||
|
Me.Panel1.TabIndex = 12
|
||||||
|
'
|
||||||
|
'tb_pgno
|
||||||
|
'
|
||||||
|
Me.tb_pgno.Location = New System.Drawing.Point(155, 64)
|
||||||
|
Me.tb_pgno.Name = "tb_pgno"
|
||||||
|
Me.tb_pgno.ReadOnly = True
|
||||||
|
Me.tb_pgno.Size = New System.Drawing.Size(219, 21)
|
||||||
|
Me.tb_pgno.TabIndex = 1
|
||||||
|
Me.tb_pgno.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||||
|
'
|
||||||
|
'Label3
|
||||||
|
'
|
||||||
|
Me.Label3.AutoSize = True
|
||||||
|
Me.Label3.Location = New System.Drawing.Point(87, 67)
|
||||||
|
Me.Label3.Name = "Label3"
|
||||||
|
Me.Label3.Size = New System.Drawing.Size(67, 15)
|
||||||
|
Me.Label3.TabIndex = 11
|
||||||
|
Me.Label3.Text = "프로그램명"
|
||||||
|
'
|
||||||
|
'Label4
|
||||||
|
'
|
||||||
|
Me.Label4.AutoSize = True
|
||||||
|
Me.Label4.Location = New System.Drawing.Point(97, 40)
|
||||||
|
Me.Label4.Name = "Label4"
|
||||||
|
Me.Label4.Size = New System.Drawing.Size(55, 15)
|
||||||
|
Me.Label4.TabIndex = 0
|
||||||
|
Me.Label4.Text = "받는사람"
|
||||||
|
'
|
||||||
|
'tb_to
|
||||||
|
'
|
||||||
|
Me.tb_to.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||||
|
Me.tb_to.ImeMode = System.Windows.Forms.ImeMode.Alpha
|
||||||
|
Me.tb_to.Location = New System.Drawing.Point(155, 37)
|
||||||
|
Me.tb_to.Name = "tb_to"
|
||||||
|
Me.tb_to.ReadOnly = True
|
||||||
|
Me.tb_to.Size = New System.Drawing.Size(219, 21)
|
||||||
|
Me.tb_to.TabIndex = 0
|
||||||
|
Me.tb_to.Text = "arinware@outlook.com"
|
||||||
|
Me.tb_to.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||||
|
'
|
||||||
|
'MailForm
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 15.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.BackColor = System.Drawing.Color.White
|
||||||
|
Me.ClientSize = New System.Drawing.Size(567, 511)
|
||||||
|
Me.Controls.Add(Me.Panel2)
|
||||||
|
Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.999999!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
|
||||||
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
|
Me.KeyPreview = True
|
||||||
|
Me.MaximizeBox = False
|
||||||
|
Me.MinimizeBox = False
|
||||||
|
Me.Name = "MailForm"
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
|
Me.Text = "메일 전송"
|
||||||
|
Me.ToolStrip1.ResumeLayout(False)
|
||||||
|
Me.ToolStrip1.PerformLayout()
|
||||||
|
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
Me.Panel2.ResumeLayout(False)
|
||||||
|
Me.Panel2.PerformLayout()
|
||||||
|
Me.Panel3.ResumeLayout(False)
|
||||||
|
Me.Panel3.PerformLayout()
|
||||||
|
Me.Panel1.ResumeLayout(False)
|
||||||
|
Me.Panel1.PerformLayout()
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents TB_FROM As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents TB_BODY As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents RadioButton4 As System.Windows.Forms.RadioButton
|
||||||
|
Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton
|
||||||
|
Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton
|
||||||
|
Friend WithEvents TB_SUBJECT As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents tb_errbody As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents ToolStrip1 As System.Windows.Forms.ToolStrip
|
||||||
|
Friend WithEvents ToolStripButton1 As System.Windows.Forms.ToolStripButton
|
||||||
|
Friend WithEvents bt_cancel As System.Windows.Forms.ToolStripButton
|
||||||
|
Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
|
||||||
|
Friend WithEvents Panel2 As System.Windows.Forms.Panel
|
||||||
|
Friend WithEvents Label2 As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents tb_pgno As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents Label3 As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents tb_to As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents Label4 As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents Panel1 As System.Windows.Forms.Panel
|
||||||
|
Friend WithEvents Panel3 As System.Windows.Forms.Panel
|
||||||
|
Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
|
||||||
|
Friend WithEvents lb_msg As System.Windows.Forms.ToolStripLabel
|
||||||
|
End Class
|
||||||
201
ArinClassV2/MailForm.resx
Normal file
201
ArinClassV2/MailForm.resx
Normal file
@@ -0,0 +1,201 @@
|
|||||||
|
<?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="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>254, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="ToolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAO8SURBVFhH7ZVLSBthEMelVx+ICApGvOjFKB9iLYh48eDF
|
||||||
|
g4KIoKCCHkQQFF94EC1SEHqoW6+1tMRYq5goiqJkVRRFEdNi1ULaxDx8xke1Ptp6mc58m6jtxm2abk/t
|
||||||
|
wI95fLMzf3azm6D/5sPu1dfXp7e2tvZ0dHSAEtRDvXSNdKk6FtzU1DQ4tTYF1s9WRainsbHRUFlZmYnX
|
||||||
|
qSZC097ezhc8szxThHrENRHq6uqMaorQtrW1+SWA4CLeiVBTU2OsqKhQRQRraWkB22cbdH/oVuQ5eUs3
|
||||||
|
2M5sYFo1QXV1tSoiWHNzM9jP7NBj1cnQcXpA9xH9R/SeGvWLq1NQVVVlLCsr+yMRrKGhARznDui19crQ
|
||||||
|
k7fqQY/02gisWQk9inCgCBHwLhiLi4sDFsFqa2u5gD5b391s+s7pOvGtCOXl5cbCwsKARDB8luA8d8LA
|
||||||
|
Zr+MfvsADNgxRt/PPdY2seY9x5iuJRElJSUBiWD4SoHr3AWDdoMMA3nHIBgI+yDWPB5zfu6Q+lwXLi6i
|
||||||
|
qKjImJ+f/1siGD5D2LrYgiHHkA+GuR/mUIw4pZw873FSbZjPEN+IgHfBmJub67cIVlpaCtsX2zDqGvHJ
|
||||||
|
iGv0mlGnx9+qSzXsdY7wOaJZBLwLBpwdLK1QNoa3DXYud2B8a8wnY1vjCMXoXd7ajafzcRf1SNAsmomz
|
||||||
|
NdIKZWMFBQWwe7kLk9sTMiY4kxhPck85xd6zm7r3TIJm4myttELZWF5eHuxd7oG4Iypi2jGhR3ZNGFNO
|
||||||
|
dardPhdB6BcgIyPDjLP9E5CTkwPuL26Y2Z3xybQ33sMY+aHGmb72wmsBUlNTLTExMQ9xtn+PIDs7GwUc
|
||||||
|
wOzenIy5fU+Mfu46n5XOrj3VZ0F4JUBKSoolKirqMc69j/j3I8zKyoKDr4cw716QsbCPkPfWPLkUz2M8
|
||||||
|
j/E8CL0CJCUleZc/QMIR/17DzMxMOEIBS+5FGYvuJYkDgnKqL0lnnrxT3wlardYSGRn528vJWHp6Ogo4
|
||||||
|
guWDZd8cevg5R4QeARISEgJeTsbS0tLg+NsxmI9WZKxwzLBy6M3NYD6UckEnLY+IiAh4ORnDHw6cXJ3A
|
||||||
|
2qc1v+nSdUFcXJwlPDz8j5aTseTkZDi9OoWNTxuKrJM/WYenL5+qtpyMJSYmcgHvT97/EloeGxtrCQsL
|
||||||
|
U2U5mVaj0ZiFF4LPhbehnujoaEtISIhqy8k0oaGhD2lwfHw8KPE3lpPR1yoFqUAeIU/ugM6oh75wqi0n
|
||||||
|
o0Ekgr7b9OfB7oDOqId6VVv+r1lQ0Hd2H4LCpM7eWgAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bt_cancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAViSURBVFhHpVZbT1NpFLWPiDBvEFJIiOAbIZBATIhBEokP
|
||||||
|
8Dwh4YFkQnhhpJSWi+JYqzKIIAIDiCByKVePM/ojlEu5yqX0gGReRxIvP2HPXt/ltLQFGviSlX351l5r
|
||||||
|
N5zTcinGsTkcjhyPxzPZ0dFBiKjRl9dxnXNr2Kqrq3Obm5uN+eZm+u/jR0JEjT7uJe3Uc24NMeh2u425
|
||||||
|
piYxuObxiIga/TiWOLeGGHS5XMZsYyN9/YTBh/SptpbWHj4UArONTYT7U5YI02hijU8862GN360lTtKw
|
||||||
|
VVVV5TqdTmOGt8TgutdLC3fuWECNPu7BAx9zclycODUWYmpcrqurM2bwyRcWaP3xY1pwOAQWw4A+7qeZ
|
||||||
|
B36YgDBHD3fgbDAXM5E66OMeXuDDGwvY7927R18XF2mjrY0WnU5acjYwnCLXNeIm34MHo9raWqOysjIP
|
||||||
|
QC7MlUZolucatIaMuAcPnvDGAtcqKir8PhZYcrkZLgk3gJqBKGoXbba309HSEvka3VRTU/MemHI3it7m
|
||||||
|
n+0WfzlcA1HU3OccXvCENxawZ2ZmtpSXl5uTTPDz32hZgx8agYjeZ363j5aXCXwAOXrHeCcAfHjBE95Y
|
||||||
|
AH+HvIyMDC8uJrBEy12Juy0cAdQcUd+V+eeuLjry+wWQyz5mZFy2ZlSfAW14wAueyls8SEmMfFyUlZWZ
|
||||||
|
Y0xcab3PaKWV+zL6EQW4J/qttPW8W0ByJPwqCo7O+X6cNaGtzPOVZ+hVZIgl7Ha7t7S01HzDA6sPHih4
|
||||||
|
aJXfZasWuYdWFHS96tFcPSdraEET2vBQXpa5PlFLjPIDtep9RGsCXolHgK5D8ThP5qucj/LDF4+5PtYS
|
||||||
|
aWlp3uLiYnOEBdafPFFoU+CcX6f1NtW3csQQB7PQgBY0lfaJ5vpYS6Smpoolhlloo/2pwPrTdiu38DQi
|
||||||
|
MjCDWWhAS2meaa4PiL9kZ2f/evPmTf8rFtvs7JR4pmJ4jhiec8QMZqEBLaUZ97EVFRXl3b59+/1Qg4u+
|
||||||
|
bW3TZ37aBbpfhOUKOg/jfNvaoiFeAhrQgqaUPvvYbty4kXvr1i1jkM2/7+xQcGyCtnp7abunV8Stnj6O
|
||||||
|
fbSNXNQqhiE4Pi5mB3kJaEET2tLi5GO7fv16bklJiTHQ0EDfd3fJ9Plou7+ftv8a4DhAO8gZO5yjln3Z
|
||||||
|
k7xQjlloQAua0IaHtIo+tvz8/Fze1OjHJw8EaH96mnZfvqTdwSERdwYZYfFYz8KQgqyhAS1oQhse8JKW
|
||||||
|
oSPMeUOjj7f9sRekg7k52n01QrvDwxwVhrnmGFBRQnNGuB/RA49xMDvPmnvUx7+O8IhcwpaTk5NbUFBg
|
||||||
|
9DLhR9CkL28NCoy+ocBrhhVHJZAz9l6PEvi9vDDyQBTAG7XuvhiG0MYMvOAJbyxwmTcyevjip7lPh+/+
|
||||||
|
pr2x8TCMHa/54UIE/+rVq/8CPfw7f4xzAqAND8zCE95YwF5YWEg/9w/o8P0HCk74KDg5aWGP670Jzq2+
|
||||||
|
j7rZMCsry7xy5UoPgPwF93AX1FxEXWNOzR/+80F4wRPeWOAaC/ifQ2BqWmHKyk2rJwFz/tRmUlISvuGK
|
||||||
|
AOToQSOSb7KWhNQyfdMEHjzhjQXsycnJLfwzaT6vZ4GZ2ZjYn5mhLr4HT5nj6xXfcEA+ergDx5yNnFWR
|
||||||
|
+1oDnvBmyH9IEhMTLYH9ufko6EHwYMjQ3+2A+O04ScOMrRH9Dwku0tPTzU4IzBt0MP+W9vmNQI1+DHN9
|
||||||
|
Ymu8lfPQ6qyvP1XDEkhISPCmpKSYzxz1dGC8I0TU6ONe8cLN9bmwRpQA/5LFa67PhTW0AP4+vzH+UBH1
|
||||||
|
Web6XFgDBDwceELxmiCijsdcnzg1Ll36H/c9x/7dcPWAAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="PictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAEh0lEQVRoQ9WX208UZxjGoe3W
|
||||||
|
KogugtYVayRY7UmU2INpTZM21iYmvel1/4XeeGHSQ1ptRREkHJQoHlCs1lVLW11ramhaEpo0GptiEJCa
|
||||||
|
ll0EtkdWYQ+WZZ++zySQBd4P1ygyc/FLyLfzvc/vmdmZWdIAOBp10Umoi05CXXQS6qKTUBedhLroJNRF
|
||||||
|
J6EuOonRP355L22EdwW/EBdgE+hCJ7pZnqYCzVe3z0T/lXX47+bbsvyOLaALnehGR1OBTe2lmYj3bAR6
|
||||||
|
3wJa30T88hu4fWn9tEIHutAp3rcRHWWzWWKzVqA75FsJdGzA0MXXcfun12wFnegWOlfIAj1agUTkh5cR
|
||||||
|
a37V1kSaXmGBhFYAv1XnItL4EmIsYkPoRke6qgW6Dy5G65ZH8Y93OWKNL9oKOtGNjsYCMbk8f596Gr+W
|
||||||
|
u9FVlYOIbxVi54umFTrQhU50o6O5wPdrRwnUenCVV+NYPqJnn5sWmE0HuiS7mQuMu2x/HitA584s+Cuz
|
||||||
|
ETm9AtGGpx4IzGIms+kw3stc4Ns1E4jKZQzULECbnIl/6/IQ8RZMKcxgFjOZrTkZC0S/WW0kWLfE2hgo
|
||||||
|
n4Nw/ROIHF1yX+FMzmYGszSHEcwFzq6clMEvn4G/OgftW1zo3yuP3DrPfYGzOJOzmaFlJ2Mu8JVsToG+
|
||||||
|
2oVoeV8eu6UZCNfm3hOcwVmcqWVpmAt8ITdqigycKIC/wo2Ojx9Bf2UWwnvcdwX3cC9ncJaWYcJc4OSy
|
||||||
|
u+Z6SaZ1Bm9sn4FwZWZK8Fju4V5t5p0wFoh8np8yt+Sm69qVhc6qObh1qQjdhz249tFDCJU+hvCumSr8
|
||||||
|
jMfwWO7hXs7gLC3DhLnAZ/JESIHe6my0fJCO4Jl8JDrXARfXIt74PHoP5OGKnNneTx7GYIlrDFyzPpNj
|
||||||
|
eCz3cC9ncBZnalka5gJH5Dk/CQOHPPDL/wwdZbMQvbwK+PkF4Dt5tPkKRwl5n0RX5Tx0fpiO0Da5IgL/
|
||||||
|
5ho/Sz6WezmDsziTs5mhZSdjLnBooZFgxVz53qajz+tBoqUIaCpE3Pes+pQgN2rmW2ec8G/tGMIZnMWZ
|
||||||
|
nM0MZmkOI5gL7J8/AT7q/CWz0L5DbtKmZUCzBPpWIHZazuapyQnL04VonyXDWZzJ2cxgFjOZrTkZC4T3
|
||||||
|
zhtDsHw2rskLpudwNoZ/XA6cL8CQV26k40unBM5mBrOYyWw6jPcyF9gzdxR/8Qy0ferCwLlFwIWlwEl5
|
||||||
|
vdcvlu/g1MIMZjGT2XSgS7KbuUBVFv6Sm+n6VnnB7M7A8IU8oGER4kfku3fw8QcKM5lNh0BNpuVENzoa
|
||||||
|
CwS2udDKZ/kJN/D1AuCofAf35chlmx6Yjfpcy4VOdKOjscDvO10YahD5424M75NfnbvtAV3oRDc6mgok
|
||||||
|
BisyALlcUb7yK+wFnehGR7pqBXr+KHYhXCY/BWwMHemqFdjcJq/0mzvG/gSwE3SjI121AqS5Vd6cwa1S
|
||||||
|
RH4CDBbbA7rQiW50pKupANkkdAvDgnXD2AC60IlulueEAk5FXXQS6qKTUBedhLroJNRFJ6EuOgl10Tkg
|
||||||
|
7X8pTD3Ee7Z+2gAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
150
ArinClassV2/MailForm.vb
Normal file
150
ArinClassV2/MailForm.vb
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
Imports System.net.mail
|
||||||
|
|
||||||
|
Public Class MailForm
|
||||||
|
Enum MailType
|
||||||
|
auth = 1
|
||||||
|
Err = 2
|
||||||
|
question = 3
|
||||||
|
others = 4
|
||||||
|
End Enum
|
||||||
|
'Public ProgName As String = vbNullString
|
||||||
|
|
||||||
|
Public Sub New(ByVal from As String, ByVal subject As String, ByVal Message As String, ByVal ProgramName As String, Optional ByVal type As MailType = 3, Optional ByVal Errmsg As String = "")
|
||||||
|
|
||||||
|
' 이 호출은 Windows Form 디자이너에 필요합니다.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' InitializeComponent() 호출 뒤에 초기화 코드를 추가하십시오.
|
||||||
|
|
||||||
|
Me.TB_BODY.Text = Message
|
||||||
|
Me.TB_SUBJECT.Text = subject
|
||||||
|
|
||||||
|
If from = vbNullString Then
|
||||||
|
Me.TB_FROM.Text = "보내는사람 메일주소"
|
||||||
|
Else
|
||||||
|
Me.TB_FROM.Text = from
|
||||||
|
End If
|
||||||
|
|
||||||
|
Me.tb_errbody.Text = Errmsg
|
||||||
|
|
||||||
|
Me.tb_pgno.Text = ProgramName
|
||||||
|
|
||||||
|
Select Case type
|
||||||
|
Case MailType.auth '인증
|
||||||
|
Me.RadioButton1.Checked = True
|
||||||
|
Case MailType.Err '에러
|
||||||
|
Me.RadioButton2.Checked = True
|
||||||
|
Case MailType.question '질문
|
||||||
|
Me.RadioButton4.Checked = True
|
||||||
|
Case Else '기타
|
||||||
|
Me.RadioButton4.Checked = True
|
||||||
|
End Select
|
||||||
|
Me.TB_BODY.Focus()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Function IsValidEmail(ByVal strIn As String) As Boolean
|
||||||
|
' Return true if strIn is in valid e-mail format.
|
||||||
|
Return System.Text.RegularExpressions.Regex.IsMatch(strIn, "^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$")
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub Msg(ByVal mm As String)
|
||||||
|
' MsgBox(mm, MsgBoxStyle.Information, "확인")
|
||||||
|
Me.lb_msg.Text = mm
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TB_FROM_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TB_FROM.GotFocus, tb_to.GotFocus
|
||||||
|
Msg("본인의 메일주소를 입력하세요")
|
||||||
|
Me.TB_FROM.SelectAll()
|
||||||
|
End Sub
|
||||||
|
Private Sub TB_SUBJECT_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TB_SUBJECT.GotFocus
|
||||||
|
Msg("메일제목을 입력하세요")
|
||||||
|
Me.TB_SUBJECT.SelectAll()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TB_BODY_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TB_BODY.GotFocus
|
||||||
|
Msg("본문 내용을 입력하세요")
|
||||||
|
Me.TB_BODY.SelectAll()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
|
||||||
|
Dim Buf As New System.Text.StringBuilder
|
||||||
|
Dim SubJect As String = ""
|
||||||
|
|
||||||
|
If Me.TB_BODY.Text = vbNullString Then
|
||||||
|
Msg("본문내용이 없습니다")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not IsValidEmail(Me.TB_FROM.Text) Then '//@가없는 메일주소일때
|
||||||
|
Me.TB_FROM.SelectAll()
|
||||||
|
Me.TB_FROM.Focus()
|
||||||
|
Msg("메일주소 형식이 잘못되었습니다")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Me.RadioButton1.Checked Then SubJect = "[인증요청]"
|
||||||
|
If Me.RadioButton2.Checked Then SubJect = "[에러보고]"
|
||||||
|
If Me.RadioButton4.Checked Then SubJect = "[기타]"
|
||||||
|
|
||||||
|
SubJect = SubJect & Space(1) & Me.TB_SUBJECT.Text
|
||||||
|
|
||||||
|
Dim mailobj As New MailMessage(TB_FROM.Text, Me.tb_to.Text) '//여기메일서버는 나아니면 못받게되어잇다.
|
||||||
|
mailobj.Subject = SubJect '//제목줄
|
||||||
|
mailobj.BodyEncoding = System.Text.Encoding.Default
|
||||||
|
mailobj.IsBodyHtml = False
|
||||||
|
Buf.AppendLine("=======================")
|
||||||
|
Buf.AppendLine("보내는사람 : " & Me.TB_FROM.Text)
|
||||||
|
Buf.AppendLine("프로그램명 : " & Me.tb_pgno.Text)
|
||||||
|
Buf.AppendLine("=======================")
|
||||||
|
Buf.AppendLine("본문메세지")
|
||||||
|
Buf.AppendLine(Me.TB_BODY.Text)
|
||||||
|
Buf.AppendLine("=======================")
|
||||||
|
Buf.AppendLine("오류메세지")
|
||||||
|
Buf.AppendLine(Me.tb_errbody.Text)
|
||||||
|
|
||||||
|
mailobj.Body = Buf.ToString
|
||||||
|
|
||||||
|
Dim SC As New System.Net.Mail.SmtpClient("tindevil.com", 2552)
|
||||||
|
SC.Credentials = New System.Net.NetworkCredential("mail", "Mail2506!@+_")
|
||||||
|
|
||||||
|
SC.Send(mailobj)
|
||||||
|
Me.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_cancel.Click
|
||||||
|
Me.DialogResult = Windows.Forms.DialogResult.Cancel
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TB_FROM_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TB_FROM.KeyDown, tb_to.KeyDown
|
||||||
|
If e.KeyCode = Windows.Forms.Keys.Enter Then
|
||||||
|
Me.TB_SUBJECT.Focus()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Private Sub MailForm_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
|
||||||
|
If e.KeyCode = Windows.Forms.Keys.Escape Then
|
||||||
|
Me.bt_cancel.PerformClick()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TB_SUBJECT_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TB_SUBJECT.KeyDown
|
||||||
|
If e.KeyCode = Windows.Forms.Keys.Enter Then
|
||||||
|
Me.TB_BODY.Focus()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TB_SUBJECT_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TB_SUBJECT.TextChanged
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TB_BODY_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TB_BODY.TextChanged
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
|
||||||
|
Me.ToolStripButton1.PerformClick()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
13
ArinClassV2/My Project/Application.Designer.vb
generated
Normal file
13
ArinClassV2/My Project/Application.Designer.vb
generated
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' 이 코드는 도구를 사용하여 생성되었습니다.
|
||||||
|
' 런타임 버전:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||||
|
' 이러한 변경 내용이 손실됩니다.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
10
ArinClassV2/My Project/Application.myapp
Normal file
10
ArinClassV2/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
ArinClassV2/My Project/AssemblyInfo.vb
Normal file
35
ArinClassV2/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
Imports System
|
||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Runtime.InteropServices
|
||||||
|
|
||||||
|
' 어셈블리의 일반 정보는 다음 특성 집합을 통해 제어됩니다.
|
||||||
|
' 어셈블리와 관련된 정보를 수정하려면
|
||||||
|
' 이 특성 값을 변경하십시오.
|
||||||
|
|
||||||
|
' 어셈블리 특성 값을 검토합니다.
|
||||||
|
|
||||||
|
<Assembly: AssemblyTitle("Arin's Common Class")>
|
||||||
|
<Assembly: AssemblyDescription("")>
|
||||||
|
<Assembly: AssemblyCompany("MICROSOFT")>
|
||||||
|
<Assembly: AssemblyProduct("Arin's Common Class")>
|
||||||
|
<Assembly: AssemblyCopyright("Copyright (C) MICROSOFT 2007")>
|
||||||
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
|
'이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
|
||||||
|
<Assembly: Guid("d9e7bc78-e3aa-487f-9584-17d727270c37")>
|
||||||
|
|
||||||
|
' 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
|
||||||
|
'
|
||||||
|
' 주 버전
|
||||||
|
' 부 버전
|
||||||
|
' 빌드 번호
|
||||||
|
' 수정 버전
|
||||||
|
'
|
||||||
|
' 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 버전이 자동으로
|
||||||
|
' 지정되도록 할 수 있습니다.
|
||||||
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
|
<Assembly: AssemblyVersion("1.2.1.3")>
|
||||||
|
<Assembly: AssemblyFileVersion("1.2.1.3")>
|
||||||
63
ArinClassV2/My Project/Resources.Designer.vb
generated
Normal file
63
ArinClassV2/My Project/Resources.Designer.vb
generated
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' 이 코드는 도구를 사용하여 생성되었습니다.
|
||||||
|
' 런타임 버전:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||||
|
' 이러한 변경 내용이 손실됩니다.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
|
|
||||||
|
Namespace My.Resources
|
||||||
|
|
||||||
|
'이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
|
||||||
|
'클래스에서 자동으로 생성되었습니다.
|
||||||
|
'멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
|
||||||
|
'다시 실행하거나 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("ACC.Resources", GetType(Resources).Assembly)
|
||||||
|
resourceMan = temp
|
||||||
|
End If
|
||||||
|
Return resourceMan
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture
|
||||||
|
''' 속성을 재정의합니다.
|
||||||
|
'''</summary>
|
||||||
|
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||||
|
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||||
|
Get
|
||||||
|
Return resourceCulture
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
resourceCulture = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
117
ArinClassV2/My Project/Resources.resx
Normal file
117
ArinClassV2/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>
|
||||||
84
ArinClassV2/My Project/Settings.Designer.vb
generated
Normal file
84
ArinClassV2/My Project/Settings.Designer.vb
generated
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
'------------------------------------------------------------------------------
|
||||||
|
' <auto-generated>
|
||||||
|
' 이 코드는 도구를 사용하여 생성되었습니다.
|
||||||
|
' 런타임 버전:4.0.30319.42000
|
||||||
|
'
|
||||||
|
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
||||||
|
' 이러한 변경 내용이 손실됩니다.
|
||||||
|
' </auto-generated>
|
||||||
|
'------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
|
||||||
|
|
||||||
|
Namespace My
|
||||||
|
|
||||||
|
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||||
|
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.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 자동 저장 기능"
|
||||||
|
#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
|
||||||
|
|
||||||
|
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||||
|
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||||
|
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
|
||||||
|
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=orcl;Persist Security Info=True;User ID=chick;Password=c1245;Unicode="& _
|
||||||
|
"True")> _
|
||||||
|
Public ReadOnly Property ConnectionString() As String
|
||||||
|
Get
|
||||||
|
Return CType(Me("ConnectionString"),String)
|
||||||
|
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.ACC.My.MySettings
|
||||||
|
Get
|
||||||
|
Return Global.ACC.My.MySettings.Default
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
End Module
|
||||||
|
End Namespace
|
||||||
14
ArinClassV2/My Project/Settings.settings
Normal file
14
ArinClassV2/My Project/Settings.settings
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
|
||||||
|
<Profiles />
|
||||||
|
<Settings>
|
||||||
|
<Setting Name="ConnectionString" Type="(Connection string)" Scope="Application">
|
||||||
|
<DesignTimeValue Profile="(Default)"><?xml version="1.0" encoding="utf-16"?>
|
||||||
|
<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<ConnectionString>Data Source=orcl;Persist Security Info=True;User ID=chick;Password=c1245;Unicode=True</ConnectionString>
|
||||||
|
<ProviderName>System.Data.OracleClient</ProviderName>
|
||||||
|
</SerializableConnectionString></DesignTimeValue>
|
||||||
|
<Value Profile="(Default)">Data Source=orcl;Persist Security Info=True;User ID=chick;Password=c1245;Unicode=True</Value>
|
||||||
|
</Setting>
|
||||||
|
</Settings>
|
||||||
|
</SettingsFile>
|
||||||
70
ArinClassV2/MyAuth.vb
Normal file
70
ArinClassV2/MyAuth.vb
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
Public Class MyAuth '//각종인증방법을 이용한다.
|
||||||
|
Public Function GetDateAuth(ByVal 만기일자 As Date) As Boolean '//날짜인증시 사용가능한지
|
||||||
|
'//사용가능한 날짜인지 확인하고 만약 날짜정보가 없으면은 날짜를 setdataeauth 를 실행합니다
|
||||||
|
'//인터넷에 연결되어있을시 현재 시간정보를 인터넷에서 받아온ㄷ
|
||||||
|
'//콘솔의 현재날짜가 설치된 날짜보다 더 뒤일경우 사용중지
|
||||||
|
'//레지 파일의 기록날짜가 서로다를경우 사용중지
|
||||||
|
'//레지,파일의 기록날짜가 동일하고 콘솔의 현재날짜가 기한을 넘지않았을경우에만 true 한다.
|
||||||
|
Dim isAvailable As Boolean = My.Computer.Network.IsAvailable '//인터넷사용여부
|
||||||
|
Dim CurrentDate As Date
|
||||||
|
|
||||||
|
If isAvailable Then '//인터넷에서 날짜정보를 가져온다 기록된 날짜와 오늘의 날짜를 확인한다.
|
||||||
|
Dim Itime As Date
|
||||||
|
Try
|
||||||
|
CurrentDate = Itime
|
||||||
|
Catch ex As Exception '//에러발생시 콘솔날짜로 세팅한다.
|
||||||
|
CurrentDate = Now
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
MsgBox("인터넷사용불가")
|
||||||
|
CurrentDate = Now
|
||||||
|
End If
|
||||||
|
|
||||||
|
If 만기일자 > CurrentDate Then Return False
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub SetAuth(ByVal Newkey As String, ByVal Fn As String)
|
||||||
|
Dim auth As New ARINCLASS
|
||||||
|
Dim Arinini As New MyINI(Fn)
|
||||||
|
Arinini.Write("main", "install", Newkey)
|
||||||
|
Arinini.Write("main", "installkey", Newkey.GetHashCode)
|
||||||
|
|
||||||
|
Dim A As New System.Text.StringBuilder
|
||||||
|
A.AppendLine("인증정보가 파일에 기록되었습니다")
|
||||||
|
A.AppendLine("만기일 : " & Date.FromFileTimeUtc(Newkey))
|
||||||
|
MsgBox(A.ToString, MsgBoxStyle.Information, "기록완료")
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 미지원 함수
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function SetDateAuth() As Boolean '//레지와 파일에 해당 인증정보를 기록합니다
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 미지원함수
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function GetCurrentDate() As Date '//오늘날짜를 가져옵니다
|
||||||
|
Return Now
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetDateNumber(ByVal 시작일 As Date) As Long
|
||||||
|
Return 시작일.ToFileTimeUtc
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetDateNumberEnc(ByVal 시작일 As Date) As String
|
||||||
|
Return 시작일.ToFileTimeUtc.ToString.GetHashCode '//날짜로 들어가면 날짜의 해쉬코드를 넘겨준다.
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function GetDateNumberEnc(ByVal 시작일 As Long) As String
|
||||||
|
Return 시작일.ToString.GetHashCode
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
77
ArinClassV2/MyDate.vb
Normal file
77
ArinClassV2/MyDate.vb
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
Public Class MyDate
|
||||||
|
|
||||||
|
Public Shared Function DIFF_Time(ByVal sd As Date, ByVal ed As Date) As Short
|
||||||
|
'//두날짜사이의 차리르 분으로 환상한다.
|
||||||
|
Dim sdt As Short = sd.Hour * 60 + sd.Minute
|
||||||
|
Dim edt As Short = ed.Hour * 60 + ed.Minute
|
||||||
|
Return edt - sdt
|
||||||
|
End Function
|
||||||
|
Public Shared Function DIFF_TimeC(ByVal sd As Date, ByVal ed As Date) As String
|
||||||
|
'//두날짜사이의 차리르 분으로 환상한다.
|
||||||
|
Dim sdt As Short = sd.Hour * 60 + sd.Minute
|
||||||
|
Dim edt As Short = ed.Hour * 60 + ed.Minute
|
||||||
|
Return TimeChar(edt - sdt)
|
||||||
|
End Function
|
||||||
|
Public Shared Function TimeChar(ByVal Min As Short) As String
|
||||||
|
Dim Retval As String = Math.Truncate(Min / 60)
|
||||||
|
Dim Retval2 As String = Min Mod 60
|
||||||
|
Return Retval & ":" & Retval2
|
||||||
|
End Function
|
||||||
|
Public Shared Function LastDay(ByVal Cd As Date) As Date
|
||||||
|
'//말일자를 반환
|
||||||
|
Dim Nd As Date = CDate(Format(Cd.AddMonths(1), "yyyy-MM-01")).AddDays(-1)
|
||||||
|
Return Nd
|
||||||
|
End Function
|
||||||
|
Public Shared Function FirstDay(ByVal Cd As Date) As Date
|
||||||
|
'//말일자를 반환
|
||||||
|
Dim Nd As Date = CDate(Format(Cd, "yyyy-MM-01"))
|
||||||
|
Return Nd
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function FirstWeek(ByVal cd As Date) As Date
|
||||||
|
Return cd.AddDays(1 - cd.DayOfWeek)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function LastWeek(ByVal cd As Date) As Date
|
||||||
|
Return cd.AddDays(7 - cd.DayOfWeek)
|
||||||
|
End Function
|
||||||
|
Public Shared Function GetWeekName(ByVal Cd As Date) As String
|
||||||
|
Select Case Cd.DayOfWeek
|
||||||
|
Case DayOfWeek.Friday
|
||||||
|
Return "금"
|
||||||
|
Case DayOfWeek.Monday
|
||||||
|
Return "월"
|
||||||
|
Case DayOfWeek.Saturday
|
||||||
|
Return "토"
|
||||||
|
Case DayOfWeek.Sunday
|
||||||
|
Return "일"
|
||||||
|
Case DayOfWeek.Thursday
|
||||||
|
Return "목"
|
||||||
|
Case DayOfWeek.Tuesday
|
||||||
|
Return "화"
|
||||||
|
Case DayOfWeek.Wednesday
|
||||||
|
Return "수"
|
||||||
|
End Select
|
||||||
|
Return Cd.DayOfWeek
|
||||||
|
End Function
|
||||||
|
Public Shared Function GetFullDateText(ByVal src As String) As String
|
||||||
|
Select Case src.Length
|
||||||
|
Case 10
|
||||||
|
Return src
|
||||||
|
Case 8 '//20090501
|
||||||
|
Return src.Substring(0, 4) & "-" & src.Substring(4, 2) & "-" & src.Substring(6, 2)
|
||||||
|
Case 6 '//090501
|
||||||
|
Return "20" & src.Substring(0, 2) & "-" & src.Substring(2, 2) & "-" & src.Substring(4, 2)
|
||||||
|
Case 4 '//0501
|
||||||
|
Return Format(Today, "yyyy") & "-" & src.Substring(0, 2) & "-" & src.Substring(2, 2)
|
||||||
|
Case 3 '//501
|
||||||
|
Return Format(Today, "yyyy") & "-" & "0" & src.Substring(0, 1) & "-" & src.Substring(1, 2)
|
||||||
|
Case 2 '//01
|
||||||
|
Return Format(Today, "yyyy-MM") & "-" & src.Substring(0, 2)
|
||||||
|
Case 1 '//1
|
||||||
|
Return Format(Today, "yyyy-MM") & "-0" & src.Substring(0, 1)
|
||||||
|
Case Else
|
||||||
|
Return ""
|
||||||
|
End Select
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
287
ArinClassV2/MyINI.vb
Normal file
287
ArinClassV2/MyINI.vb
Normal file
@@ -0,0 +1,287 @@
|
|||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class MyINI
|
||||||
|
Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
|
||||||
|
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpDownFileName As String) As Integer
|
||||||
|
'Private Aname As String
|
||||||
|
Public FileName As String = vbNullString
|
||||||
|
Private FileNameBuf As String
|
||||||
|
Private m_sPath As String
|
||||||
|
Private m_sKey As String
|
||||||
|
Private m_sSection As String
|
||||||
|
Private m_sDefault As String
|
||||||
|
Private m_lLastReturnCode As Integer
|
||||||
|
|
||||||
|
Public Sub New(ByVal File As String)
|
||||||
|
FileName = File
|
||||||
|
FileNameBuf = File
|
||||||
|
Me.Create()
|
||||||
|
|
||||||
|
'MsgBox("New 1=" & FileName & vbCrLf & "2=" & FileNameBuf)
|
||||||
|
|
||||||
|
' If Not System.IO.File.Exists(File) Then System.IO.File.Create(File)
|
||||||
|
End Sub
|
||||||
|
Public Sub Create()
|
||||||
|
If Exist() = True Then Return
|
||||||
|
Dim A As New IO.FileInfo(FileName)
|
||||||
|
A.Directory.Create()
|
||||||
|
Dim FS As IO.FileStream = A.Create()
|
||||||
|
Dim SW As New IO.StreamWriter(FS, System.Text.Encoding.Default)
|
||||||
|
SW.WriteLine("//Myini 로부터 자동생성된 파일입니다")
|
||||||
|
SW.WriteLine("//생성일자 : " & Now.ToString)
|
||||||
|
SW.Flush()
|
||||||
|
SW.Close()
|
||||||
|
FS.Close()
|
||||||
|
SW = Nothing
|
||||||
|
FS = Nothing
|
||||||
|
FileName = FileNameBuf
|
||||||
|
End Sub
|
||||||
|
Public Function Exist() As Boolean
|
||||||
|
Return System.IO.File.Exists(FileName)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function Read(ByVal appkey As String, ByVal subkey As String, Optional ByVal DefaultValue As String = vbNullString) As String '//변수초기화
|
||||||
|
'MsgBox("Read 1=" & FileName & vbCrLf & "2=" & FileNameBuf)
|
||||||
|
|
||||||
|
Dim tempstr As Integer 'ini파일에서 읽어온 값을 임시저장하는 변수
|
||||||
|
Dim strtemp As String = New String(Chr(0), 2000) 'ini파일의 임시 변수
|
||||||
|
Dim Tempbuf As String
|
||||||
|
|
||||||
|
If Not Exist() Then
|
||||||
|
MsgBox("환경파일이 존재하지 않습니다" & vbCrLf & "APP=" & appkey & vbCrLf & "subkey=" & subkey & vbCrLf & "파일명=" & FileName, MsgBoxStyle.Critical, "Error")
|
||||||
|
Return vbNullString
|
||||||
|
End If
|
||||||
|
Try
|
||||||
|
tempstr = GetPrivateProfileString(appkey, subkey, "", strtemp, Len(strtemp), FileName)
|
||||||
|
Tempbuf = strtemp.Substring(0, tempstr)
|
||||||
|
Tempbuf = Tempbuf.Trim(Chr(0))
|
||||||
|
|
||||||
|
FileName = FileNameBuf
|
||||||
|
|
||||||
|
If Tempbuf.Trim = vbNullString AndAlso DefaultValue <> vbNullString Then
|
||||||
|
Return DefaultValue
|
||||||
|
Else
|
||||||
|
Return Tempbuf
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
FileName = FileNameBuf
|
||||||
|
Return vbNullString
|
||||||
|
End Try
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Function ReadFile(ByVal appkey As String, ByVal subkey As String, ByVal filename2 As String, Optional ByVal DefaultValue As String = vbNullString) As String '//변수초기화
|
||||||
|
'MsgBox("ReadFile 1=" & FileName & vbCrLf & "2=" & FileNameBuf)
|
||||||
|
Dim tempstr As Integer 'ini파일에서 읽어온 값을 임시저장하는 변수
|
||||||
|
Dim strtemp As String = New String(Chr(0), 2000) 'ini파일의 임시 변수
|
||||||
|
Dim Tempbuf As String
|
||||||
|
|
||||||
|
If Not System.IO.File.Exists(filename2) Then
|
||||||
|
MsgBox("환경파일이 존재하지 않습니다" & vbCrLf & "파일명=" & FileName, MsgBoxStyle.Critical, "Error")
|
||||||
|
Return vbNullString
|
||||||
|
End If
|
||||||
|
|
||||||
|
Try
|
||||||
|
tempstr = GetPrivateProfileString(appkey, subkey, "", strtemp, Len(strtemp), filename2)
|
||||||
|
Tempbuf = strtemp.Substring(0, tempstr)
|
||||||
|
If Tempbuf.Trim = vbNullString AndAlso DefaultValue <> vbNullString Then
|
||||||
|
Return DefaultValue
|
||||||
|
Else
|
||||||
|
Return Tempbuf
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
Return vbNullString
|
||||||
|
End Try
|
||||||
|
FileName = FileNameBuf
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function Write(ByVal appkey As String, ByVal subkey As String, ByVal WriteVal As Object) As Integer
|
||||||
|
Dim RetVal As Integer
|
||||||
|
'MsgBox("Write1 1=" & FileName & vbCrLf & "2=" & FileNameBuf)
|
||||||
|
If Not Exist() Then
|
||||||
|
MsgBox("환경파일이 존재하지 않습니다" & vbCrLf & "파일을 생성합니다." & vbCrLf & "파일명=" & FileName, MsgBoxStyle.Information, "확인")
|
||||||
|
Me.Create()
|
||||||
|
End If
|
||||||
|
' FileName = Aname
|
||||||
|
RetVal = (WritePrivateProfileString(appkey, subkey, WriteVal, FileName))
|
||||||
|
FileName = FileNameBuf
|
||||||
|
Return RetVal
|
||||||
|
|
||||||
|
End Function
|
||||||
|
Public Sub Write(ByVal appkey As String, ByVal subkey As String, ByVal WriteVal As Object, ByVal fileName2 As String)
|
||||||
|
'MsgBox("Write2 1=" & FileName & vbCrLf & "2=" & FileNameBuf)
|
||||||
|
If Not System.IO.File.Exists(fileName2) Then
|
||||||
|
MsgBox("[D] 환경파일이 존재하지 않습니다" & vbCrLf & "파일을 생성합니다." & vbCrLf & "파일명=" & fileName2, MsgBoxStyle.Information, "확인")
|
||||||
|
System.IO.File.Create(fileName2)
|
||||||
|
End If
|
||||||
|
WritePrivateProfileString(appkey, subkey, WriteVal, fileName2)
|
||||||
|
FileName = FileNameBuf
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub EnumerateCurrentSection(ByRef sKey() As String, ByRef iCount As Integer)
|
||||||
|
Dim sSection As String
|
||||||
|
Dim iPos As Integer
|
||||||
|
Dim iNextPos As Integer
|
||||||
|
Dim sCur As String
|
||||||
|
|
||||||
|
iCount = 0
|
||||||
|
Erase sKey
|
||||||
|
sSection = INISection
|
||||||
|
If (Len(sSection) > 0) Then
|
||||||
|
iPos = 1
|
||||||
|
iNextPos = InStr(iPos, sSection, Chr(0))
|
||||||
|
Do While iNextPos <> 0
|
||||||
|
sCur = Mid(sSection, iPos, iNextPos - iPos)
|
||||||
|
If (sCur <> Chr(0)) Then
|
||||||
|
iCount = iCount + 1
|
||||||
|
'UPGRADE_WARNING: sKey 배열의 하한이 1에서 0(으)로 변경되었습니다. 자세한 내용은 다음을 참조하십시오. 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
|
||||||
|
ReDim Preserve sKey(iCount)
|
||||||
|
sKey(iCount) = Mid(sSection, iPos, iNextPos - iPos)
|
||||||
|
iPos = iNextPos + 1
|
||||||
|
iNextPos = InStr(iPos, sSection, Chr(0))
|
||||||
|
End If
|
||||||
|
Loop
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub GetAllsection(ByVal key As String, ByRef Section As ArrayList, ByRef Value As ArrayList)
|
||||||
|
Dim FS As New System.IO.FileStream(FileName, FileMode.Open)
|
||||||
|
Dim SR As New StreamReader(FS, System.Text.Encoding.Default)
|
||||||
|
Dim Findkey As String = "[" & key & "]"
|
||||||
|
Dim Line As String
|
||||||
|
Dim KeyPos As Integer = -1
|
||||||
|
Dim Seppos As Integer = -1
|
||||||
|
While SR.Peek > -1
|
||||||
|
Line = SR.ReadLine
|
||||||
|
If KeyPos = -1 Then '//키를 못찻았으면
|
||||||
|
If Line.ToUpper.IndexOf(Findkey.ToUpper) > -1 Then KeyPos = Line.ToUpper.IndexOf(Findkey.ToUpper)
|
||||||
|
Else '//찾앗으면
|
||||||
|
If Line.IndexOf("[") = -1 Then '//그다음 키가 오기전까지 모두 추가한다.
|
||||||
|
Seppos = Line.IndexOf("=")
|
||||||
|
Section.Add(Line.Substring(0, Seppos))
|
||||||
|
Value.Add(Line.Substring(Seppos + 1))
|
||||||
|
Else
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
|
||||||
|
SR.Close()
|
||||||
|
FS.Close()
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub EnumerateAllSections(ByRef sSections() As String, ByRef iCount As Integer)
|
||||||
|
Dim sIniFile As String
|
||||||
|
Dim iPos As Integer
|
||||||
|
Dim iNextPos As Integer
|
||||||
|
Dim sCur As String
|
||||||
|
|
||||||
|
iCount = 0
|
||||||
|
Erase sSections
|
||||||
|
sIniFile = Sections
|
||||||
|
If (Len(sIniFile) > 0) Then
|
||||||
|
iPos = 1
|
||||||
|
iNextPos = InStr(iPos, sIniFile, Chr(0))
|
||||||
|
Do While iNextPos <> 0
|
||||||
|
If (iNextPos <> iPos) Then
|
||||||
|
sCur = Mid(sIniFile, iPos, iNextPos - iPos)
|
||||||
|
iCount = iCount + 1
|
||||||
|
'UPGRADE_WARNING: sSections 배열의 하한이 1에서 0(으)로 변경되었습니다. 자세한 내용은 다음을 참조하십시오. 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="0F1C9BE1-AF9D-476E-83B1-17D43BECFF20"'
|
||||||
|
ReDim Preserve sSections(iCount)
|
||||||
|
sSections(iCount) = sCur
|
||||||
|
End If
|
||||||
|
iPos = iNextPos + 1
|
||||||
|
iNextPos = InStr(iPos, sIniFile, Chr(0))
|
||||||
|
Loop
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Property INISection() As String
|
||||||
|
Get
|
||||||
|
Dim sBuf As String
|
||||||
|
Dim iSize As String
|
||||||
|
Dim iRetCode As Short
|
||||||
|
|
||||||
|
sBuf = Space(8192)
|
||||||
|
iSize = CStr(Len(sBuf))
|
||||||
|
iRetCode = GetPrivateProfileString(m_sSection, 0, m_sDefault, sBuf, CInt(iSize), m_sPath)
|
||||||
|
If (CDbl(iSize) > 0) Then
|
||||||
|
INISection = Left(sBuf, iRetCode)
|
||||||
|
Else
|
||||||
|
INISection = ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As String)
|
||||||
|
m_lLastReturnCode = WritePrivateProfileString(m_sSection, 0, Value, m_sPath)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
ReadOnly Property Sections() As String
|
||||||
|
Get
|
||||||
|
Dim sBuf As String
|
||||||
|
Dim iSize As String
|
||||||
|
Dim iRetCode As Short
|
||||||
|
|
||||||
|
sBuf = Space(8192)
|
||||||
|
iSize = CStr(Len(sBuf))
|
||||||
|
iRetCode = GetPrivateProfileString(0, 0, m_sDefault, sBuf, CInt(iSize), m_sPath)
|
||||||
|
If (CDbl(iSize) > 0) Then
|
||||||
|
Sections = Left(sBuf, iRetCode)
|
||||||
|
Else
|
||||||
|
Sections = ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property LastReturnCode() As Integer
|
||||||
|
Get
|
||||||
|
LastReturnCode = m_lLastReturnCode
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
ReadOnly Property Success() As Boolean
|
||||||
|
Get
|
||||||
|
Success = (m_lLastReturnCode <> 0)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
'UPGRADE_NOTE: Default이(가) Default_Renamed(으)로 업그레이드되었습니다. 자세한 내용은 다음을 참조하십시오. 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="A9E4979A-37FA-4718-9994-97DD76ED70A7"'
|
||||||
|
Property Default_Renamed() As String
|
||||||
|
Get
|
||||||
|
Default_Renamed = m_sDefault
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As String)
|
||||||
|
m_sDefault = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Property Path() As String
|
||||||
|
Get
|
||||||
|
Path = m_sPath
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As String)
|
||||||
|
m_sPath = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Property Key() As String
|
||||||
|
Get
|
||||||
|
Key = m_sKey
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As String)
|
||||||
|
m_sKey = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Property Section() As String
|
||||||
|
Get
|
||||||
|
Section = m_sSection
|
||||||
|
End Get
|
||||||
|
Set(ByVal Value As String)
|
||||||
|
m_sSection = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
59
ArinClassV2/MyMail.vb
Normal file
59
ArinClassV2/MyMail.vb
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
Public Class MyMail
|
||||||
|
Dim MailFrom, Subject, Body, MailType, program As String
|
||||||
|
Dim th As Threading.Thread
|
||||||
|
Public Sub New(ByVal vmailfrom As String, ByVal vsubject As String, ByVal vbody As String, ByVal vMailType As String, ByVal vprogram As String)
|
||||||
|
Me.MailFrom = vmailfrom
|
||||||
|
Me.Subject = vsubject
|
||||||
|
Me.Body = vbody
|
||||||
|
Me.MailType = vMailType
|
||||||
|
Me.program = vprogram
|
||||||
|
th = New Threading.Thread(AddressOf AutoSendMail)
|
||||||
|
End Sub
|
||||||
|
Public Sub SendMail()
|
||||||
|
th.Start()
|
||||||
|
End Sub
|
||||||
|
Private Sub AutoSendMail()
|
||||||
|
Dim A As New Frm_SendMail
|
||||||
|
A.Show()
|
||||||
|
A.Validate()
|
||||||
|
A.Update()
|
||||||
|
|
||||||
|
Dim Buf As New System.Text.StringBuilder
|
||||||
|
|
||||||
|
subject = "[" & MailType & "]" & subject
|
||||||
|
|
||||||
|
Dim mailobj As New Net.Mail.MailMessage(MailFrom, "arin@tindevil.com") '//여기메일서버는 나아니면 못받게되어잇다.
|
||||||
|
mailobj.Subject = subject '//제목줄
|
||||||
|
mailobj.BodyEncoding = System.Text.Encoding.Default
|
||||||
|
mailobj.IsBodyHtml = False
|
||||||
|
Buf.AppendLine("=======================")
|
||||||
|
Buf.AppendLine("보내는사람 : " & mailfrom)
|
||||||
|
Buf.AppendLine("프로그램명 : " & program)
|
||||||
|
Buf.AppendLine("=======================")
|
||||||
|
Buf.AppendLine("본문메세지")
|
||||||
|
Buf.AppendLine(body)
|
||||||
|
Buf.AppendLine("=======================")
|
||||||
|
|
||||||
|
mailobj.Body = Buf.ToString
|
||||||
|
Dim C As New Net.Mail.SmtpClient("mail.xtto.net")
|
||||||
|
C.Send(mailobj)
|
||||||
|
A.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Sub SenMail2(ByVal P_subject As String, ByVal p_body As String)
|
||||||
|
'smtp.hanmail.net
|
||||||
|
Dim MM As New System.Net.Mail.MailMessage
|
||||||
|
MM.From = New System.Net.Mail.MailAddress("tindevil@tindevil.com")
|
||||||
|
MM.BodyEncoding = System.Text.Encoding.Default
|
||||||
|
MM.To.Add("tindevil@hanmail.net")
|
||||||
|
MM.Subject = P_subject
|
||||||
|
MM.Body = p_body
|
||||||
|
MM.IsBodyHtml = False
|
||||||
|
MM.Priority = Net.Mail.MailPriority.Normal
|
||||||
|
Dim SC As New System.Net.Mail.SmtpClient("uwa64-033.cafe24.com")
|
||||||
|
SC.Credentials = New System.Net.NetworkCredential("tindevil", "Blue2506")
|
||||||
|
'SC.EnableSsl = True
|
||||||
|
SC.Send(MM)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
64
ArinClassV2/MyNet.vb
Normal file
64
ArinClassV2/MyNet.vb
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
Imports System.Net.NetworkInformation
|
||||||
|
Imports System.Net
|
||||||
|
Imports System.Net.Dns
|
||||||
|
|
||||||
|
Public Class MyNet
|
||||||
|
Public Shared Function GetMacAddr() As String '//MAC주소를 볼수있다.
|
||||||
|
Dim computerProperties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
|
||||||
|
Dim nics As NetworkInterface() = NetworkInterface.GetAllNetworkInterfaces()
|
||||||
|
Dim adapter As NetworkInterface
|
||||||
|
|
||||||
|
Dim 출력용 As String = vbNullString
|
||||||
|
Dim 카드타입 As String = vbNullString
|
||||||
|
Dim 맥주소 As String = vbNullString
|
||||||
|
Dim 임시맥주소 As String = vbNullString
|
||||||
|
|
||||||
|
For Each adapter In nics
|
||||||
|
Dim properties As IPInterfaceProperties = adapter.GetIPProperties()
|
||||||
|
|
||||||
|
카드타입 = adapter.NetworkInterfaceType.ToString.ToUpper.Trim
|
||||||
|
맥주소 = adapter.GetPhysicalAddress.ToString.ToUpper.Trim
|
||||||
|
|
||||||
|
'//VMWARE NIC 까지 감지를 한다.
|
||||||
|
If 카드타입 = "ETHERNET" Then 임시맥주소 = 맥주소
|
||||||
|
If 카드타입 = "ETHERNET" And 임시맥주소.Substring(0, 11) <> "005056C0000" Then 출력용 = 임시맥주소
|
||||||
|
|
||||||
|
Next adapter
|
||||||
|
|
||||||
|
If 출력용 = vbNullString And 맥주소 = vbNullString Then
|
||||||
|
Return "UNKNOWN"
|
||||||
|
ElseIf 출력용 <> vbNullString Then
|
||||||
|
' MsgBox("맥주소출력")
|
||||||
|
Return (출력용)
|
||||||
|
Else
|
||||||
|
'MsgBox("임시맥주소발견")
|
||||||
|
Return (임시맥주소)
|
||||||
|
End If
|
||||||
|
End Function 'DisplayTypeAndAddress
|
||||||
|
|
||||||
|
Public Shared Function GetLocalHostIP() As String '//ip주소보기
|
||||||
|
Dim objAddress As IPAddress
|
||||||
|
Dim B(15) As Byte
|
||||||
|
Dim sAns As String
|
||||||
|
Try
|
||||||
|
objAddress = Dns.GetHostEntry(GetHostName).AddressList(0)
|
||||||
|
sAns = objAddress.ToString
|
||||||
|
Catch ex As Exception
|
||||||
|
sAns = ""
|
||||||
|
End Try
|
||||||
|
Return sAns
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetLocalHostIPArray() As ArrayList '//ip주소보기
|
||||||
|
|
||||||
|
Dim B(15) As Byte
|
||||||
|
Dim sAns As New ArrayList
|
||||||
|
For Each objAddress As IPAddress In Dns.GetHostEntry(GetHostName).AddressList
|
||||||
|
If IsNumeric(objAddress.ToString.Substring(0, 3)) Then
|
||||||
|
sAns.Add(objAddress.ToString)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
Return sAns
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
525
ArinClassV2/MyParser.vb
Normal file
525
ArinClassV2/MyParser.vb
Normal file
@@ -0,0 +1,525 @@
|
|||||||
|
Public Class MyParser
|
||||||
|
'Enum EParam
|
||||||
|
' Text = 0 '//문자형태의자료
|
||||||
|
' Digit = 1 '//숫자형태의 자료
|
||||||
|
' Func = 2 '//함수형태의 자료
|
||||||
|
'End Enum
|
||||||
|
'Structure SParam
|
||||||
|
' Dim Type As EParam
|
||||||
|
' Dim Value As String
|
||||||
|
'End Structure
|
||||||
|
'Structure SCommand
|
||||||
|
' Dim Name As String
|
||||||
|
' Dim ParamList As ArrayList
|
||||||
|
' Dim Unknown As Boolean '//알려진 함수인지?
|
||||||
|
'End Structure
|
||||||
|
Dim SrcText As String
|
||||||
|
Dim CommandList As ArrayList '//여기엔 Scommand 가 들어있다.
|
||||||
|
Dim ErrMsg As System.Text.StringBuilder
|
||||||
|
Public Log As System.Text.StringBuilder
|
||||||
|
|
||||||
|
Public Sub New(ByVal vSrcTest As String)
|
||||||
|
'My.Computer.FileSystem.WriteAllText("c:\command.txT", "srctext=" & vSrcTest & vbCrLf, True)
|
||||||
|
|
||||||
|
SrcText = vSrcTest
|
||||||
|
Check_error(SrcText)
|
||||||
|
If Me.isError Then
|
||||||
|
MsgBox(ErrMsg.ToString, MsgBoxStyle.Critical, "오류")
|
||||||
|
End If
|
||||||
|
Me.Log = New System.Text.StringBuilder("Start MYParser LOg >>" & vbCrLf)
|
||||||
|
End Sub
|
||||||
|
Public Shadows ReadOnly Property toString() As String
|
||||||
|
Get
|
||||||
|
If Me.isError = False Then
|
||||||
|
Dim Value As Object = ParseCommand(SrcText, True)
|
||||||
|
Return Value.ToString
|
||||||
|
End If
|
||||||
|
Return ""
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Shadows ReadOnly Property GetData() As Object
|
||||||
|
Get
|
||||||
|
If Me.isError = False Then
|
||||||
|
Dim Value As Object = ParseCommand(SrcText, True)
|
||||||
|
Return Value
|
||||||
|
End If
|
||||||
|
Return Nothing
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
ReadOnly Property isError() As Boolean
|
||||||
|
Get
|
||||||
|
If Me.ErrMsg.ToString <> "" Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Private Sub Check_error(ByVal vSrcText As String)
|
||||||
|
' Return '//임시로 해제
|
||||||
|
|
||||||
|
Dim Lcnt As Short = 0
|
||||||
|
Dim Rcnt As Short = 0
|
||||||
|
ErrMsg = New System.Text.StringBuilder
|
||||||
|
|
||||||
|
Return '
|
||||||
|
For Each EXP As String In vSrcText.Split(";") '//각명령을 ;로 구분되어잇기떄문에 구분됫것들이 각자의 명령이다.
|
||||||
|
EXP = EXP.Trim
|
||||||
|
Lcnt = MyString.GetInCountChar(EXP, "(") '//파라미터 시작갯수
|
||||||
|
Rcnt = MyString.GetInCountChar(EXP, ")") '//파라미터 종료갯수
|
||||||
|
If Lcnt <> Rcnt Then '//오류검사
|
||||||
|
ErrMsg.AppendLine(EXP & "파라미터 시작기호 ( 와 종료기호 ) 가 일치하지 않습니다")
|
||||||
|
End If
|
||||||
|
Lcnt = MyString.GetInCountChar(EXP, Chr(34)) '//파라미터 시작갯수
|
||||||
|
Rcnt = MyString.GetInCountChar(EXP, Chr(34)) '//파라미터 종료갯수
|
||||||
|
If Lcnt <> Rcnt Then '//오류검사
|
||||||
|
ErrMsg.AppendLine(EXP & "문자열묶음기호(" & Chr(34) & ")가 일치하지 않습니다")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function ParseCommand(ByVal vSrcText As String, ByVal isfirst As Boolean, Optional ByVal NEwValue As Object = "") As Object
|
||||||
|
'//각명령어를 쪼갠다.
|
||||||
|
'//중첩명령어의 경우에도 쪼갠다.
|
||||||
|
|
||||||
|
|
||||||
|
'Dim Cmd As String '//명령어
|
||||||
|
'Dim Param As String '//명렁파라미터
|
||||||
|
'Dim target As String '//타겏값
|
||||||
|
'Dim Str As String
|
||||||
|
'Dim Line As String
|
||||||
|
|
||||||
|
If isfirst Then Me.CommandList = New ArrayList '//처음에만 이것을 초기화한다.
|
||||||
|
|
||||||
|
'//left(format(now,"yyyyMMddHHmmss"),1)
|
||||||
|
'//먼저 ( 의 수와 ) 의 수가 맞는지 확인한다.
|
||||||
|
|
||||||
|
'Dim NewValue As Object = ""
|
||||||
|
|
||||||
|
|
||||||
|
Me.Log.AppendLine("Command Expression : " & vSrcText)
|
||||||
|
For Each EXP As String In vSrcText.Split(";") '//각명령을 ;로 구분되어잇기떄문에 구분됫것들이 각자의 명령이다.
|
||||||
|
Me.Log.AppendLine("New Line Value is : " & NewValue.ToString)
|
||||||
|
|
||||||
|
EXP = EXP.Trim
|
||||||
|
Dim CmdFind As Boolean = False '//명령어를다 찾앗는가?
|
||||||
|
Dim ParamFind As Boolean = False
|
||||||
|
Dim NewParam As New System.Text.StringBuilder
|
||||||
|
Dim Isfunction As Boolean = False
|
||||||
|
Dim IsFunctionEnd As Boolean = False
|
||||||
|
Dim InnerFuncCnt As Short = 0
|
||||||
|
Dim NewCmd As New System.Text.StringBuilder
|
||||||
|
Dim ParamList As New ArrayList
|
||||||
|
Dim IsTextInner As Boolean = False
|
||||||
|
|
||||||
|
If EXP <> "" Then '//명령어가 존재햇을때
|
||||||
|
|
||||||
|
'My.Computer.FileSystem.WriteAllText("c:\command.txT", "expressiong=" & EXP, True)
|
||||||
|
|
||||||
|
If EXP.Substring(0, 1) = Chr(34) Then '//첫데이터가 " 로시작한다면 이건 그냥 문자열값을의미한다.
|
||||||
|
NewValue = EXP '//해당문자자체가 값이된다.
|
||||||
|
Else
|
||||||
|
'//파라미터란 ()사이의 명령어이며, 콤마(,)로 분리된다
|
||||||
|
'//단 "" 사이의 콤마는 인정하지않는다.
|
||||||
|
|
||||||
|
For Each C As Char In EXP.ToCharArray
|
||||||
|
If CmdFind = False Then
|
||||||
|
If C = "(" Then
|
||||||
|
CmdFind = True
|
||||||
|
Else
|
||||||
|
NewCmd.Append(C)
|
||||||
|
End If
|
||||||
|
Else '//명령어를 찾은상태이므로 파라미터를 추가한다. 파람은 , 로 분리되어잇다.
|
||||||
|
Select Case C
|
||||||
|
Case ","
|
||||||
|
If IsTextInner Then
|
||||||
|
NewParam.Append(C)
|
||||||
|
Else
|
||||||
|
If Isfunction = False Then '//펑션부분이 아니여야한다.
|
||||||
|
If IsFunctionEnd Then
|
||||||
|
ParamList.Add(NewParam.ToString) '//파라미터를 찾았으므로 파람리스트에 추가한다.
|
||||||
|
'//파라미터중에 # 가 앞에 붙으면 함수로 인정한다.
|
||||||
|
Else '//이번것은 펑션이 아니므로 파람리스트에 추가한다.
|
||||||
|
ParamList.Add(NewParam.ToString) '//파라미터를 찾았으므로 파람리스트에 추가한다.
|
||||||
|
End If
|
||||||
|
NewParam = New System.Text.StringBuilder '//파라미터부분 초기화
|
||||||
|
IsFunctionEnd = False
|
||||||
|
'//이파라미터의 종결을 으미한다. '//left(format(now,"yyyyMMddHHmmss"),1)
|
||||||
|
Else
|
||||||
|
NewParam.Append(C)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case "("
|
||||||
|
If IsTextInner Then
|
||||||
|
NewParam.Append(C)
|
||||||
|
Else
|
||||||
|
If Isfunction Then '//함수잇는데 함수가 또잇네?
|
||||||
|
InnerFuncCnt += 1
|
||||||
|
NewParam.Append(C)
|
||||||
|
Else
|
||||||
|
Isfunction = True '//이파라미터가 또 함수를 가지고있다 ㅠ_ㅠ;
|
||||||
|
NewParam.Append(C)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case ")"
|
||||||
|
If IsTextInner Then
|
||||||
|
NewParam.Append(C)
|
||||||
|
Else
|
||||||
|
If Isfunction Then
|
||||||
|
If InnerFuncCnt > 0 Then '/.내부펑션이 게속잇엇다
|
||||||
|
InnerFuncCnt -= 1
|
||||||
|
NewParam.Append(C)
|
||||||
|
Else
|
||||||
|
Isfunction = False '//이파라미터가 또 함수를 가지고있다 ㅠ_ㅠ;
|
||||||
|
IsFunctionEnd = True
|
||||||
|
NewParam.Append(C)
|
||||||
|
End If
|
||||||
|
Else '//펑션상태가 아닌데 )를만나면 명령어의 종료를 의미한다. 현재 파람을 확인하고 추가한다.
|
||||||
|
If NewParam.ToString <> "" Then ParamList.Add(NewParam.ToString) '//파라미터를 찾았으므로 파람리스트에 추가한다.
|
||||||
|
NewParam = New System.Text.StringBuilder '//파라미터부분 초기화
|
||||||
|
IsFunctionEnd = False
|
||||||
|
|
||||||
|
'MsgBox("명령어실행 : " & NewCmd.ToString)
|
||||||
|
'//각 파라미터들의 값을 가져온다
|
||||||
|
Me.Log.AppendLine("New COmmand : " & NewCmd.ToString & " paramCount=" & ParamList.Count)
|
||||||
|
Select Case NewCmd.ToString.ToUpper
|
||||||
|
Case "ISEQULE" '//둘이 같은지 반환해준다.
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("ISEQULE 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As Object = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
Dim Param2 As Object = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
' MsgBox(ParamList(1).ToString & "/" & NewValue)
|
||||||
|
Me.Log.AppendLine("ISEQULE " & Param1 & vbTab & Param2)
|
||||||
|
If Param1 <> Param2 Then
|
||||||
|
Me.Log.AppendLine("ISEQULE RETURN FALSE")
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
Me.Log.AppendLine("ISEQULE RETURN TRUE")
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
'MsgBox(Param1, MsgBoxStyle.Information, "확인")
|
||||||
|
End If
|
||||||
|
Case "IF"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("IF 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As Object = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As Object = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
If Param1 <> Param2 Then
|
||||||
|
Me.Log.AppendLine("If FALSE Case Exit Loop Return Nullstring")
|
||||||
|
Return "" '//해당구문전체를 모두 FALSE한다.
|
||||||
|
Else
|
||||||
|
Me.Log.AppendLine("If True Case IN(" & Param1 & " " & Param2 & ")")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'MsgBox(Param1, MsgBoxStyle.Information, "확인")
|
||||||
|
End If
|
||||||
|
Case "IFNOT"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("IFNOT 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As Object = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
Dim Param2 As Object = RunParam(ParamList(1).ToString, NEwValue)
|
||||||
|
If Param1 = Param2 Then
|
||||||
|
Me.Log.AppendLine("If FALSE Case Exit Loop Return Nullstring")
|
||||||
|
Return "" '//해당구문전체를 모두 FALSE한다.
|
||||||
|
Else
|
||||||
|
Me.Log.AppendLine("If True Case IN(" & Param1 & " " & Param2 & ")")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'MsgBox(Param1, MsgBoxStyle.Information, "확인")
|
||||||
|
End If
|
||||||
|
Case "MSGBOX", "MSG"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("MSGBOX 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
MsgBox(Param1, MsgBoxStyle.Information, "확인")
|
||||||
|
End If
|
||||||
|
Case "ISNUM"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("ISNUM 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
NEwValue = IsNumeric(Param1)
|
||||||
|
'NEwValue = Param1.ToString.Replace(Param2, Param3)
|
||||||
|
'MsgBox("p1=" & Param1 & " p2=" & Param2, MsgBoxStyle.Information, NewValue)
|
||||||
|
End If
|
||||||
|
Case "NVL"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("ISEMPTY 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
Dim Param2 As Object = RunParam(ParamList(1).ToString, NEwValue)
|
||||||
|
If Param1.Trim = "" Then '//비어있으면 두번째꺼를 쓰고
|
||||||
|
NEwValue = Param2
|
||||||
|
Else '//안비어있으면 원래값을 쓴다.
|
||||||
|
NEwValue = Param1
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Case "INDEXOF"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("INDEXOF 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NEwValue)
|
||||||
|
NEwValue = Param1.IndexOf(Param2) + 1
|
||||||
|
|
||||||
|
End If
|
||||||
|
Case "LINDEXOF"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("LINDEXOF 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NEwValue)
|
||||||
|
NEwValue = Param1.LastIndexOf(Param2) + 1
|
||||||
|
End If
|
||||||
|
Case "REPLACE"
|
||||||
|
If ParamList.Count <> 3 Then
|
||||||
|
MsgBox("REPLACE 함수에 3개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NEwValue)
|
||||||
|
Dim Param3 As String = RunParam(ParamList(2).ToString, NEwValue)
|
||||||
|
NEwValue = Param1.ToString.Replace(Param2, Param3)
|
||||||
|
'MsgBox("p1=" & Param1 & " p2=" & Param2, MsgBoxStyle.Information, NewValue)
|
||||||
|
End If
|
||||||
|
Case "REMOVECHAR"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("REMOVESPACE 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As Object = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
NewValue = Param1.Trim(Param2.ToCharArray).ToString.Trim
|
||||||
|
'MsgBox("p1=" & Param1 & " p2=" & Param2, MsgBoxStyle.Information, NewValue)
|
||||||
|
End If
|
||||||
|
Case "REMOVESCHAR" '//특수기호삭제한다.
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("REMOVESCHAR 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim NewString As New Text.StringBuilder
|
||||||
|
For Each Cc As Char In Param1.ToCharArray
|
||||||
|
Select Case Asc(Cc)
|
||||||
|
Case 65 To 90, 48 To 57, 97 To 122, Is < 0, 32
|
||||||
|
NewString.Append(Cc)
|
||||||
|
End Select
|
||||||
|
Next
|
||||||
|
NewValue = NewString.ToString
|
||||||
|
End If
|
||||||
|
Case "REMOVESPACE"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("REMOVESPACE 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = Param1.Replace(Space(1), vbNullString)
|
||||||
|
End If
|
||||||
|
Case "TOUPPER"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("TOUPPER 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = Param1.ToUpper
|
||||||
|
End If
|
||||||
|
Case "TOLOWER"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("TOLOWER 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = Param1.ToLower
|
||||||
|
End If
|
||||||
|
Case "LENB"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("LENB 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = System.Text.Encoding.Default.GetByteCount(Param1)
|
||||||
|
End If
|
||||||
|
Case "LEN"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("LEN 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = Param1.Length
|
||||||
|
End If
|
||||||
|
Case "RIGHTADD"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("RIGHTADD 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
NewValue = Param1 & Param2
|
||||||
|
End If
|
||||||
|
Case "ADDNUM"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("ADDNUM 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As Integer = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As Integer = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
NewValue = Param1 + Param2
|
||||||
|
End If
|
||||||
|
Case "LEFTADD"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("LEFTADD 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
NewValue = Param2 & Param1
|
||||||
|
End If
|
||||||
|
Case "TODATE"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("TODATE 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = (CDate(Param1))
|
||||||
|
End If
|
||||||
|
Case "TOSTRING"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("TOSTRING 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = (CStr(Param1))
|
||||||
|
End If
|
||||||
|
Case "TOINT"
|
||||||
|
If ParamList.Count <> 1 Then
|
||||||
|
MsgBox("TOINT 함수에 1개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As Integer = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
NewValue = Param1
|
||||||
|
End If
|
||||||
|
Case "NOW"
|
||||||
|
NEwValue = Now
|
||||||
|
|
||||||
|
Case "SUBSTRING" '//2개의 파라미터를 사용한다.
|
||||||
|
If ParamList.Count < 2 Then
|
||||||
|
MsgBox("SUBSTRING 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NEwValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NEwValue)
|
||||||
|
Dim param3 As String = ""
|
||||||
|
If ParamList.Count = 3 Then
|
||||||
|
param3 = RunParam(ParamList(2).ToString, NEwValue)
|
||||||
|
End If
|
||||||
|
If Param1.Trim = "" OrElse IsNumeric(Param2) = False OrElse CInt(Param2) < 0 Then
|
||||||
|
NEwValue = ""
|
||||||
|
Else
|
||||||
|
If param3 <> "" Then
|
||||||
|
NEwValue = Param1.Substring(Param2, param3)
|
||||||
|
Else
|
||||||
|
NEwValue = Param1.Substring(Param2)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Case "LEFT" '//2개의 파라미터를 사용한다.
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("LEFT 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
NewValue = Left(Param1, Param2)
|
||||||
|
End If
|
||||||
|
Case "RIGHT" '//2개의 파라미터를 사용한다.
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("RIGHT 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
NewValue = Right(Param1, Param2)
|
||||||
|
End If
|
||||||
|
Case "MID" '//2개의 파라미터를 사용한다.
|
||||||
|
If ParamList.Count <> 3 Then
|
||||||
|
MsgBox("MID 함수에 3개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As String = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
Dim Param3 As String = RunParam(ParamList(2).ToString, NEwValue)
|
||||||
|
If Param2 = "-1" OrElse Param3 < 1 Then
|
||||||
|
MsgBox("MID 함수의 시작위치값은 0이상이여야합니다" & vbCrLf & _
|
||||||
|
"MID 함수의 추출길이는 1이상이여야합니다", MsgBoxStyle.Information, "확인")
|
||||||
|
NEwValue = ""
|
||||||
|
Else
|
||||||
|
NEwValue = Mid(Param1, Param2, Param3)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Case "FORMAT"
|
||||||
|
If ParamList.Count <> 2 Then
|
||||||
|
MsgBox("FORMAT 함수에 2개의 파라미터가 없습니다")
|
||||||
|
Else
|
||||||
|
Dim Param1 As Object = RunParam(ParamList(0).ToString, NewValue)
|
||||||
|
Dim Param2 As String = RunParam(ParamList(1).ToString, NewValue)
|
||||||
|
|
||||||
|
' MsgBox(Param1 & "/" & Param2)
|
||||||
|
NewValue = Format(Param1, Param2)
|
||||||
|
End If
|
||||||
|
Case Else
|
||||||
|
NewValue = RunUnknown(NewCmd.ToString, NewValue, ParamList)
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Case Else
|
||||||
|
If C = Chr(34) Then '//" 옴표가왓다면
|
||||||
|
IsTextInner = Not IsTextInner
|
||||||
|
NewParam.Append(C)
|
||||||
|
ElseIf IsFunctionEnd Then '//함수종결문인데 , 가 아닌다른게 왓다면 오류다
|
||||||
|
MsgBox("내부한수 종결문다음에 , 가 와야하는데 " & C & "가 왔습니다")
|
||||||
|
Else
|
||||||
|
NewParam.Append(C)
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
'MsgBox("명령어 : " & NewCmd.ToString)
|
||||||
|
'For Each S As String In ParamList
|
||||||
|
' MsgBox("파람 : " & S)
|
||||||
|
'Next
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Me.Log.AppendLine("ParseCOmmand Return : " & NewValue.ToString)
|
||||||
|
Return NewValue
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function RunParam(ByVal vParam As String, ByVal SrcValue As Object) As Object
|
||||||
|
'My.Computer.FileSystem.WriteAllText("c:\log.txT", "runparam param=" & vParam, True)
|
||||||
|
vParam = vParam.Trim
|
||||||
|
If vParam = "" Then Return ""
|
||||||
|
If vParam.Substring(0, 1) = Chr(34) Then '//파라미터자체가 "" 로시작한다면
|
||||||
|
Return vParam.Trim(Chr(34))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If vParam.ToUpper = "TRUE" Then Return True
|
||||||
|
If vParam.ToUpper = "FALSE" Then Return False
|
||||||
|
|
||||||
|
'//시작값이 숫자라면 이건 숫자값이다.
|
||||||
|
If IsNumeric(vParam.Substring(0, 1)) = True Then Return vParam
|
||||||
|
|
||||||
|
'//시작값이 # 라면 원본 데이터이다.
|
||||||
|
If vParam = "#" Then Return SrcValue
|
||||||
|
|
||||||
|
'//시작값이 숫자도 일반 문자도 공백도 아니라면 영문단어이다.
|
||||||
|
'// ( 가 있다면 함수이므로 함수를 실행한다.
|
||||||
|
Select Case vParam.ToUpper
|
||||||
|
Case "NOW" '//date 타입을 반환한다.
|
||||||
|
Return Now
|
||||||
|
Case Else
|
||||||
|
If vParam.IndexOf("(") <> -1 Then '//일반 실행가능용 명령어이다.
|
||||||
|
Return Me.ParseCommand(vParam, False, SrcValue)
|
||||||
|
Else
|
||||||
|
Return RunUnknown(vParam, SrcValue) '//비지원 목록으로 반환한다.
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
Return ""
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Overridable Function RunUnknown(ByVal Cmd As String, ByVal Srcvalue As Object, Optional ByVal Paramlist As ArrayList = Nothing) As Object
|
||||||
|
MsgBox("RunUnknown 함수를 재정의 하세요")
|
||||||
|
Return ""
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
52
ArinClassV2/MyPath.vb
Normal file
52
ArinClassV2/MyPath.vb
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
Public Class MyPath
|
||||||
|
Public Function Current() As String
|
||||||
|
Return My.Application.Info.DirectoryPath
|
||||||
|
End Function
|
||||||
|
Public Function Windows() As String
|
||||||
|
Dim SYSTEMD As String = (System.Environment.GetFolderPath(Environment.SpecialFolder.System))
|
||||||
|
Dim DI As System.IO.DirectoryInfo = New System.IO.DirectoryInfo(SYSTEMD)
|
||||||
|
Return DI.Parent.FullName
|
||||||
|
End Function
|
||||||
|
Public Function System32() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.System).ToString
|
||||||
|
End Function
|
||||||
|
Public Function Desktop() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||||
|
End Function
|
||||||
|
Public Function DesktopPath() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
|
||||||
|
End Function
|
||||||
|
Public Function Mycomputer() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.MyComputer)
|
||||||
|
End Function
|
||||||
|
Public Function Mydocument() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||||
|
End Function
|
||||||
|
Public Function Programfiles() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
|
||||||
|
End Function
|
||||||
|
Public Function StartMenu() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.StartMenu)
|
||||||
|
End Function
|
||||||
|
Public Function StartUp() As String
|
||||||
|
Return System.Environment.GetFolderPath(Environment.SpecialFolder.Startup)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetFileArray(ByVal p_path As String, Optional ByVal p_searchPatten As String = "*.*", Optional ByVal p_subdir As Boolean = False) As ArrayList
|
||||||
|
|
||||||
|
Dim extensions() As String = p_searchPatten.Split(",")
|
||||||
|
Dim FileArray As New ArrayList
|
||||||
|
|
||||||
|
Dim Di As New System.IO.DirectoryInfo(p_path)
|
||||||
|
|
||||||
|
For Each ext As String In extensions
|
||||||
|
For Each Fi As System.IO.FileInfo In Di.GetFiles(ext, IIf(p_subdir = True, 1, 0))
|
||||||
|
FileArray.Add(Fi)
|
||||||
|
Next
|
||||||
|
'FileArray.AddRange(Di.GetFiles(ext, IIf(p_subdir = True, 1, 0)))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return FileArray
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
60
ArinClassV2/MyProcess.vb
Normal file
60
ArinClassV2/MyProcess.vb
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Public Class MyProcess
|
||||||
|
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
|
||||||
|
Declare Function PostMessage Lib "user32.dll" Alias "PostMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer
|
||||||
|
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Integer)
|
||||||
|
Private Const WM_QUIT = &H12
|
||||||
|
Private Const WM_CLOSE = &H10
|
||||||
|
|
||||||
|
|
||||||
|
Public Function RunProcess(ByVal 파일이름 As String, Optional ByVal 실행옵션 As String = vbNullString) As Boolean
|
||||||
|
Dim RunP As Process
|
||||||
|
Dim B As System.Diagnostics.ProcessStartInfo = New System.Diagnostics.ProcessStartInfo
|
||||||
|
|
||||||
|
If FileIO.FileSystem.FileExists(파일이름) Then
|
||||||
|
B.FileName = 파일이름
|
||||||
|
B.WorkingDirectory = 파일이름.Substring(0, 파일이름.LastIndexOf("\"))
|
||||||
|
B.Arguments = 실행옵션
|
||||||
|
RunP = Process.Start(B)
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function checkmyproc(ByVal 프로세스명 As String) As Boolean
|
||||||
|
Dim Prc() As Process = Process.GetProcesses '//현재프로세스배열을 가져온다.
|
||||||
|
Dim MyPrc As Process
|
||||||
|
Dim 파일명 As String = 프로세스명.Substring(프로세스명.LastIndexOf("\") + 1).ToUpper
|
||||||
|
For Each MyPrc In Prc
|
||||||
|
If (MyPrc.ProcessName & ".EXE").ToUpper = 파일명 Then Return True
|
||||||
|
Next
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub KillMyProc(ByVal 클래스명 As String)
|
||||||
|
Dim Np As IntPtr
|
||||||
|
Np = FindWindow(클래스명, vbNullString)
|
||||||
|
'Me.lstOutput.Items.Add("WHND:" & Np.ToInt32.ToString)
|
||||||
|
If Np = 0 Then
|
||||||
|
'Form_Standard.MDIMessage.Text = "Cannot Find :" & 클래스명
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
PostMessage(Np.ToInt32, WM_QUIT, 0&, 0&)
|
||||||
|
Sleep(500)
|
||||||
|
End Sub
|
||||||
|
Public Sub oKillMyProc(ByVal 프로세스명 As String)
|
||||||
|
Dim Prc() As Process = Process.GetProcesses '//현재프로세스배열을 가져온다.
|
||||||
|
Dim MyPrc As Process
|
||||||
|
Dim 파일명 As String = 프로세스명.Substring(프로세스명.LastIndexOf("\") + 1).ToUpper
|
||||||
|
For Each MyPrc In Prc
|
||||||
|
If (MyPrc.ProcessName & ".EXE").ToUpper = 파일명 Then
|
||||||
|
|
||||||
|
' MsgBox(MyPrc.StartInfo.Fileame)
|
||||||
|
MyPrc.Kill()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Sleep(500)
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
115
ArinClassV2/MyReg.vb
Normal file
115
ArinClassV2/MyReg.vb
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
Imports Microsoft.Win32
|
||||||
|
Public Class MyReG
|
||||||
|
Enum RegRootkey
|
||||||
|
CURRENT_USER = 1
|
||||||
|
LOCAL_MACHINE = 2
|
||||||
|
CLASSES_ROOT = 3
|
||||||
|
USERS = 4
|
||||||
|
CURRENT_CONFIG = 5
|
||||||
|
End Enum
|
||||||
|
Public Function Read(ByVal rootkey As RegRootkey, ByVal subkey As String, ByVal ValName As String) As Object
|
||||||
|
Dim RegKey As RegistryKey
|
||||||
|
Dim Result As Object
|
||||||
|
|
||||||
|
Select Case rootkey
|
||||||
|
Case RegRootkey.CURRENT_USER
|
||||||
|
RegKey = Registry.CurrentUser.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.LOCAL_MACHINE
|
||||||
|
RegKey = Registry.LocalMachine.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.CLASSES_ROOT
|
||||||
|
RegKey = Registry.ClassesRoot.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.USERS
|
||||||
|
RegKey = Registry.Users.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.CURRENT_CONFIG
|
||||||
|
RegKey = Registry.CurrentConfig.OpenSubKey(subkey, True)
|
||||||
|
Case Else
|
||||||
|
Return Nothing
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If Not RegKey Is Nothing Then
|
||||||
|
Result = RegKey.GetValue(ValName, Nothing)
|
||||||
|
RegKey.Close()
|
||||||
|
Return Result
|
||||||
|
Else '//첫 실행일때다 즉 값이 없을때
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
Public Function Write(ByVal rootkey As RegRootkey, ByVal subkey As String, ByVal ValName As String, ByVal ValVal As String) As Boolean
|
||||||
|
Dim RegKey As RegistryKey
|
||||||
|
' Dim Result As Object
|
||||||
|
Select Case rootkey
|
||||||
|
Case RegRootkey.CURRENT_USER
|
||||||
|
RegKey = Registry.CurrentUser.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.LOCAL_MACHINE
|
||||||
|
RegKey = Registry.LocalMachine.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.CLASSES_ROOT
|
||||||
|
RegKey = Registry.ClassesRoot.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.USERS
|
||||||
|
RegKey = Registry.Users.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.CURRENT_CONFIG
|
||||||
|
RegKey = Registry.CurrentConfig.OpenSubKey(subkey, True)
|
||||||
|
Case Else
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If RegKey Is Nothing Then
|
||||||
|
Select Case rootkey
|
||||||
|
Case RegRootkey.CURRENT_USER
|
||||||
|
RegKey = Registry.CurrentUser.CreateSubKey(subkey)
|
||||||
|
Case RegRootkey.LOCAL_MACHINE
|
||||||
|
RegKey = Registry.LocalMachine.CreateSubKey(subkey)
|
||||||
|
Case RegRootkey.CLASSES_ROOT
|
||||||
|
RegKey = Registry.ClassesRoot.CreateSubKey(subkey)
|
||||||
|
Case RegRootkey.USERS
|
||||||
|
RegKey = Registry.Users.CreateSubKey(subkey)
|
||||||
|
Case RegRootkey.CURRENT_CONFIG
|
||||||
|
RegKey = Registry.CurrentConfig.CreateSubKey(subkey)
|
||||||
|
Case Else
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
RegKey.SetValue(ValName, ValVal)
|
||||||
|
RegKey.Close()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
Public Function DeleteKey(ByVal rootkey As RegRootkey, ByVal subkey As String) As Boolean
|
||||||
|
'//잘 작동함
|
||||||
|
Select Case rootkey
|
||||||
|
Case RegRootkey.CURRENT_USER
|
||||||
|
Registry.CurrentUser.DeleteSubKeyTree(subkey)
|
||||||
|
Case RegRootkey.LOCAL_MACHINE
|
||||||
|
Registry.LocalMachine.DeleteSubKeyTree(subkey)
|
||||||
|
Case RegRootkey.CLASSES_ROOT
|
||||||
|
Registry.ClassesRoot.DeleteSubKeyTree(subkey)
|
||||||
|
Case RegRootkey.USERS
|
||||||
|
Registry.Users.DeleteSubKeyTree(subkey)
|
||||||
|
Case RegRootkey.CURRENT_CONFIG
|
||||||
|
Registry.CurrentConfig.DeleteSubKeyTree(subkey)
|
||||||
|
Case Else
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
Public Function DeleteVal(ByVal rootkey As RegRootkey, ByVal subkey As String, ByVal ValName As String) As Boolean
|
||||||
|
Dim RegKey As RegistryKey
|
||||||
|
' Dim Result As Object
|
||||||
|
Select Case rootkey
|
||||||
|
Case RegRootkey.CURRENT_USER
|
||||||
|
RegKey = Registry.CurrentUser.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.LOCAL_MACHINE
|
||||||
|
RegKey = Registry.LocalMachine.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.CLASSES_ROOT
|
||||||
|
RegKey = Registry.ClassesRoot.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.USERS
|
||||||
|
RegKey = Registry.Users.OpenSubKey(subkey, True)
|
||||||
|
Case RegRootkey.CURRENT_CONFIG
|
||||||
|
RegKey = Registry.CurrentConfig.OpenSubKey(subkey, True)
|
||||||
|
Case Else
|
||||||
|
Return False
|
||||||
|
End Select
|
||||||
|
|
||||||
|
RegKey.DeleteValue(ValName)
|
||||||
|
RegKey.Close()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
152
ArinClassV2/MyString.vb
Normal file
152
ArinClassV2/MyString.vb
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
Public Class MyString
|
||||||
|
'//문자열관련이다.
|
||||||
|
Private Shared ChoSung As Char()
|
||||||
|
Private Shared JongSung As Char()
|
||||||
|
Private Shared JungSung As Char()
|
||||||
|
|
||||||
|
Enum E_Hangle
|
||||||
|
한글아님 = 0
|
||||||
|
완성형
|
||||||
|
자모
|
||||||
|
초성
|
||||||
|
중성
|
||||||
|
종성
|
||||||
|
End Enum
|
||||||
|
Enum e_UnicodeHanAddress
|
||||||
|
chosung_start = &H1100
|
||||||
|
jungsung_start = &H1161
|
||||||
|
jongsung_start = &H11A7
|
||||||
|
wangsung_start = &HAC00
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Shared Sub New()
|
||||||
|
ChoSung = New Char() {"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ", "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"}
|
||||||
|
JungSung = New Char() {"ㅏ", "ㅐ", "ㅑ", "ㅒ", "ㅓ", "ㅔ", "ㅕ", "ㅖ", "ㅗ", "ㅘ", "ㅙ", "ㅚ", "ㅛ", "ㅜ", "ㅝ", "ㅞ", "ㅟ", "ㅠ", "ㅡ", "ㅢ", "ㅣ"}
|
||||||
|
JongSung = New Char() {ChrW(0), "ㄱ", "ㄲ", "ㄳ", "ㄴ", "ㄵ", "ㄶ", "ㄷ", "ㄹ", "ㄺ", "ㄻ", "ㄼ", "ㄽ", "ㄾ", "ㄿ", "ㅀ", "ㅁ", "ㅂ", "ㅄ", "ㅅ", "ㅆ", "ㅇ", "ㅈ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"}
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function Read_ConString(ByVal CSFile As String) As String
|
||||||
|
Dim A As New EnDec("ENDECPASSWORDKEY")
|
||||||
|
Dim Cs As String = ""
|
||||||
|
If System.IO.File.Exists(CSFile) = False Then
|
||||||
|
MsgBox("연결파일이 존재하지않습니다" & vbCrLf & "로그인기능을 이용할 수 없습니다", MsgBoxStyle.Critical, "확인")
|
||||||
|
'Return ""
|
||||||
|
End If
|
||||||
|
Return A.Read_STring(CSFile)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function FindIndex(ByVal list As Char(), ByVal c As Char) As Integer
|
||||||
|
Dim i As Integer
|
||||||
|
For i = 0 To list.Length - 1
|
||||||
|
If list(i).Equals(c) Then
|
||||||
|
Return i
|
||||||
|
End If
|
||||||
|
Next i
|
||||||
|
Return -1
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function AssembleHangul(ByVal cho As Char, ByVal jung As Char, ByVal jong As Char) As String
|
||||||
|
If (cho.Equals(ChrW(0)) OrElse jung.Equals(ChrW(0))) Then
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
Dim num As Short = CShort(MyString.FindIndex(MyString.ChoSung, cho))
|
||||||
|
Dim num3 As Short = CShort(MyString.FindIndex(MyString.JungSung, jung))
|
||||||
|
Dim num2 As Short = CShort(MyString.FindIndex(MyString.JongSung, jong))
|
||||||
|
Dim charCode As Integer = (((((num * &H15) + num3) * &H1C) + num2) + &HAC00)
|
||||||
|
Return ChrW(charCode)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetChosung(ByVal c As Char) As Char
|
||||||
|
Dim cho As Char = ChrW(0)
|
||||||
|
Dim jung As Char = ChrW(0)
|
||||||
|
Dim jong As Char = ChrW(0)
|
||||||
|
MyString.GetSplitHangul(c, (cho), (jung), (jong))
|
||||||
|
Return cho
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetInCountChar(ByVal vStr As String, ByVal vChar As String) As Short
|
||||||
|
Dim num2 As Short = 0
|
||||||
|
|
||||||
|
For Each ch As Char In vStr.ToUpper.ToCharArray
|
||||||
|
If ch = vChar.ToUpper Then
|
||||||
|
num2 = CShort((num2 + 1))
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return num2
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetSplitHangul(ByVal HanChar As Char, ByRef cho As Char, ByRef jung As Char, ByRef jong As Char) As Integer
|
||||||
|
Dim num As Integer = AscW(HanChar)
|
||||||
|
cho = ChrW(0)
|
||||||
|
jung = ChrW(0)
|
||||||
|
jong = ChrW(0)
|
||||||
|
If (MyString.IsHangul(HanChar) <> E_Hangle.완성형) Then
|
||||||
|
Return -1
|
||||||
|
End If
|
||||||
|
num = (num - &HAC00)
|
||||||
|
Dim index As Integer = CInt(Math.Round(Conversion.Int(CDbl((CDbl(num) / 588)))))
|
||||||
|
num = (num Mod &H24C)
|
||||||
|
Dim num5 As Integer = CInt(Math.Round(Conversion.Int(CDbl((CDbl(num) / 28)))))
|
||||||
|
Dim num4 As Integer = (num Mod &H1C)
|
||||||
|
If (((index > &H12) Or (num5 > 20)) Or (num4 > &H1B)) Then
|
||||||
|
Return -1
|
||||||
|
End If
|
||||||
|
cho = MyString.ChoSung(index)
|
||||||
|
jung = MyString.JungSung(num5)
|
||||||
|
jong = MyString.JongSung(num4)
|
||||||
|
Return IIf(jong = ChrW(0), 0, 1)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IsHangul(ByVal c As Char) As E_Hangle
|
||||||
|
Dim num As Integer = AscW(c)
|
||||||
|
Dim num2 As Integer = num
|
||||||
|
If ((num2 >= &H1100) AndAlso (num2 <= &H1159)) Then
|
||||||
|
Return E_Hangle.초성
|
||||||
|
End If
|
||||||
|
If ((num2 >= &H1161) AndAlso (num2 <= &H11A2)) Then
|
||||||
|
Return E_Hangle.중성
|
||||||
|
End If
|
||||||
|
If ((num2 >= &H11A7) AndAlso (num2 <= &H11F9)) Then
|
||||||
|
Return E_Hangle.종성
|
||||||
|
End If
|
||||||
|
If ((num2 >= &H3130) AndAlso (num2 <= &H318F)) Then
|
||||||
|
Return E_Hangle.자모
|
||||||
|
End If
|
||||||
|
If ((num2 >= &HAC00) AndAlso (num2 <= &HD7AF)) Then
|
||||||
|
Return E_Hangle.완성형
|
||||||
|
End If
|
||||||
|
Return E_Hangle.한글아님
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Public Shared Function GetOrgString(ByVal src As String, Optional ByVal Exp As Boolean = False, Optional ByVal UseOriginal As Boolean = False) As String
|
||||||
|
If UseOriginal Then Return src
|
||||||
|
If src = "" Then Return ""
|
||||||
|
Dim retstr As New System.Text.StringBuilder
|
||||||
|
Dim ascnum As Integer
|
||||||
|
For Each C As Char In src.ToCharArray
|
||||||
|
ascnum = Asc(C)
|
||||||
|
' MsgBox(C, MsgBoxStyle.Information, ascnum)
|
||||||
|
If Exp = True AndAlso (C = "-" OrElse ascnum = 40 OrElse ascnum = 91) Then '// ( 나 [를 발견하면 그대로 빠진다.
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
If ascnum < 0 OrElse ascnum > 127 OrElse (ascnum > 47 AndAlso ascnum < 58) OrElse (ascnum > 64 AndAlso ascnum < 91) OrElse (ascnum > 96 AndAlso ascnum < 123) Then
|
||||||
|
retstr.Append(C)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return retstr.ToString
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Class
|
||||||
132
ArinClassV2/MyXml.vb
Normal file
132
ArinClassV2/MyXml.vb
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
Imports System.Xml
|
||||||
|
|
||||||
|
Public Class MyXML
|
||||||
|
Private File As String
|
||||||
|
Private vDocu As XmlDocument = Nothing
|
||||||
|
Private nsmgr As XmlNamespaceManager
|
||||||
|
Public Root As XmlElement
|
||||||
|
|
||||||
|
Public ReadOnly Property Docu() As XmlDocument
|
||||||
|
Get
|
||||||
|
Return Me.vDocu
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub New(ByVal Filename As String)
|
||||||
|
Me.File = Filename
|
||||||
|
If Exist() Then '//파일이 존재하면 도큐먼트반환
|
||||||
|
Me.vDocu = New XmlDocument
|
||||||
|
nsmgr = New XmlNamespaceManager(New Xml.NameTable)
|
||||||
|
nsmgr.AddNamespace("x", "http://tindevil.com")
|
||||||
|
Try
|
||||||
|
Me.vDocu.Load(Filename)
|
||||||
|
Root = vDocu.DocumentElement
|
||||||
|
Catch ex As Exception
|
||||||
|
Me.vDocu = Nothing
|
||||||
|
Me.Root = Nothing
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New(ByVal docu As Xml.XmlDocument)
|
||||||
|
Me.vDocu = docu
|
||||||
|
Me.File = My.Application.Info.DirectoryPath & "\temp.xml"
|
||||||
|
nsmgr = New XmlNamespaceManager(New Xml.NameTable)
|
||||||
|
nsmgr.AddNamespace("x", "http://tindevil.com")
|
||||||
|
Root = vDocu.DocumentElement
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' 파일존재여부
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
''' <remarks></remarks>
|
||||||
|
Public Function Exist() As Boolean
|
||||||
|
If Not vDocu Is Nothing Then Return True
|
||||||
|
Return System.IO.File.Exists(Me.File)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Sub CreateFile()
|
||||||
|
'//주어진파일명으로 기본파일을 생성한다.
|
||||||
|
Dim NewXml As New System.Text.StringBuilder
|
||||||
|
NewXml.AppendLine("<?xml version='1.0' encoding='KSC5601'?>")
|
||||||
|
NewXml.AppendLine("<tindevil xmlns='http://tindevil.com'> ")
|
||||||
|
NewXml.AppendLine("</tindevil>")
|
||||||
|
If System.IO.File.Exists(Me.File) Then System.IO.File.Delete(Me.File)
|
||||||
|
My.Computer.FileSystem.WriteAllText(Me.File, NewXml.ToString.Replace("'", Chr(&H22)), False)
|
||||||
|
Me.vDocu = New XmlDocument
|
||||||
|
Me.vDocu.Load(Me.File)
|
||||||
|
nsmgr = New XmlNamespaceManager(New Xml.NameTable)
|
||||||
|
nsmgr.AddNamespace("x", "http://tindevil.com")
|
||||||
|
Root = vDocu.DocumentElement
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function Read(ByVal appkey As String, ByVal subkey As String, Optional ByVal defaltvalue As String = "", Optional ByVal Nullvalue As String = "") As String '//변수초기화
|
||||||
|
'//파일이없을경우 빈값을 반환합니다.
|
||||||
|
If Exist() = False Then Return ""
|
||||||
|
Dim L As XmlElement = Me.Root.SelectSingleNode(appkey, nsmgr) '//appkey를 먼저 조회한다.
|
||||||
|
If L Is Nothing Then Return ""
|
||||||
|
Dim C As XmlElement = L.SelectSingleNode(subkey, nsmgr)
|
||||||
|
If C Is Nothing Then Return ""
|
||||||
|
Return C.InnerText
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function Get_NameSpace() As XmlNamespaceManager
|
||||||
|
Return Me.nsmgr
|
||||||
|
End Function
|
||||||
|
Public Function NS() As XmlNamespaceManager
|
||||||
|
Return Me.nsmgr
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function CreateElement(ByVal name As String) As XmlElement
|
||||||
|
Return Me.Docu.CreateElement(name, Me.NS.DefaultNamespace)
|
||||||
|
End Function
|
||||||
|
Public Function GetNode(ByVal appkey As String) As XmlElement
|
||||||
|
'//파일이없을경우 빈값을 반환합니다.
|
||||||
|
If Docu Is Nothing Then Return Nothing
|
||||||
|
Return Me.Root.SelectSingleNode(appkey, nsmgr) '//appkey를 먼저 조회한다.
|
||||||
|
End Function
|
||||||
|
Public Function GetNodes(ByVal appkey As String) As Xml.XmlNodeList
|
||||||
|
'//파일이없을경우 빈값을 반환합니다.
|
||||||
|
If Docu Is Nothing Then Return Nothing
|
||||||
|
Dim L As XmlNodeList = Me.Root.SelectNodes(appkey, nsmgr) '//appkey를 먼저 조회한다.
|
||||||
|
Return L
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Property Data(ByVal appkey As String, ByVal subkey As String, Optional ByVal defaltvalue As Object = "") As String
|
||||||
|
Get
|
||||||
|
'//파일이없을경우 빈값을 반환합니다.
|
||||||
|
If Exist() = False Then Return defaltvalue
|
||||||
|
Dim L As XmlElement = Me.Root.SelectSingleNode(appkey, nsmgr) '//appkey를 먼저 조회한다.
|
||||||
|
If L Is Nothing Then Return defaltvalue
|
||||||
|
Dim C As XmlElement = L.SelectSingleNode(subkey, nsmgr)
|
||||||
|
If C Is Nothing Then Return defaltvalue
|
||||||
|
Return C.InnerText
|
||||||
|
End Get
|
||||||
|
Set(ByVal value As String)
|
||||||
|
'//파일이없을경우 빈값을 반환합니다.
|
||||||
|
If Exist() = False Then Return
|
||||||
|
Dim L As XmlElement = Me.Root.SelectSingleNode(appkey, nsmgr) '//appkey를 먼저 조회한다.
|
||||||
|
If L Is Nothing Then '//만들어야한다.
|
||||||
|
L = Me.Docu.CreateElement(appkey)
|
||||||
|
Me.Root.AppendChild(L)
|
||||||
|
End If
|
||||||
|
Dim C As XmlElement = L.SelectSingleNode(subkey, nsmgr)
|
||||||
|
If C Is Nothing Then '//만들어야한다.
|
||||||
|
C = Me.Docu.CreateElement(subkey)
|
||||||
|
C.InnerText = value
|
||||||
|
L.AppendChild(C)
|
||||||
|
Else
|
||||||
|
C.InnerText = value
|
||||||
|
End If
|
||||||
|
Me.Docu.Save(Me.File)
|
||||||
|
'MsgBox(value)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Save()
|
||||||
|
Me.Docu.Save(Me.File)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
BIN
ArinClassV2/T4key.pfx
Normal file
BIN
ArinClassV2/T4key.pfx
Normal file
Binary file not shown.
28
ArinClassV2/app.config
Normal file
28
ArinClassV2/app.config
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<configSections>
|
||||||
|
</configSections>
|
||||||
|
<connectionStrings>
|
||||||
|
<add name="ACC.My.MySettings.ConnectionString" connectionString="Data Source=orcl;Persist Security Info=True;User ID=chick;Password=c1245;Unicode=True" providerName="System.Data.OracleClient"/>
|
||||||
|
</connectionStrings>
|
||||||
|
<system.diagnostics>
|
||||||
|
<sources>
|
||||||
|
<!-- 이 섹션은 My.Application.Log의 로깅 구성을 정의합니다. -->
|
||||||
|
<source name="DefaultSource" switchName="DefaultSwitch">
|
||||||
|
<listeners>
|
||||||
|
<add name="FileLog"/>
|
||||||
|
<!-- 아래 섹션의 주석 처리를 제거하여 응용 프로그램 이벤트 로그에 씁니다. -->
|
||||||
|
<!--<add name="EventLog"/>-->
|
||||||
|
</listeners>
|
||||||
|
</source>
|
||||||
|
</sources>
|
||||||
|
<switches>
|
||||||
|
<add name="DefaultSwitch" value="Information"/>
|
||||||
|
</switches>
|
||||||
|
<sharedListeners>
|
||||||
|
<add name="FileLog" type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" initializeData="FileLogWriter"/>
|
||||||
|
<!-- 아래 섹션의 주석 처리를 제거하여 APPLICATION_NAME을 응용 프로그램 이름으로 바꾼 후 응용 프로그램 이벤트 로그에 씁니다. -->
|
||||||
|
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
|
||||||
|
</sharedListeners>
|
||||||
|
</system.diagnostics>
|
||||||
|
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
|
||||||
BIN
ArinClassV2/test.pfx
Normal file
BIN
ArinClassV2/test.pfx
Normal file
Binary file not shown.
Reference in New Issue
Block a user