Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

SYS-UPDATE.vb 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. Imports System.IO
  2. Public Class SYS_UPDATE
  3. ReadOnly ds2 As New DataSet
  4. Dim 號1, 號2, 號3, 號4, 號5, fileReader, FS3 As String
  5. Dim Auto_B, Verify_B As Boolean
  6. Dim timeNow1, timeNow2 As Integer
  7. Dim Str As String = Application.StartupPath
  8. Dim 標 As String = "SYS-UPDATE........"
  9. Private Sub OK_Tick(sender As Object, e As EventArgs) Handles OK.Tick
  10. Dim 已開啟 As Boolean = False
  11. Dim Strs As String = Application.StartupPath
  12. If File.Exists(My.Computer.FileSystem.SpecialDirectories.Desktop & "\GA-ERP-SYS.exe") Then
  13. Dim pro() As Process = System.Diagnostics.Process.GetProcesses()
  14. ' 判斷是否有符合的Process
  15. For Each process As Process In pro
  16. If ("GA-ERP-SYS").Equals(process.ProcessName) Then : 已開啟 = True : End If
  17. Next
  18. If 已開啟 = False Then
  19. OK.Enabled = False : MyModule1.進度條() : Shell(Strs + "\GA-ERP-SYS.exe", vbNormalFocus) : Me.Close()
  20. End If
  21. ElseIf File.Exists(Strs & "\GA-ERP-SYS.exe") Then
  22. Dim pro() As Process = System.Diagnostics.Process.GetProcesses()
  23. ' 判斷是否有符合的Process
  24. For Each process As Process In pro
  25. If ("GA-ERP-SYS").Equals(process.ProcessName) Then : 已開啟 = True : End If
  26. Next
  27. If 已開啟 = False Then
  28. OK.Enabled = False : MyModule1.進度條() : Shell(Strs + "\GA-ERP-SYS.exe", vbNormalFocus) : Me.Close()
  29. End If
  30. End If
  31. End Sub
  32. Private Sub SYS_UPDATE_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  33. 資料數 = 131 : timeNow1 = 3
  34. End Sub
  35. Private Sub SYS_UPDATE_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
  36. Target = "https://gcm-smart.com/ERP/GA-ERP/"
  37. Timer1.Enabled = True
  38. End Sub
  39. Private Sub 更新路徑01()
  40. Me.Text = 標 & FS3 : My.Computer.Network.DownloadFile(Target & FS3, Str & "\" & FS3)
  41. End Sub
  42. Private Sub 更新路徑02()
  43. Me.Text = 標 & FS3 : My.Computer.Network.DownloadFile(Target & "DawnCache/" & FS3, Str & "\DawnCache\" & FS3)
  44. End Sub
  45. Private Sub 更新路徑03()
  46. Me.Text = 標 & FS3 : My.Computer.Network.DownloadFile(Target & "GPUCache/" & FS3, Str & "\GPUCache\" & FS3)
  47. End Sub
  48. Private Sub 更新路徑04()
  49. Me.Text = 標 & FS3 : My.Computer.Network.DownloadFile(Target & "locales/" & FS3, Str & "\locales\" & FS3)
  50. End Sub
  51. Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
  52. Timer1.Enabled = False
  53. MyModule1.進度條() : Dim Str As String = Application.StartupPath
  54. If (fileReader = 號1 Or fileReader = 號2 Or fileReader = 號3 Or fileReader = 號4 Or fileReader = 號5) And fileReader <> "" Then
  55. '------------------------------------------系統主體---------------------------------------------------------------------------------
  56. MyModule1.進度條() : Me.Text = "SYS-UPDATE........GA-ERP-SYS.exe"
  57. Else
  58. '------------------------------------------系統主體---------------------------------------------------------------------------------
  59. MyModule1.進度條() : Me.Text = "SYS-UPDATE........GA-ERP-SYS.exe"
  60. If Verify_B = True Then : FS3 = "Verify.exe" : MyModule1.進度條() : If File.Exists(Str + "\Verify.exe") Then : File.Delete(Str + "\Verify.exe") : End If : 更新路徑01() : End If
  61. If Auto_B = True Then : FS3 = "Auto.exe" : MyModule1.進度條() : If File.Exists(Str + "\Auto.exe") Then : File.Delete(Str + "\Auto.exe") : End If : 更新路徑01() : End If
  62. End If
  63. FS3 = "CefSharp.BrowserSubprocess.Core.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  64. FS3 = "CefSharp.BrowserSubprocess.Core.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  65. FS3 = "CefSharp.BrowserSubprocess.exe" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  66. FS3 = "CefSharp.BrowserSubprocess.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  67. FS3 = "CefSharp.Core.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  68. FS3 = "CefSharp.Core.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  69. FS3 = "CefSharp.Core.Runtime.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  70. FS3 = "CefSharp.Core.Runtime.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  71. FS3 = "CefSharp.Core.Runtime.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  72. FS3 = "CefSharp.Core.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  73. FS3 = "CefSharp.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  74. FS3 = "CefSharp.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  75. FS3 = "CefSharp.WinForms.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  76. FS3 = "CefSharp.WinForms.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  77. FS3 = "CefSharp.WinForms.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  78. FS3 = "CefSharp.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  79. FS3 = "chrome_100_percent.pak" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  80. FS3 = "chrome_200_percent.pak" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  81. FS3 = "chrome_elf.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  82. FS3 = "d3dcompiler_47.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  83. FS3 = "debug.log" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  84. FS3 = "DocumentFormat.OpenXml.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  85. FS3 = "DocumentFormat.OpenXml.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  86. FS3 = "GA-ERP-SYS.exe.config" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  87. FS3 = "GA-ERP-SYS.pdb" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  88. FS3 = "GA-ERP-SYS.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  89. FS3 = "icudtl.dat" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  90. FS3 = "Interop.VSTOEE100.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  91. FS3 = "itextsharp.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  92. FS3 = "libcef.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  93. FS3 = "libEGL.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  94. FS3 = "libGLESv2.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  95. FS3 = "LICENSE.txt" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  96. FS3 = "Microsoft.IO.RecyclableMemoryStream.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  97. FS3 = "Microsoft.IO.RecyclableMemoryStream.xml" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  98. FS3 = "README.txt" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  99. FS3 = "resources.pak" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  100. FS3 = "snapshot_blob.bin" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  101. FS3 = "v8_context_snapshot.bin" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  102. FS3 = "vk_swiftshader.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  103. FS3 = "vk_swiftshader_icd.json" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  104. FS3 = "vulkan-1.dll" : MyModule1.進度條() : If File.Exists(Str & "\" & FS3) Then : Else : 更新路徑01() : End If
  105. '---------------------------------------------------------------------------------------------------------------------------------------------------
  106. MyModule1.進度條() : If Dir(Str + "\DawnCache", vbDirectory) <> "" Then : Else : MkDir(Str + "\DawnCache") : End If
  107. FS3 = "data_0" : MyModule1.進度條() : If File.Exists(Str & "\DawnCache\" & FS3) Then : Else : 更新路徑02() : End If
  108. FS3 = "data_1" : MyModule1.進度條() : If File.Exists(Str & "\DawnCache\" & FS3) Then : Else : 更新路徑02() : End If
  109. FS3 = "data_2" : MyModule1.進度條() : If File.Exists(Str & "\DawnCache\" & FS3) Then : Else : 更新路徑02() : End If
  110. FS3 = "data_3" : MyModule1.進度條() : If File.Exists(Str & "\DawnCache\" & FS3) Then : Else : 更新路徑02() : End If
  111. FS3 = "index" : MyModule1.進度條() : If File.Exists(Str & "\DawnCache\" & FS3) Then : Else : 更新路徑02() : End If
  112. '---------------------------------------------------------------------------------------------------------------------------------------------------
  113. MyModule1.進度條() : If Dir(Str + "\GPUCache", vbDirectory) <> "" Then : Else : MkDir(Str + "\GPUCache") : End If
  114. FS3 = "data_0" : MyModule1.進度條() : If File.Exists(Str & "\GPUCache\" & FS3) Then : Else : 更新路徑03() : End If
  115. FS3 = "data_1" : MyModule1.進度條() : If File.Exists(Str & "\GPUCache\" & FS3) Then : Else : 更新路徑03() : End If
  116. FS3 = "data_2" : MyModule1.進度條() : If File.Exists(Str & "\GPUCache\" & FS3) Then : Else : 更新路徑03() : End If
  117. FS3 = "data_3" : MyModule1.進度條() : If File.Exists(Str & "\GPUCache\" & FS3) Then : Else : 更新路徑03() : End If
  118. FS3 = "index" : MyModule1.進度條() : If File.Exists(Str & "\GPUCache\" & FS3) Then : Else : 更新路徑03() : End If
  119. '---------------------------------------------------------------------------------------------------------------------------------------------------
  120. MyModule1.進度條() : If Dir(Str + "\locales", vbDirectory) <> "" Then : Else : MkDir(Str + "\locales") : End If
  121. FS3 = "af.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  122. FS3 = "am.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  123. FS3 = "ar.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  124. FS3 = "bg.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  125. FS3 = "bn.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  126. FS3 = "ca.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  127. FS3 = "cs.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  128. FS3 = "da.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  129. FS3 = "de.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  130. FS3 = "el.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  131. FS3 = "en-GB.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  132. FS3 = "en-US.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  133. FS3 = "es-419.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  134. FS3 = "es.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  135. FS3 = "et.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  136. FS3 = "fa.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  137. FS3 = "fi.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  138. FS3 = "fil.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  139. FS3 = "fr.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  140. FS3 = "gu.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  141. FS3 = "he.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  142. FS3 = "hi.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  143. FS3 = "hr.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  144. FS3 = "hu.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  145. FS3 = "id.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  146. FS3 = "it.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  147. FS3 = "ja.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  148. FS3 = "kn.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  149. FS3 = "ko.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  150. FS3 = "lt.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  151. FS3 = "lv.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  152. FS3 = "ml.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  153. FS3 = "mr.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  154. FS3 = "ms.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  155. FS3 = "nb.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  156. FS3 = "nl.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  157. FS3 = "pl.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  158. FS3 = "pt-BR.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  159. FS3 = "pt-PT.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  160. FS3 = "ro.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  161. FS3 = "ru.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  162. FS3 = "sk.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  163. FS3 = "sl.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  164. FS3 = "sr.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  165. FS3 = "sv.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  166. FS3 = "sw.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  167. FS3 = "ta.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  168. FS3 = "te.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  169. FS3 = "th.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  170. FS3 = "tr.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  171. FS3 = "uk.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  172. FS3 = "ur.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  173. FS3 = "vi.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  174. FS3 = "zh-CN.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  175. FS3 = "zh-TW.pak" : MyModule1.進度條() : If File.Exists(Str & "\locales\" & FS3) Then : Else : 更新路徑04() : End If
  176. Timer3.Enabled = True
  177. End Sub
  178. Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
  179. Dim 已開啟 As Boolean = False
  180. Dim Strs As String = Application.StartupPath
  181. If File.Exists(My.Computer.FileSystem.SpecialDirectories.Desktop & "\GA-ERP-SYS.exe") Then
  182. Dim pro() As Process = System.Diagnostics.Process.GetProcesses()
  183. ' 判斷是否有符合的Process
  184. For Each process As Process In pro
  185. If ("GA-ERP-SYS").Equals(process.ProcessName) Then
  186. 已開啟 = True
  187. End If
  188. Next
  189. If 已開啟 = False Then
  190. Timer3.Enabled = False
  191. If File.Exists(Str + "\GA-ERP-SYS.exe") Then : File.Delete(Str + "\GA-ERP-SYS.exe") : End If
  192. MyModule1.進度條() : My.Computer.Network.DownloadFile(Target & "GA-ERP-SYS.exe", Str + "\GA-ERP-SYS.exe")
  193. OK.Enabled = True
  194. End If
  195. ElseIf File.Exists(Strs & "\GA-ERP-SYS.exe") Then
  196. Dim pro() As Process = System.Diagnostics.Process.GetProcesses()
  197. ' 判斷是否有符合的Process
  198. For Each process As Process In pro
  199. If ("GA-ERP-SYS").Equals(process.ProcessName) Then
  200. 已開啟 = True
  201. End If
  202. Next
  203. If 已開啟 = False Then
  204. Timer3.Enabled = False
  205. If File.Exists(Str + "\GA-ERP-SYS.exe") Then : File.Delete(Str + "\GA-ERP-SYS.exe") : End If
  206. MyModule1.進度條() : My.Computer.Network.DownloadFile(Target & "GA-ERP-SYS.exe", Str + "\GA-ERP-SYS.exe")
  207. OK.Enabled = True
  208. End If
  209. End If
  210. End Sub
  211. Public Sub Delay(ByRef Interval As Double) 'Interval单位为毫秒
  212. Dim time As DateTime = DateTime.Now
  213. Dim Span As Double = Interval * 1234
  214. While ((DateTime.Now.Ticks - time.Ticks) < Span)
  215. Application.DoEvents()
  216. End While
  217. End Sub
  218. End Class