]> Creatis software - bbtk.git/blob - packages/toolsbbtk/bbs/appli/GUIPlugPackage.bbs
a6a7777db20182009846a263790ca0a6f051ae3b
[bbtk.git] / packages / toolsbbtk / bbs / appli / GUIPlugPackage.bbs
1 # ----------------------------------
2 # - BBTKGEditor v 1.3 BBS BlackBox Script
3 # - /home/daniel/Documents/TrabajosCreaTools/Proyectos/PlugPackageBBS/GUIPlugPackage.bbs
4 # ----------------------------------
5
6 # BBTK GEditor Script
7 # ----------------------
8
9 include std
10 include itkvtk
11 include wx
12 include std
13
14 author "Daniel Gonzalez"
15 description "Plug Package Script"
16 category "Core Script"
17
18 new DirectorySelector directorySelect
19   set directorySelect.Message "Select the location of the package"
20   set directorySelect.Title "Select Package"
21
22 new LayoutLine Layout
23   set Layout.WinHeight "200"
24   set Layout.WinTitle "Plug Package"
25   set Layout.WinWidth "500"
26
27 new OutputText title
28   set title.In "Plug package directory: "
29
30 new ExecSystemCommand execution
31
32 new CommandButton plugButton
33   set plugButton.In "print $lineToExecute.Out$;"
34   set plugButton.Label "Plug it!"
35
36 new ConcatStrings lineToExecute
37   set lineToExecute.In1 "bbPlugPackage "
38
39 new OutputText pathText
40
41 new StringSelect resultString
42   set resultString.In0 "Packaged Successfully Plugged"
43   set resultString.In1 "An error occurred while plugging the package. Please check the command line."
44   set resultString.In2 "An error 2 occurred while plugging the package. Please check the command line."
45   set resultString.In3 "An error 3 occurred while plugging the package. Please check the command line."
46   set resultString.In4 "An error 4 occurred while plugging the package. Please check the command line."
47   set resultString.In5 "An error 5 occurred while plugging the package. Please check the command line."
48   set resultString.In6 "An error 6 occurred while plugging the package. Please check the command line."
49   set resultString.In7 "An error 7 occurred while plugging the package. Please check the command line."
50   set resultString.In8 "An error 8 occurred while plugging the package. Please check the command line."
51   set resultString.In9 "An error 9 occurred while plugging the package. Please check the command line."
52
53 new LayoutLine resultDialog
54   set resultDialog.WinDialog "true"
55   set resultDialog.WinHeight "100"
56   set resultDialog.WinTitle "Result"
57   set resultDialog.WinWidth "400"
58
59 new OutputText textLabel
60
61
62 connect title.Widget Layout.Widget1
63 connect lineToExecute.Out execution.In
64 connect plugButton.Widget Layout.Widget3
65 connect directorySelect.Out lineToExecute.In2
66 connect directorySelect.Out pathText.In
67 connect pathText.Widget Layout.Widget2
68 connect plugButton.BoxChange execution.BoxExecute
69 connect textLabel.Widget resultDialog.Widget1
70 connect plugButton.BoxChange resultDialog.BoxExecute
71 connect plugButton.BoxChange textLabel.BoxExecute
72 connect execution.Return resultString.In
73 connect resultString.Out textLabel.In
74 connect plugButton.BoxChange resultString.BoxExecute
75
76 exec directorySelect
77 exec Layout