diff options
| author | Michael <[email protected]> | 2017-05-27 16:59:54 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-27 16:59:54 -0400 |
| commit | e841b168e13e0bd699c0e0d19857167aa725f1ca (patch) | |
| tree | 6d8754bbf66fcc52e80d4d0bf642d919c5a41aee /ShiftOS.WinForms/WinformsDesktop.cs | |
| parent | fde832b35763443afdc57dc8a5d82fb3bb25009b (diff) | |
| download | shiftos_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.cs | 49 |
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; } |
