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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

1 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 using RomCheater.Core;
11 using RomCheater.Logging;
12
13 namespace RomCheater.Docking
14 {
15 public partial class FloatingWebBrowser : DockContent, IWebBrowserInterface
16 {
17 private WebBrowserProvider BackingProvider = new WebBrowserProvider();
18 public FloatingWebBrowser()
19 {
20 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 }

  ViewVC Help
Powered by ViewVC 1.1.22