private void btnScan_Click(object sender, EventArgs e)
 {
     using (var progressIndicator = new ProgressIndicator(_deviceReader))
     {
         cbSelectedTrack.DataSource = null;
         cbSelectedTrack.Items.Clear();
         cbSelectedTrack.Enabled = false;
         _deviceReader.StartRescanPortThread();
         progressIndicator.ShowDialog();
         cbSelectedTrack.DataSource = _deviceReader.GetTracksInfo();
         cbSelectedTrack.Enabled = (cbSelectedTrack.Items.Count > 0);
         btnOk.Enabled = (cbSelectedTrack.Items.Count > 0);
     }
 }
        public DialogResult ShowPreImportDialogs()
        {
            if (BeginWork != null) BeginWork(this, new EventArgs());

              DialogResult result;
              if (!_regSEReader.LoadCompleted)
              {
            var progressIndicator = new ProgressIndicator(_regSEReader);
            _regSEReader.StartLoadTracks();
            result = progressIndicator.ShowDialog();
            if (result != DialogResult.OK)
            {
              if (EndWork != null) EndWork(this, new EventArgs());
              return result;
            }
              }

              using (var dlg = new JJConnectRegistratorSETrackSelector { DeviceReader = _regSEReader })
              {
            result = dlg.ShowDialog();
            if (result == DialogResult.OK)
            {
              _trackToImport = dlg.SelectedTrack;
            }
            dlg.Dispose();
              }

              if (EndWork != null) EndWork(this, new EventArgs());

              return result;
        }