//----------------------------------------------------------------------------- public void openFile(String filename) { fluoroStatusLabel.Text = "Loading..."; closeFile(); try { fscope.openSourceFile(filename); } catch (Win32ReadException e) { String msg = "unable to load " + filename + "\n" + e.Message; MessageBox.Show(msg, "read error", MessageBoxButtons.OK, MessageBoxIcon.Error); fluoroStatusLabel.Text = ""; return; } Point panelPos = new Point(0, 0); foreach (Section section in fscope.winexe.sections) { SectionPanel panel = new SectionPanel(this, section); sections.Add(panel); panel.Location = panelPos; fCanvas.Controls.Add(panel); panel.Show(); panelPos.Offset(0, panel.Height); } this.ClientSize = new Size(fCanvas.Width + 20, fCanvas.Height + fluoroMenu.Height + fluoroToolStrip.Height + fluoroStatus.Height + 20); Text = "Fluoroscope [" + filename + "]"; fluoroStatusLabel.Text = ""; exeHdrViewMenuItem.Enabled = true; exehdrToolStripButton.Enabled = true; }
public ActionResult CreateSectionPanel(SectionPanel section) { if (ModelState.IsValid) { respository.AddSectionPanel(section); return(RedirectToAction("Index")); } return(View(section)); }
public FluoroWindow() { fscope = new Fluoroscope(this); InitializeComponent(); sections = new List <SectionPanel>(); selectedSection = null; currentPath = null; }
public void setSelectedSections(SectionPanel selected) { if (selected != selectedSection) { if (selectedSection != null) { selectedSection.setSelcted(false); } selectedSection = selected; selectedSection.setSelcted(true); dataToolStripButton.Enabled = true; dataViewMenuItem.Enabled = true; bool codesec = selectedSection.section.isCode(); codeViewMenuItem.Enabled = codesec; codeToolStripButton.Enabled = codesec; } }