protected void Dispose(bool native) { if (_engine != null) { _engine.Dispose(); _engine = null; } }
public ProgramEditor() { InitializeComponent(); var syntax = Application.GetResourceStream(new Uri("pack://application:,,,/ECalc;component/Ecalc.xshd")); Editor.SyntaxHighlighting = HighlightingLoader.Load(new XmlTextReader(syntax.Stream), HighlightingManager.Instance); _engine = new IronPythonEngine.Engine(); _timer = new DispatcherTimer(); _timer.IsEnabled = false; _timer.Interval = TimeSpan.FromSeconds(1); _timer.Tick += _timer_Tick; }