Skip to content

Commit

Permalink
Merge pull request #258 from blackms/master
Browse files Browse the repository at this point in the history
Refactor Naming
  • Loading branch information
NecronomiconCoding authored Jul 23, 2016
2 parents ff859cd + e88b93d commit 8a09517
Show file tree
Hide file tree
Showing 26 changed files with 47 additions and 45 deletions.
6 changes: 3 additions & 3 deletions Pokemon Go Rocket API.sln → Pokemon Go NecroBot.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PokemonGo.RocketAPI", "PokemonGo.RocketAPI\PokemonGo.RocketAPI.csproj", "{05D2DA44-1B8E-4CF7-94ED-4D52451CD095}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PokemonGo.RocketAPI.Console", "PokemonGo.RocketAPI.Console\PokemonGo.RocketAPI.Console.csproj", "{1FEA147E-F704-497B-A538-00B053B5F672}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PokemonGo.NecroBot.CLI", "PokemonGo.NecroBot.CLI\PokemonGo.NecroBot.CLI.csproj", "{1FEA147E-F704-497B-A538-00B053B5F672}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PokemonGo.RocketAPI.Logic", "PokemonGo.RocketAPI.Logic\PokemonGo.RocketAPI.Logic.csproj", "{0739E40D-C589-4AEB-93E5-EE8CD6773C60}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PokemonGo.NecroBot.Logic", "PokemonGo.NecroBot.Logic\PokemonGo.NecroBot.Logic.csproj", "{0739E40D-C589-4AEB-93E5-EE8CD6773C60}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@
<userSettings>
<PokemonGo.RocketAPI.Console.UserSettings>
<setting name="AuthType" serializeAs="String">
<value>Google</value>
<value>Ptc</value>
</setting>
<setting name="PtcUsername" serializeAs="String">
<value>username2</value>
<value>user1</value>
</setting>
<setting name="PtcPassword" serializeAs="String">
<value>pw</value>
<value>pwd1</value>
</setting>
<setting name="GoogleRefreshToken" serializeAs="String">
<value />
</setting>
<setting name="DefaultLatitude" serializeAs="String">
<value>52.379189</value>
<value>40.800621</value>
</setting>
<setting name="DefaultLongitude" serializeAs="String">
<value>4.899431</value>
<value>-74.001889</value>
</setting>
<setting name="DefaultAltitude" serializeAs="String">
<value>10</value>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#region

using System;
using PokemonGo.RocketAPI;
using PokemonGo.RocketAPI.Logging;

#endregion

namespace PokemonGo.RocketAPI.Console
namespace PokemonGo.NecroBot.CLI
{
/// <summary>
/// The ConsoleLogger is a simple logger which writes all logs to the Console.
Expand All @@ -28,7 +29,7 @@ public ConsoleLogger(LogLevel maxLogLevel)
/// Log a specific message by LogLevel. Won't log if the LogLevel is greater than the maxLogLevel set.
/// </summary>
/// <param name="message">The message to log. The current time will be prepended.</param>
/// <param name="level">Optional. Default <see cref="LogLevel.Info" />.</param>
/// <param name="level">Optional. Default <see cref="System.LogLevel.Info" />.</param>
/// <param name="color">Optional. Default is auotmatic</param>
public void Write(string message, LogLevel level = LogLevel.Info, ConsoleColor color = ConsoleColor.Black)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PokemonGo.RocketAPI.Logic\PokemonGo.RocketAPI.Logic.csproj">
<ProjectReference Include="..\PokemonGo.NecroBot.Logic\PokemonGo.NecroBot.Logic.csproj">
<Project>{0739E40D-C589-4AEB-93E5-EE8CD6773C60}</Project>
<Name>PokemonGo.RocketAPI.Logic</Name>
<Name>PokemonGo.NecroBot.Logic</Name>
</ProjectReference>
<ProjectReference Include="..\PokemonGo.RocketAPI\PokemonGo.RocketAPI.csproj">
<Project>{05D2DA44-1B8E-4CF7-94ED-4D52451CD095}</Project>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using PokemonGo.RocketAPI;
using PokemonGo.RocketAPI.Exceptions;

#endregion

namespace PokemonGo.RocketAPI.Console
namespace PokemonGo.NecroBot.CLI
{
internal class Program
{
Expand All @@ -19,15 +20,15 @@ private static void Main(string[] args)
{
try
{
new Logic.Logic(new Settings()).Execute().Wait();
new NecroBot.Logic.Logic(new Settings()).Execute().Wait();
}
catch (PtcOfflineException)
{
Logger.Write("PTC Servers are probably down OR your credentials are wrong. Try google",
LogLevel.Error);
Logger.Write("Trying again in 20 seconds...");
Thread.Sleep(20000);
new Logic.Logic(new Settings()).Execute().Wait();
new NecroBot.Logic.Logic(new Settings()).Execute().Wait();
}
catch (AccountNotVerifiedException)
{
Expand All @@ -37,7 +38,7 @@ private static void Main(string[] args)
catch (Exception ex)
{
Logger.Write($"Unhandled exception: {ex}", LogLevel.Error);
new Logic.Logic(new Settings()).Execute().Wait();
new NecroBot.Logic.Logic(new Settings()).Execute().Wait();
}
});
System.Console.ReadLine();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
using System;
using System.Collections.Generic;
using System.IO;
using PokemonGo.RocketAPI;
using PokemonGo.RocketAPI.Enums;
using PokemonGo.RocketAPI.GeneratedCode;

#endregion

namespace PokemonGo.RocketAPI.Console
namespace PokemonGo.NecroBot.CLI
{
public class Settings : ISettings
{
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#endregion

namespace PokemonGo.RocketAPI.Console
namespace PokemonGo.NecroBot.CLI
{
// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
<Profiles />
<Settings>
<Setting Name="AuthType" Type="System.String" Scope="User">
<Value Profile="(Default)">Google</Value>
<Value Profile="(Default)">Ptc</Value>
</Setting>
<Setting Name="PtcUsername" Type="System.String" Scope="User">
<Value Profile="(Default)">username2</Value>
<Value Profile="(Default)">user1</Value>
</Setting>
<Setting Name="PtcPassword" Type="System.String" Scope="User">
<Value Profile="(Default)">pw</Value>
<Value Profile="(Default)">pwd1</Value>
</Setting>
<Setting Name="GoogleRefreshToken" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="DefaultLatitude" Type="System.Double" Scope="User">
<Value Profile="(Default)">52.379189</Value>
<Value Profile="(Default)">40.800621</Value>
</Setting>
<Setting Name="DefaultLongitude" Type="System.Double" Scope="User">
<Value Profile="(Default)">4.899431</Value>
<Value Profile="(Default)">-74.001889</Value>
</Setting>
<Setting Name="DefaultAltitude" Type="System.Double" Scope="User">
<Value Profile="(Default)">10</Value>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
using System.Collections.Concurrent;
using System;
using System.Threading;
using PokemonGo.RocketAPI;

#endregion

namespace PokemonGo.RocketAPI.Logic
namespace PokemonGo.NecroBot.Logic
{
public class Inventory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
using PokemonGo.RocketAPI.Extensions;
using PokemonGo.RocketAPI.GeneratedCode;
using PokemonGo.RocketAPI.Helpers;
using PokemonGo.RocketAPI.Logic.Utils;
using System.Device.Location;
using PokemonGo.NecroBot.Logic.Utils;
using PokemonGo.RocketAPI;

#endregion

namespace PokemonGo.RocketAPI.Logic
namespace PokemonGo.NecroBot.Logic
{
public class Logic
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
using System;
using System.Threading.Tasks;
using PokemonGo.RocketAPI.GeneratedCode;
using PokemonGo.RocketAPI.Logic.Utils;
using System.Device.Location;
using PokemonGo.NecroBot.Logic.Utils;
using PokemonGo.RocketAPI;

#endregion

namespace PokemonGo.RocketAPI.Logic
namespace PokemonGo.NecroBot.Logic
{
public class Navigation
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<ProjectGuid>{0739E40D-C589-4AEB-93E5-EE8CD6773C60}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PokemonGo.RocketAPI.Logic</RootNamespace>
<AssemblyName>PokemonGo.RocketAPI.Logic</AssemblyName>
<RootNamespace>PokemonGo.NecroBot.Logic</RootNamespace>
<AssemblyName>PokemonGo.NecroBot.Logic</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand Down Expand Up @@ -48,6 +48,7 @@
<Compile Include="Inventory.cs" />
<Compile Include="Logic.cs" />
<Compile Include="Navigation.cs" />
<Compile Include="PokemonInfo.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Utils\LocationUtils.cs" />
<Compile Include="Utils\Statistics.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PokemonGo.RocketAPI.GeneratedCode;

namespace PokemonGo.RocketAPI
namespace PokemonGo.NecroBot.Logic
{
public struct BaseStats
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

using System;
using System.Device.Location;
using static PokemonGo.RocketAPI.Logic.Navigation;
using static PokemonGo.NecroBot.Logic.Navigation;

#endregion

namespace PokemonGo.RocketAPI.Logic.Utils
namespace PokemonGo.NecroBot.Logic.Utils
{
public static class LocationUtils
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#endregion

namespace PokemonGo.RocketAPI.Logic.Utils
namespace PokemonGo.NecroBot.Logic.Utils
{
internal class Statistics
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#endregion

namespace PokemonGo.RocketAPI.Logic.Utils
namespace PokemonGo.NecroBot.Logic.Utils
{
public static class StringUtils
{
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion PokemonGo.RocketAPI/PokemonGo.RocketAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@
<Compile Include="Extensions\HttpClientExtensions.cs" />
<Compile Include="Helpers\RandomHelper.cs" />
<Compile Include="Helpers\RequestBuilder.cs" />
<Compile Include="PokemonInfo.cs" />
<Compile Include="Resources.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
Expand Down

0 comments on commit 8a09517

Please sign in to comment.