WeibullDataSet.UpdateCalculationProgress: Difference between revisions
Jump to navigation
Jump to search
John Leavitt (talk | contribs) m (Protected "WeibullEvents.UpdateCalculationProgress" ([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 WeibullDataSet object when the calculation progress should be updated. Provides ability to customize the calculation progress display. | |||
Provides ability to customize the calculation progress display. | |||
== Method Syntax == | == Method Syntax == | ||
<ul><li>UpdateCalculationProgress( | |||
{{APIName|sender}} | {{APIName|sender}} | ||
{{APIPrefix|As}} | {{APIPrefix|As}} | ||
{{APIName|[[WeibullDataSet Class|WeibullDataSet]]}} | {{APIName|[[WeibullDataSet Class|WeibullDataSet]]}}, | ||
{{APIName|msgx_0}} | |||
{{APIPrefix|As String}}, | |||
{{APIName|msgx_1}} | |||
{{APIPrefix|As String}}, | |||
{{APIName|pdone}} | |||
{{APIPrefix|As Double}}, | |||
{{APIName|append_to}} | |||
{{APIPrefix|As Boolean}}, | |||
{{APIName|Prev_increment}} | |||
{{APIPrefix|As Long}}, | |||
{{APIName|Cancel}} | |||
{{APIPrefix|As Boolean}} | |||
{{APIName|)}}</li></ul> | |||
Parameters | |||
:''sender'': An WeibullDataSet object | |||
An WeibullDataSet object | |||
:''msgx_0'': The main display label. | |||
The main display label. | |||
:''msgx_1'': The remaining label. | |||
The remaining label. | |||
:''pdone '': The percentage, in decimal, to display. (0.00 to 0.99) | |||
The percentage, in decimal, to display. (0.00 to 0.99) | |||
:''append_to'': If True, append '''pdone''' to the current percentage value in the progress display at the rate of '''Prev_increment''', otherwise '''pdone''' will replace the value. | |||
If True, append '''pdone''' to the current percentage value in the progress display at the rate of '''Prev_increment''', otherwise '''pdone''' will replace the value. | |||
:''Prev_increment'': This is the value of the incremental value per progress update, if '''append_to''' is True. If '''append_to''' is False, this value is ignored. | |||
This is the value of the incremental value per progress update, if '''append_to''' is True. If '''append_to''' is False, this value is ignored. | |||
:''Cancel'': This determines if the calculation can be cancelled. | |||
This determines if the calculation can be cancelled. | |||
== Usage Example == | == Usage Example == |
Revision as of 21:27, 21 February 2014
Called by WeibullDataSet object when the calculation progress should be updated. Provides ability to customize the calculation progress display.
Method Syntax
- UpdateCalculationProgress( sender As WeibullDataSet , msgx_0 As String, msgx_1 As String, pdone As Double, append_to As Boolean, Prev_increment As Long, Cancel As Boolean )
Parameters
- sender: An WeibullDataSet object
- msgx_0: The main display label.
- msgx_1: The remaining label.
- pdone : The percentage, in decimal, to display. (0.00 to 0.99)
- append_to: If True, append pdone to the current percentage value in the progress display at the rate of Prev_increment, otherwise pdone will replace the value.
- Prev_increment: This is the value of the incremental value per progress update, if append_to is True. If append_to is False, this value is ignored.
- Cancel: This determines if the calculation can be cancelled.
Usage Example
Declare a New class that Inherits from WeibullEvents.
Override the method.
Private Class myEvents Inherits WeibullEvents Public Overrides Sub UpdateCalculationProgress(sender As WeibullDataSet, msgx_0 As String, msgx_1 As String, pdone As Double, append_to As Boolean, Prev_increment As Long, ByRef Cancel As Boolean) MyBase.UpdateCalculationProgress(sender, msgx_0, msgx_1, pdone, append_to, Prev_increment, 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
Update the calculation progress display.
WDS.Events.UpdateCalculationProgress(WDS, "NewMessage1", "NewMessage2", 100, False, 0, True)