Skip to content

Commit

Permalink
Added loading icon to top right bar
Browse files Browse the repository at this point in the history
  • Loading branch information
erfg12 committed Oct 26, 2018
1 parent e64701d commit c1d53ea
Show file tree
Hide file tree
Showing 16 changed files with 975 additions and 273 deletions.
393 changes: 309 additions & 84 deletions aol_4/Form1.Designer.cs

Large diffs are not rendered by default.

48 changes: 38 additions & 10 deletions aol_4/Form1.cs
Expand Up @@ -4,6 +4,7 @@
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Reflection;
Expand Down Expand Up @@ -134,6 +135,9 @@ private async void Form1_Shown(object sender, EventArgs e)
toolTip1.SetToolTip(this.backBtn, "Back");
toolTip1.SetToolTip(this.forwardBtn, "Forward");
toolTip1.SetToolTip(this.reloadBtn, "Refresh");
toolTip1.SetToolTip(this.write_mail_button, "Write mail and send files.");
toolTip1.SetToolTip(this.my_files_btn, "Your Personal Documents.");
toolTip1.SetToolTip(this.print_page_btn, "Print text or pictures.");

// open fake dial up window
dial_up du = new dial_up();
Expand All @@ -148,16 +152,12 @@ private async void Form1_Shown(object sender, EventArgs e)
bo.Owner = (Form)this;
bo.MdiParent = this;
bo.Show();
bo.Left = this.Width - bo.Width - 8;
bo.Top += 100;

// open home menu
home_menu hm = new home_menu();
hm.Owner = (Form)this;
hm.MdiParent = this;
hm.Show();
hm.Left += 320;
hm.Top += 200;

// enable buttons
internet_btn.Image = Properties.Resources.internet_icon_enabled;
Expand All @@ -181,8 +181,6 @@ private void openBrowser(string url = "")
BrowseWnd.Owner = (Form)this;
BrowseWnd.MdiParent = this;
BrowseWnd.Show();
BrowseWnd.Left += 100;
BrowseWnd.Top += 120;
}

private Point FindLocation(Control ctrl)
Expand Down Expand Up @@ -228,6 +226,16 @@ private void getMdiChildURL_Tick(object sender, EventArgs e)
{
if (this.ActiveMdiChild is Browse)
{
if (((Browse)this.ActiveMdiChild).loading)
{
loadingIcon.Enabled = true;
}
else
{
loadingIcon.Enabled = false;
loadingIcon.Image.SelectActiveFrame(new FrameDimension(loadingIcon.Image.FrameDimensionsList[0]), 0);
loadingIcon.Image = loadingIcon.Image;
}
if (((Browse)this.ActiveMdiChild).url != old_url)
{
addrBox.Text = ((Browse)this.ActiveMdiChild).url;
Expand Down Expand Up @@ -342,14 +350,25 @@ private void Form1_FormClosing(object sender, FormClosingEventArgs e)
System.Threading.Thread.Sleep(1000);
}

bool channelsOpen = false;
// channels button
private void pictureBox10_Click(object sender, EventArgs e)
{
channels ch = new channels();
if (!channelsOpen)
{
PictureBox btnSender = (PictureBox)sender;
Point ptLowerLeft = new Point(0, btnSender.Height);
ptLowerLeft = btnSender.PointToScreen(ptLowerLeft);
channelsContextMenuStrip.Show(ptLowerLeft);
channelsOpen = true;
}
else
channelsOpen = false;
// this form doesn't open from the top bar button, only from the AOL today window
/*channels ch = new channels();
ch.Owner = (Form)this;
ch.MdiParent = this;
ch.Show();
ch.Left += 320;
ch.Top += 200;
ch.Show();*/
}

private void mainTitle_MouseMove(object sender, MouseEventArgs e)
Expand All @@ -361,6 +380,15 @@ private void mainTitle_MouseMove(object sender, MouseEventArgs e)
}
}

private void aOLTodayToolStripMenuItem_Click(object sender, EventArgs e)
{
// open home menu
home_menu hm = new home_menu();
hm.Owner = (Form)this;
hm.MdiParent = this;
hm.Show();
}

Rectangle TopLeft { get { return new Rectangle(0, 0, tenDigit, tenDigit); } }
Rectangle TopRight { get { return new Rectangle(this.ClientSize.Width - tenDigit, 0, tenDigit, tenDigit); } }
Rectangle BottomLeft { get { return new Rectangle(0, this.ClientSize.Height - tenDigit, tenDigit, tenDigit); } }
Expand Down
3 changes: 3 additions & 0 deletions aol_4/Form1.resx
Expand Up @@ -167,6 +167,9 @@
tExAqwzTD27lDPJwcddGFY+uU2V53LT/ARkPO6h/RZjHAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="channelsContextMenuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>429, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>41</value>
</metadata>
Expand Down
10 changes: 10 additions & 0 deletions aol_4/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c1d53ea

Please sign in to comment.