Example #1
0
        private void 登录ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmWebBrowser frm = new FrmWebBrowser();

            frm.Url = "https://passport.suning.com/ids/login?service=https%3A%2F%2Floginst.suning.com%2F%2Fauth%3FtargetUrl%3Dhttps%253A%252F%252Fwww.suning.com%252F%253Futm_source%253Dbaidu%2526utm_medium%253Dbrand%2526utm_campaign%253Dtitle%2526utm_term%253Dbrand&method=GET&loginTheme=b2c";
            frm.ShowDialog();
        }
Example #2
0
        private void LoadBrowserTab(string url = "", bool navigate = false)
        {
            //this.browsingNow = url;
            //if (IsOpenedBefore(TabPageType.Browser))
            //{
            //    flashTabpage("Browser",true);
            //  //  int broth = BrotherIndex(TabPageType.Browser);
            //    return;
            //}
            TabPage tp = new TabPage();

            tp.Text        = "Browser";
            tp.ToolTipText = TabPageType.Browser.ToString();
            tp.Name        = "Browser";//h.Id;

            Panel cont = new Panel();

            cont.Dock = DockStyle.Fill;

            tabControl1.TabPages.Add(tp);
            int selind = tabControl1.TabCount - 1;

            FrmWebBrowser objForm = new FrmWebBrowser(url); objForm.Owner = this;

            this.IsMdiContainer = true;
            objForm.TopLevel    = false;


            this.tabControl1.TabPages[selind].Controls.Clear();

            this.tabControl1.TabPages[selind].Controls.Add(cont);
            this.tabControl1.TabPages[selind].Controls[0].Controls.Add(objForm);
            objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            objForm.Dock            = DockStyle.Fill;
            objForm.Show();

            if (navigate)
            {
                tabControl1.SelectedIndex = selind;
            }
        }