private void traiteLectureVariable(LectureVariable lectureVariable) { Variable variableAAffecter = this.rechercheLaVariableDeNom(lectureVariable.obtenirNomVariable()); if (variableAAffecter == null) { this.GUI.avertirNomDeVariableInexistant(lectureVariable.obtenirNomVariable()); this.backgroundWorker.CancelAsync(); return; } String expressionAEvaluer; while (true) { try { this.GUI.afficheFenetreLireVariable(lectureVariable.obtenirNomVariable()); expressionAEvaluer = this.GUI.obtenirValeurLireVariable(); this.remplaceValeurDesVariables(ref expressionAEvaluer); double resultatExpression = Convert.ToDouble(new Expression(expressionAEvaluer).Evaluate()); variableAAffecter.changerValeur(resultatExpression); return; } catch (Exception e) { continue; } } }