Exemplo n.º 1
0
        void ScanAsync(string arg, Settings sets)
        {
            var content     = PanelContent;
            var outRedirect = new ConsoleSetOut(content.content)
            {
                Directory = sets.Directory
            };

            outRedirect.WriteLine(sets.Directory + ">" + (arg ?? ""));

            if (!string.IsNullOrWhiteSpace(arg))
            {
                var scannner = new ConsoleCmd();
                try
                {
                    scannner.Go(new[] { sets.Directory, arg });
                }
                catch (Exception ex)
                {
                    outRedirect.WriteLine("Error " + ex.Message);
                    // System.Windows.MessageBox.Show("Error " + ex.Message);
                }
            }
            outRedirect.Dispose();
        }
Exemplo n.º 2
0
    public static int Main()
    {
        ConsoleSetOut test = new ConsoleSetOut();

        TestLibrary.TestFramework.BeginTestCase("ConsoleSetOut");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return(100);
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return(0);
        }
    }
Exemplo n.º 3
0
    public static int Main()
    {
        ConsoleSetOut test = new ConsoleSetOut();

        TestLibrary.TestFramework.BeginTestCase("ConsoleSetOut");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }