Skip to content

Commit

Permalink
1.0.3.2
Browse files Browse the repository at this point in the history
Remove extra log
  • Loading branch information
HenryQuan committed Apr 26, 2018
1 parent d1e5a74 commit 02ebdff
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion WRInfo/WRInfo/Constant/Value.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
class Value
{
static public string VERSION = "1.0.3.1";
static public string VERSION = "1.0.3.2";
static public string ApplicationID = "e8b46cbc33f242c78725bd6a7562788a";

static public string PlayerSearch = "https://api.worldofwarships.{0}/wows/account/list/?application_id=" + ApplicationID + "&search={1}&type=exact&language=en&fields=account_id";
Expand Down
1 change: 0 additions & 1 deletion WRInfo/WRInfo/Core/API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Newtonsoft.Json;
using WRInfo.Properties;
using WRInfo.Resouces;
using WRInfo.Core;
using System.IO;
using Newtonsoft.Json.Linq;
using System.Text;
Expand Down
2 changes: 1 addition & 1 deletion WRInfo/WRInfo/Core/DataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Text.RegularExpressions;
using WRInfo.Resouces;

namespace WRInfo.Core
namespace WRInfo
{
class DataManager
{
Expand Down
2 changes: 1 addition & 1 deletion WRInfo/WRInfo/Core/PersonalRating.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Drawing;

namespace WRInfo.Core
namespace WRInfo
{
class PersonalRating
{
Expand Down
30 changes: 20 additions & 10 deletions WRInfo/WRInfo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Threading;
using System.IO;
using System.Drawing;
using WRInfo.Core;
using WRInfo.Resouces;
using WRInfo.Properties;
using Console = Colorful.Console;
Expand Down Expand Up @@ -203,7 +202,8 @@ private static void StartWRInfo()
if (count == 0)
{
// No battle is found, Waah
Console.WriteLine("EMPTY LOG, STAND BY...");
Console.Clear();
Console.Write("Standby ...");
}
else if (count != battleCount)
{
Expand Down Expand Up @@ -231,18 +231,17 @@ private static void StartWRInfo()
}
battleCount = count;
}

// Rest for 20 seconds WRInfo >_<
GC.Collect();
Thread.Sleep(20000);
}
else
{
// Never play this game or you deleted it just to break this program
Console.WriteLine("-_-\n" + strings.no_log);
Console.ReadKey();
Environment.Exit(1);
Console.Clear();
Console.Write(strings.no_log);
}

// Rest for 15 seconds WRInfo >_<
GC.Collect();
Thread.Sleep(15000);
}
}

Expand Down Expand Up @@ -316,7 +315,18 @@ private static void CheckPlayerInfo(string log)
/// </summary>
private static void RemoveExtraLog()
{
// TODO: I dont have any extra log nooooow
var logPath = Settings.Default.GamePath + "/profile/";
var i = 1;
while (true)
{
var file = logPath + "python_" + i++ + ".log";
if (File.Exists(file))
{
// Remove this file
File.Delete(file);
}
else break;
}
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion WRInfo/WRInfo/Resouces/strings.Designer.cs

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

2 changes: 1 addition & 1 deletion WRInfo/WRInfo/Resouces/strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
<value>Language</value>
</data>
<data name="no_log" xml:space="preserve">
<value>Where is your python.log? Please at least open your game once before using this program</value>
<value>Where is your python.log?</value>
</data>
<data name="no_update" xml:space="preserve">
<value>It is up to date</value>
Expand Down

0 comments on commit 02ebdff

Please sign in to comment.