IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Forms.VectorFunctionScriptControl Class Reference
+ Inheritance diagram for IG.Forms.VectorFunctionScriptControl:
+ Collaboration diagram for IG.Forms.VectorFunctionScriptControl:

Public Member Functions

 VectorFunctionScriptControl ()
 Constructs and initializes the vector function script control. More...
 
void CopyDataFromController ()
 Copies data from the internal DTO to the current control. More...
 
void SynchronizeData (bool syncParameterNames=false, bool syncFunctionNames=true)
 Synchronizes data for the current vector function definition. More...
 
string CreateFunctonSummary ()
 

Protected Member Functions

string GetFunctionSignature ()
 Returns function signature created from the data. More...
 
override void Dispose (bool disposing)
 Clean up any resources being used. More...
 

Protected Attributes

string ScalarFunctionNotDefinedString = "<< not defined >>"
 

Properties

IG.Lib.IReporter Reporter [get]
 
string FunctionNameTitleNormal [get, set]
 Normal text of the label that introduces function name input box. More...
 
string FunctionNameTitleModified [get, set]
 Normal text of the label that introduces function name input box. More...
 
VectorFunctionScriptController FunctionController [get, set]
 
IVectorFunction Function [get]
 Gets the function generated according to the function definition contained in this control and stored in FunctionController. More...
 
virtual string[] InitialScalarFunctionDefinitionStrings [get, set]
 This property contains initial definitions of scalar functions (i.e.their values defined in terms of parameters). If defined then these definitions are asigned in initialization. More...
 
bool HasUnsavedChanges [get, set]
 Whether the current function definition has unsaved changes. More...
 
bool HasChildUnsavedChanges [get, set]
 Indicates whether child control (of type ScalarFunctionScriptControl) has unsaved changes. More...
 
int CurrentScalarFunctionIndex [get, set]
 Gets or sets index of the current scalar funciton that is worked on. More...
 
ScalarFunctionScriptController CurrentScalarFunctionController [get, set]
 Scalar function controller that represents the element of the vector function that is currently edited. More...
 
bool IsLoaderConsistent [get, protected set]
 Whether function loader is in consistent state. More...
 
string FunctionName [get, set]
 Name of the function. More...
 
string FunctionDescription [get, set]
 
int NumParameters [get, set]
 Gets or sets number of parameters of the represented vector function. More...
 
int NumValues [get, set]
 Gets or sets number of values of the represented vector function (i.e., dimension of its codomain). More...
 
string[] ParameterNames [get, set]
 Names of function parameters. More...
 
string[] FunctionNames [get, set]
 Names of scalar function components that define individual values of the represented vector function. More...
 
InputOutputDataDefiniton DataDefinition [get, set]
 Definition of input and output data for the represented scalar function. More...
 
FileSelector FileSelector [get]
 GUI component for seclecting files. More...
 
bool PrepareStandardDefinitions [get, set]
 

Private Member Functions

void CopyDataToController ()
 Copies data from the current control to the internal function DTO. More...
 
void txtFunctionName_Validated (object sender, EventArgs e)
 
void txtFunctionDescription_Validated (object sender, EventArgs e)
 
void txtParameterNames_Validated (object sender, EventArgs e)
 
void txtFunctionNames_Validated (object sender, EventArgs e)
 
void numNumParameters_Validated (object sender, EventArgs e)
 
void numNumFunctions_Validated (object sender, EventArgs e)
 
void numCurrentFunction_ValueChanged (object sender, EventArgs e)
 
void numCurrentFunction_Validated (object sender, EventArgs e)
 
void btnCreateFunction_Click (object sender, EventArgs e)
 
void btnSummary_Click (object sender, EventArgs e)
 
void btnValueCalculator_Click (object sender, EventArgs e)
 
void btnPlot1d_Click (object sender, EventArgs e)
 Launches 1D parametric plots of the function defined in this control. More...
 
void btnPlot2d_Click (object sender, EventArgs e)
 Launches 2D parametric plots of the function defined in this control. More...
 
void btnSave_Click (object sender, EventArgs e)
 Saves the current fucntion definition to a JSON file. More...
 
void btnLoad_Click (object sender, EventArgs e)
 Loads vector funcition definition from a file. More...
 
void InitializeComponent ()
 Required method for Designer support - do not modify the contents of this method with the code editor. More...
 

Private Attributes

string _functionNameTitleNormal = "Function Name: "
 
string _functionNameTitleModified = "Function Name: (*)"
 
VectorFunctionScriptController _functionController
 
string[] _initialScalarFunctionDefinitionStrings
 
bool _hasUnsavedChanges = false
 
int _currentScalarFunctionIndex = 0
 
ScalarFunctionScriptController _currentScalarFunctionController = null
 
bool _isLoaderConsistent = false
 
InputOutputDataDefiniton _dataDefinition = null
 
bool _prepareStandardDefinitions = true
 
System.ComponentModel.IContainer components = null
 Required designer variable. More...
 
System.Windows.Forms.Panel pnlVector
 
System.Windows.Forms.Label label1
 
System.Windows.Forms.Label lblCurrentFunction
 
System.Windows.Forms.Panel pnlOuter
 
System.Windows.Forms.NumericUpDown numCurrentFunction
 
System.Windows.Forms.Label lblTitle
 
System.Windows.Forms.NumericUpDown numNumFunctions
 
System.Windows.Forms.Label lblCurrentFunctionLabelTitle
 
System.Windows.Forms.NumericUpDown numNumParameters
 
System.Windows.Forms.Label lblNumParameters
 
System.Windows.Forms.Label lblParameterNames
 
System.Windows.Forms.Panel pnlDimensions
 
System.Windows.Forms.Label lblCurrentFunctionName
 
System.Windows.Forms.Label lblFunctionNames
 
System.Windows.Forms.Panel pnlFunctionNames
 
System.Windows.Forms.TextBox txtFunctionNames
 
System.Windows.Forms.Panel pnlParameterNames
 
System.Windows.Forms.TextBox txtParameterNames
 
IG.Forms.ScalarFunctionScriptControl scalarFunctionScriptControl1
 
System.Windows.Forms.Panel pnlButtons
 
System.Windows.Forms.Button btnCreateFunction
 
System.Windows.Forms.Button btnValueCalculator
 
System.Windows.Forms.Button btnLoad
 
System.Windows.Forms.Button btnSave
 
System.Windows.Forms.Button btnSummary
 
System.Windows.Forms.Panel pnlPlotButtons
 
System.Windows.Forms.Button btnPlot1d
 
System.Windows.Forms.Button btnPlot2d
 
System.Windows.Forms.Panel pnlFunctionDescription
 
System.Windows.Forms.TextBox txtFunctionDescription
 
System.Windows.Forms.Label lblFunctionDescription
 
System.Windows.Forms.Panel pnlFunctionName
 
System.Windows.Forms.TextBox txtFunctionName
 
System.Windows.Forms.Label lblFunctionName
 

Constructor & Destructor Documentation

IG.Forms.VectorFunctionScriptControl.VectorFunctionScriptControl ( )
inline

Constructs and initializes the vector function script control.

Member Function Documentation

void IG.Forms.VectorFunctionScriptControl.CopyDataToController ( )
inlineprivate

Copies data from the current control to the internal function DTO.

void IG.Forms.VectorFunctionScriptControl.CopyDataFromController ( )
inline

Copies data from the internal DTO to the current control.

void IG.Forms.VectorFunctionScriptControl.SynchronizeData ( bool  syncParameterNames = false,
bool  syncFunctionNames = true 
)
inline

Synchronizes data for the current vector function definition.

This method checks number of parameters and number of funcion values, then goes through all scalar funciton elemennts and checks if their data is allocated and consistent. It also takes care that data for the currently edited scalar function is updated according to the true state.

Parameters
syncParameterNamesIf true then parameterr names are also synchroniized.
syncFunctionNamesIf true then function names are also synchronized.
string IG.Forms.VectorFunctionScriptControl.GetFunctionSignature ( )
inlineprotected

Returns function signature created from the data.

References IG.Lib.UtilStr.GetParametersStringPlain().

string IG.Forms.VectorFunctionScriptControl.CreateFunctonSummary ( )
inline
void IG.Forms.VectorFunctionScriptControl.txtFunctionName_Validated ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.txtFunctionDescription_Validated ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.txtParameterNames_Validated ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.txtFunctionNames_Validated ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.numNumParameters_Validated ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.numNumFunctions_Validated ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.numCurrentFunction_ValueChanged ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.numCurrentFunction_Validated ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.btnCreateFunction_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.btnSummary_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.btnValueCalculator_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.btnPlot1d_Click ( object  sender,
EventArgs  e 
)
inlineprivate
void IG.Forms.VectorFunctionScriptControl.btnPlot2d_Click ( object  sender,
EventArgs  e 
)
inlineprivate
override void IG.Forms.VectorFunctionScriptControl.Dispose ( bool  disposing)
inlineprotected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.
void IG.Forms.VectorFunctionScriptControl.InitializeComponent ( )
inlineprivate

Required method for Designer support - do not modify the contents of this method with the code editor.

Member Data Documentation

string IG.Forms.VectorFunctionScriptControl._functionNameTitleNormal = "Function Name: "
private
string IG.Forms.VectorFunctionScriptControl._functionNameTitleModified = "Function Name: (*)"
private
VectorFunctionScriptController IG.Forms.VectorFunctionScriptControl._functionController
private
string [] IG.Forms.VectorFunctionScriptControl._initialScalarFunctionDefinitionStrings
private
string IG.Forms.VectorFunctionScriptControl.ScalarFunctionNotDefinedString = "<< not defined >>"
protected
bool IG.Forms.VectorFunctionScriptControl._hasUnsavedChanges = false
private
int IG.Forms.VectorFunctionScriptControl._currentScalarFunctionIndex = 0
private
ScalarFunctionScriptController IG.Forms.VectorFunctionScriptControl._currentScalarFunctionController = null
private
bool IG.Forms.VectorFunctionScriptControl._isLoaderConsistent = false
private
InputOutputDataDefiniton IG.Forms.VectorFunctionScriptControl._dataDefinition = null
private
bool IG.Forms.VectorFunctionScriptControl._prepareStandardDefinitions = true
private
System.ComponentModel.IContainer IG.Forms.VectorFunctionScriptControl.components = null
private

Required designer variable.

System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlVector
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.label1
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblCurrentFunction
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlOuter
private
System.Windows.Forms.NumericUpDown IG.Forms.VectorFunctionScriptControl.numCurrentFunction
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblTitle
private
System.Windows.Forms.NumericUpDown IG.Forms.VectorFunctionScriptControl.numNumFunctions
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblCurrentFunctionLabelTitle
private
System.Windows.Forms.NumericUpDown IG.Forms.VectorFunctionScriptControl.numNumParameters
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblNumParameters
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblParameterNames
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlDimensions
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblCurrentFunctionName
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblFunctionNames
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlFunctionNames
private
System.Windows.Forms.TextBox IG.Forms.VectorFunctionScriptControl.txtFunctionNames
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlParameterNames
private
System.Windows.Forms.TextBox IG.Forms.VectorFunctionScriptControl.txtParameterNames
private
IG.Forms.ScalarFunctionScriptControl IG.Forms.VectorFunctionScriptControl.scalarFunctionScriptControl1
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlButtons
private
System.Windows.Forms.Button IG.Forms.VectorFunctionScriptControl.btnCreateFunction
private
System.Windows.Forms.Button IG.Forms.VectorFunctionScriptControl.btnValueCalculator
private
System.Windows.Forms.Button IG.Forms.VectorFunctionScriptControl.btnLoad
private
System.Windows.Forms.Button IG.Forms.VectorFunctionScriptControl.btnSave
private
System.Windows.Forms.Button IG.Forms.VectorFunctionScriptControl.btnSummary
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlPlotButtons
private
System.Windows.Forms.Button IG.Forms.VectorFunctionScriptControl.btnPlot1d
private
System.Windows.Forms.Button IG.Forms.VectorFunctionScriptControl.btnPlot2d
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlFunctionDescription
private
System.Windows.Forms.TextBox IG.Forms.VectorFunctionScriptControl.txtFunctionDescription
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblFunctionDescription
private
System.Windows.Forms.Panel IG.Forms.VectorFunctionScriptControl.pnlFunctionName
private
System.Windows.Forms.TextBox IG.Forms.VectorFunctionScriptControl.txtFunctionName
private
System.Windows.Forms.Label IG.Forms.VectorFunctionScriptControl.lblFunctionName
private

Property Documentation

IG.Lib.IReporter IG.Forms.VectorFunctionScriptControl.Reporter
getprotected
string IG.Forms.VectorFunctionScriptControl.FunctionNameTitleNormal
getsetprotected

Normal text of the label that introduces function name input box.

string IG.Forms.VectorFunctionScriptControl.FunctionNameTitleModified
getsetprotected

Normal text of the label that introduces function name input box.

VectorFunctionScriptController IG.Forms.VectorFunctionScriptControl.FunctionController
getsetprotected
IVectorFunction IG.Forms.VectorFunctionScriptControl.Function
get

Gets the function generated according to the function definition contained in this control and stored in FunctionController.

Function loaders from the FunctionController's elements (scalar function script controllers) are used to generate the function.

virtual string [] IG.Forms.VectorFunctionScriptControl.InitialScalarFunctionDefinitionStrings
getset

This property contains initial definitions of scalar functions (i.e.their values defined in terms of parameters). If defined then these definitions are asigned in initialization.

bool IG.Forms.VectorFunctionScriptControl.HasUnsavedChanges
getset

Whether the current function definition has unsaved changes.

bool IG.Forms.VectorFunctionScriptControl.HasChildUnsavedChanges
getset

Indicates whether child control (of type ScalarFunctionScriptControl) has unsaved changes.

int IG.Forms.VectorFunctionScriptControl.CurrentScalarFunctionIndex
getsetprivate

Gets or sets index of the current scalar funciton that is worked on.

Changing this property affect which function is edited in the scalar function definition frame.

ScalarFunctionScriptController IG.Forms.VectorFunctionScriptControl.CurrentScalarFunctionController
getsetprotected

Scalar function controller that represents the element of the vector function that is currently edited.

bool IG.Forms.VectorFunctionScriptControl.IsLoaderConsistent
getprotected set

Whether function loader is in consistent state.

This method shoulld be elaborated or dropped.

string IG.Forms.VectorFunctionScriptControl.FunctionName
getset

Name of the function.

string IG.Forms.VectorFunctionScriptControl.FunctionDescription
getset
int IG.Forms.VectorFunctionScriptControl.NumParameters
getset

Gets or sets number of parameters of the represented vector function.

int IG.Forms.VectorFunctionScriptControl.NumValues
getset

Gets or sets number of values of the represented vector function (i.e., dimension of its codomain).

string [] IG.Forms.VectorFunctionScriptControl.ParameterNames
getset

Names of function parameters.

string [] IG.Forms.VectorFunctionScriptControl.FunctionNames
getset

Names of scalar function components that define individual values of the represented vector function.

InputOutputDataDefiniton IG.Forms.VectorFunctionScriptControl.DataDefinition
getsetprivate

Definition of input and output data for the represented scalar function.

FileSelector IG.Forms.VectorFunctionScriptControl.FileSelector
get

GUI component for seclecting files.

bool IG.Forms.VectorFunctionScriptControl.PrepareStandardDefinitions
getsetprivate

The documentation for this class was generated from the following files: