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); } }
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()); }
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()); }
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(); } }
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); } }
public override void Run() { GotoDialog.ShowSingleInstance(); }
private void gotoAdressToolStripMenuItem_Click(object sender, EventArgs e) { GotoDialog dlg = new GotoDialog(this.hexBox); dlg.ShowDialog(this); }