diff options
| author | lempamo <lempamo@users.noreply.github.com> | 2017-09-18 16:49:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-09-18 16:49:14 -0500 |
| commit | 2d83155d9833a7ea1396ee62265f900be258a5eb (patch) | |
| tree | 28c7cfc42927d9c340a5f17048a024227358fc5f /Histacom2/OS/Win95/Win95Apps/12padamsViruses/StartRunner95.cs | |
| parent | 92495924b688faf93d37929a8dab27554ac78e4f (diff) | |
| parent | 3188a4eac09bbcfb1dffaa2e001f1f76137ed1ac (diff) | |
| download | histacom2-2d83155d9833a7ea1396ee62265f900be258a5eb.tar.gz histacom2-2d83155d9833a7ea1396ee62265f900be258a5eb.tar.bz2 histacom2-2d83155d9833a7ea1396ee62265f900be258a5eb.zip | |
Merge pull request #161 from IBMPCDOS5/master
Added Error Blaster 95, see Description for details
Diffstat (limited to 'Histacom2/OS/Win95/Win95Apps/12padamsViruses/StartRunner95.cs')
| -rw-r--r-- | Histacom2/OS/Win95/Win95Apps/12padamsViruses/StartRunner95.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Histacom2/OS/Win95/Win95Apps/12padamsViruses/StartRunner95.cs b/Histacom2/OS/Win95/Win95Apps/12padamsViruses/StartRunner95.cs new file mode 100644 index 0000000..579f001 --- /dev/null +++ b/Histacom2/OS/Win95/Win95Apps/12padamsViruses/StartRunner95.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Histacom2.Engine; +using System.Drawing.Text; +using static Histacom2.Engine.SaveSystem; +using Histacom2.OS.Win95; + +namespace Histacom2.OS.Win95.Win95Apps._12padamsViruses +{ + public partial class StartRunner95 : UserControl + { + Point beginLocation; + int taskbarLength; + int xLocation; + Timer moveStart = new Timer(); + private static PrivateFontCollection pfc = new PrivateFontCollection(); + Windows95 w = new Windows95(); + public StartRunner95() + { + InitializeComponent(); + pfc.AddFontFile(DataDirectory + "\\LeviWindows.ttf"); + label2.Font = new Font(pfc.Families[0], 16F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))); + beginLocation = w.startbutton.Location; + moveStart.Interval = 300; + moveStart.Tick += MoveStart_Tick; + + } + + private void MoveStart_Tick(object sender, EventArgs e) + { + int taskbarWidth = w.taskbar.Size.Width; + Random random = new Random(); + xLocation = random.Next(1, taskbarWidth); + w.startbutton.Location = new Point(xLocation, w.startbutton.Location.Y); + } + + private void classicButton1_Click(object sender, EventArgs e) + { + moveStart.Start(); + } + + private void StartRunner95_Load(object sender, EventArgs e) + { + + } + + private void classicButton2_Click(object sender, EventArgs e) + { + moveStart.Stop(); + w.startbutton.Location = beginLocation; + } + + private void classicButton3_Click(object sender, EventArgs e) + { + ParentForm.Close(); + } + } +} |
