initial commit

This commit is contained in:
Chikyun
2019-10-24 21:24:21 +09:00
commit 376f7d9de0
544 changed files with 295019 additions and 0 deletions

29
CEnergy/ArinClassV2/ArinDV.Designer.vb generated Normal file
View File

@@ -0,0 +1,29 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class arindv
Inherits System.Windows.Forms.DataGridView
'UserControl1은 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()
components = New System.ComponentModel.Container()
' Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
End Sub
End Class

View File

@@ -0,0 +1,87 @@
Public Class arindv
Private v_EnterToTab As Boolean = True
Private v_DeleteKey As Boolean = True
Public Event EditControl_Keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs)
#Region " {Enter} Keyboard Override "
''' <summary>
''' <20><><EFBFBD><EFBFBD>Űó<C5B0><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>
''' </summary>
''' <param name="keyData"></param>
''' <returns></returns>
''' <remarks></remarks>
Protected Overrides Function ProcessDialogKey(ByVal keyData As Windows.Forms.Keys) As Boolean
If v_EnterToTab AndAlso keyData = Windows.Forms.Keys.Enter Then
MyBase.ProcessTabKey(Windows.Forms.Keys.Tab)
Return True
End If
Return MyBase.ProcessDialogKey(keyData)
End Function
''' <summary>
''' <20><><EFBFBD><EFBFBD>Űó<C5B0><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>
''' </summary>
''' <param name="e"></param>
''' <returns></returns>
''' <remarks></remarks>
Protected Overrides Function ProcessDataGridViewKey(ByVal e As Windows.Forms.KeyEventArgs) As Boolean
If e.KeyCode = Windows.Forms.Keys.Enter Then
MyBase.ProcessTabKey(Windows.Forms.Keys.Tab)
Return True
End If
Return MyBase.ProcessDataGridViewKey(e)
End Function
#End Region
''' <summary>
''' <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ұ<EFBFBD><D2B0><EFBFBD><EFBFBD><EFBFBD>?
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<System.ComponentModel.Description("<22><EFBFBD><E4BFA1> <20>߻<EFBFBD><DFBB>ϴ<EFBFBD> <20>޼<EFBFBD><DEBC><EFBFBD><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.")> _
Public Property A_DelCurrentCell() As Boolean
Get
Return Me.v_DeleteKey
End Get
Set(ByVal value As Boolean)
Me.v_DeleteKey = value
End Set
End Property
''' <summary>
''' <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ű<EFBFBD><C5B0> <20>߻<EFBFBD><DFBB>մϴ<D5B4>
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
<System.ComponentModel.Description("<22><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ű<EFBFBD><C5B0> <20>߻<EFBFBD><DFBB>մϴ<D5B4>")> _
Public Property A_EnterToTab() As Boolean
Get
Return Me.v_EnterToTab
End Get
Set(ByVal value As Boolean)
Me.v_EnterToTab = value
End Set
End Property
Private Sub arindv_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Select Case e.KeyCode
Case Windows.Forms.Keys.Delete
'MsgBox(Me.CurrentCellAddress.ToString, MsgBoxStyle.Information, Me.CurrentCell.Value)
If e.Shift Then
Me.Rows.Remove(Me.CurrentRow) '//<2F>ٻ<EFBFBD><D9BB><EFBFBD>
Else
If v_DeleteKey AndAlso Me.RowCount > 0 Then Me.CurrentCell.Value = DBNull.Value
End If
End Select
End Sub
End Class

View File

@@ -0,0 +1,157 @@
<?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>{2AF28E8C-84F1-4D56-9592-3B0EBDE8DF14}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>CEnergy</RootNamespace>
<AssemblyName>CEnergy</AssemblyName>
<MyType>Windows</MyType>
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
<IsWebBootstrapper>true</IsWebBootstrapper>
<StartupObject>
</StartupObject>
<DelaySign>true</DelaySign>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<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>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<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>
</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>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<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="ArinDV.Designer.vb">
<DependentUpon>ArinDV.vb</DependentUpon>
</Compile>
<Compile Include="ArinDV.vb">
<SubType>Component</SubType>
</Compile>
<Compile Include="Common.vb" />
<Compile Include="Dbbase.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="MyINI.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</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>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0%28x86%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0%28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<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>

View File

@@ -0,0 +1,170 @@
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
Public Shared Sub SaveLoad_FrmSetting(ByVal Frm As Form, ByRef LastPos As Short, Optional ByVal Save As Boolean = False, Optional ByVal RestoreStatus As Boolean = False)
'//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
'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)
INI.Write(Frm.Name, "LastPos", LastPos)
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)
LastPos = INI.Read(Frm.Name, "LastPos", 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
Public Shared Function Read_LastPos_Frm(ByVal Frm As Form) As Short
'//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
'If Frm.FormBorderStyle <> FormBorderStyle.Sizable AndAlso Frm.FormBorderStyle <> FormBorderStyle.SizableToolWindow Then Return
Dim INI As New MyINI(My.Application.Info.DirectoryPath & "\Frm_Setting.ini")
Return INI.Read(Frm.Name, "LastPos", 0)
End Function
Public Shared Function Read_LastPos_Frm(ByVal FrmName As String) As Short
'//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
'If Frm.FormBorderStyle <> FormBorderStyle.Sizable AndAlso Frm.FormBorderStyle <> FormBorderStyle.SizableToolWindow Then Return
Dim INI As New MyINI(My.Application.Info.DirectoryPath & "\Frm_Setting.ini")
Return INI.Read(FrmName, "LastPos", 0)
End Function
Public Shared Sub Save_LastPos_Frm(ByVal FrmName As String, ByVal LastPos As Short)
'//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
'If Frm.FormBorderStyle <> FormBorderStyle.Sizable AndAlso Frm.FormBorderStyle <> FormBorderStyle.SizableToolWindow Then Return
Dim INI As New MyINI(My.Application.Info.DirectoryPath & "\Frm_Setting.ini")
INI.Write(FrmName, "LastPos", LastPos)
End Sub
Public Shared Function Read_LastZone(ByVal FrmName As String) As String
'//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
'If Frm.FormBorderStyle <> FormBorderStyle.Sizable AndAlso Frm.FormBorderStyle <> FormBorderStyle.SizableToolWindow Then Return
Dim INI As New MyINI(My.Application.Info.DirectoryPath & "\Frm_Setting.ini")
Return INI.Read(FrmName, "LastZone", "")
End Function
Public Shared Sub Save_LastZone(ByVal FrmName As String, ByVal LastPos As String)
'//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
'If Frm.FormBorderStyle <> FormBorderStyle.Sizable AndAlso Frm.FormBorderStyle <> FormBorderStyle.SizableToolWindow Then Return
Dim INI As New MyINI(My.Application.Info.DirectoryPath & "\Frm_Setting.ini")
INI.Write(FrmName, "LastZone", LastPos)
End Sub
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 = "<EFBFBD><EFBFBD> " & MSG & Space(1)
ElseIf Src.GetType.Name.ToUpper = "LABEL" Then
CType(Src, Windows.Forms.Label).Text = "<EFBFBD><EFBFBD> " & 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 = "<EFBFBD><EFBFBD> " & 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 = "<EFBFBD><EFBFBD> " & MSG & Space(1) & "[" & Format(Now, "HH<EFBFBD><EFBFBD>mm<EFBFBD><EFBFBD>ss<EFBFBD><EFBFBD>") & "]"
Src.ForeColor = FCOLOR
If FCOLOR = Drawing.Color.Red Then My.Computer.Audio.PlaySystemSound(Media.SystemSounds.Beep)
End Sub
''' <summary>
''' <20><><EFBFBD><EFBFBD> ǥ<><C7A5><EFBFBD>մϴ<D5B4>.
''' </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 <20>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ϴ<EFBFBD>", 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>
''' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><CFB4><EFBFBD> Ȯ<><C8AE><EFBFBD>մϴ<D5B4>.
''' </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
End Class

View File

@@ -0,0 +1,72 @@
Public Class Dbbase
Public Shared Function NVL(ByVal Indata As Object, Optional ByVal nullVal As String = vbNullString) As Object
Try
'If Indata = "" Then Return nullVal
If Indata Is DBNull.Value Then Return nullVal
Catch ex As Exception
'MsgBox(ex.Message.ToString)
Return nullVal
End Try
If Indata Is vbNullString Then Return nullVal
If Indata.ToString.Trim = "" Then Return nullVal
Return Indata
End Function
Public Shared Sub DelCrow(ByVal bs As System.Windows.Forms.BindingSource, ByVal prompt As Boolean)
If bs.Count < 1 Then Return
If prompt Then
If MsgBox("선택된 줄을 삭제하시겠습니까?", MsgBoxStyle.OkCancel Or MsgBoxStyle.Information, "삭제확인") <> MsgBoxResult.Ok Then Return
End If
bs.RemoveCurrent()
End Sub
Public Shared Function Data_Cancel(ByVal SrcDs As Data.DataSet, Optional ByVal DisplayLabel As Windows.Forms.ToolStripStatusLabel = Nothing) As Boolean
Dim Retval As Boolean = False
If SrcDs.HasChanges Then
If MsgBox("취소된 내용은 다시 되돌리지 못합니다" & vbCrLf & vbCrLf & "계속하시겠습니까?", MsgBoxStyle.Critical + MsgBoxStyle.OkCancel, "확인") = MsgBoxResult.Ok Then
SrcDs.RejectChanges()
Retval = True
If Not DisplayLabel Is Nothing Then
DisplayLabel.Text = "변경된 내용이 취소되었습니다"
Else
MsgBox("변경된 내용이 취소되었습니다", MsgBoxStyle.Information, "확인")
End If
Else
If Not DisplayLabel Is Nothing Then DisplayLabel.Text = "취소되었습니다"
End If
End If
If Not DisplayLabel Is Nothing Then
DisplayLabel.Text = "변경된 내용이 없습니다"
Else
MsgBox("변경된 내용이 없습니다", MsgBoxStyle.Information, "확인")
End If
Return Retval
End Function
Public Shared Sub Data_Cancel(ByVal BS As System.Windows.Forms.BindingSource, ByVal SrcDs As Data.DataSet, Optional ByVal SrcDT As Data.DataTable = Nothing, Optional ByVal DisplayLabel As Windows.Forms.ToolStripStatusLabel = Nothing, Optional ByVal prompt As Boolean = True)
Try
BS.EndEdit()
Catch ex As Exception
If MsgBox("마지막으로 편집중인 데이터에 오류가 있습니다" & vbCrLf & "해당데이터를 취소하시겠습니까?", MsgBoxStyle.OkCancel Or MsgBoxStyle.Critical, "확인") = MsgBoxResult.Ok Then
BS.CancelEdit()
End If
End Try
If SrcDs.HasChanges Then
If MsgBox("취소된 내용은 다시 되돌리지 못합니다" & vbCrLf & vbCrLf & "계속하시겠습니까?", MsgBoxStyle.Critical + MsgBoxStyle.OkCancel, "확인") = MsgBoxResult.Ok Then
If SrcDT Is Nothing Then
SrcDs.RejectChanges() '//데이터이없으면 데이터셋을 취소하고
Else
SrcDT.RejectChanges() '//그렇지않으면 해당 테이블만 취소한다.
End If
If Not DisplayLabel Is Nothing Then DisplayLabel.Text = "변경된 내용이 취소되었습니다"
If prompt Then MsgBox("변경된 내용이 취소되었습니다", MsgBoxStyle.Information, "확인")
Else
If Not DisplayLabel Is Nothing Then DisplayLabel.Text = "취소되었습니다"
If prompt Then MsgBox("복원이 취소되었습니다", MsgBoxStyle.Information, "확인")
End If
Else
If Not DisplayLabel Is Nothing Then DisplayLabel.Text = "변경된 내용이 없습니다"
If prompt Then MsgBox("변경된 내용이 없습니다", MsgBoxStyle.Information, "확인")
End If
End Sub
End Class

View File

@@ -0,0 +1,13 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 이 코드는 도구를 사용하여 생성되었습니다.
' 런타임 버전:4.0.30319.18051
'
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
' 이러한 변경 내용이 손실됩니다.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View 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>

View File

@@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' 어셈블리의 일반 정보는 다음 특성 집합을 통해 제어됩니다.
' 어셈블리와 관련된 정보를 수정하려면
' 이 특성 값을 변경하십시오.
' 어셈블리 특성 값을 검토합니다.
<Assembly: AssemblyTitle("Arin's Energy Class")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("Arinware")>
<Assembly: AssemblyProduct("Arin's Energy Class")>
<Assembly: AssemblyCopyright("Copyright (C) Arin")>
<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.0")>
<Assembly: AssemblyFileVersion("1.2.1.0")>

View File

@@ -0,0 +1,63 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 이 코드는 도구를 사용하여 생성되었습니다.
' 런타임 버전:4.0.30319.18051
'
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
' 이러한 변경 내용이 손실됩니다.
' </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("CEnergy.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

View 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>

View File

@@ -0,0 +1,84 @@
'------------------------------------------------------------------------------
' <auto-generated>
' 이 코드는 도구를 사용하여 생성되었습니다.
' 런타임 버전:4.0.30319.18051
'
' 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
' 이러한 변경 내용이 손실됩니다.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings 자동 저장 기능"
#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.CEnergy.My.MySettings
Get
Return Global.CEnergy.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View 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)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=orcl;Persist Security Info=True;User ID=chick;Password=c1245;Unicode=True&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.OracleClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=orcl;Persist Security Info=True;User ID=chick;Password=c1245;Unicode=True</Value>
</Setting>
</Settings>
</SettingsFile>

View 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

Binary file not shown.

View File

@@ -0,0 +1,28 @@
<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="CEnergy.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>