private void RunThread() { var success = true; while (_running && success) { // invoke so that our listviews will get updated Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, (Action)(() => { success = CoreVm.Core.Tick(); if (CoreVm.IsBreakPoint()) { _running = false; } })); } }
private void Start() { ErrorMessages.Clear(); if (_programCode == null) { ErrorMessages.Add("No program was loaded!"); return; } try { // load the current program code to the arm core, also compile / link var cmdlist = ArmSimulator.LoadFile(_programCode); // set the commandlist to display it in the listview CoreVm.UpdateList(cmdlist); DebugMode = true; } catch (Exception ex) { ErrorMessages.Add(ex.Message); } }