public void CheckPTLineThread() { if (AppInfo.CheckPTLine != null) { while (!this.StopIt) { AppInfo.CheckPTLine(); Thread.Sleep(AppInfo.cRefreshTime); } } }