switch クラス : IsEnabled ゲッタ
説明
イベント処理が実行中かどうかを示す値を返します。
構文
instance.IsEnabled
引数
無し。
返り値
| クラス | 説明 |
| bool | イベント処理が実行中かどうかを示す値。 |
サンプルコード
次のクラス定義があるとします。
| 1: | class handle |
| 2: | open method void LCHandler(dictionary dic) |
| 3: | ... // event handler code. |
| 4: | endmethod |
| 5: | endclass |
IsEnabled ゲッターの使い方は次のとおりです。
| 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" |
注意
以下の場合に true を返します。
Start() されてから Stop() されるまで。
Start() されてから イベントハンドラメソッドが例外で停止するまで。
OneShot() されてから イベントハンドラメソッドが呼び出されるまで。
上記以外の場合は false を返します。
参照リンク
無し。


