/// <summary> /// /// </summary> /// <param name="args"></param> static int Main(string[] args) { var handle = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle; SetConsoleMode(handle, ENABLE_EXTENDED_FLAGS); try { CommandLineProcessor.ProcessCommandLineArguments(args, m_config); var controller = new AnalysisController(); var result = controller.StartMultiAlign(m_config, m_reportCreator); if (result != 0) { Logger.PrintMessage(""); Logger.PrintMessage("ANALYSIS FAILED"); } else { Logger.PrintMessage(""); Logger.PrintMessage("ANALYSIS SUCCESS"); } return result; } catch (Exception ex) { Logger.PrintMessage("Unhandled Error: " + ex.Message); var innerEx = ex.InnerException; while (innerEx != null) { Logger.PrintMessage("Inner Exception: " + innerEx.Message); innerEx = innerEx.InnerException; } Logger.PrintMessage("Stack: " + ex.StackTrace); Logger.PrintMessage(""); Logger.PrintMessage("ANALYSIS FAILED"); return 1; } }
public void Start(AnalysisConfig config) { // Set the messages Messages.Clear(); GalleryImages.Clear(); IsAnalysisRunning = true; Reporter.Config = config; m_configuration = config; Controller = new AnalysisController(); Controller.AnalysisComplete += Controller_AnalysisComplete; Controller.AnalysisError += Controller_AnalysisError; Controller.AnalysisCancelled += Controller_AnalysisCancelled; Controller.AnalysisStarted += ControllerOnAnalysisStarted; // Start the analysis. Controller.StartMultiAlignGui(config, this); }