private void OnDisconnectDevice(object sender, EventArgs e) { _dataValuerespository.DisConnectDevice(); pollingdatastreamthread.Abort(); _view.ExecuteDelegateOnUIThread(new Action(() => _view.OnDeviceDisconnected())); }