private void Results_Load(object sender, EventArgs e)
        {
            try
            {
                _cfg = MailCountAddIn2010.Config.Singleton;
                webBrowser1.ScriptErrorsSuppressed = !_cfg.ShowErrors;

                Uri u = new Uri(new Uri(_cfg.ApiUri), "en/" +
                                _cfg.TrackReceivedEmailsToken + "?v=widget");

                if (_cfg.ShowDebug)
                {
                    MessageBox.Show(String.Format(
                                        "Show received e-mails result widget from URL {0}", u),
                                    MailCountAddIn2010.Config.PROD_SHORT_NAME,
                                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                webBrowser1.Navigate(u);
            }
            catch (System.Exception ex)
            {
                if (_cfg.ShowErrors)
                {
                    MessageBox.Show("Error occurred while showing results\r\n\r\n" +
                                    ex.ToString(),
                                    MailCountAddIn2010.Config.PROD_SHORT_NAME + " error",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Ejemplo n.º 2
0
        public Config(MailCountAddIn2010.Config Configuration)
        {
            _cfg = Configuration;

            InitializeComponent();

            this.Text = String.Format("Configure {0}", Tools.AssemblyTitle);
        }