/[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

revision 695 by william, Mon Jun 17 10:53:53 2013 UTC revision 697 by william, Mon Jun 17 12:03:50 2013 UTC
# Line 7  using System.Linq; Line 7  using System.Linq;
7  using System.Text;  using System.Text;
8  using System.Windows.Forms;  using System.Windows.Forms;
9  using WeifenLuo.WinFormsUI.Docking;  using WeifenLuo.WinFormsUI.Docking;
10    using RomCheater.Core;
11    using RomCheater.Logging;
12    
13  namespace RomCheater.Docking  namespace RomCheater.Docking
14  {  {
15      public partial class FloatingWebBrowser : DockContent      public partial class FloatingWebBrowser : DockContent, IWebBrowserInterface
16      {      {
17            private WebBrowserProvider BackingProvider = new WebBrowserProvider();
18          public FloatingWebBrowser()          public FloatingWebBrowser()
19          {          {
20              InitializeComponent();              InitializeComponent();
21                this.BackingProvider = new WebBrowserProvider(this.webBrowser);
22                init();
23          }          }
24    
25        
26    
27            private void btnGo_Click(object sender, EventArgs e)
28            {
29                string url = txtWebAddress.Text;
30                this.Navigate(url);
31            }
32    
33    
34    
35    
36            public IWebBrowserInterface Provider
37            {
38                get { return this.BackingProvider; }
39            }
40    
41            private void init()
42            {
43                init_events();
44    
45                lblWebAddress.Font = this.Font;
46                txtWebAddress.Font = this.Font;
47                btnGo.Font = this.Font;
48    
49            }
50    
51            private void init_events()
52            {
53                this.webBrowser.Navigating += new WebBrowserNavigatingEventHandler(Provider_Navigating);
54                this.webBrowser.Navigated += new WebBrowserNavigatedEventHandler(Provider_Navigated);
55                this.webBrowser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(Provider_DocumentCompleted);
56            }
57    
58    
59            #region Provider Events
60            void Provider_Navigated(object sender, WebBrowserNavigatedEventArgs e)
61            {
62    
63            }
64    
65            void Provider_Navigating(object sender, WebBrowserNavigatingEventArgs e)
66            {
67    
68            }
69            void Provider_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
70            {
71                
72            }
73            #endregion
74    
75            #region IWebBrowserInterface Members
76            public void Navigate(string urlString)
77            {
78                this.Provider.Navigate(urlString);
79            }
80            public void Navigate(Uri url)
81            {
82                this.Provider.Navigate(url);
83            }
84            #endregion
85      }      }
86  }  }

Legend:
Removed from v.695  
changed lines
  Added in v.697

  ViewVC Help
Powered by ViewVC 1.1.22