Exemple #1
0
        private void RunAndShow(OutputWindow output)
        {
            output.Show();
            output.Activate();
            Application.DoEvents(); //huh?
            var run = options.Run();

            scheme = run ? ColorScheme.Green : ColorScheme.Red;
            scheme.ApplyToMain(this);
            output.ShowText(run);
            semaphore.ShowResult(run);
            this.RunSound(run);
        }
Exemple #2
0
        private void Run()
        {
            var list = new ArrayList(Application.OpenForms);
            foreach (Form form in list)
                if (form is OutputWindow && !form.IsDisposed)
                    form.Close();

            var output = new OutputWindow();
            options.Write += s => output.Write(s);
            RunAndShow(output);
        }