Class ConstructAction.BooleanInput
- Namespace
- CADability.Actions
- Assembly
- CADability.dll
Defines an input object for an action derived from ConstructAction. This input object extpects the input of a boolen value. The boolen value is selected from a combobox. Pressing enter or TAB or clicking the mouse proceeds to the next input object.
public class ConstructAction.BooleanInput : ConstructAction.InputObject
- Inheritance
-
ConstructAction.BooleanInput
- Inherited Members
Constructors
BooleanInput(string, string)
Constructs a BooleanInput object with no initial value
public BooleanInput(string resourceId, string resourceIdValues)
Parameters
resourceIdstringthe resource id to specify a string from the StringTable. ResourceId+".Label": the Label left of the edit box. ResourceId+".ShortInfo": a short tooltip text ResourceId+"DetailedInfo": a longer tooltip text.
resourceIdValuesstringresource id of the strings for the values starting with a delimiter and seperated by the same delimiter e.g. "|true|false"
BooleanInput(string, string, bool)
Constructs a BooleanInput object with an initial value
public BooleanInput(string resourceId, string resourceIdValues, bool StartValue)
Parameters
resourceIdstringthe resource id to specify a string from the StringTable. ResourceId+".Label": the Label left of the edit box. ResourceId+".ShortInfo": a short tooltip text ResourceId+"DetailedInfo": a longer tooltip text.
resourceIdValuesstringresource id of the strings for the values starting with a delimiter and seperated by the same delimiter e.g. "|true|false"
StartValueboolthe initial value
Properties
CapturesMouse
If true, selecting this input in the property grid makes it the current input of the action, like a selected ConstructAction.DoubleInput or ConstructAction.GeoPointInput: mouse moves in the view then go to this input, which ignores them or passes them on to ForwardMouseInputTo. If false (the default), the input that was current before keeps receiving the mouse input while this one is selected.
public bool CapturesMouse { get; set; }
Property Value
DefaultBoolean
Sets a DefaultGeoVector, which should be a static value, that carries the last input value of this vector to the next instantiation of the action.
public ConstructAction.DefaultBoolean DefaultBoolean { get; set; }
Property Value
ForwardMouseInputTo
Mouse input should be forwarded to another input object and only processed by this input, when the other input object is fixed.
public object ForwardMouseInputTo { get; set; }
Property Value
Value
The current value of this input. It is updated by the user's selection and by ForceValue(bool); each change raises InputValueChangedEvent. It cannot be set directly, use ForceValue(bool).
public bool Value { get; }
Property Value
Methods
ForceValue(bool)
Forces the input object to the specified value.
public void ForceValue(bool val)
Parameters
valboolthe value to set
SetError(string)
Shows errorMessage as an error on the entry of this input in the property page, e.g. when
the value entered by the user is not acceptable for the action. The default implementation does nothing; inputs
with an edit field forward the message to their property entry, inputs without one ignore it.
public override void SetError(string errorMessage)
Parameters
errorMessagestringThe text to display, or an empty string to clear the error
Events
GetBooleanEvent
Provide a method here, if the boolean value not only depends from this input, but is also modified by other means.
public event ConstructAction.BooleanInput.GetBooleanDelegate GetBooleanEvent
Event Type
InputValueChangedEvent
Event will be rasied if the Length property changed
public event ConstructAction.BooleanInput.InputValueChangedDelegate InputValueChangedEvent
Event Type
SetBooleanEvent
Provide a method here to get the result of this input (and modify your object)
public event ConstructAction.BooleanInput.SetBooleanDelegate SetBooleanEvent