frm_vcs.bas 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. Version =20
  2. VersionRequired =20
  3. Begin Form
  4. AllowFilters = NotDefault
  5. PopUp = NotDefault
  6. Modal = NotDefault
  7. RecordSelectors = NotDefault
  8. MaxButton = NotDefault
  9. MinButton = NotDefault
  10. ShortcutMenu = NotDefault
  11. AutoCenter = NotDefault
  12. NavigationButtons = NotDefault
  13. AllowDeletions = NotDefault
  14. DividingLines = NotDefault
  15. AllowAdditions = NotDefault
  16. DefaultView =0
  17. ScrollBars =0
  18. ViewsAllowed =1
  19. BorderStyle =1
  20. PictureAlignment =2
  21. DatasheetGridlinesBehavior =3
  22. GridY =10
  23. Width =8163
  24. DatasheetFontHeight =11
  25. ItemSuffix =20
  26. Left =3225
  27. Top =2415
  28. Right =20235
  29. Bottom =10335
  30. DatasheetGridlinesColor =14806254
  31. RecSrcDt = Begin
  32. 0x97e87bbff3d2e440
  33. End
  34. Caption ="VCS"
  35. DatasheetFontName ="Calibri"
  36. OnLoad ="[Event Procedure]"
  37. AllowDatasheetView =0
  38. AllowPivotTableView =0
  39. AllowPivotChartView =0
  40. AllowPivotChartView =0
  41. FilterOnLoad =0
  42. ShowPageMargins =0
  43. DisplayOnSharePointSite =1
  44. AllowLayoutView =0
  45. DatasheetAlternateBackColor =15921906
  46. DatasheetGridlinesColor12 =0
  47. FitToScreen =1
  48. DatasheetBackThemeColorIndex =1
  49. BorderThemeColorIndex =3
  50. ThemeFontIndex =1
  51. ForeThemeColorIndex =0
  52. AlternateBackThemeColorIndex =1
  53. AlternateBackShade =95.0
  54. Begin
  55. Begin Label
  56. BackStyle =0
  57. FontSize =11
  58. FontName ="Calibri"
  59. ThemeFontIndex =1
  60. BackThemeColorIndex =1
  61. BorderThemeColorIndex =0
  62. BorderTint =50.0
  63. ForeThemeColorIndex =0
  64. ForeTint =50.0
  65. GridlineThemeColorIndex =1
  66. GridlineShade =65.0
  67. End
  68. Begin CommandButton
  69. Width =1701
  70. Height =283
  71. FontSize =11
  72. FontWeight =400
  73. FontName ="Calibri"
  74. ForeThemeColorIndex =0
  75. ForeTint =75.0
  76. GridlineThemeColorIndex =1
  77. GridlineShade =65.0
  78. UseTheme =1
  79. Shape =1
  80. Gradient =12
  81. BackThemeColorIndex =4
  82. BackTint =60.0
  83. BorderLineStyle =0
  84. BorderColor =16777215
  85. BorderThemeColorIndex =4
  86. BorderTint =60.0
  87. ThemeFontIndex =1
  88. HoverThemeColorIndex =4
  89. HoverTint =40.0
  90. PressedThemeColorIndex =4
  91. PressedShade =75.0
  92. HoverForeThemeColorIndex =0
  93. HoverForeTint =75.0
  94. PressedForeThemeColorIndex =0
  95. PressedForeTint =75.0
  96. End
  97. Begin OptionGroup
  98. SpecialEffect =3
  99. BorderLineStyle =0
  100. Width =1701
  101. Height =1701
  102. BackThemeColorIndex =1
  103. BorderThemeColorIndex =1
  104. BorderShade =65.0
  105. GridlineThemeColorIndex =1
  106. GridlineShade =65.0
  107. End
  108. Begin TextBox
  109. AddColon = NotDefault
  110. FELineBreak = NotDefault
  111. BorderLineStyle =0
  112. Width =1701
  113. LabelX =-1701
  114. FontSize =11
  115. FontName ="Calibri"
  116. AsianLineBreak =1
  117. BackThemeColorIndex =1
  118. BorderThemeColorIndex =1
  119. BorderShade =65.0
  120. ThemeFontIndex =1
  121. ForeThemeColorIndex =0
  122. ForeTint =75.0
  123. GridlineThemeColorIndex =1
  124. GridlineShade =65.0
  125. End
  126. Begin ComboBox
  127. AddColon = NotDefault
  128. BorderLineStyle =0
  129. Width =1701
  130. LabelX =-1701
  131. FontSize =11
  132. FontName ="Calibri"
  133. AllowValueListEdits =1
  134. InheritValueList =1
  135. ThemeFontIndex =1
  136. BackThemeColorIndex =1
  137. BorderThemeColorIndex =1
  138. BorderShade =65.0
  139. ForeThemeColorIndex =2
  140. ForeShade =50.0
  141. GridlineThemeColorIndex =1
  142. GridlineShade =65.0
  143. End
  144. Begin Section
  145. CanGrow = NotDefault
  146. Height =2437
  147. Name ="Détail"
  148. AlternateBackColor =15921906
  149. AlternateBackThemeColorIndex =1
  150. AlternateBackShade =95.0
  151. BackThemeColorIndex =1
  152. Begin
  153. Begin Label
  154. OverlapFlags =85
  155. TextAlign =2
  156. TextFontFamily =49
  157. Left =175
  158. Top =56
  159. Width =7840
  160. Height =334
  161. FontSize =12
  162. FontWeight =700
  163. BorderColor =8355711
  164. ForeColor =8355711
  165. Name ="lbl_title"
  166. Caption ="VCS - Version Control System For Access"
  167. FontName ="Consolas"
  168. GridlineColor =10921638
  169. LayoutCachedLeft =175
  170. LayoutCachedTop =56
  171. LayoutCachedWidth =8015
  172. LayoutCachedHeight =390
  173. ThemeFontIndex =-1
  174. End
  175. Begin ComboBox
  176. LimitToList = NotDefault
  177. OverlapFlags =85
  178. TextFontFamily =49
  179. IMESentenceMode =3
  180. ColumnCount =4
  181. Left =170
  182. Top =623
  183. Width =2828
  184. Height =390
  185. FontSize =10
  186. BorderColor =10921638
  187. ForeColor =4138256
  188. ColumnInfo ="\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"\";\"10\";\"100\""
  189. Name ="cb_command"
  190. RowSourceType ="Table/Query"
  191. RowSource ="SELECT tbl_commands.cmd_name, tbl_commands.function, tbl_commands.description, t"
  192. "bl_commands.with_args FROM tbl_commands ORDER BY tbl_commands.order; "
  193. ColumnWidths ="5670;0;0;0"
  194. FontName ="Consolas"
  195. OnChange ="[Event Procedure]"
  196. GridlineColor =10921638
  197. AllowValueListEdits =0
  198. InheritValueList =0
  199. LayoutCachedLeft =170
  200. LayoutCachedTop =623
  201. LayoutCachedWidth =2998
  202. LayoutCachedHeight =1013
  203. ThemeFontIndex =-1
  204. End
  205. Begin CommandButton
  206. OverlapFlags =85
  207. TextFontFamily =49
  208. Left =7143
  209. Top =623
  210. Width =850
  211. Height =390
  212. TabIndex =2
  213. ForeColor =4210752
  214. Name ="cmd_run"
  215. Caption ="Run"
  216. OnClick ="[Event Procedure]"
  217. FontName ="Consolas"
  218. GridlineColor =10921638
  219. LayoutCachedLeft =7143
  220. LayoutCachedTop =623
  221. LayoutCachedWidth =7993
  222. LayoutCachedHeight =1013
  223. UseTheme =0
  224. BackColor =14136213
  225. BorderColor =14136213
  226. ThemeFontIndex =-1
  227. HoverColor =15060409
  228. PressedColor =9592887
  229. HoverForeColor =4210752
  230. PressedForeColor =4210752
  231. WebImagePaddingLeft =2
  232. WebImagePaddingTop =2
  233. WebImagePaddingRight =1
  234. WebImagePaddingBottom =1
  235. Overlaps =1
  236. End
  237. Begin Label
  238. OverlapFlags =93
  239. TextFontFamily =49
  240. Left =165
  241. Top =1185
  242. Width =7830
  243. Height =735
  244. FontSize =10
  245. BorderColor =8355711
  246. Name ="lbl_help"
  247. Caption ="Runs a git command"
  248. FontName ="Consolas"
  249. GridlineColor =10921638
  250. LayoutCachedLeft =165
  251. LayoutCachedTop =1185
  252. LayoutCachedWidth =7995
  253. LayoutCachedHeight =1920
  254. ThemeFontIndex =-1
  255. ForeTint =100.0
  256. End
  257. Begin Label
  258. FontItalic = NotDefault
  259. OverlapFlags =85
  260. TextAlign =3
  261. TextFontFamily =49
  262. Left =2040
  263. Top =2040
  264. Width =5949
  265. Height =223
  266. FontSize =8
  267. BorderColor =8355711
  268. Name ="Étiquette15"
  269. Caption ="Conseil départemental du Bas-Rhin, 2016"
  270. FontName ="Consolas"
  271. GridlineColor =10921638
  272. LayoutCachedLeft =2040
  273. LayoutCachedTop =2040
  274. LayoutCachedWidth =7989
  275. LayoutCachedHeight =2263
  276. ThemeFontIndex =-1
  277. ForeTint =100.0
  278. End
  279. Begin TextBox
  280. OverlapFlags =85
  281. TextFontFamily =49
  282. IMESentenceMode =3
  283. Left =3118
  284. Top =623
  285. Width =3860
  286. Height =390
  287. FontSize =10
  288. TabIndex =1
  289. BorderColor =10921638
  290. ForeColor =4138256
  291. Name ="txt_args"
  292. FontName ="Consolas"
  293. GridlineColor =10921638
  294. LayoutCachedLeft =3118
  295. LayoutCachedTop =623
  296. LayoutCachedWidth =6978
  297. LayoutCachedHeight =1013
  298. ThemeFontIndex =-1
  299. ForeThemeColorIndex =2
  300. ForeTint =100.0
  301. ForeShade =50.0
  302. End
  303. Begin CommandButton
  304. OverlapFlags =87
  305. Left =170
  306. Top =1927
  307. Width =340
  308. Height =340
  309. TabIndex =3
  310. ForeColor =4210752
  311. Name ="cmd_config"
  312. OnClick ="[Event Procedure]"
  313. GridlineColor =10921638
  314. ImageData = Begin
  315. 0x2800000010000000100000000100200000000000000000000000000000000000 ,
  316. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  317. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  318. 0x0000000000000000c0a090ff604830ff604830ff604830ff604830ff604830ff ,
  319. 0x604830ff604830ff604830ff604830ff604830ff604830ff0000000000000000 ,
  320. 0x0000000000000000c0a890fffff8f0fffff0e0fff0e8e0fff0e0d0fff0d0c0ff ,
  321. 0xf0c8b0ffe0c0a0ffe0b8a0ffe0b090ffe0a890ff604830ff0000000000000000 ,
  322. 0x0000000000000000c0a8a0fffffff0ffc0a8a0ffb0a0a0fff0e8e0ffb0a090ff ,
  323. 0xb09890ffb09890ffb09890ffb09890ffe0b090ff604830ff0000000000000000 ,
  324. 0x0000000000000000c0a8a0fffffff0fffffff0fffff8f0fffff0e0fff0e8e0ff ,
  325. 0xf0e0d0fff0d0c0fff0c8b0ffe0c0a0ffe0b8a0ff604830ff0000000000000000 ,
  326. 0x0000000000000000c0a8a0fffffff0ffb0a8a0ffb0a0a0fffff8f0ffb0a090ff ,
  327. 0xb09890ffb09890ffb09890ffb09890ffe0c0a0ff604830ff0000000000000000 ,
  328. 0x0000000000000000c0b0a0fffffff0fffffff0fffffff0fffffff0fffff8f0ff ,
  329. 0xfff0e0fff0e8e0fff0e0d0fff0d0c0fff0c8b0ff604830ff0000000000000000 ,
  330. 0x0000000000000000c0b0a0fffffff0fffffff0fffffff0fffffff0fffffff0ff ,
  331. 0xfff8f0ffc0c8c0ff406070fff0e0d0fff0d0c0ff604830ff0000000000000000 ,
  332. 0x0000000040784010c0b0a0ffffffffffe0e8f0ff607880ffe0e0e0fffffff0ff ,
  333. 0xc0c8d0ff506070ff30a8d0ff203840ffb0a0a0ff604830ff0000000000000000 ,
  334. 0x40784070408050ffd0b0a0ffffffffff90a8b0ff80d0e0ff506070ffb0b8c0ff ,
  335. 0x506070ff60c0e0ff506070ff30b8f0ff102830ff103040ff102830ff10203090 ,
  336. 0x407840ff50a860ffd0b8a0ffffffffffd0d8e0ff90a8b0ff80e0f0ff506070ff ,
  337. 0x80d0e0ff506070ff60d0f0ff406070ff30b0e0ff2098d0ff2088b0ff205070ff ,
  338. 0x508860ff50b060ffd0b8a0ffd0b8a0ffd0b8a0ffb0b0a0ff90a8b0ff80e0f0ff ,
  339. 0x506070ff80e0f0ff405870ff60d0f0ff50c8f0ff40c0f0ff20b0e0ff20a0d0ff ,
  340. 0x609870ff50b870ff00000000000000000000000090a8b0ff2080a0ff90a8b0ff ,
  341. 0x80e0f0ff405870ff80e0f0ff70d8f0ff60d0f0ff50c8f0ff40c0f0ff30b8f0ff ,
  342. 0x70a880ff60c080ff00000000000000000000000090a8b09090a8b0ff2080a0ff ,
  343. 0x90a8b0ff80e0f0ff80e0f0ff80e0f0ff70d8f0ff60d0f0ff60b0d0ff808890ff ,
  344. 0xb0c0a0ff90d0a0ff000000000000000000000000000000000000000090a8b050 ,
  345. 0x90a8b0b090a8b0ff90a0b0ff90a0a0ff8098a0ff8090a0ff808890ff80889080 ,
  346. 0xa0b8a0ffb0c0a0ff000000000000000000000000000000000000000000000000 ,
  347. 0x0000000000000000000000000000000000000000000000000000000000000000 ,
  348. 0x0000000000000000
  349. End
  350. LayoutCachedLeft =170
  351. LayoutCachedTop =1927
  352. LayoutCachedWidth =510
  353. LayoutCachedHeight =2267
  354. UseTheme =0
  355. Gradient =0
  356. BackColor =14136213
  357. BorderColor =14136213
  358. HoverColor =15060409
  359. PressedColor =9592887
  360. HoverForeColor =4210752
  361. PressedForeColor =4210752
  362. WebImagePaddingLeft =2
  363. WebImagePaddingTop =2
  364. WebImagePaddingRight =1
  365. WebImagePaddingBottom =1
  366. Overlaps =1
  367. End
  368. End
  369. End
  370. End
  371. End
  372. CodeBehindForm
  373. Attribute VB_GlobalNameSpace = False
  374. Attribute VB_Creatable = True
  375. Attribute VB_PredeclaredId = True
  376. Attribute VB_Exposed = False
  377. Option Compare Database
  378. Private Sub cb_command_Change()
  379. Call update
  380. End Sub
  381. Private Sub cmd_config_Click()
  382. If Not vcs_tbl_exists Then
  383. If Not MsgBox("The configuration table 'ztbl_vcs' does not exist, " & _
  384. "do you want to create it?", vbYesNo) = vbNo Then
  385. Exit Sub
  386. End If
  387. DoCmd.SetWarnings False
  388. DoCmd.RunSQL "SELECT INTO [ztbl_vcs] FROM [modele - ztbl_vcs];"
  389. DoCmd.SetWarnings True
  390. Else
  391. MsgBox "'ztl_vcs' already exists"
  392. End If
  393. 'DoCmd.OpenForm "frm_config"
  394. End Sub
  395. Private Sub cmd_run_Click()
  396. Call run
  397. End Sub
  398. Private Sub Form_Load()
  399. Call update
  400. End Sub
  401. Sub update()
  402. Me.lbl_help.Caption = Nz(Me.cb_command.Column(2), "")
  403. Me.txt_args.Enabled = Nz(Me.cb_command.Column(3), False)
  404. If Me.txt_args.Enabled Then
  405. Me.txt_args.SetFocus
  406. Else
  407. Me.cmd_run.SetFocus
  408. End If
  409. End Sub
  410. Sub run()
  411. If Not Me.txt_args.Enabled Then
  412. Application.run Me.cb_command.Column(1)
  413. Else
  414. Application.run Me.cb_command.Column(1), Me.txt_args
  415. End If
  416. MsgBox "Done"
  417. End Sub