..
This commit is contained in:
@@ -18,10 +18,22 @@ Public NotInheritable Class SplashScreen
|
||||
Copyright.Text = My.Application.Info.Copyright
|
||||
Me.Show() : My.Application.DoEvents()
|
||||
|
||||
'스타일팩확인
|
||||
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
|
||||
|
||||
End Try
|
||||
End If
|
||||
|
||||
If Not LoadINI() Then End '//환경파일 불러오기실패시 종료한다.
|
||||
If Command() <> "ARIN" AndAlso Not ReadAuth() Then '//에러났을떄는 카운터를 확인
|
||||
'//사용횟수가 10번ㅇ르 초과했는지 확인
|
||||
Runcnt = Me.ReadAuthcount
|
||||
RunCnt = Me.ReadAuthcount
|
||||
Dim f As New fAuth()
|
||||
If (f.ShowDialog <> Windows.Forms.DialogResult.OK) Then
|
||||
End
|
||||
@@ -46,8 +58,13 @@ Public NotInheritable Class SplashScreen
|
||||
|
||||
|
||||
'If Not ReadAuth() Then DemoDlg.ShowDialog()
|
||||
If Not LoadReg() Then End '//레지스트리정보 실패시 종료
|
||||
If Not Connect() Then End '//연결정보 실패시 종료
|
||||
If Not LoadReg() Then
|
||||
|
||||
End '//레지스트리정보 실패시 종료
|
||||
End If
|
||||
If Not Connect() Then
|
||||
End '//연결정보 실패시 종료
|
||||
End If
|
||||
Me.lb_msg.Text = ""
|
||||
|
||||
MakeList.Show()
|
||||
@@ -107,7 +124,7 @@ Public NotInheritable Class SplashScreen
|
||||
Return False
|
||||
End If
|
||||
|
||||
Rundate = Date.FromFileTimeUtc(install)
|
||||
RunDate = Date.FromFileTimeUtc(install)
|
||||
|
||||
Return True
|
||||
' MsgBox(auth.GetDateNumberEnc(Now))
|
||||
@@ -181,7 +198,11 @@ 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 Return False
|
||||
If Not System.IO.File.Exists(DataBaseFile) Then
|
||||
MsgBox("데이터베이스 파일이 없습니다", MsgBoxStyle.Critical, "오류")
|
||||
Return False
|
||||
End If
|
||||
|
||||
Dim Dbini As New MyINI(Dbpath & "\patch.ini")
|
||||
|
||||
' Return True
|
||||
|
||||
75
Epole/dialogForm/fExtractZip.Designer.vb
generated
Normal file
75
Epole/dialogForm/fExtractZip.Designer.vb
generated
Normal file
@@ -0,0 +1,75 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class fExtractZip
|
||||
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()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
|
||||
Me.lbFileName = New System.Windows.Forms.Label()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ProgressBar1
|
||||
'
|
||||
Me.ProgressBar1.Dock = System.Windows.Forms.DockStyle.Bottom
|
||||
Me.ProgressBar1.Location = New System.Drawing.Point(5, 71)
|
||||
Me.ProgressBar1.Name = "ProgressBar1"
|
||||
Me.ProgressBar1.Size = New System.Drawing.Size(1063, 65)
|
||||
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.Name = "lbFileName"
|
||||
Me.lbFileName.Size = New System.Drawing.Size(1063, 66)
|
||||
Me.lbFileName.TabIndex = 1
|
||||
Me.lbFileName.Text = "Label1"
|
||||
Me.lbFileName.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Timer1
|
||||
'
|
||||
Me.Timer1.Interval = 1
|
||||
'
|
||||
'fExtractZip
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(10.0!, 18.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1073, 141)
|
||||
Me.ControlBox = False
|
||||
Me.Controls.Add(Me.lbFileName)
|
||||
Me.Controls.Add(Me.ProgressBar1)
|
||||
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.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ProgressBar1 As ProgressBar
|
||||
Friend WithEvents lbFileName As Label
|
||||
Friend WithEvents Timer1 As Timer
|
||||
End Class
|
||||
123
Epole/dialogForm/fExtractZip.resx
Normal file
123
Epole/dialogForm/fExtractZip.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
86
Epole/dialogForm/fExtractZip.vb
Normal file
86
Epole/dialogForm/fExtractZip.vb
Normal file
@@ -0,0 +1,86 @@
|
||||
Public Class fExtractZip
|
||||
Dim zip As Ionic.Zip.ZipFile
|
||||
Public Sub New(filename As String)
|
||||
|
||||
' 디자이너에서 이 호출이 필요합니다.
|
||||
InitializeComponent()
|
||||
|
||||
If System.IO.File.Exists(filename) = False Then
|
||||
RunComplete = True
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
|
||||
End If
|
||||
|
||||
|
||||
mre.Set()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user