private void updateTaskPaneControlFromFormula() { RuleListFormulaParser parser = new RuleListFormulaParser((String)selection.Formula); if (!parser.isCorrectlyFormatted()) { // TODO fail gracefully System.Windows.Forms.MessageBox.Show(parser.ParseException.ToString()); return; } updateRulesPane(parser.Result); }
public bool taskPaneControlMatches(Range changed) { RuleListFormulaParser parser = new RuleListFormulaParser((String)changed.Formula); if (!parser.isCorrectlyFormatted()) { return(false); // an incorrectly parsed formula can only come from outside } else { return(parser.Result.Equals(getShownRuleList())); } }