WeibullDataSet.GetDistrParameters: Difference between revisions
Albert Szeto (talk | contribs) |
Albert Szeto (talk | contribs) |
||
Line 91: | Line 91: | ||
{{APIComment|Declare the WeibullEvents. Substitute [[ALTAEvents Class|ALTAEvents]] for ALTA.}}<br> | {{APIComment|Declare the WeibullEvents. Substitute [[ALTAEvents Class|ALTAEvents]] for ALTA.}}<br> | ||
{{APIComment|Declare the WeibullDataSet. Substitute [[ALTADataSet Class|ALTADataSet]] for ALTA.}}<br> | {{APIComment|Declare the WeibullDataSet. Substitute [[ALTADataSet Class|ALTADataSet]] for ALTA.}}<br> | ||
{{APIComment|Note: The WeibullDataSet constructor already creates a new WeibullEvents, which could be used in place of | {{APIComment|Note: The WeibullDataSet constructor already creates a new WeibullEvents, which could be used in place of WEvents in the example below.}} | ||
Dim WEvents as New WeibullEvents | Dim WEvents as New WeibullEvents | ||
Dim WDS As New WeibullDataSet | Dim WDS As New WeibullDataSet |
Revision as of 00:10, 11 September 2013
Displays a prompt for customized parameters.
Weibull Declaration
Public Overridable Sub GetDistrParameters( ByVal sender As WeibullDataSet, ByVal sMsg As String , ByVal GetOnlyOneParameter As Boolean , ByVal Params As List( Of ParamInputInfo), ByRef Cancel As Boolean )
Called by ‘sender’ when additional input is required.
ALTA Declaration
Public Overridable Sub GetDistrParameters( ByVal sender As ALTADataSet, ByVal sMsg As String , ByVal GetOnlyOneParameter As Boolean , ByVal Params As List( Of ParamInputInfo), ByRef Cancel As Boolean )
Called by ‘sender’ when additional input is required.
Parameters
sender An WeibullDataSet object
sMsg The main display label.
GetOnlyOneParameter Prompt for only one parameter
Params A list of Parameter input information classes, ParamInputInfo, that would be updated by this prompt.
ParamInputInfo Class
Public Name As String
Public Min As Double
Public Max As Double
Public CanEqualMin As Boolean
Public CanEqualMax As Boolean
Public Value As Double
ParamInputInfo Declaration
New(ByVal Name As String, ByVal Min As Double, ByVal Max As Double, ByVal CanEqualMin As Boolean, ByVal CanEqualMax As Boolean)
ParamInputInfo Usage
After processing with GetDistrParameters, the Value of each parameter will be updated.
Cancel If the prompt was closed by any means other than clicking the "Okay", this value would be set to True.
Usage Example
Declare the WeibullEvents. Substitute ALTAEvents for ALTA.
Declare the WeibullDataSet. Substitute ALTADataSet for ALTA.
Note: The WeibullDataSet constructor already creates a new WeibullEvents, which could be used in place of WEvents in the example below.
Dim WEvents as New WeibullEvents Dim WDS As New WeibullDataSet
Creates a new list of ParamInputInfo. Populate the list.
Dim Params As New List(Of ParamInputInfo) Params.Add(New ParamInputInfo("Param1", 0, 10, False, True)) Params.Add(New ParamInputInfo("Param2", 0, Double.MaxValue, False, True))
Prompt user to input the parameters.
WEvents.GetDistrParameters(WDS, "Message1", True, Params, True)
The new Parameter values are in their respective ParamInputInfo.Value variables.
Dim NewParameter1value as Double = Params(0).Value Dim NewParameter2value as Double = Params(1).Value