Пример #1
0
 private void gotoAdressToolStripMenuItem_Click(object sender, EventArgs e)
 {
     GotoDialog dlg = new GotoDialog();
     DialogResult result = dlg.ShowDialog(this);
     if (result == DialogResult.OK)
     {
         if (dlg.radioBegin.Checked)
             hexBox.ScrollByteIntoView(dlg.offset);
         else if (dlg.radioHere.Checked)
             hexBox.ScrollByteIntoView(hexBox._bytePos + dlg.offset);
         else if (dlg.radioEnd.Checked)
             hexBox.ScrollByteIntoView(hexBox.ByteProvider.Length - dlg.offset);
     }
 }
Пример #2
0
        private int PromptForGotoOffset()
        {
            if (!RomDataPresent())
            {
                return(-1);
            }

            var go     = new GotoDialog(ViewOffset + table.CurrentCell.RowIndex, Project.Data);
            var result = go.ShowDialog();

            if (result != DialogResult.OK)
            {
                return(-1);
            }

            return(go.GetPcOffset());
        }
Пример #3
0
        private int PromptForGotoOffset()
        {
            if (!RomDataPresent())
            {
                return(-1);
            }

            var go     = new GotoDialog(SelectedOffset, Project.Data);
            var result = go.ShowDialog();

            if (result != DialogResult.OK)
            {
                return(-1);
            }

            return(go.GetPcOffset());
        }
Пример #4
0
        public void DoGotoLine()
        {
            var dlg = new GotoDialog();

            dlg.Owner = RootWindow;
            if (dlg.ShowDialog().Value)
            {
                var ed = IDEManager.Instance.CurrentEditor as EditorDocument;

                if (dlg.EnteredNumber >= ed.Editor.Document.LineCount)
                {
                    MessageBox.Show("Number must be a value between 0 and " + ed.Editor.Document.LineCount);
                    return;
                }

                ed.Editor.TextArea.Caret.Line = dlg.EnteredNumber;
                ed.Editor.TextArea.Caret.BringCaretToView();
            }
        }
Пример #5
0
        public void ShowGotoDialog()
        {
            var sci = Scintilla;

            if (sci == null)
            {
                return;
            }

            var d = new GotoDialog {
                Max = sci.LineCount, SelectedNumber = sci.CurrentLine + 1
            };

            if (d.ShowDialog((Form)App.GetService <IEnvironmentService>().GetMainWindow()) == DialogResult.OK)
            {
                sci.GotoLine(d.SelectedNumber - 1);
                sci.PutArrow(d.SelectedNumber - 1);
            }
        }
Пример #6
0
 public override void Run()
 {
     GotoDialog.ShowSingleInstance();
 }
Пример #7
0
        private void gotoAdressToolStripMenuItem_Click(object sender, EventArgs e)
        {
            GotoDialog dlg = new GotoDialog(this.hexBox);

            dlg.ShowDialog(this);
        }