Beispiel #1
0
 private void navigateToURL(string urlStr)
 {
     this.cmb_URL.Items.Add(this.cmb_URL.Text);
     if (urlStr == "")
     {
         urlStr = this.validateURL(this.cmb_URL.Text.ToLower());
         if (urlStr != "")
         {
             this.cmb_URL.Text = urlStr;
             this.btn_Browser_GoBack.Enabled    = true;
             this.btn_Browser_GoForward.Enabled = false;
             if (!this.urlHistoryDict.Keys.Contains(this.tabControl_Browser.TabIndex))
             {
                 this.urlHistoryDict.Add(this.tabControl_Browser.TabIndex, new BrowserHistory(this.getBrowserByTabIndex(this.tabControl_Browser.TabIndex)));
             }
             this.currentHistory = this.urlHistoryDict[this.tabControl_Browser.TabIndex];
             currentHistory.addHistory(urlStr);
         }
     }
     else
     {
         urlStr = this.validateURL(urlStr);
     }
     if (urlStr != "")
     {
         this.ucWBEx_Main.Url = new Uri(urlStr);
         this.tabControl_Browser.SelectedTab.Text = urlStr;
     }
 }
Beispiel #2
0
 public UCWebBrowser()
 {
     InitializeComponent();
     this.urlHistoryDict  = new Dictionary <int, BrowserHistory>();
     this.currentHistory  = new BrowserHistory(this.ucWBEx_Main);
     this.ucWBEx_Main.Url = new Uri("about:blank");
     this.Url             = "about:blank";
     this.tabControl_Browser.TabPages[0].Text = "about:blank";
 }
 public UCWebBrowser()
 {
     InitializeComponent();
     this.urlHistoryDict = new Dictionary<int, BrowserHistory>();
     this.currentHistory = new BrowserHistory(this.ucWBEx_Main);
     this.ucWBEx_Main.Url =new Uri("about:blank");
     this.Url = "about:blank";
     this.tabControl_Browser.TabPages[0].Text = "about:blank";
 }
Beispiel #4
0
 private void tabControl_Browser_TabIndexChanged(object sender, EventArgs e)
 {
     if (!this.urlHistoryDict.Keys.Contains(this.tabControl_Browser.TabIndex))
     {
         this.urlHistoryDict.Add(this.tabControl_Browser.TabIndex, new BrowserHistory(this.getBrowserByTabIndex(this.tabControl_Browser.TabIndex)));
     }
     this.currentHistory = this.urlHistoryDict[this.tabControl_Browser.TabIndex];
     this.cmb_URL.Text   = this.currentHistory.CurrentURLString;
     this.changeButtonState();
 }
 private void tabControl_Browser_TabIndexChanged(object sender, EventArgs e)
 {
     if (!this.urlHistoryDict.Keys.Contains(this.tabControl_Browser.TabIndex))
     {
         this.urlHistoryDict.Add(this.tabControl_Browser.TabIndex, new BrowserHistory(this.getBrowserByTabIndex(this.tabControl_Browser.TabIndex)));
     }
     this.currentHistory = this.urlHistoryDict[this.tabControl_Browser.TabIndex];
     this.cmb_URL.Text = this.currentHistory.CurrentURLString;
     this.changeButtonState();
 }
 private void navigateToURL(string urlStr)
 {
     this.cmb_URL.Items.Add(this.cmb_URL.Text);
     if (urlStr == "")
     {
         urlStr = this.validateURL(this.cmb_URL.Text.ToLower());
         if(urlStr != "")
         {
             this.cmb_URL.Text = urlStr;
             this.btn_Browser_GoBack.Enabled = true;
             this.btn_Browser_GoForward.Enabled = false;
             if (!this.urlHistoryDict.Keys.Contains(this.tabControl_Browser.TabIndex))
             {
                 this.urlHistoryDict.Add(this.tabControl_Browser.TabIndex, new BrowserHistory(this.getBrowserByTabIndex(this.tabControl_Browser.TabIndex)));
             }
             this.currentHistory = this.urlHistoryDict[this.tabControl_Browser.TabIndex];
             currentHistory.addHistory(urlStr);
         }
     }
     else
     {
         urlStr = this.validateURL(urlStr);
     }
     if (urlStr != "")
     {
         this.ucWBEx_Main.Url = new Uri(urlStr);
         this.tabControl_Browser.SelectedTab.Text = urlStr;
     }
 }