Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Commit

Permalink
Clean up socket logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Furtif committed Apr 20, 2017
1 parent ef4d1b9 commit 4d8be02
Show file tree
Hide file tree
Showing 49 changed files with 2,103 additions and 16 deletions.
27 changes: 15 additions & 12 deletions Common/UITranslation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,23 @@ public class UITranslation

[Description("Theme")]
public string Theme { get; set; }

[Description("Enter your command")]

[Description("Scheme")]
public string Scheme { get; set; }

[Description("Enter your Command")]
public string InputCommand { get; set; }

#endregion
#region Map

[Description("Zoom In")]
public string ZoomIn { get; set; }

[Description("ZoomOut")]
[Description("Zoom Out")]
public string ZoomOut { get; set; }

[Description("Clear map")]
[Description("Clear Map")]
public string ClearMap { get; set; }

[Description("Walk Here")]
Expand All @@ -77,7 +80,7 @@ public class UITranslation
[Description("100% IV")]
public string TabSnipeIV100 { get; set; }

[Description("Rare pokemon")]
[Description("Rare Pokemon")]
public string TabSnipeRarePokemon { get; set; }

[Description("Others")]
Expand Down Expand Up @@ -142,12 +145,12 @@ public class UITranslation
[Description("Snipe Upgrade Setting")]
public string MenuUpgradeFilterText { get; set; }


[Description("This pokemon can be evolve to below pokemon , please select the branch you want to evolve to")]
public string EvolveConfirm { get; set; }

[Description("Evolve Pokemon")]
public string EvolvePopupCaption { get; set; }

[Description("Search & Filters")]
public string FilterAndSearch { get; set; }

Expand Down Expand Up @@ -238,22 +241,19 @@ public class UITranslation
[Description("Longitude")]
public string Longitude { get; set; }


[Description("Distance")]
public string Distance { get; set; }


[Description("Close")]
public string Close { get; set; }


[Description("WalkHere")]
[Description("Walk Here")]
public string WalkToHere { get; set; }

[Description("CP")]
public string GymDefenderCP { get; set; }

[Description("Gym Point")]
[Description("Gym Points")]
public string GymPoints { get; set; }

[Description("Pokestops: {0}")]
Expand All @@ -267,10 +267,13 @@ public class UITranslation

[Description("Transfered: {0}")]
public string PokemonTransfered { get; set; }

[Description("HIDE")]
public string Hide { get; set; }

[Description("SHOW")]
public string Show { get; set; }

[Description("Transfer filter - {0}")]
public string TransferFilterFormTitle { get; set; }
#endregion
Expand Down
73 changes: 73 additions & 0 deletions Config/log4net.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="errorAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="ERROR" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\err.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="infoAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\info.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="debugAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="DEBUG" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\debug.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="perfAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs\perf.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="errorAppender" />
<appender-ref ref="infoAppender" />
<appender-ref ref="debugAppender" />
</root>
<logger name="Performance" additivity="false">
<level value="ALL" />
<appender-ref ref="perfAppender" />
</logger>
</log4net>
73 changes: 73 additions & 0 deletions Config/log4net.unix.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="errorAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="ERROR" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<File value="Logs/err.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="infoAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs/info.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="debugAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="DEBUG" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs/debug.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger - %message%newline" />
</layout>
</appender>
<appender name="perfAppender" type="log4net.Appender.RollingFileAppender">
<filter type="log4net.Filter.LevelMatchFilter">
<levelToMatch value="INFO" />
</filter>
<filter type="log4net.Filter.DenyAllFilter" />
<file value="Logs/perf.log" />
<encoding value="utf-8"/>
<preserveLogFileNameExtension value="true" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %logger - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
<appender-ref ref="errorAppender" />
<appender-ref ref="infoAppender" />
<appender-ref ref="debugAppender" />
</root>
<logger name="Performance" additivity="false">
<level value="ALL" />
<appender-ref ref="perfAppender" />
</logger>
</log4net>
74 changes: 72 additions & 2 deletions PoGo.NecroBot.Logic.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -119,6 +119,9 @@
<HintPath>$(SolutionDir)\packages\LiteDB.3.1.0\lib\net35\LiteDB.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.SignalR.Client, Version=2.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Microsoft.AspNet.SignalR.Client.2.2.1\lib\net45\Microsoft.AspNet.SignalR.Client.dll</HintPath>
<Private>True</Private>
Expand All @@ -140,6 +143,24 @@
<HintPath>$(SolutionDir)\packages\SocketIoClientDotNet.0.9.13\lib\net45\SocketIoClientDotNet.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SuperSocket.Common, Version=1.6.6.1, Culture=neutral, PublicKeyToken=6c80000676988ebb, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\SuperSocket.1.6.6.1\lib\net45\SuperSocket.Common.dll</HintPath>
</Reference>
<Reference Include="SuperSocket.Facility, Version=1.6.6.1, Culture=neutral, PublicKeyToken=6c80000676988ebb, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\SuperSocket.1.6.6.1\lib\net45\SuperSocket.Facility.dll</HintPath>
</Reference>
<Reference Include="SuperSocket.SocketBase, Version=1.6.6.1, Culture=neutral, PublicKeyToken=6c80000676988ebb, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\SuperSocket.1.6.6.1\lib\net45\SuperSocket.SocketBase.dll</HintPath>
</Reference>
<Reference Include="SuperSocket.SocketEngine, Version=1.6.6.1, Culture=neutral, PublicKeyToken=6c80000676988ebb, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\SuperSocket.Engine.1.6.6.1\lib\net45\SuperSocket.SocketEngine.dll</HintPath>
</Reference>
<Reference Include="SuperSocket.SocketService, Version=1.6.6.1, Culture=neutral, PublicKeyToken=6c80000676988ebb, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\SuperSocket.Engine.1.6.6.1\lib\net45\SuperSocket.SocketService.exe</HintPath>
</Reference>
<Reference Include="SuperSocket.WebSocket, Version=1.6.6.1, Culture=neutral, PublicKeyToken=6c80000676988ebb, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\SuperSocket.WebSocket.1.6.6.1\lib\net45\SuperSocket.WebSocket.dll</HintPath>
</Reference>
<Reference Include="System">
<Private>True</Private>
</Reference>
Expand All @@ -148,6 +169,7 @@
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
</Reference>
Expand Down Expand Up @@ -218,6 +240,9 @@
<Reference Include="WebDriver.Support, Version=3.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\Selenium.Support.3.3.0\lib\net40\WebDriver.Support.dll</HintPath>
</Reference>
<Reference Include="websocket-sharp, Version=1.0.2.59611, Culture=neutral, PublicKeyToken=5660b08a1845a91e, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\WebSocketSharp.1.0.3-rc11\lib\websocket-sharp.dll</HintPath>
</Reference>
<Reference Include="WebSocket4Net, Version=0.14.1.0, Culture=neutral, PublicKeyToken=eb4e154b696bf72a, processorArchitecture=MSIL">
<HintPath>$(SolutionDir)\packages\WebSocket4Net.0.14.1\lib\net45\WebSocket4Net.dll</HintPath>
<Private>True</Private>
Expand Down Expand Up @@ -427,6 +452,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Service\BotDataSocketClient.cs" />
<Compile Include="Service\TelegramCommand\ICommand.cs" />
<Compile Include="Service\TelegramCommand\LocCommand.cs" />
<Compile Include="Service\TelegramUtils.cs" />
Expand Down Expand Up @@ -456,6 +482,48 @@
<Compile Include="Service\TelegramService.cs" />
<Compile Include="Model\Settings\LogicSettings.cs" />
<Compile Include="Service\MapzenDirectionsService.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\DropItemHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\EvolvePokemonHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\FastpokemapHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\FavoritePokemonHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\HumanSnipePriorityPokemonHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\HumanSnipeRemovePokemonHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\LevelUpPokemonHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\SetConfigHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\SetMoveToTargetHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\SetTrainerNicknameHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\TransferPokemonHandler.cs" />
<Compile Include="Service\WebSocketHandler\ActionCommands\UpgradePokemonHandler.cs" />
<Compile Include="Service\WebSocketHandler\EncodingHelper.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Events\ConfigResponce.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Events\EggListResponce.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Events\ItemListResponce.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Events\PokemonListResponce.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Events\SnipeListResponce.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Events\TrainerProfileResponce.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Events\WebResponce.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\GetConfigHandler.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\GetEggListHandler.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\GetItemsListHandler.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\GetPokemonListHandler.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\GetPokemonSettingsHandler.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\GetPokemonSnipeListHandler.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\GetTrainerProfileHandler.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Helpers\ConfigWeb.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Helpers\EggListWeb.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Helpers\PokemonListWeb.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Helpers\TrainerProfileWeb.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Tasks\GetConfigTask.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Tasks\GetEggListTask.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Tasks\GetItemListTask.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Tasks\GetPokemonListTask.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Tasks\GetPokemonSettingsTask.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Tasks\GetPokemonSnipeListTask.cs" />
<Compile Include="Service\WebSocketHandler\GetCommands\Tasks\GetTrainerProfileTask.cs" />
<Compile Include="Service\WebSocketHandler\IWebSocketRequestHandler.cs" />
<Compile Include="Service\WebSocketHandler\IWebSocketResponce.cs" />
<Compile Include="Service\WebSocketHandler\WebSocketEventManager.cs" />
<Compile Include="Service\WebSocketInterface.cs" />
<Compile Include="Service\YoursDirectionsService.cs" />
<Compile Include="State\BlockableScope.cs" />
<Compile Include="State\BotSwitcherState.cs" />
Expand Down Expand Up @@ -582,6 +650,8 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="config.xlsm" />
<None Include="Config\log4net.config" />
<None Include="Config\log4net.unix.config" />
<None Include="packages.config" />
<None Include="Resources\msvc.cer" />
</ItemGroup>
Expand Down Expand Up @@ -614,4 +684,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
// [assembly: AssemblyVersion1("1.0.0.134")]


[assembly: AssemblyVersion("1.0.0.157")]
[assembly: AssemblyVersion("1.0.0.158")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("v1.0.0.157")]
[assembly: AssemblyInformationalVersion("v1.0.0.158")]
Loading

0 comments on commit 4d8be02

Please sign in to comment.