IGLib
1.7.2
The IGLib base library for development of numerical, technical and business applications.
|
Control for editing input or output data definitions (only one of these two at a time). More...
Public Member Functions | |
InpuOrOutputtDataDefinitionControl () | |
void | SetInputLength (int newValue, bool internalCall=true) |
Sets the number of input elements (property InputLength). More... | |
void | SetOutputLength (int newValue, bool internalCall=true) |
Sets the number of output elements (property OutputLength). More... | |
void | UpdateInputOrOutput (bool isInput) |
Prepares control for processing either input or output data. More... | |
DataGridView | GetGridControl () |
Returns the DataGridView control that is used for setting values of the input parameters. More... | |
string | CreateInputElementName (int elementIndex) |
Returns a suitable name for input data element with the specified index. More... | |
string | CreateOutputElementName (int elementIndex) |
Returns a suitable name for output data element with the specified index. More... | |
InputElementDefinition | CreateInputElement (int elementIndex) |
Creates and returns a new input data element definition. More... | |
OutputElementDefinition | CreateOutputElement (int elementIndex) |
Creates and returns a new output data element definition. More... | |
void | CopyGridRowToData (int whichRow) |
Copies data from the specified row of the data grid view to data definition object. More... | |
void | CopyDataToGridRow (int whichRow) |
Copies data to the specified row of the data grid view from data definition object DataDefinition. More... | |
void | CopyDataToGrid () |
Copies data from the DataDefinition object to the internal data grid view control. More... | |
void | ClearCells () |
Clears contents of all DataGridView cells. More... | |
void | ClearDataGrid () |
Removes all the data from the DataGridView. More... | |
virtual string | CreateSummary () |
void | ShowContextMenuControl (object sender, MouseEventArgs e) |
Protected Member Functions | |
void | SetNumElements (int newValue, bool internalCall=true) |
Sets the number of input or output elements (property NumElements), dependent on whether the current control is for input or output data definition. More... | |
virtual void | InitDataGridProperties () |
Initializes additional properties of the data grid view that were not set in designer. More... | |
void | OnDefinitionObjectChanged (InputOutputDataDefiniton oldDataDefinition, InputOutputDataDefiniton newDataDefinition) |
Raises the DefinitionObjectChanged event. This method should be called preferrably, rather than the event itself. More... | |
void | OnNumElementsChanged (int oldLength, int newLength) |
Raises the NumElementsChanged event. This method should be called preferrably, rather than the event itself. More... | |
void | OnElementDataChanged () |
Raises the ElementDataChanged event. This method should be called preferrably, rather than the event itself. More... | |
override void | Dispose (bool disposing) |
Clean up any resources being used. More... | |
Protected Attributes | |
int | _inputLength |
int | _outputLength |
bool | _isInputData = true |
Vector | _values |
Properties | |
InputOutputDataDefiniton | DataDefinition [get, set] |
Data about input and output quantities of the manipulated functions or response. More... | |
int | NumElements [get, protected set] |
Number of the corresponding elements in the data definition. More... | |
virtual int | InputLength [get, set] |
Number of input parameters or data elements. More... | |
virtual int | OutputLength [get, set] |
Number of output parameters or data elements. More... | |
string | TitleInputData [get, set] |
Control's title (displayed as group box text) in case of input data editing. More... | |
string | TitleOutputData [get, set] |
Control's title (displayed as group box text) in case of output data editing. More... | |
virtual string | Title [get] |
Gets text of the title label shown on top left of the form. More... | |
string | TitleWithChangedSign [get] |
Actual title that is shown on the top of control, in the lblMainTitle label, includes eventual marks for unsaved changes. More... | |
bool | HasUnsavedChanges [get, set] |
Whether the current function definition has unsaved changes. More... | |
bool | IsDimentionChangeAllowed [get, set] |
Indicates whether user can change dimensions (number of input/output data elements). More... | |
bool | UseLegalVariableNames [get, set] |
Specifies whether legal variable names (according to rules in programming languages such as C++, C# or Java) should be enforced for naming input and utput elements. More... | |
virtual bool | IsInputData [get, set] |
Indicates whether this form is used to edit input (when true) or output (when false) data elements. More... | |
bool | IsOutputData [get, set] |
Indicates whether this form is used to edit input (when false) or output (when true) data elements. More... | |
bool | GridChangeEventsDisabled [get, set] |
Flag for disabling events raised when grid data is changed. Default is false. More... | |
int | ColumnIndexId [get] |
Returns column index of the ID field. More... | |
int | ColumnIndexName [get] |
Returns column index of the Name field. More... | |
int | ColumnIndexMin [get] |
Returns column index of the Min field. More... | |
int | ColumnIndexMax [get] |
Returns column index of the Max field. More... | |
int | ColumnIndexDefault [get] |
Returns column index of the Default field. More... | |
int | ColumnIndexNumPoints [get] |
Returns column index of the Num field. More... | |
int | ColumnIndexTitle [get] |
Returns column index of the Title field. More... | |
int | ColumnIndexDescription [get] |
Returns column index of the Description field. More... | |
int | NumValues [get] |
Current number of values, otained form the DataGridView. More... | |
Events | |
EventHandler < ValueChangeEventArgs < InputOutputDataDefiniton > > | DefinitionObjectChanged |
Occurs when data definition object is changed (i.e., when object reference changes), meaning that whole data definition object is replaced. More... | |
EventHandler < IndexChangeEventArgs > | NumElementsChanged |
Occurs when number of data elements (InputLength or OutputLength, dependent on IsInputData property) is changed. More... | |
EventHandler | ElementDataChanged |
Occurs when some element property is changed. More... | |
Private Member Functions | |
void | InputDataDefinitionControl_MouseClick (object sender, MouseEventArgs e) |
void | dGridInputParam_MouseClick (object sender, MouseEventArgs e) |
void | btnResetDefault_Click (object sender, EventArgs e) |
void | btnResetCenter_Click (object sender, EventArgs e) |
void | resetToDefaultToolStripMenuItem_Click (object sender, EventArgs e) |
void | resetToCenterToolStripMenuItem_Click (object sender, EventArgs e) |
void | dGridInputParam_CellValueChanged (object sender, DataGridViewCellEventArgs e) |
void | InitializeComponent () |
Required method for Designer support - do not modify the contents of this method with the code editor. More... | |
Private Attributes | |
InputOutputDataDefiniton | _dataDefinition |
string | _titleInputData = "Input Data" |
string | _titleOutputData = "Output Data" |
bool | _hasUnsavedChanges = false |
bool | _isDimentionChangeAllowed = true |
bool | _useLegalVariableNames = true |
bool | _gridChangeEventsDdisabled = false |
int | _columnIndexId = -1 |
int | _columnIndexName = -1 |
int | _columnIndexMin = -1 |
int | _columnIndexMax = -1 |
int | _columnIndexDefault = -1 |
int | _columnIndexNumPoints = -1 |
int | _columnIndexTitle = -1 |
int | _columnIndexDescription = -1 |
System.ComponentModel.IContainer | components = null |
Required designer variable. More... | |
System.Windows.Forms.GroupBox | grpOuter |
System.Windows.Forms.DataGridView | dataGridView1 |
System.Windows.Forms.Button | btnResetDefault |
System.Windows.Forms.Button | btnResetCenter |
System.Windows.Forms.ContextMenuStrip | contextMenuControl |
System.Windows.Forms.ToolStripMenuItem | resetToDefaultToolStripMenuItem |
System.Windows.Forms.ToolStripMenuItem | resetToCenterToolStripMenuItem |
System.Windows.Forms.DataGridViewTextBoxColumn | columnId |
System.Windows.Forms.DataGridViewTextBoxColumn | columnName |
System.Windows.Forms.DataGridViewTextBoxColumn | columnMin |
System.Windows.Forms.DataGridViewTextBoxColumn | columnMax |
System.Windows.Forms.DataGridViewTextBoxColumn | columnDefault |
System.Windows.Forms.DataGridViewTextBoxColumn | columnNumPoints |
System.Windows.Forms.DataGridViewTextBoxColumn | columnTitle |
System.Windows.Forms.DataGridViewTextBoxColumn | columnDescription |
IndicatorLight | indicatorLight1 |
Control for editing input or output data definitions (only one of these two at a time).
Data definitions are contained in an object of type InputOutputDataDefiniton.
$A Igor Mar16;
|
inline |
|
inlineprotected |
Sets the number of input or output elements (property NumElements), dependent on whether the current control is for input or output data definition.
Internally, this method should be used instead of the property, because it does not throw on certain situations.
Internally, the method should be called without arguments.
newValue | Value to be assigned to the property. |
internalCall | Specifies whether the method was called internally. Default is true. |
|
inline |
Sets the number of input elements (property InputLength).
Internally, this method should be used instead of the property, because it does not throw on certain situations.
Internally, the method should be called without arguments.
Outside this class, one should assign the property directyl, because that provides additional error checks.
Exception to the rule is in GUI controls and other classes that handle two controls of this kind at the same time, and setting the property can follow complex flow of ewents, so it is difficult to guarantee the right order of operations that will not trigger exceptions in various consistency checks.
newValue | Value to be assigned to the property. |
internalCall | Specifies whetherr the method was called internally. Default is true. |
|
inline |
Sets the number of output elements (property OutputLength).
Internally, this method should be used instead of the property, because it does not throw on certain situations.
Internally, the method should be called without arguments.
Outside this class, one should assign the property directyl, because that provides additional error checks.
Exception to the rule is in GUI controls and other classes that handle two controls of this kind at the same time, and setting the property can follow complex flow of ewents, so it is difficult to guarantee the right order of operations that will not trigger exceptions in various consistency checks.
newValue | Value to be assigned to the property. |
internalCall | Specifies whether the method was called internally. Default is true. |
|
inline |
Prepares control for processing either input or output data.
When calling this method, its body is executed regardles of whether it has been called with the same parameters before. This is different from IsInputData setter which has effect only when value is actually changed.
isInput |
|
inlineprotectedvirtual |
Initializes additional properties of the data grid view that were not set in designer.
This is currently not used because the relevant proprties are set in the designer's code.
We will keep the method for the case it becomes useful (e.g. if EinForms GUI designer would tend to override property values when changing the form in the designer).
|
inline |
Returns the DataGridView control that is used for setting values of the input parameters.
|
inline |
Returns a suitable name for input data element with the specified index.
elementIndex | Index of the input data element whose name is generated. |
References IG.Num.InputOutputDataDefiniton.CreateInputElementName().
|
inline |
Returns a suitable name for output data element with the specified index.
elementIndex | Index of the output data element whose name is generated. |
References IG.Num.InputOutputDataDefiniton.CreateOutputElementName().
|
inline |
Creates and returns a new input data element definition.
elementIndex | Index of data elment. |
References IG.Num.InputOutputElementDefinition.Description, and IG.Num.InputOutputElementDefinition.Title.
|
inline |
Creates and returns a new output data element definition.
elementIndex | Index of data elment. |
References IG.Num.InputOutputElementDefinition.Description, and IG.Num.InputOutputElementDefinition.Title.
|
inline |
Copies data from the specified row of the data grid view to data definition object.
whichRow | Index of row that is copied. |
References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputElementDefinition.DefaultValue, IG.Num.InputElementDefinition.DefaultValueDefined, IG.Num.InputOutputElementDefinition.Description, IG.Num.InputOutputElementDefinition.ElementIndex, IG.Num.InputOutputElementDefinition.MaximalValue, IG.Num.InputOutputElementDefinition.MinimalValue, IG.Num.InputOutputElementDefinition.Name, IG.Num.InputElementDefinition.NumSamplingPoints, and IG.Num.InputOutputElementDefinition.Title.
|
inline |
Copies data to the specified row of the data grid view from data definition object DataDefinition.
whichRow | Index of row that is copied. |
References IG.Num.InputOutputElementDefinition.BoundsDefined, IG.Num.InputElementDefinition.DefaultValue, IG.Num.InputElementDefinition.DefaultValueDefined, IG.Num.InputOutputElementDefinition.Description, IG.Num.InputOutputElementDefinition.MaximalValue, IG.Num.InputOutputElementDefinition.MinimalValue, IG.Num.InputOutputElementDefinition.Name, IG.Num.InputElementDefinition.NumSamplingPoints, and IG.Num.InputOutputElementDefinition.Title.
|
inline |
Copies data from the DataDefinition object to the internal data grid view control.
|
inline |
Clears contents of all DataGridView cells.
|
inline |
Removes all the data from the DataGridView.
|
inlineprotected |
Raises the DefinitionObjectChanged event. This method should be called preferrably, rather than the event itself.
oldDataDefinition | Old data definition object. |
newDataDefinition | New data definition object. |
|
inlineprotected |
Raises the NumElementsChanged event. This method should be called preferrably, rather than the event itself.
oldLength | Old length. |
newLength | New length. |
|
inlineprotected |
Raises the ElementDataChanged event. This method should be called preferrably, rather than the event itself.
|
inlinevirtual |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
References IG.Lib.Util.SleepSeconds().
|
inlineprotected |
Clean up any resources being used.
disposing | true if managed resources should be disposed; otherwise, false. |
|
inlineprivate |
Required method for Designer support - do not modify the contents of this method with the code editor.
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
private |
Required designer variable.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
getset |
Data about input and output quantities of the manipulated functions or response.
|
getprotected set |
Number of the corresponding elements in the data definition.
If IsInputData then this refers to the number of input elements, otherwise to the number o output elements.
|
getset |
Number of input parameters or data elements.
|
getset |
Number of output parameters or data elements.
|
getset |
Control's title (displayed as group box text) in case of input data editing.
|
getset |
Control's title (displayed as group box text) in case of output data editing.
|
get |
Gets text of the title label shown on top left of the form.
|
get |
Actual title that is shown on the top of control, in the lblMainTitle label, includes eventual marks for unsaved changes.
|
getset |
Whether the current function definition has unsaved changes.
|
getset |
Indicates whether user can change dimensions (number of input/output data elements).
|
getset |
Specifies whether legal variable names (according to rules in programming languages such as C++, C# or Java) should be enforced for naming input and utput elements.
|
getset |
Indicates whether this form is used to edit input (when true) or output (when false) data elements.
Setting the property will change behavior.
|
getsetprotected |
Indicates whether this form is used to edit input (when false) or output (when true) data elements.
This property depends on IsInputData property and is just its negation.
|
getsetprotected |
Flag for disabling events raised when grid data is changed. Default is false.
This should be set to true in functions where grid data is changed programatically.
|
get |
Returns column index of the ID field.
|
get |
Returns column index of the Name field.
|
get |
Returns column index of the Min field.
|
get |
Returns column index of the Max field.
|
get |
Returns column index of the Default field.
|
get |
Returns column index of the Num field.
|
get |
Returns column index of the Title field.
|
get |
Returns column index of the Description field.
|
get |
Current number of values, otained form the DataGridView.
EventHandler<ValueChangeEventArgs<InputOutputDataDefiniton> > IG.Forms.InpuOrOutputtDataDefinitionControl.DefinitionObjectChanged |
Occurs when data definition object is changed (i.e., when object reference changes), meaning that whole data definition object is replaced.
EventHandler<IndexChangeEventArgs> IG.Forms.InpuOrOutputtDataDefinitionControl.NumElementsChanged |
Occurs when number of data elements (InputLength or OutputLength, dependent on IsInputData property) is changed.
EventHandler IG.Forms.InpuOrOutputtDataDefinitionControl.ElementDataChanged |
Occurs when some element property is changed.