diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-07-21 13:24:28 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-07-21 13:24:28 +0100 |
| commit | 75c05d35535267096b0c46e143be7a55bb21c9c4 (patch) | |
| tree | b9f175812ff8fde1f982ee0667a3853572ec8259 /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs | |
| parent | fee528f280640948216f41f0569c79a6552e61c7 (diff) | |
| parent | a42b7b8d3219f5df18721afdf88bddb8dd11d463 (diff) | |
| download | histacom2-75c05d35535267096b0c46e143be7a55bb21c9c4.tar.gz histacom2-75c05d35535267096b0c46e143be7a55bb21c9c4.tar.bz2 histacom2-75c05d35535267096b0c46e143be7a55bb21c9c4.zip | |
Update My Fork PART 2!!!
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs index b0542ba..e2c8d64 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,9 @@ namespace TimeHACK.OS.Win95 { lblCountDown.Visible = true; btnGo.Enabled = false; + ((WinClassic)ParentForm).closeDisabled = true; + + _action?.Invoke(); countDownTimer.Start(); lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds"; @@ -37,10 +41,8 @@ namespace TimeHACK.OS.Win95 if (_counter == 0) { countDownTimer.Stop(); - - if (_action != null) - _action.ShowDialog(); } + lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds"; } } |
