Zeus API Reference - MyGeneration Software

GuiController Class

The ui object is only available in the user interface block of the template. This object is very similar to a form object in Windows programming. Controls are added to a collection of controls and a simple auto-layout algorithm is applied. You can customize the layout of the form by editing each of the control's top, left, width, and height properties.

For a list of all members of this type, see GuiController Members.

System.Object
   Zeus.UserInterface.GuiControl
      Zeus.UserInterface.GuiController

public class GuiController : GuiControl, IGuiController, IZeusGuiControl, IEnumerable

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The GuiController is an object that generically describes a graphical user interface. It is used along to gather input from the user for use in the template body. For example, You may want to gather a table's name and a tablespace name for the generation of a data-access object or stored procedure. Below are some examples showing how the GuiController can be used in the setup function of the interface code segment.

Example

VBScript sample of the GuiController (ui)

ui.Title = "Template Form Title Here"
ui.Width  = 330
ui.Height = 420

ui.AddLabel "lblPath", "Output file path: ",  "Select the output path."
ui.AddTextBox "txtPath", sOutputPath, "Select the Output Path."
ui.AddFilePicker "btnPath", "Select Path", "Select the Output Path.", "txtPath", true
ui.AddLabel "lblDatabases", "Select a database:", "Select a database in the dropdown below."

Set cmbDatabases = ui.AddComboBox("cmbDatabase", "Select a database.")
cmbDatabases.AttachEvent "onchange", "cmbDatabases_onchange"

ui.AddLabel "lblTables", "Select tables:", "Select tables from the listbox below."
Set lstTables = ui.AddListBox ("lstTables", "Select tables:")
lstTables.Height = 150
JScript sample of the GuiController (ui)
ui.Title = "Template Form Title Here"
ui.Width = 350;
ui.Height = 420;

var lblError = ui.AddLabel("lblError", "", "");
lblError.ForeColor = "Red";

ui.AddLabel("lblPath", "Select the output path:", "Select the output path in the field below.");
ui.AddTextBox("txtPath", sOutputPath, "Select the Output Path.");
ui.AddFilePicker("btnPath", "Select Path", "Select the Output Path.", "txtPath", true);
ui.AddLabel("lblDatabases", "Select a database:", "Select a database in the dropdown below.");

var cmbDatabases = ui.AddComboBox("cmbDatabase", "Select a database.");
cmbDatabases.AttachEvent("onchange", "cmbDatabases_onchange");

ui.AddLabel("lblTables", "Select tables:", "Select tables from the listbox below.");
var lstTables = ui.AddListBox("lstTables", "Select tables.");
lstTables.Height = 150;
C# sample of the GuiController (ui)
ui.Title = "Template Form Title Here";
ui.Width = 340;
ui.Height = 420;

GuiLabel lblError = ui.AddLabel("lblError", "", "");
lblError.ForeColor = "Red";

ui.AddLabel("lblPath", "Select the output path:", "Select the output path in the field below.");
ui.AddTextBox("txtPath", sOutputPath, "Select the Output Path.");
ui.AddFilePicker("btnPath", "Select Path", "Select the Output Path.", "txtPath", true);

ui.AddLabel("lblDatabases", "Select a database:", "Select a database in the dropdown below.");
GuiComboBox cmbDatabases = ui.AddComboBox("cmbDatabase", "Select a database.");
cmbDatabases.AttachEvent("onchange", "cmbDatabases_onchange");

ui.AddLabel("lblTables", "Select tables:", "Select tables from the listbox below.");
GuiListBox lstTables = ui.AddListBox("lstTables", "Select tables.");
lstTables.Height = 80;

ui.AddLabel("lblViews", "Select view:", "Select views from the listbox below.");
GuiListBox lstViews = ui.AddListBox("lstViews", "Select views.");
lstViews.Height = 80;

Requirements

Namespace: Zeus.UserInterface

Assembly: Zeus (in Zeus.dll)

See Also

GuiController Members | Zeus.UserInterface Namespace