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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 697 - (hide annotations) (download)
Mon Jun 17 12:03:50 2013 UTC (7 years, 4 months ago) by william
File size: 2275 byte(s)

1 william 695 using System;
2     using System.Collections.Generic;
3     using System.ComponentModel;
4     using System.Data;
5     using System.Drawing;
6     using System.Linq;
7     using System.Text;
8     using System.Windows.Forms;
9     using WeifenLuo.WinFormsUI.Docking;
10 william 696 using RomCheater.Core;
11 william 697 using RomCheater.Logging;
12 william 695
13     namespace RomCheater.Docking
14     {
15 william 696 public partial class FloatingWebBrowser : DockContent, IWebBrowserInterface
16 william 695 {
17 william 696 private WebBrowserProvider BackingProvider = new WebBrowserProvider();
18 william 695 public FloatingWebBrowser()
19     {
20     InitializeComponent();
21 william 696 this.BackingProvider = new WebBrowserProvider(this.webBrowser);
22 william 697 init();
23 william 695 }
24 william 696
25    
26    
27     private void btnGo_Click(object sender, EventArgs e)
28     {
29 william 697 string url = txtWebAddress.Text;
30     this.Navigate(url);
31 william 696 }
32    
33    
34    
35    
36     public IWebBrowserInterface Provider
37     {
38     get { return this.BackingProvider; }
39     }
40    
41 william 697 private void init()
42     {
43     init_events();
44 william 696
45 william 697 lblWebAddress.Font = this.Font;
46     txtWebAddress.Font = this.Font;
47     btnGo.Font = this.Font;
48    
49     }
50    
51 william 696 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 william 695 }
86     }

  ViewVC Help
Powered by ViewVC 1.1.22