Brak opisu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HX-PGS-UPDATE.vb 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. Imports System.IO
  2. Imports System.Net
  3. Imports System.Net.NetworkInformation
  4. Public Class HX_PGS_UPDATE
  5. ReadOnly ds2 As New DataSet
  6. ReadOnly computerProperties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
  7. ReadOnly IPEndPoint() As EndPoint = computerProperties.GetActiveTcpListeners()
  8. Dim myIPEndPoint As IPEndPoint
  9. Dim 內網線路 As Boolean : ReadOnly 開發線路 As Boolean
  10. Private Sub Set_清單1()
  11. ftp清單_dgv.DataSource = Nothing : ds2.Clear()
  12. ftp清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
  13. ftp清單_dgv.ColumnHeadersHeight = 25
  14. ftp清單_dgv.AllowUserToAddRows = False
  15. SQL_FTP資料夾路徑分配()
  16. da.Fill(ds2) : ftp清單_dgv.DataSource = ds2.Tables(0) : conn.Close()
  17. End Sub
  18. Private Sub IP比對()
  19. '-----------------------IP比對----------------------------------------------------------------------------------------------------------------------------------------------------
  20. 伺服器區域_cb.Text = "公司雲端"
  21. End Sub
  22. Private Sub 伺服器區域_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 伺服器區域_cb.SelectedIndexChanged
  23. '-----------------------確認登入伺服器位置-----------------------------------------------------------------------------------------------------------------------------------------
  24. If SQL_連線狀態模組1.ConnectTest1("103.231.201.230, 2433") = True Then
  25. 登入人IP = "103.231.201.230,2433"
  26. Else
  27. 登入人IP = "103.144.143.182,2433"
  28. End If
  29. End Sub
  30. Private Sub HX_PGS_UPDATE_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  31. IP比對() : 資料數 = 86
  32. MyModule1.進度條() : If Strings.Left(伺服器區域_cb.Text, 2) = "公司" Then : SQL_連線字串_正式() : Else : SQL_連線字串_測試() : End If
  33. MyModule1.進度條() : SQL_FTP伺服器登入位置()
  34. MyModule1.進度條() : If dr.Read() Then : Target = dr("FTP地址") : FTP帳號 = dr("FTP帳號") : FTP密碼 = dr("FTP密碼") : FTP物理位置 = dr("FTP物理位置") : End If : conn.Close()
  35. MyModule1.進度條() : Set_清單1()
  36. MyModule1.進度條() : Dim HH As String = ""
  37. For i As Integer = 0 To ftp清單_dgv.Rows.Count - 1
  38. If i < 10 Then : HH = "0" & i : ElseIf i >= 10 Then : HH = i : End If
  39. If ftp清單_dgv("指定", i).Value.ToString = "AA" & HH Then : AA(i) = ftp清單_dgv("資料夾名稱", i).Value.ToString : End If
  40. Next
  41. MyModule1.進度條() : Target1 = Target & AA(0) & "/"
  42. End Sub
  43. Private Sub HX_PGS_UPDATE_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
  44. MyModule1.進度條() : Delay(30000)
  45. MyModule1.進度條() : Dim Str As String = Application.StartupPath
  46. '--- 刪除在下載---------------------------------------------------------------------------------------------------------------------------
  47. MyModule1.進度條() : If File.Exists(Str + "\HX-PGS-ERP-SYS.exe") Then : File.Delete(Str + "\HX-PGS-ERP-SYS.exe") : End If
  48. MyModule1.進度條() : If File.Exists(Str + "\HX01.docx") Then : File.Delete(Str + "\HX01.docx") : End If
  49. MyModule1.進度條() : If File.Exists(Str + "\PGS01.docx") Then : File.Delete(Str + "\PGS01.docx") : End If
  50. MyModule1.進度條() : If File.Exists(Str + "\LIN HSING HAO.txt") Then : File.Delete(Str + "\LIN HSING HAO.txt") : End If
  51. MyModule1.進度條() : My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "HX-PGS-ERP-SYS.exe", Str + "\HX-PGS-ERP-SYS.exe")
  52. MyModule1.進度條() : My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "HX01.docx", Str + "\HX01.docx")
  53. MyModule1.進度條() : My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "PGS01.docx", Str + "\PGS01.docx")
  54. MyModule1.進度條() : My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "LIN HSING HAO.txt", Str + "\LIN HSING HAO.txt")
  55. '--- 比對下載---------------------------------------------------------------------------------------------------------------------------
  56. MyModule1.進度條()
  57. If Dir(Str + "\Theme", vbDirectory) <> "" Then : Else : MyModule1.進度條() : MkDir(Str + "\Theme") : End If
  58. MyModule1.進度條() : If File.Exists(Str + "\Theme\excel_chinese.xml") Then : Else
  59. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "excel_chinese.xml", Str + "\Theme\excel_chinese.xml") : End If
  60. MyModule1.進度條() : If File.Exists(Str + "\Theme\excel_english.xml") Then : Else
  61. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "excel_english.xml", Str + "\Theme\excel_english.xml") : End If
  62. MyModule1.進度條() : If File.Exists(Str + "\Theme\TelerikMetro_Chinese.tssp") Then : Else
  63. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "TelerikMetro_Chinese.tssp", Str + "\Theme\TelerikMetro_Chinese.tssp") : End If
  64. MyModule1.進度條() : If File.Exists(Str + "\Theme\word_chinese.xml") Then : Else
  65. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "word_chinese.xml", Str + "\Theme\word_chinese.xml") : End If
  66. MyModule1.進度條() : If File.Exists(Str + "\Theme\word_english.xml") Then : Else
  67. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "word_english.xml", Str + "\Theme\word_english.xml") : End If
  68. '--- 比對下載---------------------------------------------------------------------------------------------------------------------------
  69. MyModule1.進度條() : If File.Exists(Str + "\HX-PGS-Message.exe") Then : Else
  70. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "HX-PGS-Message.exe", Str + "\HX-PGS-Message.exe") : End If
  71. MyModule1.進度條() : If File.Exists(Str + "\HX-PGS-Message.exe") Then : Else
  72. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "HX-PGS-Message.exe", Str + "\HX-PGS-Message.exe") : End If
  73. MyModule1.進度條() : If File.Exists(Str + "\Tran.exe") Then : Else
  74. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Tran.exe", Str + "\Tran.exe") : End If
  75. MyModule1.進度條() : If File.Exists(Str + "\HX-PGS-ERP-SYS.pdb") Then : Else
  76. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "HX-PGS-ERP-SYS.pdb", Str + "\HX-PGS-ERP-SYS.pdb") : End If
  77. MyModule1.進度條() : If File.Exists(Str + "\HX-PGS-ERP-SYS.xml") Then : Else
  78. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "HX-PGS-ERP-SYS.xml", Str + "\HX-PGS-ERP-SYS.xml") : End If
  79. MyModule1.進度條() : If File.Exists(Str + "\Interop.SHDocVw.dll") Then : Else
  80. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Interop.SHDocVw.dll", Str + "\Interop.SHDocVw.dll") : End If
  81. MyModule1.進度條() : If File.Exists(Str + "\AxInterop.MSHTML.dll") Then : Else
  82. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "AxInterop.MSHTML.dll", Str + "\AxInterop.MSHTML.dll") : End If
  83. MyModule1.進度條() : If File.Exists(Str + "\AxInterop.SHDocVw.dll") Then : Else
  84. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "AxInterop.SHDocVw.dll", Str + "\AxInterop.SHDocVw.dll") : End If
  85. MyModule1.進度條() : If File.Exists(Str + "\HX-PGS-ERP-SYS.exe.config") Then : Else
  86. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "HX-PGS-ERP-SYS.exe.config", Str + "\HX-PGS-ERP-SYS.exe.config") : End If
  87. MyModule1.進度條() : If File.Exists(Str + "\A.txt") Then : Else
  88. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "A.txt", Str + "\A.txt") : End If
  89. MyModule1.進度條() : If File.Exists(Str + "\C.txt") Then : Else
  90. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "C.txt", Str + "\C.txt") : End If
  91. MyModule1.進度條() : If File.Exists(Str + "\ch.txt") Then : Else
  92. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "ch.txt", Str + "\ch.txt") : End If
  93. MyModule1.進度條() : If File.Exists(Str + "\DotNetBarcode.dll") Then : Else
  94. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "DotNetBarcode.dll", Str + "\DotNetBarcode.dll") : End If
  95. MyModule1.進度條() : If File.Exists(Str + "\en.txt") Then : Else
  96. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "en.txt", Str + "\en.txt") : End If
  97. MyModule1.進度條() : If File.Exists(Str + "\IdentityModel.dll") Then : Else
  98. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "IdentityModel.dll", Str + "\IdentityModel.dll") : End If
  99. MyModule1.進度條() : If File.Exists(Str + "\IdentityModel.pdb") Then : Else
  100. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "IdentityModel.pdb", Str + "\IdentityModel.pdb") : End If
  101. MyModule1.進度條() : If File.Exists(Str + "\IdentityModel.xml") Then : Else
  102. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "IdentityModel.xml", Str + "\IdentityModel.xml") : End If
  103. MyModule1.進度條() : If File.Exists(Str + "\in.txt") Then : Else
  104. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "in.txt", Str + "\in.txt") : End If
  105. MyModule1.進度條() : If File.Exists(Str + "\Newtonsoft.Json.dll") Then : Else
  106. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Newtonsoft.Json.dll", Str + "\Newtonsoft.Json.dll") : End If
  107. MyModule1.進度條() : If File.Exists(Str + "\Newtonsoft.Json.xml") Then : Else
  108. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Newtonsoft.Json.xml", Str + "\Newtonsoft.Json.xml") : End If
  109. MyModule1.進度條() : If File.Exists(Str + "\PInvoke.Windows.Core.dll") Then : Else
  110. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "PInvoke.Windows.Core.dll", Str + "\PInvoke.Windows.Core.dll") : End If
  111. MyModule1.進度條() : If File.Exists(Str + "\PInvoke.Windows.Core.xml") Then : Else
  112. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "PInvoke.Windows.Core.xml", Str + "\PInvoke.Windows.Core.xml") : End If
  113. MyModule1.進度條() : If File.Exists(Str + "\py-tran-log.txt") Then : Else
  114. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "py-tran-log.txt", Str + "\py-tran-log.txt") : End If
  115. MyModule1.進度條() : If File.Exists(Str + "\System.Buffers.dll") Then : Else
  116. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Buffers.dll", Str + "\System.Buffers.dll") : End If
  117. MyModule1.進度條() : If File.Exists(Str + "\System.Buffers.xml") Then : Else
  118. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Buffers.xml", Str + "\System.Buffers.xml") : End If
  119. MyModule1.進度條() : If File.Exists(Str + "\System.Memory.dll") Then : Else
  120. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Memory.dll", Str + "\System.Memory.dll") : End If
  121. MyModule1.進度條() : If File.Exists(Str + "\System.Memory.xml") Then : Else
  122. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Memory.xml", Str + "\System.Memory.xml") : End If
  123. MyModule1.進度條() : If File.Exists(Str + "\System.Numerics.Vectors.dll") Then : Else
  124. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Numerics.Vectors.dll", Str + "\System.Numerics.Vectors.dll") : End If
  125. MyModule1.進度條() : If File.Exists(Str + "\System.Numerics.Vectors.xml") Then : Else
  126. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Numerics.Vectors.xml", Str + "\System.Numerics.Vectors.xml") : End If
  127. MyModule1.進度條() : If File.Exists(Str + "\System.Runtime.CompilerServices.Unsafe.dll") Then : Else
  128. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Runtime.CompilerServices.Unsafe.dll", Str + "\System.Runtime.CompilerServices.Unsafe.dll") : End If
  129. MyModule1.進度條() : If File.Exists(Str + "\System.Runtime.CompilerServices.Unsafe.xml") Then : Else
  130. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Runtime.CompilerServices.Unsafe.xml", Str + "\System.Runtime.CompilerServices.Unsafe.xml") : End If
  131. MyModule1.進度條() : If File.Exists(Str + "\System.Text.Encodings.Web.dll") Then : Else
  132. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Text.Encodings.Web.dll", Str + "\System.Text.Encodings.Web.dll") : End If
  133. MyModule1.進度條() : If File.Exists(Str + "\System.Text.Encodings.Web.xml") Then : Else
  134. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "System.Text.Encodings.Web.xml", Str + "\System.Text.Encodings.Web.xml") : End If
  135. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RadToastNotification.dll") Then : Else
  136. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RadToastNotification.dll", Str + "\Telerik.WinControls.RadToastNotification.dll") : End If
  137. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RadToastNotification.xml") Then : Else
  138. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RadToastNotification.xml", Str + "\Telerik.WinControls.RadToastNotification.xml") : End If
  139. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.SyntaxEditor.dll") Then : Else
  140. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.SyntaxEditor.dll", Str + "\Telerik.WinControls.SyntaxEditor.dll") : End If
  141. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.SyntaxEditor.xml") Then : Else
  142. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.SyntaxEditor.xml", Str + "\Telerik.WinControls.SyntaxEditor.xml") : End If
  143. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RadWebCam.dll") Then : Else
  144. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RadWebCam.dll", Str + "\Telerik.WinControls.RadWebCam.dll") : End If
  145. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RadWebCam.xml") Then : Else
  146. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RadWebCam.xml", Str + "\Telerik.WinControls.RadWebCam.xml") : End If
  147. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.GridView.dll") Then : Else
  148. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.GridView.dll", Str + "\Telerik.WinControls.GridView.dll") : End If
  149. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RadMap.dll") Then : Else
  150. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RadMap.dll", Str + "\Telerik.WinControls.RadMap.dll") : End If
  151. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RadMap.xml") Then : Else
  152. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RadMap.xml", Str + "\Telerik.WinControls.RadMap.xml") : End If
  153. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.GridView.xml") Then : Else
  154. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.GridView.xml", Str + "\Telerik.WinControls.GridView.xml") : End If
  155. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.ChartView.dll") Then : Else
  156. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.ChartView.dll", Str + "\Telerik.WinControls.ChartView.dll") : End If
  157. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.ChartView.xml") Then : Else
  158. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.ChartView.xml", Str + "\Telerik.WinControls.ChartView.xml") : End If
  159. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.UI.dll") Then : Else
  160. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.UI.dll", Str + "\Telerik.WinControls.UI.dll") : End If
  161. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.UI.xml") Then : Else
  162. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.UI.xml", Str + "\Telerik.WinControls.UI.xml") : End If
  163. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.dll") Then : Else
  164. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.dll", Str + "\Telerik.WinControls.dll") : End If
  165. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.xml") Then : Else
  166. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.xml", Str + "\Telerik.WinControls.xml") : End If
  167. MyModule1.進度條() : If File.Exists(Str + "\TelerikCommon.dll") Then : Else
  168. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "TelerikCommon.dll", Str + "\TelerikCommon.dll") : End If
  169. MyModule1.進度條() : If File.Exists(Str + "\MediaFoundation.dll") Then : Else
  170. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "MediaFoundation.dll", Str + "\MediaFoundation.dll") : End If
  171. MyModule1.進度條() : If File.Exists(Str + "\Telerik.Windows.MediaFoundation.dll") Then : Else
  172. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.Windows.MediaFoundation.dll", Str + "\Telerik.Windows.MediaFoundation.dll") : End If
  173. MyModule1.進度條() : If File.Exists(Str + "\Microsoft.Toolkit.Uwp.Notifications.dll") Then : Else
  174. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Microsoft.Toolkit.Uwp.Notifications.dll", Str + "\Microsoft.Toolkit.Uwp.Notifications.dll") : End If
  175. MyModule1.進度條() : If File.Exists(Str + "\SuperDataGrid.dll") Then : Else
  176. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "SuperDataGrid.dll", Str + "\SuperDataGrid.dll") : End If
  177. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.PdfViewer.dll") Then : Else
  178. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.PdfViewer.dll", Str + "\Telerik.WinControls.PdfViewer.dll") : End If
  179. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.PdfViewer.xml") Then : Else
  180. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.PdfViewer.xml", Str + "\Telerik.WinControls.PdfViewer.xml") : End If
  181. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RichTextEditor.dll") Then : Else
  182. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RichTextEditor.dll", Str + "\Telerik.WinControls.RichTextEditor.dll") : End If
  183. MyModule1.進度條() : If File.Exists(Str + "\Telerik.WinControls.RichTextEditor.xml") Then : Else
  184. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.WinControls.RichTextEditor.xml", Str + "\Telerik.WinControls.RichTextEditor.xml") : End If
  185. MyModule1.進度條() : If File.Exists(Str + "\Telerik.Windows.Documents.Core.dll") Then : Else
  186. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.Windows.Documents.Core.dll", Str + "\Telerik.Windows.Documents.Core.dll") : End If
  187. MyModule1.進度條() : If File.Exists(Str + "\Telerik.Windows.Documents.Core.xml") Then : Else
  188. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.Windows.Documents.Core.xml", Str + "\Telerik.Windows.Documents.Core.xml") : End If
  189. MyModule1.進度條() : If File.Exists(Str + "\Telerik.Windows.Documents.Fixed.dll") Then : Else
  190. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.Windows.Documents.Fixed.dll", Str + "\Telerik.Windows.Documents.Fixed.dll") : End If
  191. MyModule1.進度條() : If File.Exists(Str + "\Telerik.Windows.Documents.Fixed.xml") Then : Else
  192. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.Windows.Documents.Fixed.xml", Str + "\Telerik.Windows.Documents.Fixed.xml") : End If
  193. MyModule1.進度條() : If File.Exists(Str + "\Telerik.Windows.Zip.dll") Then : Else
  194. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.Windows.Zip.dll", Str + "\Telerik.Windows.Zip.dll") : End If
  195. MyModule1.進度條() : If File.Exists(Str + "\Telerik.Windows.Zip.xml") Then : Else
  196. My.Computer.Network.DownloadFile(Target & AA(0) & "/" & "Telerik.Windows.Zip.xml", Str + "\Telerik.Windows.Zip.xml") : End If
  197. '--- 開啟專案---------------------------------------------------------------------------------------------------------------------------
  198. MyModule1.進度條() : Shell(Str + "\HX-PGS-ERP-SYS.exe", vbNormalFocus)
  199. Me.Close()
  200. End Sub
  201. Public Sub Delay(ByRef Interval As Double) 'Interval单位为毫秒
  202. Dim time As DateTime = DateTime.Now
  203. Dim Span As Double = Interval * 1234
  204. While ((DateTime.Now.Ticks - time.Ticks) < Span)
  205. Application.DoEvents()
  206. End While
  207. End Sub
  208. End Class