Imports System
Imports System.Net
Imports System.Text
Imports System.Threading
Imports Scripting
Imports System.io
Imports Fairy4_Api
Imports DevExpress.XtraEditors
Friend Class update
Inherits
System.Windows.Forms.Form
Private
MyWebClient As New WebClient
Private
ByteNum As Long
' Private
Threaddown, Threadchk As Thread
Private
Mybyte() As Byte
Private
Zipsize As Long
Private Func
As New Func
Private fso
As New FileSystemObject
Private fl
As Scripting.File
Private
Ready As String = Application.StartupPath &
"\images\ready.ico"
Private down
As String = Application.StartupPath &
"\images\down.ico"
Private Err
As String = Application.StartupPath &
"\images\Error.ico"
Private
Inipath As String = Application.StartupPath &
"\update.ini"
Private
Tempfolder As String = Application.StartupPath &
"\temp_download" '临时下载文件夹
Private
Address As String '下载网站
Private
SleepTime As Integer '下載完一個進程休眠時間:單位毫秒
Private
RunProgrom As String
Private
KillProgrom As String
Public
UpdateDataSet As New DataSet '升级配置文件数据集
Private
Curversion As String
Private
Alldownloadbyte As Long = 0
Private
Runthread As Thread '执行时候运行的线程
Private
Myapi As New Fairy4_Api.My_Api
'############################
'程式製作:Fairy4
'參考網友:雨浪部分源碼
'Mail_To:
Phoenix4197@163.com
'############################
#Region " Windows 窗体设计器生成的代码 "
Public
Sub New()
MyBase.New()
'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()
'在 InitializeComponent() 调用之后添加任何初始化
End
Sub
'窗体重写
dispose 以清理组件列表。
Protected
Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Windows
窗体设计器所必需的
Private
components As System.ComponentModel.IContainer
'注意:
以下过程是 Windows 窗体设计器所必需的
'可以使用
Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend
WithEvents PictureBox1 As System.Windows.Forms.PictureBox
Friend
WithEvents Label1 As System.Windows.Forms.Label
Friend
WithEvents Label2 As System.Windows.Forms.Label
Friend
WithEvents GroupBox1 As System.Windows.Forms.GroupBox
Friend
WithEvents PictureBox2 As System.Windows.Forms.PictureBox
Friend
WithEvents PictureBox3 As System.Windows.Forms.PictureBox
Friend
WithEvents Label5 As System.Windows.Forms.Label
Friend
WithEvents Label6 As System.Windows.Forms.Label
Friend
WithEvents lbl As System.Windows.Forms.Label
Friend
WithEvents btnupdate As System.Windows.Forms.Button
Friend
WithEvents btnclose As System.Windows.Forms.Button
Friend
WithEvents Label8 As System.Windows.Forms.Label
Friend
WithEvents Label9 As System.Windows.Forms.Label
Friend
WithEvents Label10 As System.Windows.Forms.Label
Friend
WithEvents PictureBox4 As System.Windows.Forms.PictureBox
Friend
WithEvents PictureBox9 As System.Windows.Forms.PictureBox
' Friend
WithEvents Progressdownload As
DevExpress.XtraEditors.ProgressBarControl '
DevExpress.XtraEditors.ProgressBarControl
Friend
WithEvents Label4 As System.Windows.Forms.Label
'Friend
WithEvents ProgressCdownload As
DevExpress.XtraEditors.ProgressBarControl
Friend
WithEvents Label7 As System.Windows.Forms.Label
Friend
WithEvents PictureBox5 As System.Windows.Forms.PictureBox
Friend
WithEvents PictureBox6 As System.Windows.Forms.PictureBox
Friend
WithEvents PictureBox7 As System.Windows.Forms.PictureBox
Friend
WithEvents PictureBox8 As System.Windows.Forms.PictureBox
Friend
WithEvents ImageList1 As System.Windows.Forms.ImageList
Friend
WithEvents Label3 As System.Windows.Forms.Label
Friend
WithEvents Progressdownload As
DevExpress.XtraEditors.ProgressBarControl
Friend
WithEvents ProgressCdownload As
DevExpress.XtraEditors.ProgressBarControl
Friend
WithEvents AxWebBrowser1 As AxSHDocVw.AxWebBrowser
Friend
WithEvents GroupBox2 As System.Windows.Forms.GroupBox
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New
System.Resources.ResourceManager(GetType(update))
Me.PictureBox1 = New System.Windows.Forms.PictureBox
Me.Label1 = New System.Windows.Forms.Label
Me.ImageList1 = New
System.Windows.Forms.ImageList(Me.components)
Me.Label2 = New System.Windows.Forms.Label
Me.GroupBox1 = New System.Windows.Forms.GroupBox
Me.ProgressCdownload = New
DevExpress.XtraEditors.ProgressBarControl
Me.Progressdownload = New
DevExpress.XtraEditors.ProgressBarControl
Me.Label4 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.PictureBox2 = New System.Windows.Forms.PictureBox
Me.PictureBox3 = New System.Windows.Forms.PictureBox
Me.PictureBox4 = New System.Windows.Forms.PictureBox
Me.Label6 = New System.Windows.Forms.Label
Me.btnupdate = New System.Windows.Forms.Button
Me.lbl = New System.Windows.Forms.Label
Me.btnclose = New System.Windows.Forms.Button
Me.PictureBox5 = New System.Windows.Forms.PictureBox
Me.Label8 = New System.Windows.Forms.Label