private void openSelectFolder(string lsPath) { string opPath = comboBox_FilePath.Text; string ofExt = comboBox_Filter.Text; if (System.IO.Directory.Exists(opPath)) { Sources sources = new Sources(App_Config, checkBox1_SubFolder.Checked); List <Dictionary <string, string> > fileList = sources.queryFilelists(opPath, ofExt); addFileItems(fileList); lastOpenFolder = opPath; textBox1_FileNum.Text = File_Num.ToString(); Total_Lines_Num = 0; Comment_Lines_Num = 0; Comment_Spaces_Num = 0; checkFilesEncoding(); if ((waitForm != null) && (File_Num > 100)) { waitForm.Close(); waitForm = new FormWait(); waitForm.setTipstr(0); waitForm.ShowDialog(); } if (comboBox_FilePath.Items.IndexOf(lsPath) < 0) { comboBox_FilePath.Items.Add(lsPath); } } listView_Filelist.Focus(); }
private void FileManForm_Load(object sender, EventArgs e) { App_Config = new Options(); load_config(); comboBox_FilePath.Items.Add(Application.StartupPath); this.comboBox_FilePath.SelectedIndex = 0; comboBox_Filter.Items.Add(App_Config.FileExt); comboBox_Filter.SelectedIndex = 0; openSelectFolder(comboBox_FilePath.Text); waitForm = new FormWait(); lvwColumnSorter = new ListViewColumnSorter(); listView_Filelist.ListViewItemSorter = lvwColumnSorter; timer1.Interval = 10 * 1000; timer1.Enabled = true; }