From 7a0939095bb8a68e9b79e5d34284d08e13238ac3 Mon Sep 17 00:00:00 2001 From: JayXKanz666 Date: Thu, 13 Jul 2017 22:54:30 +0200 Subject: Added features to IE -Added icons -You can now press enter instead of pressing 'Go' -Made it look more like the real IE4 --- TimeHACK.Main/OS/Win95/Win95Apps/TempIE4.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'TimeHACK.Main/OS/Win95/Win95Apps/TempIE4.cs') diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/TempIE4.cs b/TimeHACK.Main/OS/Win95/Win95Apps/TempIE4.cs index 568749f..d41add1 100644 --- a/TimeHACK.Main/OS/Win95/Win95Apps/TempIE4.cs +++ b/TimeHACK.Main/OS/Win95/Win95Apps/TempIE4.cs @@ -23,7 +23,7 @@ namespace TimeHACK.OS.Win95.Win95Apps addressbar = _addressbar; } - public static void GoToPage(string url) + public static async void GoToPage(string url) { UserControl uc = new UserControl(); @@ -45,6 +45,9 @@ namespace TimeHACK.OS.Win95.Win95Apps addressbar.Text = url; uc.Dock = DockStyle.Fill; + + await Task.Delay(new Random().Next(500, 1500)); + browsingArea.Controls.Clear(); browsingArea.Controls.Add(uc); } @@ -52,11 +55,22 @@ namespace TimeHACK.OS.Win95.Win95Apps private void TempIE4_Load(object sender, EventArgs e) { GoToPage("www.microsoft.com/windows/ie/default.htm"); + GoButton.Paint += (s, args) => Engine.Paintbrush.PaintClassicBorders(s, args, 2); } private void GoButton_Click(object sender, EventArgs e) { GoToPage(addressbar.Text); } + + private void _addressbar_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + GoButton_Click(this, new EventArgs()); + e.SuppressKeyPress = true; + browsingArea.Focus(); + } + } } } -- cgit v1.2.3