private void ShowMemoryControlRange(IStatusBarService sbSvc, AddressRange range) { if (range.Begin == null || range.End == null) { return; } if (range.Begin.ToLinear() == range.End.ToLinear()) //$REFACTOR: make bytespan a method of addressrange. { sbSvc.SetText(string.Format("[{0}]", range.Begin)); } else { sbSvc.SetText(string.Format("[{0}-{1}]", range.Begin, range.End)); } }
protected override void Execute() { if (_debuggerService.CurrentDebugger != null) { if (MessageBox.Show("Do you want to stop debugging?", "Debugging", MessageBoxButtons.YesNo) == DialogResult.No) { return; } _debuggerService.EndDebugging(); } _statusBarService.SetText(string.Format(CultureInfo.CurrentCulture, "Building {0}", _projectService.Project.ProjectName)); _assemblerService.AssemblerProjectFinished += AssemblerService_AssemblerProjectFinished; Task.Factory.StartNew(() => _assemblerService.AssembleProject(_projectService.Project)); }
private void Caret_PositionChanged(object sender, EventArgs e) { if (Document.TextLength == 0) { return; } Document.MarkerStrategy.RemoveAll(marker => marker is ReferenceMarker); if (_updateRefsTimer.Enabled) { _updateRefsTimer.Stop(); } _updateRefsTimer.Start(); _statusBarService.SetCaretPosition(ActiveTextAreaControl.Caret.Line, ActiveTextAreaControl.Caret.Column); UpdateCodeCountInfo(); CalcLocation label = _symbolService.ListTable.GetCalcLocation(new FilePath(FileName), ActiveTextAreaControl.Caret.Line + 1); if (label == null) { return; } string assembledInfo = string.Format("Page: {0} Address: {1}", label.Page, label.Address.ToString("X4")); _statusBarService.SetText(assembledInfo); }
public static void AddBreakpoint(FilePath fileName, int lineNumber) { WabbitcodeBreakpoint newBreak = new WabbitcodeBreakpoint(fileName, lineNumber); if (BreakList.Contains(newBreak)) { return; } BreakList.Add(newBreak); if (OnBreakpointAdded == null) { return; } var eventArgs = new WabbitcodeBreakpointEventArgs(newBreak); foreach (var addedDelegage in OnBreakpointAdded.GetInvocationList()) { var handler = (BreakpointAdded)addedDelegage; if (!eventArgs.Cancel) { handler(null, eventArgs); } } if (!eventArgs.Cancel) { return; } IStatusBarService statusBarService = DependencyFactory.Resolve <IStatusBarService>(); statusBarService.SetText("A breakpoint could not be set at this location"); }
private void ShowMemoryControlRange(IStatusBarService sbSvc, AddressRange range) { if (range.Begin == null || range.End == null) return; if (range.Begin.ToLinear() == range.End.ToLinear()) //$REFACTOR: make bytespan a method of addressrange. { sbSvc.SetText(string.Format("[{0}]", range.Begin)); } else { sbSvc.SetText(string.Format("[{0}-{1}]", range.Begin, range.End)); } }