aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/WinformsDesktop.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-27 16:59:54 -0400
committerMichael <[email protected]>2017-05-27 16:59:54 -0400
commite841b168e13e0bd699c0e0d19857167aa725f1ca (patch)
tree6d8754bbf66fcc52e80d4d0bf642d919c5a41aee /ShiftOS.WinForms/WinformsDesktop.cs
parentfde832b35763443afdc57dc8a5d82fb3bb25009b (diff)
downloadshiftos_thereturn-e841b168e13e0bd699c0e0d19857167aa725f1ca.tar.gz
shiftos_thereturn-e841b168e13e0bd699c0e0d19857167aa725f1ca.tar.bz2
shiftos_thereturn-e841b168e13e0bd699c0e0d19857167aa725f1ca.zip
stuff
Diffstat (limited to 'ShiftOS.WinForms/WinformsDesktop.cs')
-rw-r--r--ShiftOS.WinForms/WinformsDesktop.cs49
1 files changed, 27 insertions, 22 deletions
diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs
index 15ecb7a..6ce8cc9 100644
--- a/ShiftOS.WinForms/WinformsDesktop.cs
+++ b/ShiftOS.WinForms/WinformsDesktop.cs
@@ -188,14 +188,40 @@ namespace ShiftOS.WinForms
widget.OnSkinLoad();
}
+
SetupDesktop();
};
+
+ long lastcp = 0;
+
+ var storythread = new Thread(() =>
+ {
+ do
+ {
+ if (SaveSystem.CurrentSave != null)
+ {
+ if (SaveSystem.CurrentSave.Codepoints != lastcp)
+ lastcp = SaveSystem.CurrentSave.Codepoints;
+ if (lastcp >= 10000)
+ {
+ if (!Shiftorium.UpgradeInstalled("victortran_shiftnet"))
+ {
+ Story.Start("victortran_shiftnet");
+ }
+ }
+ }
+ } while (!SaveSystem.ShuttingDown);
+ });
+ storythread.IsBackground = true;
+ storythread.Start();
+
time.Tick += (o, a) =>
{
if (Shiftorium.IsInitiated == true)
{
- if (SaveSystem.CurrentSave != null && TutorialManager.IsInTutorial == false)
+ if (SaveSystem.CurrentSave != null)
{
+
lbtime.Text = Applications.Terminal.GetTime();
lbtime.Left = pnlnotifications.Width - lbtime.Width - LoadedSkin.DesktopPanelClockFromRight.X;
lbtime.Top = LoadedSkin.DesktopPanelClockFromRight.Y;
@@ -230,27 +256,6 @@ namespace ShiftOS.WinForms
};
time.Start();
- var ssThread = new Thread(() =>
- {
- while(this.Visible == true)
- {
- var mousePos = Cursor.Position;
- while(Cursor.Position == mousePos)
- {
- if(millisecondsUntilScreensaver <= 0)
- {
- ShowScreensaver();
- }
- millisecondsUntilScreensaver--;
- Thread.Sleep(1);
- }
- millisecondsUntilScreensaver = 300000;
- HideScreensaver();
- }
- });
- ssThread.IsBackground = true;
- ssThread.Start();
-
this.DoubleBuffered = true;
}