aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-10-01 08:23:50 -0600
committerAShifter <[email protected]>2017-10-01 08:23:50 -0600
commit46fe7eb7098dd31b186e13e228fede07c46ee064 (patch)
treee6fbc5ac67890b11293f682c279ff7670ecef8cf /ShiftOS.Main/ShiftOS/Apps/TestForm.cs
parentf5004702c46d6c99737a0519d7d6735307c7501a (diff)
parentf2ed0c673c2d3f0e021b0307a22792af66fd217d (diff)
downloadshiftos-rewind-46fe7eb7098dd31b186e13e228fede07c46ee064.tar.gz
shiftos-rewind-46fe7eb7098dd31b186e13e228fede07c46ee064.tar.bz2
shiftos-rewind-46fe7eb7098dd31b186e13e228fede07c46ee064.zip
Merge remote-tracking branch 'refs/remotes/ShiftOS-Rewind/master'
Diffstat (limited to 'ShiftOS.Main/ShiftOS/Apps/TestForm.cs')
-rw-r--r--ShiftOS.Main/ShiftOS/Apps/TestForm.cs22
1 files changed, 12 insertions, 10 deletions
diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
index c8cd086..1fd3b18 100644
--- a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
+++ b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs
@@ -1,5 +1,8 @@
using System;
+using System.Drawing;
+using System.Linq;
using System.Windows.Forms;
+using ShiftOS.Engine;
using ShiftOS.Engine.WindowManager;
using ShiftOS.Main.ShiftOS.Apps;
@@ -7,8 +10,6 @@ namespace ShiftOS.Main
{
public partial class TestForm : Form
{
- public ShiftWM shiftWM = new ShiftWM();
-
public TestForm()
{
InitializeComponent();
@@ -16,15 +17,16 @@ namespace ShiftOS.Main
private void Button1_Click(object sender, EventArgs e)
{
- ShiftDemo demo = new ShiftDemo();
- demo.label1.Text = textBox2.Text;
- shiftWM.Init(demo, textBox1.Text, null);
- shiftWM.StartInfoboxSession(textBox1.Text, textBox2.Text, InfoboxTemplate.buttonType.OK);
- }
+ ShiftDemo demo = new ShiftDemo {label1 = {Text = textBox2.Text}};
- private void button2_Click(object sender, EventArgs e)
- {
- shiftWM.Init(new Shifter(), "Shifter", Properties.Resources.iconShifter);
+ var item = typeof(SystemIcons).GetProperties()
+ .First(p => p.Name == comboBox1.SelectedItem as string);
+
+ ShiftWM.Init(demo, textBox1.Text, (item.GetMethod.Invoke(null, new object[0]) as Icon));
+ ShiftWM.StartInfoboxSession(textBox1.Text, textBox2.Text, InfoboxTemplate.ButtonType.Ok);
}
+
+ private void button2_Click(object sender, EventArgs e)
+ => ShiftWM.Init(new Shifter(), "Shifter", Properties.Resources.iconShifter.ToIcon());
}
}