public void Evaluate(string expression) { try { object result; bool result_set; ErrorStream.Clear(); string ret = this.Evaluator.Evaluate(expression, out result, out result_set); if (result_set) { if (result is ILScene) { Panel.Scene = (result as ILScene); } else { m_shell.WriteText(Environment.NewLine); m_shell.WriteText(result.ToString()); } } else if (ErrorStream.Length > 0) { m_shell.WriteError(ErrorStream.ToString()); } Panel.Configure(); Panel.Refresh(); } catch (Exception exc) { m_shell.WriteError(exc.ToString()); } }
public void Evaluate(string expression) { try { object result; bool result_set; ErrorStream.Clear(); string ret = this.Evaluator.Evaluate(expression, out result, out result_set); if (result_set) { if (result is ILScene) { if (m_cleanUpExample != null) { m_cleanUpExample(); m_cleanUpExample = null; } PanelForm.Panel.Scene = (result as ILScene); } else { m_shell.WriteText(Environment.NewLine); m_shell.WriteText(result.ToString()); } } else if (ErrorStream.Length > 0) { m_shell.WriteError(ErrorStream.ToString()); } PanelForm.Panel.Configure(); PanelForm.Panel.Refresh(); } catch (ArgumentException exc) { m_shell.WriteError(exc.Message.ToString()); } catch (ILNumerics.Exceptions.ILArgumentException exc) { m_shell.WriteError(exc.Message.ToString()); } catch (Exception exc) { m_shell.WriteError(exc.ToString()); } }