private void DisplayWatchExpression(GridEXRow watchRow) { NuGenIValueFormatter watchValueFormatter = null; NuGenExpressionValueRefresher expressionRefresher = null; try { NuGenParser parser = new NuGenParser(); string watchExpression = (string)watchRow.Cells[0].Value; List <NuGenBaseExpression> expressions = parser.Parse(watchExpression); expressionRefresher = new NuGenExpressionValueRefresher(expressions, ActiveFrameRefresher, EvaluationContext.EvaluationHandler, watchExpression); watchValueFormatter = ValueDisplayer.CreateSimpleFormatter(expressionRefresher.GetRefreshedValue()); } catch (NuGenParserException parserException) { watchValueFormatter = new NuGenErrorValueFormatter("Parser exception", parserException.Message); } catch (NuGenEvaluationException evaluationException) { watchValueFormatter = new NuGenErrorValueFormatter("Evaluation exception", evaluationException.Message); } catch (NuGenEvaluationHandlerException evaluationHandlerException) { watchValueFormatter = new NuGenErrorValueFormatter("Evaluation running exception", evaluationHandlerException.Message); } catch (NugenMissingModuleException missingModuleException) { watchValueFormatter = new NuGenMissingModuleFormatter(missingModuleException.MissingModule); } catch (InvalidOperationException invalidOperationException) { watchValueFormatter = new NuGenErrorValueFormatter("Evaluation exception", invalidOperationException.Message); } catch (Exception exception) { watchValueFormatter = new NuGenErrorValueFormatter("Unexpected exception", exception.Message); } if (watchValueFormatter != null) { watchValueFormatter.ValueRefresher = expressionRefresher; watchRow.Cells[1].Value = watchValueFormatter.GetFormattedString(NuGenSettings.Instance.DisplayHexaNumbers); NuGenHelperFunctions.TaggedObjects[(int)watchRow.Cells[2].Value] = watchValueFormatter; } }
private void DisplayWatchExpression(GridEXRow watchRow) { NuGenIValueFormatter watchValueFormatter = null; NuGenExpressionValueRefresher expressionRefresher = null; try { NuGenParser parser = new NuGenParser(); string watchExpression = (string)watchRow.Cells[0].Value; List<NuGenBaseExpression> expressions = parser.Parse(watchExpression); expressionRefresher = new NuGenExpressionValueRefresher(expressions, ActiveFrameRefresher, EvaluationContext.EvaluationHandler, watchExpression); watchValueFormatter = ValueDisplayer.CreateSimpleFormatter(expressionRefresher.GetRefreshedValue()); } catch (NuGenParserException parserException) { watchValueFormatter = new NuGenErrorValueFormatter("Parser exception", parserException.Message); } catch (NuGenEvaluationException evaluationException) { watchValueFormatter = new NuGenErrorValueFormatter("Evaluation exception", evaluationException.Message); } catch (NuGenEvaluationHandlerException evaluationHandlerException) { watchValueFormatter = new NuGenErrorValueFormatter("Evaluation running exception", evaluationHandlerException.Message); } catch (NugenMissingModuleException missingModuleException) { watchValueFormatter = new NuGenMissingModuleFormatter(missingModuleException.MissingModule); } catch (InvalidOperationException invalidOperationException) { watchValueFormatter = new NuGenErrorValueFormatter("Evaluation exception", invalidOperationException.Message); } catch (Exception exception) { watchValueFormatter = new NuGenErrorValueFormatter("Unexpected exception", exception.Message); } if (watchValueFormatter != null) { watchValueFormatter.ValueRefresher = expressionRefresher; watchRow.Cells[1].Value = watchValueFormatter.GetFormattedString(NuGenSettings.Instance.DisplayHexaNumbers); NuGenHelperFunctions.TaggedObjects[(int)watchRow.Cells[2].Value] = watchValueFormatter; } }