WeibullDataSet.GetDistrParameters: Difference between revisions
Jump to navigation
Jump to search
John Leavitt (talk | contribs) m (Protected "WeibullEvents.GetDistrParameters" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading]) |
Chris Kahn (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template:APIClass|WeibullEvents Class|WeibullEvents}} | {{Template:APIClass|WeibullEvents Class|WeibullEvents}} | ||
Called by a WeibullDataSet object when additional input is required. Displays a prompt for customized parameters. | |||
== Syntax == | |||
<ul><li>GetDistrParameters( | |||
== | |||
{{APIName|sender}} | {{APIName|sender}} | ||
{{APIPrefix|As}} | {{APIPrefix|As}} | ||
{{APIName|[[WeibullDataSet Class|WeibullDataSet]],}} | {{APIName|[[WeibullDataSet Class|WeibullDataSet]],}} | ||
{{APIName|sMsg}} | {{APIName|sMsg}} | ||
{{APIPrefix|As String}} | {{APIPrefix|As String}} | ||
{{APIName|,}} | {{APIName|,}} | ||
{{APIName|GetOnlyOneParameter}} | {{APIName|GetOnlyOneParameter}} | ||
{{APIPrefix|As Boolean}} | {{APIPrefix|As Boolean}} | ||
{{APIName|,}} | {{APIName|,}} | ||
{{APIName|Params}} | {{APIName|Params}} | ||
{{APIPrefix|As}} | {{APIPrefix|As}} | ||
Line 23: | Line 18: | ||
{{APIPrefix|Of}} | {{APIPrefix|Of}} | ||
{{APIName|[[ParamInputInfo Class|ParamInputInfo]]),}} | {{APIName|[[ParamInputInfo Class|ParamInputInfo]]),}} | ||
{{APIName|Cancel}} | {{APIName|Cancel}} | ||
{{APIPrefix|As Boolean | {{APIPrefix|As Boolean}}</li></ul> | ||
Parameters | |||
:''sender'': An WeibullDataSet object | |||
An WeibullDataSet object | |||
:''sMsg'': The main display label. | |||
The main display label. | |||
:''GetOnlyOneParameter'': Prompt for only one parameter | |||
Prompt for only one parameter | |||
:''Params'': A list of Parameter input information classes, ParamInputInfo, that would be updated by this prompt. After processing with [[WeibullEvents.GetDistrParameters|GetDistrParameters]], the Value of each parameter will be updated. | |||
A list of Parameter input information classes, ParamInputInfo, that would be updated by this prompt. | |||
'''Cancel''' | '''Cancel''' |
Revision as of 21:18, 21 February 2014
Called by a WeibullDataSet object when additional input is required. Displays a prompt for customized parameters.
Syntax
- GetDistrParameters( sender As WeibullDataSet, sMsg As String , GetOnlyOneParameter As Boolean , Params As List( Of ParamInputInfo), Cancel As Boolean
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. 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 a New class that Inherits from WeibullEvents.
Override the method.
Private Class myEvents Inherits WeibullEvents Public Overrides Sub GetDistrParameters(sender As WeibullDataSet, sMsg As String, GetOnlyOneParamater As Boolean, Params As List(Of ParamInputInfo), ByRef Cancel As Boolean) MyBase.GetDistrParameters(sender, sMsg, GetOnlyOneParamater, Params, Cancel) MessageBox.Show("Additional overridden code here.") End Sub End Class
Declare the WeibullDataSet.
Dim WDS as New WeibullDataSet
Use the created myEvents class in place of the one created by the dataset.
WDS.Events = New myEvents
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))
Create a Boolean for return of "Cancel" parameter.
Dim wasCanceled As Boolean
Prompt user to input the parameters.
WDS.Events.GetDistrParameters(WDS, "Message1", True, Params, wasCanceled)
The new Parameter values are in their respective ParamInputInfo.Value variables.
Dim NewParameter1value As Double Dim NewParameter2value As Double
If Not wasCanceled Then NewParameter1value = Params(0).Value NewParameter2value = Params(1).Value End If