Example #1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Application.ThreadException +=
                new ThreadExceptionEventHandler(Application_ThreadException);

            AppDomain.CurrentDomain.UnhandledException +=
                new UnhandledExceptionEventHandler(AppDomain_UnhandledException);

            // For manual positioning of the form.
            MainForm form = new MainForm();
            form.StartPosition = FormStartPosition.Manual;

            try
            {
                Application.Run(form);
            }
            catch (Exception exc)
            {
                LogView.LogToFile("Unhandled Run Exception:\n" + exc.ToString());

                DialogResult result = MessageBox.Show(
                    "Unhandled Run Exception:\n" + exc.ToString() +
                    "\nApplication will exit..",
                    "Fatal Application Exception",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Exclamation);
            }
        }
Example #2
0
        internal WindowManager(MainForm form, DockPanel dockPanel, StatusStrip statusStrip, MenuStrip menuStrip)
        {
            _mainForm = form;

            _dockPanel = dockPanel;

            _statusManager = new StatusManager(this, statusStrip);
            _menuManager = new MenuManager(this, menuStrip);

            _logView = new LogView(this);
            _projectBrowser = new ProjectBrowser(this);
            _projectBrowser.OnFilesChanged += new EventHandler(_projectBrowser_OnFilesChanged);
            _favouritesBrowser = new FavouritesBrowser(this);
            _historyBrowser = new HistoryBrowser(this);
        }