diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-09-23 17:25:22 +0100 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-09-23 17:25:22 +0100 |
| commit | 350e749bb9eab16efe753f9b8fd703b52a97f808 (patch) | |
| tree | 9c90ec1a8148d66d9ff8605710a992e5e14a6b7e /Histacom2/OS/Win98/Win98Apps/WinClassicIE4.cs | |
| parent | 84ef033af262343febc3f84471233e18bc6b502e (diff) | |
| parent | 1ee3e00f8f0ee879fce4edf7d1ba9889335bc826 (diff) | |
| download | histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.gz histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.tar.bz2 histacom2-350e749bb9eab16efe753f9b8fd703b52a97f808.zip | |
Merge branch 'master' of https://github.com/Histacom2-Devs/Histacom2
Diffstat (limited to 'Histacom2/OS/Win98/Win98Apps/WinClassicIE4.cs')
| -rw-r--r-- | Histacom2/OS/Win98/Win98Apps/WinClassicIE4.cs | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Histacom2/OS/Win98/Win98Apps/WinClassicIE4.cs b/Histacom2/OS/Win98/Win98Apps/WinClassicIE4.cs new file mode 100644 index 0000000..7d9c9d0 --- /dev/null +++ b/Histacom2/OS/Win98/Win98Apps/WinClassicIE4.cs @@ -0,0 +1,77 @@ +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.OS.Win98.Win98Apps.IE4Sites; + +namespace Histacom2.OS.Win98.Win98Apps +{ + public partial class WinClassicIE4 : UserControl + { + public static Panel browsingArea = new Panel(); + public static ComboBox addressbar = new ComboBox(); + + public WinClassicIE4() + { + InitializeComponent(); + browsingArea = _browsingArea; + addressbar = _addressbar; + } + + public static async void GoToPage(string url) + { + UserControl uc = new UserControl(); + + switch (url) + { + case "www.microsoft.com/windows/ie/default.htm": + uc = new IE4HomePage(); + break; + /* + case "www.google.com": + uc = new GoogleHome(); + break;*/ + case "www.12padams.com": + uc = new _12padams1999(); + break; + default: + uc = new IENoPage(); + break; + } + + addressbar.Text = url; + uc.Dock = DockStyle.Fill; + + await Task.Delay(new Random().Next(500, 1500)); + + browsingArea.Controls.Clear(); + browsingArea.Controls.Add(uc); + } + + 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(); + } + } + } +} |
