//public event CopyEventHandler CopyEvent; public MainWindow() { InitializeComponent(); // Setup the logger RosDiagnostics.SetupLogger(); RosDiagnostics.DebugTrace(RosDiagnostics.TraceType.Info, "Initialising application"); mSymbolContext = new SymbolContext(); RegisterControl(m_RegView); RegisterControl(m_BackTrace); RegisterControl(m_RawTraffic); RegisterControl(m_Locals); RegisterControl(m_MemoryWindow); RegisterControl(m_ProcThread); RegisterControl(m_Modules); RegisterControl(m_Breakpoints); m_Locals.Show(dockPanel, DockState.DockRight); m_RegView.Show(dockPanel, DockState.DockRight); m_Breakpoints.Show(dockPanel, DockState.DockRight); m_RegView.Activate(); m_BackTrace.Show(dockPanel, DockState.DockBottom); m_RawTraffic.Show(dockPanel); m_Modules.Show(dockPanel); m_ProcThread.Show(dockPanel); ReactOSWeb web = new ReactOSWeb(); web.Show(dockPanel); }
private void dockPanel_ActiveDocumentChanged(object sender, EventArgs e) { try { ToolWindow Wnd = (ToolWindow)dockPanel.ActiveDocument.DockHandler.Form; saveToolStripButton.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.Save); saveToolStripMenuItem.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.Save); saveAsToolStripMenuItem.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.SaveAs); printToolStripButton.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.Print); printToolStripMenuItem.Enabled = Wnd.IsCmdEnabled(ToolWindow.Commands.Print); } catch (NullReferenceException ex) { RosDiagnostics.DebugTrace(RosDiagnostics.TraceType.Exception, "Null reference : " + ex.Message); } catch (Exception) { RosDiagnostics.DebugTrace(RosDiagnostics.TraceType.Exception, "Unexpected error"); } }
private void MainWindowMDI_FormClosing(object sender, FormClosingEventArgs e) { RosDiagnostics.DebugTrace(RosDiagnostics.TraceType.Info, "Closing application"); mConnection.Close(true); SaveWindowSettings(); }