Interface IInputBox
The InputBox window. It can be used to ask some additional information from a user. You can create a new instance of this object using CreateInputBox() method. Then use methods of this instance to add properties of type you need:
- AddStringProp
- AddDoubleProp
- AddIntegerProp
- AddBooleanProp
- AddFilePathProp
- etc.
Namespace: SprutTechnology.SCPostprocessor
Assembly: SCPostprocessor.dll
Syntax
public interface IInputBox
Remarks
string myProgName = "TestProg1";
int myProgNumber = 1000;
var bx = CreateInputBox();
bx.WindowCaption = "Input the program parameters please";
bx.StartGroup("Program parameters");
bx.AddStringProp("Name", myProgName, v => myProgName = v);
bx.AddIntegerProp("Number", myProgNumber, v => myProgNumber = v);
bx.CloseGroup();
bx.Show();
Properties
WindowCaption
The title of the InputBox window.
Declaration
string WindowCaption { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
AddBooleanProp(String, Boolean, InputBoxValueSetter<Boolean>)
Adds a new boolean type parameter to the InputBox window. It will be shown as checkbox.
Declaration
IInputBoxProperty AddBooleanProp(string caption, bool value, InputBoxValueSetter<bool> valueSetter)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Boolean | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Boolean> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
bool use = false;
inputBox.AddBooleanProp("Use upper case", false, newValue => use = newValue);
inputBox.Show();
AddBooleanProp(String, Boolean, InputBoxValueSetter<Boolean>, InputBoxEnumValuesFormer<Boolean>)
Adds a new boolean type parameter to the InputBox window. Using the enumValuesFormer parameter you can fill the list of possible values which will be shown for the user as combo box. Additionally you can specify the display name for each possible value. The user will be able to select values only from the specified list.
Declaration
IInputBoxProperty AddBooleanProp(string caption, bool value, InputBoxValueSetter<bool> valueSetter, InputBoxEnumValuesFormer<bool> enumValuesFormer)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Boolean | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Boolean> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
InputBoxEnumValuesFormer<System.Boolean> | enumValuesFormer | Passed possible boolean values for selection. This parameter allows you to set the display names of the values. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
bool use = false;
inputBox.AddBooleanProp("Use upper case", false, newValue => use = newValue,
list => {
list.AddValue(false, "not use");
list.AddValue(true, "USE");
}
);
inputBox.Show();
AddBooleanProp(String, Boolean, InputBoxValueSetter<Boolean>, Boolean[])
Adds a new boolean type parameter to the InputBox window with the list of possible values. It will be shown as a combo box.
Declaration
IInputBoxProperty AddBooleanProp(string caption, bool value, InputBoxValueSetter<bool> valueSetter, params bool[] possibleValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Boolean | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Boolean> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.Boolean[] | possibleValues | The array of possible values for the parameter. The maximum number of values passed is 2, the rest are ignored. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
bool use = false;
inputBox.AddBooleanProp("Use upper case", false, newValue => use = newValue, false, true);
inputBox.Show();
AddDoubleEditableProp(String, Double, InputBoxValueSetter<Double>, InputBoxEnumValuesFormer<Double>)
Adds a new double type parameter to the InputBox window. Using the enumValuesFormer parameter you can fill the list of possible values which will be shown for the user as combo box. Additionally you can specify the display name for each possible value. If the default value you pass is not in the list of possible values then it will be added to the list with a display name equal to the value itself. The user will be able to either select one of the specified values, or enter their own.
Declaration
IInputBoxProperty AddDoubleEditableProp(string caption, double value, InputBoxValueSetter<double> valueSetter, InputBoxEnumValuesFormer<double> enumValuesFormer)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Double | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Double> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
InputBoxEnumValuesFormer<System.Double> | enumValuesFormer | Passed possible double values for selection. This parameter allows you to set the display names of the values. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
double tolerance = 0.02;
inputBox.AddDoubleEditableProp("Input tolerance", 0.02, newValue => tolerance = newValue,
list => {
list.AddValue(0.2, "Low");
list.AddValue(0.02, "Standard");
list.AddValue(0.002, "High");
}
);
inputBox.Show();
AddDoubleEditableProp(String, Double, InputBoxValueSetter<Double>, Double[])
Adds a new double type parameter to the InputBox window with the list of possible values. The user will be able to either select one of the specified values, or enter their own.
Declaration
IInputBoxProperty AddDoubleEditableProp(string caption, double value, InputBoxValueSetter<double> valueSetter, params double[] possibleValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Double | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Double> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.Double[] | possibleValues | The array of possible values for the parameter. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
double tolerance = 0.02;
inputBox.AddDoubleEditableProp("Input tolerance", 0.02, newValue => tolerance = newValue, 0.2, 0.02, 0.002);
inputBox.Show();
AddDoubleProp(String, Double, InputBoxValueSetter<Double>)
Adds a new double parameter to the InputBox window.
Declaration
IInputBoxProperty AddDoubleProp(string caption, double value, InputBoxValueSetter<double> valueSetter)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Double | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Double> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
double tolerance = 0.02;
inputBox.AddDoubleProp("Input tolerance", 0.02, newValue => tolerance = newValue);
inputBox.Show();
AddDoubleProp(String, Double, InputBoxValueSetter<Double>, InputBoxEnumValuesFormer<Double>)
Adds a new double type parameter to the InputBox window. Using the enumValuesFormer parameter you can fill the list of possible values which will be shown for the user as combo box. Additionally you can specify the display name for each possible value. The user will be able to select values only from the specified list. If the default value you pass is not in the list of possible values then it will be added to the list with a display name equal to the value itself.
Declaration
IInputBoxProperty AddDoubleProp(string caption, double value, InputBoxValueSetter<double> valueSetter, InputBoxEnumValuesFormer<double> enumValuesFormer)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Double | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Double> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
InputBoxEnumValuesFormer<System.Double> | enumValuesFormer | Passed possible double values for selection. This parameter allows you to set the display names of the values. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
double tolerance = 0.02;
inputBox.AddDoubleProp("Input tolerance", 0.02, newValue => tolerance = newValue,
list => {
list.AddValue(0.2, "Low");
list.AddValue(0.02, "Standard");
list.AddValue(0.002, "High");
}
);
inputBox.Show();
AddDoubleProp(String, Double, InputBoxValueSetter<Double>, Double[])
Adds a new double type parameter to the InputBox window with the list of possible values. The user will be able to select values only from the specified list.
Declaration
IInputBoxProperty AddDoubleProp(string caption, double value, InputBoxValueSetter<double> valueSetter, params double[] possibleValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Double | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Double> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.Double[] | possibleValues | The array of possible values for the parameter. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
double tolerance = 0.02;
inputBox.AddDoubleProp("Input tolerance", 0.02, newValue => tolerance = newValue, 0.2, 0.02, 0.002);
inputBox.Show();
AddFilePathProp(String, String, InputBoxValueSetter<String>)
Adds a new string type file path parameter to the InputBox window. Allows to use standard File open dialog to choose file path.
Declaration
IInputBoxProperty AddFilePathProp(string caption, string value, InputBoxValueSetter<string> valueSetter)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string path = "%userprofile%\NewFile.txt";
inputBox.AddFilePathProp("Output file path", path, newValue => path = newValue);
inputBox.Show();
AddFilePathProp(String, String, InputBoxValueSetter<String>, String)
Adds a new string type file path parameter to the InputBox window. Allows to use standard File open dialog to choose file path with the specified files filter.
Declaration
IInputBoxProperty AddFilePathProp(string caption, string value, InputBoxValueSetter<string> valueSetter, string filesFilter)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.String | filesFilter | Textual string with the list of possible file extensions to filter files inside
standard File open dialog.
You can use "|" char to divide the display name of the filter from the extentions part and to divide several
filters from each other.
You can use ";" char to divide several file extensions inside one filter string.
|
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string path = "%userprofile%\NewFile.txt";
inputBox.AddFilePathProp("Output file path", path, newValue => path = newValue, "*.txt");
inputBox.Show();
AddFolderPathProp(String, String, InputBoxValueSetter<String>)
Adds a new string type folder path parameter to the InputBox window. Allows to use standard Folder open dialog to choose folder path.
Declaration
IInputBoxProperty AddFolderPathProp(string caption, string value, InputBoxValueSetter<string> valueSetter)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string path = "%userprofile%\OutFiles";
inputBox.AddFolderPathProp("Output folder", path, newValue => path = newValue);
inputBox.Show();
AddIntegerEditableProp(String, Int32, InputBoxValueSetter<Int32>, InputBoxEnumValuesFormer<Int32>)
Adds a new integer type parameter to the InputBox window. Using the enumValuesFormer parameter you can fill the list of possible values which will be shown for the user as combo box. Additionally you can specify the display name for each possible value. If the default value you pass is not in the list of possible values then it will be added to the list with a display name equal to the value itself. The user will be able to either select one of the specified values, or enter their own.
Declaration
IInputBoxProperty AddIntegerEditableProp(string caption, int value, InputBoxValueSetter<int> valueSetter, InputBoxEnumValuesFormer<int> enumValuesFormer)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Int32 | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Int32> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
InputBoxEnumValuesFormer<System.Int32> | enumValuesFormer | Passed possible integer values for selection. This parameter allows you to set the display names of the values. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
int count = 1000;
inputBox.AddIntegerEditableProp("Max lines count", 1000, newValue => count = newValue,
list => {
list.AddValue(1000, "Low");
list.AddValue(10000, "Standard");
list.AddValue(100000, "High");
}
);
inputBox.Show();
AddIntegerEditableProp(String, Int32, InputBoxValueSetter<Int32>, Int32[])
Adds a new integer type parameter to the InputBox window with the list of possible values. The user will be able to either select one of the specified values, or enter their own.
Declaration
IInputBoxProperty AddIntegerEditableProp(string caption, int value, InputBoxValueSetter<int> valueSetter, params int[] possibleValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Int32 | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Int32> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.Int32[] | possibleValues | The array of possible values for the parameter. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
int count = 1000;
inputBox.AddIntegerEditableProp("Max lines count", 1000, newValue => count = newValue, 1000, 10000, 100000);
inputBox.Show();
AddIntegerProp(String, Int32, InputBoxValueSetter<Int32>)
Adds a new integer type parameter to the InputBox window.
Declaration
IInputBoxProperty AddIntegerProp(string caption, int value, InputBoxValueSetter<int> valueSetter)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Int32 | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Int32> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
int count = 1000;
inputBox.AddIntegerProp("Max lines count", 1000, newValue => count = newValue);
inputBox.Show();
AddIntegerProp(String, Int32, InputBoxValueSetter<Int32>, InputBoxEnumValuesFormer<Int32>)
Adds a new integer type parameter to the InputBox window. Using the enumValuesFormer parameter you can fill the list of possible values which will be shown for the user as combo box. Additionally you can specify the display name for each possible value. The user will be able to select values only from the specified list. If the default value you pass is not in the list of possible values then it will be added to the list with a display name equal to the value itself.
Declaration
IInputBoxProperty AddIntegerProp(string caption, int value, InputBoxValueSetter<int> valueSetter, InputBoxEnumValuesFormer<int> enumValuesFormer)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Int32 | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Int32> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
InputBoxEnumValuesFormer<System.Int32> | enumValuesFormer | Passed possible integer values for selection. This parameter allows you to set the display names of the values. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
int count = 1000;
inputBox.AddIntegerProp("Max lines count", 1000, newValue => count = newValue,
list => {
list.AddValue(1000, "Low");
list.AddValue(10000, "Standard");
list.AddValue(100000, "High");
}
);
inputBox.Show();
AddIntegerProp(String, Int32, InputBoxValueSetter<Int32>, Int32[])
Adds a new integer type parameter to the InputBox window with the list of possible values. The user will be able to select values only from the specified list.
Declaration
IInputBoxProperty AddIntegerProp(string caption, int value, InputBoxValueSetter<int> valueSetter, params int[] possibleValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.Int32 | value | The default value for the parameter you add. |
InputBoxValueSetter<System.Int32> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.Int32[] | possibleValues | The array of possible values for the parameter. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
int count = 1000;
inputBox.AddIntegerProp("Max lines count", 1000, newValue => count = newValue, 1000, 10000, 100000);
inputBox.Show();
AddStringEditableProp(String, String, InputBoxValueSetter<String>, InputBoxEnumValuesFormer<String>)
Adds a new string parameter to the InputBox window. Using the enumValuesFormer parameter you can fill the list of possible values which will be shown for the user as combo box. Additionally you can specify the display name for each possible value. If the default value you pass is not in the list of possible values then it will be added to the list with a display name equal to the value itself. The user will be able to either select one of the specified values, or enter their own.
Declaration
IInputBoxProperty AddStringEditableProp(string caption, string value, InputBoxValueSetter<string> valueSetter, InputBoxEnumValuesFormer<string> enumValuesFormer)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
InputBoxEnumValuesFormer<System.String> | enumValuesFormer | Passed possible string values for selection. This parameter allows you to set the display names of the values. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string clr = "R";
inputBox.AddStringEditableProp("Select color", "R", newValue => clr = newValue,
list => {
list.AddValue("R", "Red color");
list.AddValue("G", "Green color");
list.AddValue("B", "Blue color");
}
);
inputBox.Show();
AddStringEditableProp(String, String, InputBoxValueSetter<String>, String[])
Adds a new string parameter to the InputBox window with the list of possible values. The user will be able to either select one of the specified values, or enter their own.
Declaration
IInputBoxProperty AddStringEditableProp(string caption, string value, InputBoxValueSetter<string> valueSetter, params string[] possibleValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.String[] | possibleValues | The array of possible values for the parameter. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string clr = "Red";
inputBox.AddStringEditableProp("Select color", "Red", newValue => clr = newValue, "Red", "Green", "Blue");
inputBox.Show();
AddStringProp(String, String, InputBoxValueSetter<String>)
Adds a new string parameter to the InputBox window.
Declaration
IInputBoxProperty AddStringProp(string caption, string value, InputBoxValueSetter<string> valueSetter)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string clr = "Red";
inputBox.AddStringProp("Select color", "Red", newValue => clr = newValue);
inputBox.Show();
AddStringProp(String, String, InputBoxValueSetter<String>, InputBoxEnumValuesFormer<String>)
Adds a new string parameter to the InputBox window. Using the enumValuesFormer parameter you can fill the list of possible values which will be shown for the user as combo box. Additionally you can specify the display name for each possible value. The user will be able to select values only from the specified list. If the default value you pass is not in the list of possible values then it will be added to the list with a display name equal to the value itself.
Declaration
IInputBoxProperty AddStringProp(string caption, string value, InputBoxValueSetter<string> valueSetter, InputBoxEnumValuesFormer<string> enumValuesFormer)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
InputBoxEnumValuesFormer<System.String> | enumValuesFormer | A delegate (callback procedure) that allows you to fill a list of possible values and their display names for the adding property. It will be shown as a combo box. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string clr = "R";
inputBox.AddStringProp("Select color", "R", newValue => clr = newValue,
list => {
list.AddValue("R", "Red color");
list.AddValue("G", "Green color");
list.AddValue("B", "Blue color");
}
);
inputBox.Show();
AddStringProp(String, String, InputBoxValueSetter<String>, String[])
Adds a new string parameter to the InputBox window with the list of possible values. The user will be able to select values only from the specified list.
Declaration
IInputBoxProperty AddStringProp(string caption, string value, InputBoxValueSetter<string> valueSetter, params string[] possibleValues)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Textual name of the parameter. It will be shown for the user. |
System.String | value | The default value for the parameter you add. |
InputBoxValueSetter<System.String> | valueSetter | Some delegate (or callback procedure) that the InputBox use to assign the new value back to the property. The easiest way is to use a lambda expression as a callback. For example:
Where
|
System.String[] | possibleValues | The array of possible values for the parameter. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Link to the property object of the input box. Using this link, you can additionally change some parameters of this property. |
Remarks
var inputBox = CreateInputBox();
string clr = "Red";
inputBox.AddStringProp("Select color", "Red", newValue => clr = newValue, "Red", "Green", "Blue");
inputBox.Show();
CloseGroup()
Closes created group of parameters. In connection with StartGroup it can be used to structure parameters. All properties which you will add between StartGroup-CloseGroup calls will be shown inside this group. Without StartGroup and CloseGroup the parameters will be shown at the root level.
Declaration
void CloseGroup()
Remarks
var inputBox = CreateInputBox();
string fontColor = "Red";
string backColor = "Blue";
inputBox.StartGroup("Appearance");
inputBox.AddStringProp("Font color", "Red", newValue => fontColor = newValue, "Red", "Green", "Blue");
inputBox.AddStringProp("Back color", "Blue", newValue => backColor = newValue, "Red", "Green", "Blue");
inputBox.CloseGroup();
inputBox.Show();
Show()
Show created InputBox window.
Declaration
void Show()
StartGroup(String)
Creates a new group of parameters. In connection with CloseGroup it can be used to structure parameters. All properties which you will add between StartGroup-CloseGroup calls will be shown inside this group. Without StartGroup and CloseGroup the parameters will be shown at the root level.
Declaration
IInputBoxProperty StartGroup(string caption)
Parameters
Type | Name | Description |
---|---|---|
System.String | caption | Name of the group of parameters. |
Returns
Type | Description |
---|---|
IInputBoxProperty | Created group. |
Remarks
var inputBox = CreateInputBox();
string fontColor = "Red";
string backColor = "Blue";
inputBox.StartGroup("Appearance");
inputBox.AddStringProp("Font color", "Red", newValue => fontColor = newValue, "Red", "Green", "Blue");
inputBox.AddStringProp("Back color", "Blue", newValue => backColor = newValue, "Red", "Green", "Blue");
inputBox.CloseGroup();
inputBox.Show();