This commit is contained in:
2026-01-17 00:56:25 +09:00
parent 1e6e1223c4
commit b598e0d538
20 changed files with 4683 additions and 4781 deletions

View File

@@ -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 = ""

View File

@@ -26,50 +26,80 @@ Partial Class fExtractZip
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.lbFileName = New System.Windows.Forms.Label()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.pnlMain = New System.Windows.Forms.Panel()
Me.lblTitle = New System.Windows.Forms.Label()
Me.pnlMain.SuspendLayout()
Me.SuspendLayout()
'
'ProgressBar1
'
Me.ProgressBar1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.ProgressBar1.Location = New System.Drawing.Point(5, 71)
Me.ProgressBar1.Location = New System.Drawing.Point(0, 137)
Me.ProgressBar1.Name = "ProgressBar1"
Me.ProgressBar1.Size = New System.Drawing.Size(1063, 65)
Me.ProgressBar1.Size = New System.Drawing.Size(598, 21)
Me.ProgressBar1.TabIndex = 0
'
'lbFileName
'
Me.lbFileName.Dock = System.Windows.Forms.DockStyle.Fill
Me.lbFileName.Font = New System.Drawing.Font("맑은 고딕", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
Me.lbFileName.Location = New System.Drawing.Point(5, 5)
Me.lbFileName.AutoEllipsis = True
Me.lbFileName.Font = New System.Drawing.Font("맑은 고딕", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
Me.lbFileName.ForeColor = System.Drawing.Color.DimGray
Me.lbFileName.Location = New System.Drawing.Point(26, 75)
Me.lbFileName.Name = "lbFileName"
Me.lbFileName.Size = New System.Drawing.Size(1063, 66)
Me.lbFileName.Size = New System.Drawing.Size(543, 44)
Me.lbFileName.TabIndex = 1
Me.lbFileName.Text = "Label1"
Me.lbFileName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
Me.lbFileName.Text = "준비 중..."
Me.lbFileName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
'
'Timer1
'
Me.Timer1.Interval = 1
'
'pnlMain
'
Me.pnlMain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnlMain.Controls.Add(Me.ProgressBar1)
Me.pnlMain.Controls.Add(Me.lblTitle)
Me.pnlMain.Controls.Add(Me.lbFileName)
Me.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill
Me.pnlMain.Location = New System.Drawing.Point(0, 0)
Me.pnlMain.Name = "pnlMain"
Me.pnlMain.Size = New System.Drawing.Size(600, 160)
Me.pnlMain.TabIndex = 2
'
'lblTitle
'
Me.lblTitle.AutoSize = True
Me.lblTitle.Font = New System.Drawing.Font("맑은 고딕", 14.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(129, Byte))
Me.lblTitle.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.lblTitle.Location = New System.Drawing.Point(24, 25)
Me.lblTitle.Name = "lblTitle"
Me.lblTitle.Size = New System.Drawing.Size(181, 25)
Me.lblTitle.TabIndex = 0
Me.lblTitle.Text = "스타일 팩 적용 중..."
'
'fExtractZip
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(10.0!, 18.0!)
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 12.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1073, 141)
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(600, 160)
Me.ControlBox = False
Me.Controls.Add(Me.lbFileName)
Me.Controls.Add(Me.ProgressBar1)
Me.Controls.Add(Me.pnlMain)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "fExtractZip"
Me.Padding = New System.Windows.Forms.Padding(5)
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "fExtractZip"
Me.pnlMain.ResumeLayout(False)
Me.pnlMain.PerformLayout()
Me.ResumeLayout(False)
End Sub
Friend WithEvents ProgressBar1 As ProgressBar
Friend WithEvents lbFileName As Label
Friend WithEvents Timer1 As Timer
Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar
Friend WithEvents lbFileName As System.Windows.Forms.Label
Friend WithEvents Timer1 As System.Windows.Forms.Timer
Friend WithEvents pnlMain As System.Windows.Forms.Panel
Friend WithEvents lblTitle As System.Windows.Forms.Label
End Class

View File

@@ -1,86 +1,64 @@
Public Class fExtractZip
Dim zip As Ionic.Zip.ZipFile
Public Sub New(filename As String)
' 디자이너에서 이 호출이 필요합니다.
Public Sub New(filename As String)
InitializeComponent()
If System.IO.File.Exists(filename) = False Then
RunComplete = True
Me.DialogResult = DialogResult.OK
Me.Close()
Else
Dim ro As New Ionic.Zip.ReadOptions()
ro.Encoding = System.Text.Encoding.Default
zip = Ionic.Zip.ZipFile.Read(filename, ro)
AddHandler zip.ExtractProgress, AddressOf extractevents
End If
' InitializeComponent() 호출 뒤에 초기화 코드를 추가하세요.
Me.Text = "스타일 팩 적용 중 - 기다려 주세요"
End Sub
Delegate Sub extranhandler(sender As Object, e As Ionic.Zip.ExtractProgressEventArgs)
Sub extractevents(sender As Object, e As Ionic.Zip.ExtractProgressEventArgs)
If Me.InvokeRequired Then
Me.Invoke(New extranhandler(AddressOf extractevents), sender, e)
Else
Me.ProgressBar1.Value = e.EntriesExtracted
If e.CurrentEntry Is Nothing Then
lbFileName.Text = "----"
Else
lbFileName.Text = e.CurrentEntry.FileName
End If
lbFileName.Refresh()
End If
Me.DoubleBuffered = True
End Sub
Private Sub fExtractZip_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Show()
Application.DoEvents()
Timer1.Start()
End Sub
Dim mre As New System.Threading.ManualResetEvent(True)
Dim RunExtract As Boolean = False
Dim RunComplete As Boolean = False
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
If mre.WaitOne(10) = False Then Return
mre.Reset()
'//완료여부확인
If RunComplete Then
Timer1.Enabled = False
mre.Set()
If Not zip Is Nothing Then
zip.Dispose()
zip = Nothing
End If
Me.DialogResult = DialogResult.OK
Else
'//처음시작
If RunExtract = False Then
Me.ProgressBar1.Value = 0
Me.ProgressBar1.Maximum = zip.Count
' Me.ProgressBar1.Style = ProgressBarStyle.Marquee
RunExtract = True
End If
If RunExtract Then
zip.ExtractAll(AppDomain.CurrentDomain.BaseDirectory, Ionic.Zip.ExtractExistingFileAction.OverwriteSilently)
RunComplete = True
End If
If zip IsNot Nothing Then
Me.ProgressBar1.Maximum = zip.Count
Dim t As New System.Threading.Thread(AddressOf DoExtract)
t.IsBackground = True
t.Start()
End If
mre.Set()
End Sub
Private Sub DoExtract()
Try
zip.ExtractAll(AppDomain.CurrentDomain.BaseDirectory, Ionic.Zip.ExtractExistingFileAction.OverwriteSilently)
Catch ex As Exception
' Error handling can be added here
Finally
Me.Invoke(Sub()
If zip IsNot Nothing Then
zip.Dispose()
zip = Nothing
End If
Me.DialogResult = DialogResult.OK
Me.Close()
End Sub)
End Try
End Sub
Delegate Sub extranhandler(sender As Object, e As Ionic.Zip.ExtractProgressEventArgs)
Sub extractevents(sender As Object, e As Ionic.Zip.ExtractProgressEventArgs)
If Me.InvokeRequired Then
Me.BeginInvoke(New extranhandler(AddressOf extractevents), sender, e)
Else
' Update Filename
If e.CurrentEntry IsNot Nothing Then
lbFileName.Text = e.CurrentEntry.FileName
End If
' Update Progress
If Me.ProgressBar1.Value <> e.EntriesExtracted Then
Me.ProgressBar1.Value = e.EntriesExtracted
End If
End If
End Sub
End Class