private void SiTest() { SITest siTest = new SITest(_switch, _iAnalyzer, _information); Savepath savepath = new Savepath(); if (SetTestFilePath(ref savepath)) { siTest.DoTest(_testConfigs, _chartDic, _aChart, _formUi, _spec, _keyPoint, savepath, _curretnProject.Report); } ControlSafe.SetcontrolEnable(btnTest, true); }
private bool SetTestFilePath(ref Savepath savepath) { if (txtSN.Text.Trim() == "") { AddStatus("SN不能为空"); Ui.MessageBoxMuti("SN为空,请输入SN"); return(false); } else { string pn = Convert.SlashRepalce(txt_PN.Text.Trim()); string sn = Convert.SlashRepalce(txtSN.Text.Trim()); savepath.SnpFilePath = _hardware.SnpFolder + "\\" + pn + "\\" + sn; savepath.TxtFilePath = _hardware.TxtFolder + "\\" + pn + "\\" + sn; savepath.Sn = sn; savepath.XmlPath = _hardware.TxtFolder + "\\" + pn + "\\" + sn + "\\txt\\1\\Result & Sample info.xml"; savepath.ReportTempletePath = _curretnProject.ReportTempletePath; Directory.CreateDirectory(savepath.SnpFilePath); Directory.CreateDirectory(savepath.TxtFilePath); return(true); } }