public void GoToAddress() { GoToAddress address = new GoToAddress(); int currentAddr = this.CurrentLine; int lineIndex = this.ctrlTextbox.SelectionStart; while (currentAddr < 0) { lineIndex++; currentAddr = this.ctrlTextbox.GetLineNumber(lineIndex); } address.Address = (UInt32)currentAddr; frmGoToLine frm = new frmGoToLine(address); frm.StartPosition = FormStartPosition.Manual; Point topLeft = this.PointToScreen(new Point(0, 0)); frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2); if (frm.ShowDialog() == DialogResult.OK) { this.ctrlTextbox.ScrollToLineNumber((int)address.Address); } }
private void GoToAddress() { GoToAddress address = new GoToAddress(); using (frmGoToLine frm = new frmGoToLine(address, _cpuType.GetAddressSize())) { frm.StartPosition = FormStartPosition.CenterParent; if (frm.ShowDialog(ctrlDisassemblyView) == DialogResult.OK) { ctrlDisassemblyView.ScrollToAddress(address.Address); } } }
private void GoToAddress() { GoToAddress address = new GoToAddress(); using (frmGoToLine frm = new frmGoToLine(address, _cpuType == CpuType.Spc ? 4 : 6)) { frm.StartPosition = FormStartPosition.CenterParent; if (frm.ShowDialog(ctrlDisassemblyView) == DialogResult.OK) { ctrlDisassemblyView.GoToAddress((int)address.Address); } } }
public void GoToAddress() { GoToAddress address = new GoToAddress(); address.Address = (UInt32)this.CurrentLine; frmGoToLine frm = new frmGoToLine(address); frm.StartPosition = FormStartPosition.Manual; Point topLeft = this.PointToScreen(new Point(0, 0)); frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2); if (frm.ShowDialog() == DialogResult.OK) { this.ctrlTextbox.ScrollToLineNumber((int)address.Address); } }