public Form1() { InitializeComponent(); flowLayoutPanel1.BackColor = Color.Transparent; this.Width += 60; spobj = new start_process(); }
private void change_dir_Click(object sender, EventArgs e) { search_box.Enabled = true; checkbox_substring_search.Enabled = true; if (progressbar_loading_files.Visible == true) { if (background_loading_files.WorkerSupportsCancellation == true) { background_loading_files.CancelAsync(); } MessageBox.Show("Loading cancelled!!\nNo files loaded"); //spobj.filePaths = new List<string>(); } /*else if(files_loaded_atleast_once==true) * { * prevfilePaths = spobj.filePaths; * }*/ spobj = new start_process(); refresh(); dir_list = new List <string>(); result = open_directory.ShowDialog(); if (result == DialogResult.OK) { GetSubDirectories(open_directory.SelectedPath); } else { if (files_loaded_atleast_once == true) { string str = prev_selected_path; if (str.Length > 25) { str.Substring(0, 22); str += "..."; } MessageBox.Show("Searching will be done in the same directory\n" + str); spobj.filePaths = prevfilePaths; } else { MessageBox.Show("No file selected to be searched"); search_box.Enabled = false; checkbox_substring_search.Enabled = false; } } }