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 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
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)
{................................................}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started