private void FolderForm_Load(object sender, EventArgs e) { baseFileOperate.AllPath = Application.StartupPath + "\\"; baseFileOperate.CreateFileDir("HLMConfig", 1); baseFileOperate.AllPath = baseFileOperate.AllPath + "HLMConfig" + "\\"; baseFileOperate.CreateFileDir("Mason.INI", 0); baseFileOperate.IniFileName = baseFileOperate.AllPath + "Mason.INI"; FileOperate.inipath = baseFileOperate.ReadIniData("Mason", "DataPath", String.Empty); if (FileOperate.inipath == String.Empty) { baseFileOperate.WriteIniData("Mason", "DataPath", "D:\\"); FileOperate.inipath = baseFileOperate.ReadIniData("Mason", "DataPath", String.Empty); } textBox1.Text = FileOperate.inipath; tVfolder.BeginUpdate(); string[] strFolder = baseFileOperate.GetFolderNames(FileOperate.inipath); foreach (string strDir in strFolder) { string strtemp = baseFileOperate.GetDirectoryNames(strDir); if (strtemp == "RECYCLER" || strtemp == "RECYCLED" || strtemp == "Recycled" || strtemp == "System Volume Information" || strtemp == "$RECYCLE.BIN") { } else { TreeNode tnMyDrives = new TreeNode(strtemp); tVfolder.Nodes.Add(tnMyDrives); } tVfolder.ImageList = imageList1; tVfolder.ImageIndex = 0; tVfolder.SelectedImageIndex = 1; } tVfolder.EndUpdate(); }