..
This commit is contained in:
@@ -21,13 +21,16 @@ Public NotInheritable Class SplashScreen
|
||||
'스타일팩확인
|
||||
Dim fistyle As New System.IO.FileInfo("StylePack.zip")
|
||||
If fistyle.Exists Then
|
||||
Dim fzip As New fExtractZip(fistyle.FullName)
|
||||
fzip.ShowDialog()
|
||||
Try
|
||||
System.IO.File.Delete(fistyle.FullName)
|
||||
Catch ex As Exception
|
||||
Dim markerFile As String = fistyle.FullName & "." & fistyle.LastWriteTime.Ticks.ToString()
|
||||
If Not System.IO.File.Exists(markerFile) Then
|
||||
Dim fzip As New fExtractZip(fistyle.FullName)
|
||||
fzip.ShowDialog()
|
||||
Try
|
||||
System.IO.File.Create(markerFile).Close()
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not LoadINI() Then End '//환경파일 불러오기실패시 종료한다.
|
||||
@@ -197,18 +200,30 @@ Public NotInheritable Class SplashScreen
|
||||
|
||||
Private Function Connect() As Boolean
|
||||
Me.lb_msg.Text = "데이터베이스확인중..."
|
||||
Dim Dbpath As String = My.Application.Info.DirectoryPath & "\database"
|
||||
If Not System.IO.File.Exists(DataBaseFile) Then
|
||||
MsgBox("데이터베이스 파일이 없습니다", MsgBoxStyle.Critical, "오류")
|
||||
Return False
|
||||
|
||||
Dim dbfile As New System.IO.FileInfo(DataBaseFile)
|
||||
|
||||
If dbfile.Exists = False Then
|
||||
Dim nameolny As String = System.IO.Path.GetFileNameWithoutExtension(dbfile.FullName)
|
||||
Dim tempfile As String = dbfile.Directory.FullName & "\irea.mdb"
|
||||
If System.IO.File.Exists(tempfile) = False Then
|
||||
MsgBox("데이터베이스 파일이 없습니다", MsgBoxStyle.Critical, "오류")
|
||||
Return False
|
||||
Else
|
||||
DataBaseFile = tempfile
|
||||
dbfile = New System.IO.FileInfo(DataBaseFile)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim Dbpath As String = dbfile.Directory.FullName ' My.Application.Info.DirectoryPath & "\database"
|
||||
Dim Dbini As New MyINI(Dbpath & "\patch.ini")
|
||||
|
||||
' Return True
|
||||
|
||||
'//데이터베이스 버젼을 확인한다.
|
||||
Dim Cn As New OleDbConnection(My.Settings.ireaConnectionString)
|
||||
Dim cs As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + dbfile.FullName
|
||||
Dim Cn As New OleDbConnection(cs)
|
||||
Try
|
||||
Cn.Open()
|
||||
Catch ex As Exception
|
||||
@@ -220,6 +235,11 @@ Public NotInheritable Class SplashScreen
|
||||
Return False
|
||||
End If
|
||||
|
||||
'//속성의 셋팅값중 ireaConnectionString 의 값을 cs 로 변경해준다
|
||||
My.Settings("ireaConnectionString") = cs
|
||||
|
||||
|
||||
|
||||
Dim Dbversion As Short = 0
|
||||
Dim ErrMsg As String = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user