Exemple #1
0
        private void runSelectedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //TODO: Do we want to auto-select the first set of tests?
            if (!Run(rulesTreeView.Nodes))
            {
                RuleBase rule = rulesTreeView.SelectedNode as RuleBase;
                if (rule != null)
                {
                    rule.Run(this);
                }
            }
            toolStripProgressBar.Maximum = tasks.Count;
            toolStripProgressBar.Value   = 0;
            toolStripProgressBar.Enabled = true;
            toolStripProgressBar.Style   = ProgressBarStyle.Marquee;

            runSelectedToolStripMenuItem.Enabled = false;
            optionsToolStripMenuItem.Enabled     = false;
            reportToolStripMenuItem.Enabled      = false;
            backgroundWorker.RunWorkerAsync();
        }
Exemple #2
0
        public MessageInfo[] Run(string path)
        {
            RuleBase rule = form.GetRule(path);

            if (rule == null)
            {
                return(null);
            }

            rule.Run(form);

            var res = new List <MessageInfo>();

            foreach (Message m in form.Messages)
            {
                Console.WriteLine(m);
                res.Add(new MessageInfo(m));
            }
            form.Messages.Clear();

            return(res.ToArray());
        }