Question: I am developing a windows form application that will perform as a tool for data analyzation. I have two checkedlistbox's , two datetimepicker's, a data

I am developing a windows form application that will perform as a tool for data analyzation. I have two checkedlistbox's , two datetimepicker's, a data grid view, and a series chart. Once i have a checked box in my checkedlistbox it is identified by (checkedListBox1.GetItemCheckState() == CheckState.Checked) and a specific path is added to a list using if conditional statements. Im having trouble accessing the paths though I get an error. I am developing a windows form application that will perform as

i will include the necessary syntax:

private void Submit_button_Click(object sender, EventArgs e)

{

Construct.distinctSerials.Clear();

Construct.fileDirectories.Clear();

Construct.files.Clear();

Construct.MainDataTable.Dispose();

Construct.MainDataTable.Columns.Clear();

Construct.MainDataTable.Rows.Clear();

Construct.totalInvalidTest = 0;

Construct.totalTest = 0;

GC.Collect();

int progressBarCount = 0;

progressBar1.Visible = true;

string earliestdate = dateTimePicker1.Value.ToString("yyyy-MM-dd");

string latestdate = dateTimePicker2.Value.ToString("yyyy-MM-dd");

List fileDirectories = new List();

if (checkedListBox1.GetItemCheckState(0) == CheckState.Checked)

{

if (checkedListBox2.GetItemCheckState(0) == CheckState.Checked)

{

fileDirectories.Add("\\\\Users\\tnooluade\\Desktop\ esult file path");

}

else if (checkedListBox2.GetItemCheckState(1) == CheckState.Checked)

{

fileDirectories.Add(\\\\Users\\tnooluade\\Desktop\ esult file path\ ew results);

}

else if (checkedListBox2.GetItemCheckState(2) == CheckState.Checked)

{

fileDirectories.Add(\\\\Users\\tnooluade\\Desktop\ esult file\\bad folder);

}..................................................................

.....................................................................

foreach (string selectedPath in fileDirectories)

{

string[] level1 = Directory.GetFiles(@selectedPath, "*.csv", SearchOption.AllDirectories);

foreach (string level2 in level1)

{................................................}

a tool for data analyzation. I have two checkedlistbox's , two datetimepicker's,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!