示例#1
0
 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();
 }
示例#2
0
 private void OnProgramChanged()
 {
     if (program != null)
     {
         Model   = new MixedCodeDataModel(program);
         addrTop = (Address)Model.CurrentPosition;
     }
     else
     {
         Model   = new EmptyEditorModel();
         addrTop = null;
     }
 }
示例#3
0
 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;
 }
示例#4
0
 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;
 }
示例#5
0
 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();
 }