|
|
Line 1: |
Line 1: |
| {{Template:APIClass|ALTAEvents Class|ALTAEvents}} | | {{Template:API}}{{Template:APIBreadcrumb|.[[ALTAEvents Class|ALTAEvents]]}} |
| {{Template:WeibullEvents.UpdateCalculationProgress.Cmt}} | | {{Template:InProgress}} |
| | |
| == Syntax ==
| |
| <ul><li>UpdateCalculationProgress(
| |
| {{APIName|sender}}
| |
| {{APIPrefix|As}}
| |
| {{APIName|[[ALTADataSet Class|ALTADataSet]]}},
| |
| {{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 [[ALTADataSet Class|ALTADataSet]] object. | |
| | |
| :''msgx_0'': The main display label.
| |
| | |
| :''msgx_1'': The remaining label.
| |
| | |
| :''pdone '': The percentage to display, in decimal form (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 ==
| |
| This example demonstrates how to produce a dialog box when the calculation progress should be updated.
| |
| {{APIComment|'Overrides requested. Create a new class, inherit WeibullEvents, and set the dataset's events.}}
| |
| Private Class myEvents
| |
| Inherits WeibullEvents
| |
| Public Overrides Sub UpdateCalculationProgress(sender As ALTADataSet, 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)
| |
| {{APIComment|'<Additional overridden code here.>}}
| |
| End Sub
| |
| End Class
| |
|
| |
| {{APIComment|'Set the new Events class.}}
| |
| ADS.Events = New myEvents
| |
|
| |
| {{APIComment|'Update calculation progress.}}
| |
| ADS.Events.UpdateCalculationProgress(ADS, "Main Label","Remaining Label", 0.8, False, 0, wasCanceled)
| |
|
| |
| {{APIComment|'The "Cancel" checkbox reflects the value of wasCanceled.}}
| |