Exemplo n.º 1
0
        public void Exec(OpenCoverModel.ExeModel model, LibClass.OpenCoverModel.GlobalModel globalModel)
        {
            TransfEvent("EXE模式,执行文件" + model.FileName);
            string fileName = Path.GetFileNameWithoutExtension(model.Target);
            string sOutput  = model.OutPut + "\\" + fileName;

            XMLEvent(sOutput + "\\" + fileName + ".xml");
            if (!Directory.Exists(sOutput))
            {
                Directory.CreateDirectory(sOutput);
            }
            string sShell = string.Format(sExecShell, globalModel.OpenCover, model.Target, sOutput + "\\" + fileName + ".xml", model.TargetDir);
            Thread thread = new Thread(ThreadExec);

            thread.IsBackground = true;
            thread.Start(sShell);
        }
Exemplo n.º 2
0
 private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     CodeAnalysis.LibClass.OpenCoverModel.ExeModel model = new LibClass.OpenCoverModel.ExeModel();
     foreach (CodeAnalysis.LibClass.OpenCoverModel.ExeModel item in list)
     {
         if (item.FileName == listBox1.SelectedItem.ToString())
         {
             model = item;
         }
     }
     textBox1.Text = model.Target;
     textBox2.Text = model.OutPut;
     if (listBox1.SelectedItem.ToString() == "增加+")
     {
         button3.Text = "保存";
     }
     else
     {
         button3.Text = "修改";
     }
 }