Exemplo n.º 1
0
        void TryToStartNavBot()
        {
            try
            {
                server              = new PageServer();
                server.ReportError += new PageServer.ErrorMessageHandler(ReportError);
                server.AddPage(new WelcomePage());
                //server.AddPage(new HelpPage());
                server.AddPage(new SearchPage(new TradeFinderFactory(eveDirectory.Text)));
                server.AddPage(new ReportsPage(new TradeFinderFactory(eveDirectory.Text)));

                try
                {
                    Clipboard.SetText(ConfigurationSettings.AppSettings["URLPrefix"]);
                }
                catch (Exception)
                {
                }

                notifyIcon.Visible = true;
                Hide();
                notifyIcon.ShowBalloonTip(7000);
            }
            catch (PlatformNotSupportedException e)
            {
                WindowState = FormWindowState.Normal;
                if (server != null)
                {
                    server.Close();
                }
                ReportError("Sorry, NavBot requires Windows XP SP2, Windows Vista or Windows Server 2003 to run.\nNo, really, I *am* sorry, but Microsoft simply doesn't support the HttpListener class on anything else.", e.ToString());
            }
            catch (Exception e)
            {
                WindowState = FormWindowState.Normal;
                if (server != null)
                {
                    server.Close();
                    ReportError("Are you sure EVE stores your market logs in \"" + eveDirectory.Text + "\"?\nIf so, then something else has gone wrong.\nI've put some extra error information in your clipboard - if you send it to Tejar then he'll do his best to help you.", e.ToString());
                }
                else
                {
                    ReportError("Is another copy of NavBot already running? If not, try restarting or send an EVE mail to Tejar for help. \nI've put some extra error information in your clipboard that you can send to him.", e.ToString());
                }
            }
        }
Exemplo n.º 2
0
        void TryToStartNavBot()
        {
            try
            {
                server = new PageServer();
                server.ReportError += new PageServer.ErrorMessageHandler(ReportError);
                server.AddPage(new WelcomePage());
                //server.AddPage(new HelpPage());
                server.AddPage(new SearchPage(new TradeFinderFactory(eveDirectory.Text)));
                server.AddPage(new ReportsPage(new TradeFinderFactory(eveDirectory.Text)));

                try
                {
                    Clipboard.SetText(ConfigurationSettings.AppSettings["URLPrefix"]);
                }
                catch (Exception)
                {
                }

                notifyIcon.Visible = true;
                Hide();
                notifyIcon.ShowBalloonTip(7000);
            }
            catch (PlatformNotSupportedException e)
            {
                WindowState = FormWindowState.Normal;
                if (server != null)
                {
                    server.Close();
                }
                ReportError("Sorry, NavBot requires Windows XP SP2, Windows Vista or Windows Server 2003 to run.\nNo, really, I *am* sorry, but Microsoft simply doesn't support the HttpListener class on anything else.", e.ToString());
            }
            catch (Exception e)
            {
                WindowState = FormWindowState.Normal;
                if (server != null)
                {
                    server.Close();
                    ReportError("Are you sure EVE stores your market logs in \"" + eveDirectory.Text + "\"?\nIf so, then something else has gone wrong.\nI've put some extra error information in your clipboard - if you send it to Tejar then he'll do his best to help you.", e.ToString());
                }
                else
                {
                    ReportError("Is another copy of NavBot already running? If not, try restarting or send an EVE mail to Tejar for help. \nI've put some extra error information in your clipboard that you can send to him.", e.ToString());
                }
            }
        }
Exemplo n.º 3
0
        private void showToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (server != null)
            {
                server.Close();
            }

            Show();
            WindowState = FormWindowState.Normal;
        }