static void Main(string[] args) { var arguments = new ConsoleSwitches(args); RunAction(() => { StartBatchProcessing(arguments); StartWindowsForms(arguments); }); }
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"); }
/// <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()); }