From 6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Tue, 19 Jul 2016 21:53:26 -0400 Subject: 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. --- source/WindowsFormsApplication1/Apps/NetGen.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/WindowsFormsApplication1/Apps/NetGen.cs') diff --git a/source/WindowsFormsApplication1/Apps/NetGen.cs b/source/WindowsFormsApplication1/Apps/NetGen.cs index 616505d..679ad51 100644 --- a/source/WindowsFormsApplication1/Apps/NetGen.cs +++ b/source/WindowsFormsApplication1/Apps/NetGen.cs @@ -7,7 +7,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; namespace ShiftOS { @@ -51,7 +51,7 @@ namespace ShiftOS { foreach(var p in potentialModules) { - pnlnetdesign.Controls.Remove(p); + pnlnetdesign.Widgets.Remove(p); p.Hide(); } @@ -71,7 +71,7 @@ namespace ShiftOS var c = network.Network[0].Deploy(); c.Left = (pnlnetdesign.Width - 64) / 2; c.Top = (pnlnetdesign.Height - 64) / 2; - pnlnetdesign.Controls.Add(c); + pnlnetdesign.Widgets.Add(c); c.Select += (s, a) => { ShowSysInf(c); @@ -236,7 +236,7 @@ namespace ShiftOS fmod.HP = fmod.GetTotalHP(); var computerToPlace = fmod.Deploy(); computerToPlace.Location = new Point(x, y); - pnlnetdesign.Controls.Add(computerToPlace); + pnlnetdesign.Widgets.Add(computerToPlace); potentialModules.Add(computerToPlace); computerToPlace.Select += (s, a) => { @@ -270,7 +270,7 @@ namespace ShiftOS if(SelectedSystem != null) { potentialModules.Remove(SelectedSystem); - pnlnetdesign.Controls.Remove(SelectedSystem); + pnlnetdesign.Widgets.Remove(SelectedSystem); SelectedSystem.Dispose(); } SelectedSystem = null; -- cgit v1.2.3