switch class : IsEnabled getter

Description

Returns a value that indicates whether the timer handing is running.

Syntax

instance.IsEnabled

Arguments

None

Return value

ClassDescription
boolWhether the handling is running.

Sample code

Suppose you have the following class definition.

1:

class handle

2:

open method void LCHandler(dictionary dic)

3:

... // event handler code.

4:

endmethod

5:

endclass

Usage of the IsEnabled getter is as follows.

1:

browser b = new browser();

2:

handle h = new handle();

3:

switch sw = b.LoadCompleted(h,"LCHandler(dictionary)"); // It sets the instance of the handle class.

4:

sw.Start();

5:

bool run = sw.IsEnabled; // "true"

Notes

Returns true if:

From the start() to the Stop().

From Start() until the event handler method stops with an exception.

From OneShot() to call of the event handler method.

Otherwise, returns false.

Links for reference

None.

Copyright © Cooker All rights reserved.