private void stopTimer() { if (_timer != null) { _timer.Dispose(); } _timer = null; }
protected override void onLoad() { base.onLoad(); if (string.IsNullOrEmpty(Url)) { LogService.Error("获取湖州船舶数据的WebServiceUrl配置有误!"); } else { _service = new HZShipDataWebService(); _service.Url = Url; int interval = 3000;//:默认刷新间隔为3秒; _timer = new PeriodTimer(interval, onRefreshGPSData); } }
private void startTimer() { _refreshTimes = 0; _timer = new PeriodTimer(1000, onTimerCallBack); }