Leaked source code of windows server 2003
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.

352 lines
10 KiB

  1. VERSION 5.00
  2. Begin VB.Form frmMain
  3. BorderStyle = 1 'Fixed Single
  4. Caption = "SDK BVT ( wbem 494 : opal > 1035 )"
  5. ClientHeight = 3660
  6. ClientLeft = 45
  7. ClientTop = 330
  8. ClientWidth = 6630
  9. Icon = "frmMain.frx":0000
  10. LinkTopic = "Form1"
  11. MaxButton = 0 'False
  12. ScaleHeight = 3660
  13. ScaleWidth = 6630
  14. StartUpPosition = 3 'Windows Default
  15. Begin VB.CommandButton cmdModInfo
  16. Caption = "Module &Info >"
  17. Height = 375
  18. Left = 1860
  19. TabIndex = 22
  20. Top = 2160
  21. Width = 1335
  22. End
  23. Begin VB.Frame fraLoop
  24. Caption = "&Looping"
  25. Height = 1635
  26. Left = 60
  27. TabIndex = 14
  28. Top = 1980
  29. Width = 1635
  30. Begin VB.OptionButton rdoLoopInf
  31. Caption = "Infinite"
  32. Height = 195
  33. Left = 180
  34. TabIndex = 23
  35. Top = 540
  36. Width = 1035
  37. End
  38. Begin VB.TextBox txtLoop
  39. BackColor = &H8000000F&
  40. Enabled = 0 'False
  41. Height = 285
  42. Left = 240
  43. TabIndex = 18
  44. Top = 1260
  45. Width = 1275
  46. End
  47. Begin VB.OptionButton rdoLoopIter
  48. Caption = "Iterations"
  49. Height = 195
  50. Left = 180
  51. TabIndex = 17
  52. Top = 1020
  53. Width = 1095
  54. End
  55. Begin VB.OptionButton rdoLoopMin
  56. Caption = "Minutes"
  57. Enabled = 0 'False
  58. Height = 195
  59. Left = 180
  60. TabIndex = 16
  61. Top = 780
  62. Width = 1035
  63. End
  64. Begin VB.OptionButton rdoLoopDis
  65. Caption = "Disabled"
  66. Height = 195
  67. Left = 180
  68. TabIndex = 15
  69. Top = 300
  70. Value = -1 'True
  71. Width = 975
  72. End
  73. End
  74. Begin VB.CommandButton cmdGo
  75. Default = -1 'True
  76. Height = 915
  77. Left = 1860
  78. Picture = "frmMain.frx":0442
  79. Style = 1 'Graphical
  80. TabIndex = 21
  81. Top = 2640
  82. Width = 1335
  83. End
  84. Begin VB.Frame fraModules
  85. Caption = "&Modules"
  86. Height = 3555
  87. Left = 3360
  88. TabIndex = 19
  89. Top = 60
  90. Width = 3195
  91. Begin VB.ListBox lstModules
  92. Height = 3195
  93. IntegralHeight = 0 'False
  94. Left = 120
  95. Style = 1 'Checkbox
  96. TabIndex = 20
  97. Top = 240
  98. Width = 2955
  99. End
  100. End
  101. Begin VB.Frame fraConfig
  102. Caption = "&Configuration"
  103. Height = 1875
  104. Left = 60
  105. TabIndex = 0
  106. Top = 60
  107. Width = 3195
  108. Begin VB.CheckBox chkAuthority
  109. Caption = "Null"
  110. Height = 195
  111. Left = 960
  112. TabIndex = 12
  113. Top = 1500
  114. Value = 1 'Checked
  115. Width = 615
  116. End
  117. Begin VB.CheckBox chkPassword
  118. Caption = "Null"
  119. Height = 195
  120. Left = 960
  121. TabIndex = 9
  122. Top = 1200
  123. Value = 1 'Checked
  124. Width = 615
  125. End
  126. Begin VB.CheckBox chkUserid
  127. Caption = "Null"
  128. Height = 195
  129. Left = 960
  130. TabIndex = 6
  131. Top = 900
  132. Value = 1 'Checked
  133. Width = 615
  134. End
  135. Begin VB.TextBox txtAuthority
  136. BackColor = &H8000000F&
  137. Enabled = 0 'False
  138. Height = 285
  139. Left = 1560
  140. TabIndex = 13
  141. Top = 1440
  142. Width = 1515
  143. End
  144. Begin VB.TextBox txtPassword
  145. BackColor = &H8000000F&
  146. Enabled = 0 'False
  147. Height = 285
  148. IMEMode = 3 'DISABLE
  149. Left = 1560
  150. PasswordChar = "*"
  151. TabIndex = 10
  152. Top = 1140
  153. Width = 1515
  154. End
  155. Begin VB.TextBox txtUserid
  156. BackColor = &H8000000F&
  157. Enabled = 0 'False
  158. Height = 285
  159. Left = 1560
  160. TabIndex = 7
  161. Top = 840
  162. Width = 1515
  163. End
  164. Begin VB.TextBox txtServer
  165. Height = 285
  166. Left = 1560
  167. TabIndex = 2
  168. Top = 240
  169. Width = 1515
  170. End
  171. Begin VB.TextBox txtSitecode
  172. Height = 285
  173. Left = 1560
  174. MaxLength = 3
  175. TabIndex = 4
  176. Top = 540
  177. Width = 1515
  178. End
  179. Begin VB.Label lblAuthority
  180. AutoSize = -1 'True
  181. Caption = "Authority:"
  182. Height = 195
  183. Left = 120
  184. TabIndex = 11
  185. Top = 1500
  186. Width = 660
  187. End
  188. Begin VB.Label lblPassword
  189. AutoSize = -1 'True
  190. Caption = "Password:"
  191. Height = 195
  192. Left = 120
  193. TabIndex = 8
  194. Top = 1200
  195. Width = 735
  196. End
  197. Begin VB.Label lblUserid
  198. AutoSize = -1 'True
  199. Caption = "UserID:"
  200. Height = 195
  201. Left = 120
  202. TabIndex = 5
  203. Top = 900
  204. Width = 540
  205. End
  206. Begin VB.Label lblServer
  207. AutoSize = -1 'True
  208. Caption = "Provider Machine:"
  209. Height = 195
  210. Left = 120
  211. TabIndex = 1
  212. Top = 300
  213. Width = 1290
  214. End
  215. Begin VB.Label lblSitecode
  216. AutoSize = -1 'True
  217. Caption = "Site code:"
  218. Height = 195
  219. Left = 120
  220. TabIndex = 3
  221. Top = 600
  222. Width = 720
  223. End
  224. End
  225. End
  226. Attribute VB_Name = "frmMain"
  227. Attribute VB_GlobalNameSpace = False
  228. Attribute VB_Creatable = False
  229. Attribute VB_PredeclaredId = True
  230. Attribute VB_Exposed = False
  231. Option Explicit
  232. Public canceled As Boolean
  233. Private Sub Form_Load()
  234. canceled = False
  235. InstallModules
  236. lstModules.ListIndex = -1
  237. End Sub
  238. Private Sub chkAuthority_Click()
  239. If chkAuthority.Value = 0 Then
  240. txtAuthority.Enabled = True
  241. txtAuthority.BackColor = &H80000005
  242. txtAuthority.SetFocus
  243. Else
  244. txtAuthority.Enabled = False
  245. txtAuthority.BackColor = &H8000000F
  246. End If
  247. End Sub
  248. Private Sub chkPassword_Click()
  249. If chkPassword.Value = 0 Then
  250. txtPassword.Enabled = True
  251. txtPassword.BackColor = &H80000005
  252. txtPassword.SetFocus
  253. Else
  254. txtPassword.Enabled = False
  255. txtPassword.BackColor = &H8000000F
  256. End If
  257. End Sub
  258. Private Sub chkUserid_Click()
  259. If chkUserid.Value = 0 Then
  260. txtUserid.Enabled = True
  261. txtUserid.BackColor = &H80000005
  262. txtUserid.SetFocus
  263. Else
  264. txtUserid.Enabled = False
  265. txtUserid.BackColor = &H8000000F
  266. End If
  267. End Sub
  268. Private Sub cmdGo_Click()
  269. Open "\bvtlog.txt" For Output As #1
  270. Print #1, "** BVT Started **" & vbCrLf & vbCrLf
  271. Close #1
  272. If rdoLoopDis.Value Then
  273. frmTest.Run
  274. ElseIf rdoLoopInf.Value Then
  275. Do
  276. frmTest.Run
  277. Dim f As New frmPause
  278. f.Show 1
  279. If canceled Then
  280. canceled = False
  281. Exit Do
  282. End If
  283. Loop
  284. ElseIf rdoLoopMin.Value Then
  285. ElseIf rdoLoopIter.Value Then
  286. Dim i As Integer
  287. For i = 1 To val(txtLoop.text)
  288. frmTest.Run
  289. Dim g As New frmPause
  290. g.Show 1
  291. If canceled Then
  292. canceled = False
  293. Exit For
  294. End If
  295. Next i
  296. End If
  297. End Sub
  298. Private Sub cmdModInfo_Click()
  299. If lstModules.ListIndex >= 0 Then
  300. Dim s As String
  301. s = Modules(lstModules.List(lstModules.ListIndex)).GetModuleInfo
  302. Dim f As New frmObjText
  303. f.Caption = "Module info for: " & lstModules.List(lstModules.ListIndex)
  304. f.txtMain.text = s
  305. f.Show
  306. End If
  307. End Sub
  308. Private Sub InstallModules()
  309. Modules.Add New SoftDist, "Software Distribution"
  310. Modules.Add New SiteCtrl, "Site Control File"
  311. Modules.Add New Methods, "Methods"
  312. Modules.Add New Queries, "Queries"
  313. Modules.Add New PDF, "Package Definition Files"
  314. End Sub
  315. Private Sub rdoLoopDis_Click()
  316. txtLoop.Enabled = False
  317. txtLoop.BackColor = &H8000000F
  318. End Sub
  319. Private Sub rdoLoopInf_Click()
  320. txtLoop.Enabled = False
  321. txtLoop.BackColor = &H8000000F
  322. End Sub
  323. Private Sub rdoLoopIter_Click()
  324. txtLoop.Enabled = True
  325. txtLoop.BackColor = &H80000005
  326. End Sub
  327. Private Sub rdoLoopMin_Click()
  328. txtLoop.Enabled = True
  329. txtLoop.BackColor = &H80000005
  330. End Sub