Ejemplo n.º 1
0
        public override void Execute(ReportInfo RI)
        {
            try
            {
                ActScript act      = new ActScript();
                string    FileName = ScriptFileName.Replace(@"~\", SolutionFolder);
                if (string.IsNullOrEmpty(SolutionFolder))
                {
                    Errors = "Script path not provided.";
                    Status = eRunSetActionStatus.Failed;
                    return;
                }
                if (!System.IO.File.Exists(FileName))
                {
                    Errors = "File Not found: " + FileName;
                    Status = eRunSetActionStatus.Failed;
                    return;
                }

                act.ScriptName            = FileName;
                act.ScriptInterpreterType = ActScript.eScriptInterpreterType.VBS;
                act.Execute();
                this.Errors = act.Error;
            }
            catch (Exception ex)
            {
                Errors = ex.Message.ToString();
                Status = eRunSetActionStatus.Failed;
            }
        }
Ejemplo n.º 2
0
 private void FillScriptsCombo()
 {
     string[] Files = Directory.GetFiles(SnippestFolder);
     foreach (string ScriptFileName in Files)
     {
         //Show only the file name
         ScriptSnippestComboBox.Items.Add(ScriptFileName.Replace(SnippestFolder, ""));
     }
 }