/[RomCheater]/trunk/RomCheater/Docking/FloatingWebBrowser.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingWebBrowser.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/FloatingWebBrowser.cs	2013/06/17 12:03:50	697
+++ trunk/RomCheater/Docking/FloatingWebBrowser.cs	2013/06/17 12:19:13	698
@@ -53,34 +53,45 @@
             this.webBrowser.Navigating += new WebBrowserNavigatingEventHandler(Provider_Navigating);
             this.webBrowser.Navigated += new WebBrowserNavigatedEventHandler(Provider_Navigated);
             this.webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(Provider_DocumentCompleted);
+            this.txtWebAddress.KeyDown += new KeyEventHandler(txtWebAddress_KeyDown);
         }
 
+      
 
         #region Provider Events
-        void Provider_Navigated(object sender, WebBrowserNavigatedEventArgs e)
+        void txtWebAddress_KeyDown(object sender, KeyEventArgs e)
         {
+            if (e.KeyCode == Keys.Enter)
+            {
+                string url = txtWebAddress.Text;
+                this.Navigate(url);
+            }
+        }
 
+        void Provider_Navigated(object sender, WebBrowserNavigatedEventArgs e)
+        {
+            logger.Debug.WriteLine("Navigated to Url: {0}", e.Url.ToString());
+            txtWebAddress.Text = e.Url.ToString();
         }
 
         void Provider_Navigating(object sender, WebBrowserNavigatingEventArgs e)
         {
-
+            logger.Debug.WriteLine("Navigating to Url: {0}", e.Url.ToString());
         }
         void Provider_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
         {
-            
+            logger.Debug.WriteLine("Loaded Document at Url: {0}", e.Url.ToString());
         }
         #endregion
 
         #region IWebBrowserInterface Members
         public void Navigate(string urlString)
         {
-            this.Provider.Navigate(urlString);
-        }
-        public void Navigate(Uri url)
-        {
-            this.Provider.Navigate(url);
+            this.Provider.Navigate(urlString);            
         }
+        public void Navigate(Uri url) { Navigate(url.ToString()); }
         #endregion
+
+      
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22