public dataLoader(YSensor sensor)
 {
     _sensor           = sensor;
     _hwdName          = _sensor.get_hardwareId();
     _progressCallback = null;
     _mustStopNow      = false;
 }
        public void load(CustomSensor.DataLoadProgressCallback progressCallback,
                         CustomSensor.SensorLoadCompletedCallback completedCallback)
        {
            if (_mustStopNow)
            {
                return;
            }

            _completedCallback = completedCallback;
            _progressCallback  = progressCallback;

            loadProcess = new BackgroundWorker();
            loadProcess.WorkerReportsProgress = true;
            loadProcess.DoWork             += new DoWorkEventHandler(load_DoWork);
            loadProcess.RunWorkerCompleted += new RunWorkerCompletedEventHandler(load_Completed);
            loadProcess.ProgressChanged    += new ProgressChangedEventHandler(load_ProgressChanged);
            loadProcess.RunWorkerAsync(null);
        }