Example #1
0
        public frmGoToLine(GoToAddress address)
        {
            InitializeComponent();

            Entity = address;
            AddBinding("Address", txtAddress);
        }
Example #2
0
        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);
            }
        }
        public frmGoToLine(GoToAddress address, int charLimit)
        {
            InitializeComponent();

            Entity = address;
            AddBinding("Address", txtAddress);

            txtAddress.MaxLength = charLimit;
        }
Example #4
0
        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);
                }
            }
        }
Example #5
0
        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);
                }
            }
        }
Example #6
0
        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);
            }
        }