Skip to content

Commit

Permalink
Removing ads & adding functionality to warn users of bans.
Browse files Browse the repository at this point in the history
  • Loading branch information
UltimateFishbot committed Jan 17, 2015
1 parent 7037263 commit 8c9dcdc
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 312 deletions.
115 changes: 0 additions & 115 deletions UltimateFishBot/Forms/frmCode.Designer.cs

This file was deleted.

52 changes: 0 additions & 52 deletions UltimateFishBot/Forms/frmCode.cs

This file was deleted.

120 changes: 0 additions & 120 deletions UltimateFishBot/Forms/frmCode.resx

This file was deleted.

14 changes: 14 additions & 0 deletions UltimateFishBot/Forms/frmMain.Designer.cs

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

37 changes: 33 additions & 4 deletions UltimateFishBot/Forms/frmMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
Expand Down Expand Up @@ -46,9 +48,36 @@ private void frmMain_Load(object sender, EventArgs e)
btnClose.Text = Translate.GetTranslate("frmMain", "BUTTON_EXIT");
lblStatus.Text = Translate.GetTranslate("frmMain", "LABEL_STOPPED");

Win32.RegisterHotKey(this.Handle, (int)HotKey.StartStop, (int)KeyModifier.Shift + (int)KeyModifier.Control, Keys.S.GetHashCode());
}

Win32.RegisterHotKey(this.Handle, (int)HotKey.StartStop, (int)KeyModifier.Shift + (int)KeyModifier.Control, Keys.S.GetHashCode());
CheckStatus();
}

private void CheckStatus()
{
lblWarn.Text = "Checking Status...";
lblWarn.Parent = PictureBox1;

try
{
Task.Factory.StartNew(() => (new WebClient()).DownloadString("http://www.fishbot.net/status.txt"),
TaskCreationOptions.LongRunning).ContinueWith(x =>
{
if (x.Result.ToLower().Trim() != "sadfe")
{
lblWarn.Text = "This bot is no longer safe. Do not use on public servers!";
lblWarn.ForeColor = Color.Red;
lblWarn.BackColor = Color.Black;
}
else
lblWarn.Visible = false;
}, TaskScheduler.FromCurrentSynchronizationContext());
}
catch (Exception)
{
lblWarn.Text = "Could Not Verify Status! Use at own risk...";
}
}

private void btnStart_Click(object sender, EventArgs e)
{
if (!m_manager.IsStoppedOrPaused())
Expand Down
Loading

0 comments on commit 8c9dcdc

Please sign in to comment.