diff options
| author | Michael VanOverbeek <[email protected]> | 2016-07-25 12:57:52 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-07-25 12:57:52 -0400 |
| commit | 46c1c31302f111a1f3ec23a70e6f3986a9aa2a27 (patch) | |
| tree | f00af7ea3f6ad2641fb26fa1d310fd8b7179b39c /source/WindowsFormsApplication1/Apps/Shiftnet.cs | |
| parent | af48e774189596b8d7a058c564a7d6d75205ca03 (diff) | |
| parent | 6fa16209519896de09949a27425dff00ebf2970a (diff) | |
| download | shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.tar.gz shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.tar.bz2 shiftos-c--46c1c31302f111a1f3ec23a70e6f3986a9aa2a27.zip | |
Merge pull request #17 from MichaelTheShifter/shiftui_integration
Shiftui integration
Diffstat (limited to 'source/WindowsFormsApplication1/Apps/Shiftnet.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Apps/Shiftnet.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.cs b/source/WindowsFormsApplication1/Apps/Shiftnet.cs index 017377c..11c8094 100644 --- a/source/WindowsFormsApplication1/Apps/Shiftnet.cs +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.cs @@ -6,7 +6,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; using System.Net; namespace ShiftOS @@ -26,17 +26,18 @@ namespace ShiftOS public void InitialSetup() { pnlcontrols.BackColor = API.CurrentSkin.titlebarcolour; - wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); + wbshiftnet.Document.TextContent = WebLayer.VisitSite("shiftnet://main"); txtaddress.Text = WebLayer.LastUrl; } - private void LinkInterceptor(object sender, WebBrowserNavigatingEventArgs e) + private void LinkInterceptor(object sender, Gecko.Events.GeckoNavigatingEventArgs e) { - var url = e.Url.OriginalString; + + var url = e.Uri.OriginalString; if (url != "about:blank") { var surl = url.Replace("http://", "shiftnet://"); - wbshiftnet.DocumentText = WebLayer.VisitSite(surl); + wbshiftnet.Document.TextContent = WebLayer.VisitSite(surl); txtaddress.Text = WebLayer.LastUrl; } } @@ -45,19 +46,19 @@ namespace ShiftOS { if (txtaddress.Text.ToLower().StartsWith("shiftnet://")) { - wbshiftnet.DocumentText = WebLayer.VisitSite(txtaddress.Text); + wbshiftnet.Document.TextContent = WebLayer.VisitSite(txtaddress.Text); txtaddress.Text = WebLayer.LastUrl; } else { - wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://not_found"); + wbshiftnet.Document.TextContent = WebLayer.VisitSite("shiftnet://not_found"); txtaddress.Text = WebLayer.LastUrl; } } private void btnhome_Click(object sender, EventArgs e) { - wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); + wbshiftnet.Document.TextContent = WebLayer.VisitSite("shiftnet://main"); txtaddress.Text = WebLayer.LastUrl; } @@ -80,7 +81,7 @@ namespace ShiftOS { try { - string content = wc.DownloadString(url.Replace("shiftnet://", serverurl + "/shiftnet/www/")); + string content = wc.DownloadString(url.Replace("shiftnet://", "http://releases.playshiftos.ml/shiftnet/www/")); if (content.StartsWith("<!STML>")) { LastUrl = url; |
