aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/MainMenu/Loading.cs
diff options
context:
space:
mode:
authorRogueAI42 <[email protected]>2017-06-13 20:06:38 +1000
committerRogueAI42 <[email protected]>2017-06-13 20:06:38 +1000
commit2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0 (patch)
tree72954044f3dde5f9a17d12f99cd57a819f1b0f58 /ShiftOS.WinForms/MainMenu/Loading.cs
parenta2db5d39096cbf4d32412ad40168769ca63d9493 (diff)
downloadshiftos_thereturn-2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0.tar.gz
shiftos_thereturn-2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0.tar.bz2
shiftos_thereturn-2acfa34596061a9236bb6a9df1e3f3a0c01d6ff0.zip
Python API
It uses a meta-language and a CSharpCodeProvider on startup. I will release a tutorial on the forums soon showing how to use it. This commit also adds an extremely basic loading screen which shows while Desktop is getting everything ready. Which can take a while if you have any Python mods. Thanks, IronPython.
Diffstat (limited to 'ShiftOS.WinForms/MainMenu/Loading.cs')
-rw-r--r--ShiftOS.WinForms/MainMenu/Loading.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/MainMenu/Loading.cs b/ShiftOS.WinForms/MainMenu/Loading.cs
new file mode 100644
index 0000000..555f1d4
--- /dev/null
+++ b/ShiftOS.WinForms/MainMenu/Loading.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using ShiftOS.Engine;
+
+namespace ShiftOS.WinForms.MainMenu
+{
+ public partial class Loading : Form
+ {
+ public Loading()
+ {
+ InitializeComponent();
+ }
+
+ private void Loading_FormShown(object sender, EventArgs e)
+ {
+ // This hideous timer thing is the most reliable way to make the form update
+ // before it starts doing stuff.
+ var callback = new Timer();
+ callback.Tick += (o, a) => { Desktop.CurrentDesktop.Show(); Hide(); callback.Stop(); };
+ callback.Interval = 1;
+ callback.Start();
+ }
+ }
+}