aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/Apps/NetGen.cs
diff options
context:
space:
mode:
authorMichaelTheShifter <[email protected]>2016-07-19 21:53:26 -0400
committerMichaelTheShifter <[email protected]>2016-07-19 21:53:26 -0400
commit6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9 (patch)
treed7bc4b46c45a552add946666151d44490f3b3caf /source/WindowsFormsApplication1/Apps/NetGen.cs
parent9322701aa1eae9596a8586ef19a0fe1d1b3ab66b (diff)
downloadshiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.gz
shiftos-c--6b804f03ebcdd1c5aa145f29ae71b62bd61f8cb9.tar.bz2
shiftos-c--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/NetGen.cs')
-rw-r--r--source/WindowsFormsApplication1/Apps/NetGen.cs10
1 files changed, 5 insertions, 5 deletions
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;