public bool Poll() { if (detach_state_) { return(false); } if ((!detach_req_) && (GetDetachStatus())) { detach_req_ = true; runner_.StopAsync(); } if ((!detach_req_) && (!runner_.IsRunning)) { if (mode_ == ScriptRunMode.Repeat) { runner_.RunAsync(); } } if ((detach_req_) && (!detach_state_)) { detach_state_ = !runner_.IsRunning; } /* 状態更新 */ var update_state = false; var status_new = GetRunnerStatus(); if (status_ != status_new) { status_ = status_new; update_state = true; } return(update_state); }