コード例 #1
0
        static void Main(string[] args)
        {
            var arguments = new ConsoleSwitches(args);

            RunAction(() =>
            {
                StartBatchProcessing(arguments);
                StartWindowsForms(arguments);
            });
        }
コード例 #2
0
        static void StartBatchProcessing(ConsoleSwitches arguments)
        {
            if (!arguments.RunBatch)
            {
                return;
            }
            var log = new ConsoleLog();

            AllocConsole();
            log.WriteInformation("Starting batch processing");
            var batcher = new BatchProcessing(log);

            batcher.DoFolder(arguments.Folder, arguments.Filter);
            log.WriteInformation("Starting batch completed");
        }
コード例 #3
0
 /// <summary>
 /// Executes an action on the application
 /// </summary>
 /// <param name="arguments"></param>
 static void StartWindowsForms(ConsoleSwitches arguments)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new MainForm());
 }