C# Class Support.UI.QueryPanel

Afficher le fichier Open project: nhmkdev/cardmaker

Protected Properties

Свойство Type Description
X_LABEL_SIZE int
m_nButtonHeight int
m_zPanel System.Windows.Forms.Panel
m_zTabControl System.Windows.Forms.TabControl

Méthodes publiques

Méthode Description
AddButton ( string sLabel, int nDesiredWidth, EventHandler eHandler, object zQueryKey ) : Button

Adds a button

AddCheckBox ( string sLabel, bool bCheckDefault, object zQueryKey ) : CheckBox

Adds a check box with an associated label.

AddComboBox ( string sLabel, string arrayEntries, int nDefaultIndex, object zQueryKey ) : ComboBox

Adds a ComboBox

AddDateTimePicker ( string sLabel, DateTimePickerFormat eFormat, System.DateTime dtValue, object zQueryKey ) : DateTimePicker

Adds a DateTime picker field

AddEnableControl ( object zQueryKey, object zQueryKeyEnable ) : bool

Adds the specified control to be enabled when the given control is enabled.

AddEnableControls ( object zQueryKey, object arrayQueryKeyEnable ) : bool

Adds the specified controls to be enabled when the given control is enabled.

AddFileBrowseBox ( string sLabel, string sDefault, string sFilter, object zQueryKey ) : TextBox

Adds a file browser component.

AddFolderBrowseBox ( string sLabel, string sDefault, object zQueryKey ) : TextBox

Adds a folder browser component

AddLabel ( string sLabel, int nHeight ) : Label

Adds a label

AddListBox ( string sLabel, string arrayEntries, int arraySelected, bool bMultiSelect, int nHeight, object zQueryKey ) : ListBox

Adds a ListBox with the specified items and selected items

AddMultiLineTextBox ( string sLabel, string sDefaultValue, int nHeight, object zQueryKey ) : TextBox

Adds a multiline TextBox

AddNumericBox ( string sLabel, decimal dDefault, decimal dMin, decimal dMax, decimal dIncrement, int nDecimalPlaces, object zQueryKey ) : NumericUpDown

Adds a NumericUpDown

AddNumericBox ( string sLabel, decimal dDefault, decimal dMin, decimal dMax, object zQueryKey ) : NumericUpDown

Adds a NumericUpDown

AddNumericBoxSlider ( string sLabel, bool bFloat, decimal dDefault, decimal dMin, decimal dMax, object zQueryKey ) : NumericUpDown

Adds a NumericUpDown with associated slider

AddPullDownBox ( string sLabel, string arrayEntries, int nDefaultIndex, object zQueryKey ) : ComboBox

Adds a ComboBox with the pulldownlist style.

AddTab ( string sTabName ) : TabPage

Creates a Tab

AddTextBox ( string sLabel, string sDefaultValue, bool bPassword, object zQueryKey ) : TextBox

Adds a TextBox

AddVerticalSpace ( int nHeight ) : void

Adds vertical spacing

ChangeToTab ( string sTabName ) : void

Changes to the tab specified and creates it if necessary

GetBool ( object zQueryKey ) : bool

Gets the state of the specified check box

GetControl ( object zQueryKey ) : Control

Gets the control associated with the query key

GetDateTime ( object zQueryKey ) : System.DateTime

Returns the DateTime of the specified control.

GetDecimal ( object zQueryKey ) : decimal

GetIndex ( object zQueryKey ) : int

Gets the index of the specified combo box

GetIndices ( object zQueryKey ) : int[]

Gets the selected indices of the given control

GetString ( object zQueryKey ) : string

Gets the string value of the specified control

GetStrings ( object zQueryKey ) : string[]

Gets the selected strings of the control

QueryPanel ( Panel zPanel, bool bTabbed ) : System

QueryPanel ( Panel zPanel, int nLabelWidth, bool bTabbed ) : System

SetupScrollState ( ScrollableControl scrollableControl ) : void
UpdateEnableStates ( ) : void

Méthodes protégées

Méthode Description
GetYPosition ( ) : int

Gets the current y position (based on the current layout control)

numeric_ValueChanged ( object sender, EventArgs e ) : void

Handles generic numeric change

Private Methods

Méthode Description
AddBrowseBox ( string sLabel, string sDefault, string sFilter, object zQueryKey ) : TextBox

Adds a browse component (button/textbox/label)

AddComboBox ( string sLabel, string arrayEntries, int nDefaultIndex, bool bPulldown, object zQueryKey ) : ComboBox

Adds a combo box with the items specified (based on the type specified)

AddTextBox ( string sLabel, string sDefaultValue, bool bMultiLine, bool bPassword, int nHeight, object zQueryKey ) : TextBox

Adds a TextBox

AddToYPosition ( int nYAmount ) : void

Sets the Y position for the current layout control (panel, tab etc.)

CreateLabel ( string sLabel ) : Label

Created a label based on the current y position

GetLabelWidth ( Label zLabel ) : int

This gets the width of the label + the control buffer (or 0 if the label is empty)

GetQueryItem ( object zQueryKey ) : QueryItem

InitPanel ( Panel zPanel, bool bTabbed ) : void

SetupControl ( Control zControl, Label zLabel, ControlType eType, bool bApplySize, object zQueryKey ) : void

Support method to setup the control location/size. This method also adds the control to the form.

ThrowBadQueryException ( ) : void

Used to throw a general exception when the query key specified is wrong

ThrowWrongTypeException ( ) : void

Used to throw a general exception when the wrong type is queried

numericSlider_ValueChanged ( object sender, EventArgs e ) : void

Handles generic numeric slider change

zButton_Click ( object sender, EventArgs e ) : void

Generic button press (used for the browse file/folder box)

Method Details

AddButton() public méthode

Adds a button
public AddButton ( string sLabel, int nDesiredWidth, EventHandler eHandler, object zQueryKey ) : Button
sLabel string Text label of the button
nDesiredWidth int The desired width of the button
eHandler EventHandler The event handler to associated with the button
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.Button

AddCheckBox() public méthode

Adds a check box with an associated label.
public AddCheckBox ( string sLabel, bool bCheckDefault, object zQueryKey ) : CheckBox
sLabel string Label seting
bCheckDefault bool Default check box state
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.CheckBox

AddComboBox() public méthode

Adds a ComboBox
public AddComboBox ( string sLabel, string arrayEntries, int nDefaultIndex, object zQueryKey ) : ComboBox
sLabel string Label string
arrayEntries string Array of strings to be used in the combo box
nDefaultIndex int Default index of the combo box
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.ComboBox

AddDateTimePicker() public méthode

Adds a DateTime picker field
public AddDateTimePicker ( string sLabel, DateTimePickerFormat eFormat, System.DateTime dtValue, object zQueryKey ) : DateTimePicker
sLabel string Label string
eFormat DateTimePickerFormat DateTimePickerFormat to control the visual component
dtValue System.DateTime The default date time value
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.DateTimePicker

AddEnableControl() public méthode

Adds the specified control to be enabled when the given control is enabled.
public AddEnableControl ( object zQueryKey, object zQueryKeyEnable ) : bool
zQueryKey object The parent control to base the enable state on
zQueryKeyEnable object The control to enable/disable based on the parent control state
Résultat bool

AddEnableControls() public méthode

Adds the specified controls to be enabled when the given control is enabled.
public AddEnableControls ( object zQueryKey, object arrayQueryKeyEnable ) : bool
zQueryKey object The parent control to base the enable state on
arrayQueryKeyEnable object string[] of controls to enable/disable based on the parent control state
Résultat bool

AddFileBrowseBox() public méthode

Adds a file browser component.
public AddFileBrowseBox ( string sLabel, string sDefault, string sFilter, object zQueryKey ) : TextBox
sLabel string Label string
sDefault string Default string
sFilter string File filter (standard format for OpenFileDialog), string.empty for default *.*
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.TextBox

AddFolderBrowseBox() public méthode

Adds a folder browser component
public AddFolderBrowseBox ( string sLabel, string sDefault, object zQueryKey ) : TextBox
sLabel string Label string
sDefault string Default string
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.TextBox

AddLabel() public méthode

Adds a label
public AddLabel ( string sLabel, int nHeight ) : Label
sLabel string Label string
nHeight int Label height
Résultat System.Windows.Forms.Label

AddListBox() public méthode

Adds a ListBox with the specified items and selected items
public AddListBox ( string sLabel, string arrayEntries, int arraySelected, bool bMultiSelect, int nHeight, object zQueryKey ) : ListBox
sLabel string Label string
arrayEntries string Array of strings as entries
arraySelected int Array of indicies to select
bMultiSelect bool Flag indicating whether multiple items can be selected
nHeight int The desired height of the ListBox
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.ListBox

AddMultiLineTextBox() public méthode

Adds a multiline TextBox
public AddMultiLineTextBox ( string sLabel, string sDefaultValue, int nHeight, object zQueryKey ) : TextBox
sLabel string Label string
sDefaultValue string Default text
nHeight int Height of the TextBox
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.TextBox

AddNumericBox() public méthode

Adds a NumericUpDown
public AddNumericBox ( string sLabel, decimal dDefault, decimal dMin, decimal dMax, decimal dIncrement, int nDecimalPlaces, object zQueryKey ) : NumericUpDown
sLabel string Label string
dDefault decimal Default value
dMin decimal Minimum value
dMax decimal Maximum value
dIncrement decimal Increment amout
nDecimalPlaces int decimal places
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.NumericUpDown

AddNumericBox() public méthode

Adds a NumericUpDown
public AddNumericBox ( string sLabel, decimal dDefault, decimal dMin, decimal dMax, object zQueryKey ) : NumericUpDown
sLabel string Label string
dDefault decimal Default value
dMin decimal Minimum value
dMax decimal Maximum value
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.NumericUpDown

AddNumericBoxSlider() public méthode

Adds a NumericUpDown with associated slider
public AddNumericBoxSlider ( string sLabel, bool bFloat, decimal dDefault, decimal dMin, decimal dMax, object zQueryKey ) : NumericUpDown
sLabel string Label string
bFloat bool Flag indicating whether the values associated are floating point
dDefault decimal Default value
dMin decimal Minimum value
dMax decimal Maximum value
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.NumericUpDown

AddPullDownBox() public méthode

Adds a ComboBox with the pulldownlist style.
public AddPullDownBox ( string sLabel, string arrayEntries, int nDefaultIndex, object zQueryKey ) : ComboBox
sLabel string Label string
arrayEntries string Array of strings to be used in the combo box
nDefaultIndex int Default index of the combo box
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.ComboBox

AddTab() public méthode

Creates a Tab
public AddTab ( string sTabName ) : TabPage
sTabName string Name of the tab to create
Résultat System.Windows.Forms.TabPage

AddTextBox() public méthode

Adds a TextBox
public AddTextBox ( string sLabel, string sDefaultValue, bool bPassword, object zQueryKey ) : TextBox
sLabel string Label string
sDefaultValue string Default text
bPassword bool Flag indicating that this is a password textbox
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.TextBox

AddVerticalSpace() public méthode

Adds vertical spacing
public AddVerticalSpace ( int nHeight ) : void
nHeight int The amount of space to add.
Résultat void

ChangeToTab() public méthode

Changes to the tab specified and creates it if necessary
public ChangeToTab ( string sTabName ) : void
sTabName string Name of the tab to change to
Résultat void

GetBool() public méthode

Gets the state of the specified check box
public GetBool ( object zQueryKey ) : bool
zQueryKey object The query key for requesting the value
Résultat bool

GetControl() public méthode

Gets the control associated with the query key
public GetControl ( object zQueryKey ) : Control
zQueryKey object The query key for requesting the value
Résultat System.Windows.Forms.Control

GetDateTime() public méthode

Returns the DateTime of the specified control.
public GetDateTime ( object zQueryKey ) : System.DateTime
zQueryKey object The query key for requesting the value
Résultat System.DateTime

GetDecimal() public méthode

public GetDecimal ( object zQueryKey ) : decimal
zQueryKey object The query key for requesting the value
Résultat decimal

GetIndex() public méthode

Gets the index of the specified combo box
public GetIndex ( object zQueryKey ) : int
zQueryKey object The query key for requesting the value
Résultat int

GetIndices() public méthode

Gets the selected indices of the given control
public GetIndices ( object zQueryKey ) : int[]
zQueryKey object The query key for requesting the value
Résultat int[]

GetString() public méthode

Gets the string value of the specified control
public GetString ( object zQueryKey ) : string
zQueryKey object The query key for requesting the value
Résultat string

GetStrings() public méthode

Gets the selected strings of the control
public GetStrings ( object zQueryKey ) : string[]
zQueryKey object The query key for requesting the value
Résultat string[]

GetYPosition() protected méthode

Gets the current y position (based on the current layout control)
protected GetYPosition ( ) : int
Résultat int

QueryPanel() public méthode

public QueryPanel ( Panel zPanel, bool bTabbed ) : System
zPanel System.Windows.Forms.Panel Empty Panel to add controls to
bTabbed bool Flag indicating whether to use a tab control
Résultat System

QueryPanel() public méthode

public QueryPanel ( Panel zPanel, int nLabelWidth, bool bTabbed ) : System
zPanel System.Windows.Forms.Panel Empty Panel to add controls to
nLabelWidth int Desired with of labels
bTabbed bool Flag indicating whether to use a tab control
Résultat System

SetupScrollState() public static méthode

public static SetupScrollState ( ScrollableControl scrollableControl ) : void
scrollableControl System.Windows.Forms.ScrollableControl
Résultat void

UpdateEnableStates() public méthode

public UpdateEnableStates ( ) : void
Résultat void

numeric_ValueChanged() protected méthode

Handles generic numeric change
protected numeric_ValueChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Résultat void

Property Details

X_LABEL_SIZE protected_oe property

protected int X_LABEL_SIZE
Résultat int

m_nButtonHeight protected_oe property

protected int m_nButtonHeight
Résultat int

m_zPanel protected_oe property

protected Panel,System.Windows.Forms m_zPanel
Résultat System.Windows.Forms.Panel

m_zTabControl protected_oe property

protected TabControl,System.Windows.Forms m_zTabControl
Résultat System.Windows.Forms.TabControl