private void AnalyzeButton_Click(object sender, RibbonControlEventArgs e) { // check for debug easter egg if ((System.Windows.Input.Keyboard.Modifiers & System.Windows.Input.ModifierKeys.Alt) > 0) { current_workbook.DebugMode = true; } var sig = GetSignificance(this.SensitivityTextBox.Text, this.SensitivityTextBox.Label); if (sig == FSharpOption <double> .None) { return; } else { current_workbook.ToolSignificance = sig.Value; try { current_workbook.Analyze(WorkbookState.MAX_DURATION_IN_MS); current_workbook.Flag(); SetUIState(current_workbook); } catch (ExcelParserUtility.ParseException ex) { System.Windows.Forms.Clipboard.SetText(ex.Message); System.Windows.Forms.MessageBox.Show("Could not parse the formula string:\n" + ex.Message); return; } catch (System.OutOfMemoryException ex) { System.Windows.Forms.MessageBox.Show("Insufficient memory to perform analysis."); return; } } }