Inheritance: DhtWalker2.MainUI
Exemple #1
0
        public static void Main(string[] args)
        {
            MainUI ui;

            ResolveArgs(args);
            if (!NoLog)
            {
                Trace.Listeners.Add(new TextWriterTraceListener(string.Format("spider.{0}.log", DateTime.Now.ToBinary())));
            }
            if (Console)
            {
                ui = new MainConsole();
                Trace.Listeners.Add(new ConsoleTraceListener());
            }
            else
            {
                ui = new MainWindow();
            }
            ui.Run();
        }
Exemple #2
0
        public static void Main(string[] args)
        {
            Parser.Default.ParseArguments <Options>(args).WithParsed <Options>(o => options = o);

            MainUI ui;

            //ResolveArgs(args);
            if (!options.NoLog)
            {
                Trace.Listeners.Add(new TextWriterTraceListener(string.Format("spider.{0}.log", DateTime.Now.ToBinary())));
            }
            if (options.Console)
            {
                ui = new MainConsole();
                Trace.Listeners.Add(new ConsoleTraceListener());
            }
            else
            {
                ui = new MainWindow();
            }
            ui.Run();
        }