aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs
diff options
context:
space:
mode:
authorJayXKanz666 <[email protected]>2017-07-12 23:01:19 +0200
committerJayXKanz666 <[email protected]>2017-07-12 23:01:19 +0200
commite75e11bcc81e61ccdef78279aa8d39d91c860f8c (patch)
treeb2102bfec9186b636b5de551321736df9f69c31a /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs
parent07ad23b7c9ed7a4a1742df68a73cc2d4b3180cde (diff)
downloadhistacom2-e75e11bcc81e61ccdef78279aa8d39d91c860f8c.tar.gz
histacom2-e75e11bcc81e61ccdef78279aa8d39d91c860f8c.tar.bz2
histacom2-e75e11bcc81e61ccdef78279aa8d39d91c860f8c.zip
Added some stuff
-Added another story-script (Hack2.cs) -Fixed an issue where the MS-DOS prompt would freeze when displaying text -Added Action Delegate (method/function) as an argument for Time Distorter (optional)
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs
index b0542ba..57fa683 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs
@@ -1,4 +1,5 @@
using System;
+using System.Threading.Tasks;
using System.Windows.Forms;
using TimeHACK.Engine;
using TimeHACK.Engine.Template;
@@ -8,9 +9,9 @@ namespace TimeHACK.OS.Win95
public partial class WinClassicTimeDistorter : UserControl
{
private int _counter;
- private Form _action;
+ private Action _action;
- public WinClassicTimeDistorter(string currentYear, string yearToTravel, int counter, Form action = null)
+ public WinClassicTimeDistorter(string currentYear, string yearToTravel, int counter, Action action = null)
{
InitializeComponent();
@@ -25,6 +26,8 @@ namespace TimeHACK.OS.Win95
{
lblCountDown.Visible = true;
btnGo.Enabled = false;
+
+ _action?.Invoke();
countDownTimer.Start();
lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds";
@@ -37,10 +40,8 @@ namespace TimeHACK.OS.Win95
if (_counter == 0)
{
countDownTimer.Stop();
-
- if (_action != null)
- _action.ShowDialog();
}
+
lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds";
}
}