Example #1
0
 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();
 }
Example #2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            if (listView1.Items.Count == 0)
            {
                return;
            }
            Hide();
            string file_path = filepath + "\\" + listView1.SelectedItems[0].Text;

            MainForm._mainForm.masonPath    = file_path;
            MainForm._mainForm.MaintextBox2 = listView1.SelectedItems[0].Text;
            bFileOperate.AllPath            = file_path;
            bFileOperate.CreateFileDir("Hans_Wait", 1);
            bFileOperate.CreateFileDir("Hans_Test", 1);
            bFileOperate.CreateFileDir("Hans_Open", 1);
            bFileOperate.CreateFileDir("Hans_Pass", 1);
            bFileOperate.CreateFileDir("Hans_Clear", 1);
            MainForm._mainForm.WaitPath  = file_path + "\\" + "Hans_Wait";
            MainForm._mainForm.TestPath  = file_path + "\\" + "Hans_Test";
            MainForm._mainForm.OpenPath  = file_path + "\\" + "Hans_Open";
            MainForm._mainForm.PassPath  = file_path + "\\" + "Hans_Pass";
            MainForm._mainForm.ClearPath = file_path + "\\" + "Hans_Clear";
            OnTimerRun(null, null);
            MyTimer.Start();
            MainForm._mainForm.GetWTListView();
            string striName = FileOperate.inipath;

            if (striName.Contains("HansFPT"))
            {
                MainForm.blmanual = true;
            }
            // mForm.GetBatchFormTimer(MyTimer);
        }