diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-08-27 11:32:44 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-08-27 11:32:44 +0100 |
| commit | f8f3bd0b1eb57c5a289513200b192e1d54d58292 (patch) | |
| tree | c9b79515fb81d90320ef386a522a5830875f6d49 /TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs | |
| parent | bffcb720f811623015ed4795032e5c57d1064c8a (diff) | |
| parent | cd6273d7c95098e0e0dd9948c6b5cec1c5f9cd3f (diff) | |
| download | histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.tar.gz histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.tar.bz2 histacom2-f8f3bd0b1eb57c5a289513200b192e1d54d58292.zip | |
Updated my fork!
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs')
| -rw-r--r-- | TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs b/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs deleted file mode 100644 index f7776b1..0000000 --- a/TimeHACK.Main/OS/Win95/Win95Apps/WinClassicTimeDistorter.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Threading.Tasks; -using System.Windows.Forms; -using TimeHACK.Engine; -using TimeHACK.Engine.Template; - -namespace TimeHACK.OS.Win95 -{ - public partial class WinClassicTimeDistorter : UserControl - { - private int _counter; - private Action _action; - - public WinClassicTimeDistorter(string currentYear, string yearToTravel, int counter, Action action = null) - { - InitializeComponent(); - - btnGo.Paint += (sender, args) => Paintbrush.PaintClassicBorders(sender, args, 2); - lblYear.Text = currentYear; - lblDestYear.Text = yearToTravel; - _action = action; - _counter = counter; - } - - public int Counter - { - get { return _counter; } - set { _counter = value; } - } - - private void btnGo_Click(object sender, EventArgs e) - { - lblCountDown.Visible = true; - btnGo.Enabled = false; - ((WinClassic)ParentForm).closeDisabled = true; - - _action?.Invoke(); - countDownTimer.Start(); - - lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds"; - } - - private void countDownTimer_Tick(object sender, EventArgs e) - { - _counter--; - - if (_counter == 0) - { - countDownTimer.Stop(); - } - - lblCountDown.Text = $"Preparing to travel... ETA: {_counter.ToString()} seconds"; - } - } -} |
