void showhex() { if (bm != null) { HexView hv = null; foreach (IDockContent d in dockPanel.Documents) { if (d.GetType() == typeof(HexView)) { hv = (HexView)d; break; } } if (hv == null) { hv = new HexView(); } hv.setdata(bm.getoutput()); hv.MdiParent = this; hv.DockPanel = this.dockPanel; hv.Show(); } }
private void importHEXToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog dialog = new OpenFileDialog(); dialog.Filter = "Hex files (*.hex)|*.hex"; dialog.Title = "Load HEX file"; if (dialog.ShowDialog() == DialogResult.OK) { IntelHex.IntelHex ih = new IntelHex.IntelHex(); ih.load(dialog.FileName); HexView hv = new HexView(); hv.setdata(ih.rom); hv.MdiParent = this; hv.DockPanel = this.dockPanel; hv.Show(); } }
void showhex() { if (bm != null) { HexView hv = null; foreach (IDockContent d in dockPanel.Documents) { if(d.GetType() == typeof(HexView)) { hv = (HexView)d; break; } } if(hv==null) hv = new HexView(); hv.setdata(bm.getoutput()); hv.MdiParent = this; hv.DockPanel = this.dockPanel; hv.Show(); } }