private void backgroundWorker_CountRowsRunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
        {
            FileDetails fdet = (FileDetails)e.Result;

            hoju.SetRowCount(fdet.totalNumberOfRows, fdet.rowErrorCount);
            hoju.SetColNames(fdet.colNames);

            foreach (string colName in hoju.GetColNames())
            {
                ColumnsToRetainCheckedListBox.Items.Add(colName);
                ColumnsToRetainCheckedListBox.SetItemChecked(ColumnsToRetainCheckedListBox.Items.IndexOf(colName), true);
            }


            EnableControls();
            StartButton.Enabled = true;
            DisableProgBar();
            StatusLabel.Text = "Dataset contains " + ToKMB(hoju.GetRowCount()) + " rows";

            MessageBox.Show("Your file has been scanned. It contains " + ToKMB(hoju.GetRowCount()) + " rows.", "Woohoo!", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Esempio n. 2
0
 /// <summary>
 /// This is used to initialize/set up your FileDetails object — i.e., your "deck of cards"
 /// </summary>
 public void InitializeFileDetails(string fileIn, bool allowRepl, bool containsHead, Encoding fEncode, char quotechar, char delimchar)
 {
     fileDetails = new FileDetails(fileIn, containsHead, fEncode, quotechar, delimchar);
 }