void DisassemblyControl_StateChange(object sender, EventArgs e) { if (program == null || topAddress == null) { Model = new EmptyEditorModel(); } else { ImageSegment segment; if (!program.SegmentMap.TryFindSegment(topAddress, out segment) || segment.MemoryArea == null) { Model = new EmptyEditorModel(); } else { var addr = topAddress; this.dasmModel = new DisassemblyTextModel(program, segment); Model = dasmModel; Model.MoveToLine(addr, 0); } } RecomputeLayout(); base.UpdateScrollbar(); }
private void OnProgramChanged() { if (program != null) { Model = new MixedCodeDataModel(program); addrTop = (Address)Model.CurrentPosition; } else { Model = new EmptyEditorModel(); addrTop = null; } }
private void OnProgramChanged() { try { if (program != null) { Model = new MixedCodeDataModel(program); addrTop = Model.CurrentPosition as Address; return; } } catch (Exception ex) { Services.RequireService <IDiagnosticsService>().Error(ex, "An error occurred while displaying the program."); } Model = new EmptyEditorModel(); addrTop = null; }
private void OnProgramChanged() { try { if (program != null) { Model = new MixedCodeDataModel(program); addrTop = Model.CurrentPosition as Address; return; } } catch (Exception ex) { Services.RequireService<IDiagnosticsService>().Error(ex, "An error occurred while displaying the program."); } Model = new EmptyEditorModel(); addrTop = null; }
void DisassemblyControl_StateChange(object sender, EventArgs e) { if (program == null || topAddress == null) { Model = new EmptyEditorModel(); } else { ImageSegment segment; if (!program.SegmentMap.TryFindSegment(topAddress, out segment) || segment.MemoryArea == null) { Model = new EmptyEditorModel(); } else { var addr = topAddress; Model = new DisassemblyTextModel(program, segment); Model.MoveToLine(addr, 0); } } RecomputeLayout(); base.UpdateScrollbar(); }