Skip to content

Commit f91b59c

Browse files
author
Casper
committed
Fixed crash
Whoops.
1 parent 07567ec commit f91b59c

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

.vs/HourBoostr/v14/.suo

3 KB
Binary file not shown.

HourBoostr/BotClass.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Threading;
44
using System.IO;
55
using System.Windows.Forms;
6+
using System.Linq;
67
using SteamKit2;
78
using System.Timers;
89
using SteamKit2.Internal;
@@ -116,7 +117,7 @@ public enum BotState
116117
/// <summary>
117118
/// Timer to simulate stopping and restarting a game
118119
/// </summary>
119-
private System.Timers.Timer mGameTimer;
120+
private System.Timers.Timer mGameTimer = new System.Timers.Timer();
120121

121122

122123
/// <summary>
@@ -139,6 +140,7 @@ public BotClass(Config.AccountInfo info, Config.Settings settings)
139140
Password = info.Password
140141
};
141142
mInfo = info;
143+
mSettings = settings;
142144
mSteam.games = info.Games;
143145
mSteam.sentryPath = Path.Combine(Application.StartupPath, string.Format("Sentryfiles\\{0}.sentry", info.Username));
144146

@@ -312,7 +314,7 @@ private void OnLoggedOn(SteamUser.LoggedOnCallback callback)
312314
if (callback.Result == EResult.InvalidPassword)
313315
{
314316
/*Delete old user info*/
315-
Properties.Settings.Default.UserInfo.Add(userInfo);
317+
Properties.Settings.Default.UserInfo.Remove(userInfo);
316318
Properties.Settings.Default.Save();
317319

318320
Print("{0} - Invalid password! Try again:", callback.Result);
@@ -363,7 +365,6 @@ private void OnLoggedOn(SteamUser.LoggedOnCallback callback)
363365
/*Set the timer if it's not already enabled*/
364366
if (!mGameTimer.Enabled && mSettings.RestartGamesEveryThreeHours)
365367
{
366-
mGameTimer = new System.Timers.Timer();
367368
mGameTimer.Interval = TimeSpan.FromMinutes(180 + extraTime).TotalMilliseconds;
368369
mGameTimer.Elapsed += new ElapsedEventHandler(PreformStopStart);
369370
mGameTimer.Start();

HourBoostr/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class Settings
3838
public class AccountInfo
3939
{
4040
/// <summary>
41-
/// Username of steam *account
41+
/// Username of steam account
4242
/// </summary>
4343
public string Username { get; set; }
4444

HourBoostr/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.8.0.0")]
36-
[assembly: AssemblyFileVersion("1.8.0.0")]
35+
[assembly: AssemblyVersion("1.7.3.1")]
36+
[assembly: AssemblyFileVersion("1.7.3.1")]

0 commit comments

Comments
 (0)