diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-19 21:53:26 -0400 |
| commit | 6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9 (patch) | |
| tree | d7bc4b46c45a552add946666151d44490f3b3caf /source/WindowsFormsApplication1/Apps/Shiftnet.cs | |
| parent | 9322701aa1eae9596a8586ef19a0fe1d1b3ab66b (diff) | |
| download | shiftos-c-_theultimatehacker-6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.gz shiftos-c-_theultimatehacker-6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.bz2 shiftos-c-_theultimatehacker-6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.zip | |
Full ShiftUI conversion
The only bugs are that windows don't show in the center of the screen,
and Gecko webbrowsers are not serializing properly to be converted to
ShiftUI widgets (you can use the ToWidget() extension method to convert
a WinForms control to a ShiftUI widget)
Also multiple desktop panels are removed due to some odd bug I can't
diagnose. Will add them back in the future. Promise. I loved creating
GNOME2 skins.
Diffstat (limited to 'source/WindowsFormsApplication1/Apps/Shiftnet.cs')
| -rw-r--r-- | source/WindowsFormsApplication1/Apps/Shiftnet.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.cs b/source/WindowsFormsApplication1/Apps/Shiftnet.cs index cbcab1b..8e9a818 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; } } |
