From c23e42cc396d4fc55799d659bae2149cc183dbf6 Mon Sep 17 00:00:00 2001 From: FloppyDiskDrive Date: Sun, 1 Oct 2017 09:49:14 -0500 Subject: Added a fuckton of changes New infobox icons, new WIP port of Snakey, we are getting closer to a pre-alpha! --- ShiftOS.Main/ShiftOS/Apps/TestForm.cs | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'ShiftOS.Main/ShiftOS/Apps/TestForm.cs') diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs index 1fd3b18..e8360e0 100644 --- a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs +++ b/ShiftOS.Main/ShiftOS/Apps/TestForm.cs @@ -10,6 +10,7 @@ namespace ShiftOS.Main { public partial class TestForm : Form { + Point loc; public TestForm() { InitializeComponent(); @@ -17,16 +18,25 @@ namespace ShiftOS.Main private void Button1_Click(object sender, EventArgs e) { - ShiftDemo demo = new ShiftDemo {label1 = {Text = textBox2.Text}}; + ShiftDemo demo = new ShiftDemo { label1 = { Text = textBox2.Text } }; - var item = typeof(SystemIcons).GetProperties() - .First(p => p.Name == comboBox1.SelectedItem as string); + 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); + ShiftWM.Init(demo, textBox1.Text, (item.GetMethod.Invoke(null, new object[0]) as Icon)); + ShiftWM.StartInfoboxSession(textBox1.Text, textBox2.Text, InfoboxTemplate.ButtonType.Ok, InfoboxTemplate.ErrorIcon.Critical); } - private void button2_Click(object sender, EventArgs e) - => ShiftWM.Init(new Shifter(), "Shifter", Properties.Resources.iconShifter.ToIcon()); + private void button2_Click(object sender, EventArgs e) + => ShiftWM.Init(new Shifter(), "Shifter", Properties.Resources.iconShifter.ToIcon()); + + private void panel1_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + loc = new Point(Cursor.Position.X, Cursor.Position.Y); + this.Location = loc; + } + } } } -- cgit v1.2.3