Added Settings Toggle Option for:

Spegeli [2016-07-23 00:37:10]
Added Settings Toggle Option for:
* EvolveAllPokemonWithEnoughCandy
* TransferDuplicatePokemon
Default both are True

Added EvolveAllPokemonWithEnoughCandy to the ExecuteFarmingPokestopsAndPokemons()
Filename
PokemonGo.RocketAPI.Console/Settings.cs
PokemonGo.RocketAPI.Console/UserSettings.Designer.cs
PokemonGo.RocketAPI.Console/UserSettings.settings
PokemonGo.RocketAPI.Logic/Logic.cs
PokemonGo.RocketAPI/ISettings.cs
diff --git a/PokemonGo.RocketAPI.Console/Settings.cs b/PokemonGo.RocketAPI.Console/Settings.cs
index 1478c95..113081d 100644
--- a/PokemonGo.RocketAPI.Console/Settings.cs
+++ b/PokemonGo.RocketAPI.Console/Settings.cs
@@ -22,6 +22,8 @@ namespace PokemonGo.RocketAPI.Console
         public float KeepMinIVPercentage => UserSettings.Default.KeepMinIVPercentage;
         public int KeepMinCP => UserSettings.Default.KeepMinCP;
         public double WalkingSpeedInKilometerPerHour => UserSettings.Default.WalkingSpeedInKilometerPerHour;
+        public bool EvolveAllPokemonWithEnoughCandy => UserSettings.Default.EvolveAllPokemonWithEnoughCandy;
+        public bool TransferDuplicatePokemon => UserSettings.Default.TransferDuplicatePokemon;

         public string GoogleRefreshToken
         {
@@ -136,6 +138,28 @@ namespace PokemonGo.RocketAPI.Console
                 throw new NotImplementedException();
             }
         }
-
+
+        public ICollection<PokemonId> PokemonsNotToTransfer
+        {
+            get
+            {
+                //Type of pokemons not to transfer
+                return new[]
+            {
+                    PokemonId.Dragonite,
+                    PokemonId.Charizard,
+                    PokemonId.Zapdos,
+                    PokemonId.Snorlax,
+                    PokemonId.Alakhazam,
+                    PokemonId.Mew,
+                    PokemonId.Mewtwo
+                };
+            }
+            set
+            {
+                throw new NotImplementedException();
+            }
+        }
+
     }
 }
diff --git a/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs b/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs
index 96d7083..790d092 100644
--- a/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs
+++ b/PokemonGo.RocketAPI.Console/UserSettings.Designer.cs
@@ -1,180 +1,170 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
+//     Dieser Code wurde von einem Tool generiert.
+//     Laufzeitversion:4.0.30319.42000
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
+//     der Code erneut generiert wird.
 // </auto-generated>
 //------------------------------------------------------------------------------

-namespace PokemonGo.RocketAPI.Console
-{
-
-
+namespace PokemonGo.RocketAPI.Console {
+
+
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
     [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
-    internal sealed partial class UserSettings : global::System.Configuration.ApplicationSettingsBase
-    {
-
+    internal sealed partial class UserSettings : global::System.Configuration.ApplicationSettingsBase {
+
         private static UserSettings defaultInstance = ((UserSettings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new UserSettings())));
-
-        public static UserSettings Default
-        {
-            get
-            {
+
+        public static UserSettings Default {
+            get {
                 return defaultInstance;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("Google")]
-        public string AuthType
-        {
-            get
-            {
-                return ((string)(this["AuthType"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("")]
+        public string GoogleRefreshToken {
+            get {
+                return ((string)(this["GoogleRefreshToken"]));
             }
-            set
-            {
-                this["AuthType"] = value;
+            set {
+                this["GoogleRefreshToken"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("username2")]
-        public string PtcUsername
-        {
-            get
-            {
-                return ((string)(this["PtcUsername"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("10")]
+        public double DefaultAltitude {
+            get {
+                return ((double)(this["DefaultAltitude"]));
             }
-            set
-            {
-                this["PtcUsername"] = value;
+            set {
+                this["DefaultAltitude"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("pw")]
-        public string PtcPassword
-        {
-            get
-            {
-                return ((string)(this["PtcPassword"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("85")]
+        public float KeepMinIVPercentage {
+            get {
+                return ((float)(this["KeepMinIVPercentage"]));
             }
-            set
-            {
-                this["PtcPassword"] = value;
+            set {
+                this["KeepMinIVPercentage"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("")]
-        public string GoogleRefreshToken
-        {
-            get
-            {
-                return ((string)(this["GoogleRefreshToken"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("1000")]
+        public int KeepMinCP {
+            get {
+                return ((int)(this["KeepMinCP"]));
             }
-            set
-            {
-                this["GoogleRefreshToken"] = value;
+            set {
+                this["KeepMinCP"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("52.379189")]
-        public double DefaultLatitude
-        {
-            get
-            {
-                return ((double)(this["DefaultLatitude"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("50")]
+        public double WalkingSpeedInKilometerPerHour {
+            get {
+                return ((double)(this["WalkingSpeedInKilometerPerHour"]));
             }
-            set
-            {
-                this["DefaultLatitude"] = value;
+            set {
+                this["WalkingSpeedInKilometerPerHour"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("4.899431")]
-        public double DefaultLongitude
-        {
-            get
-            {
-                return ((double)(this["DefaultLongitude"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("Ptc")]
+        public string AuthType {
+            get {
+                return ((string)(this["AuthType"]));
             }
-            set
-            {
-                this["DefaultLongitude"] = value;
+            set {
+                this["AuthType"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("10")]
-        public double DefaultAltitude
-        {
-            get
-            {
-                return ((double)(this["DefaultAltitude"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("Jarolon")]
+        public string PtcUsername {
+            get {
+                return ((string)(this["PtcUsername"]));
             }
-            set
-            {
-                this["DefaultAltitude"] = value;
+            set {
+                this["PtcUsername"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("85")]
-        public float KeepMinIVPercentage
-        {
-            get
-            {
-                return ((float)(this["KeepMinIVPercentage"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("5dfM56Rh")]
+        public string PtcPassword {
+            get {
+                return ((string)(this["PtcPassword"]));
             }
-            set
-            {
-                this["KeepMinIVPercentage"] = value;
+            set {
+                this["PtcPassword"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("1000")]
-        public int KeepMinCP
-        {
-            get
-            {
-                return ((int)(this["KeepMinCP"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("48.78")]
+        public double DefaultLatitude {
+            get {
+                return ((double)(this["DefaultLatitude"]));
             }
-            set
-            {
-                this["KeepMinCP"] = value;
+            set {
+                this["DefaultLatitude"] = value;
             }
         }
-
+
         [global::System.Configuration.UserScopedSettingAttribute()]
         [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-        [global::System.Configuration.DefaultSettingValueAttribute("50")]
-        public double WalkingSpeedInKilometerPerHour
-        {
-            get
-            {
-                return ((double)(this["WalkingSpeedInKilometerPerHour"]));
+        [global::System.Configuration.DefaultSettingValueAttribute("9.18274")]
+        public double DefaultLongitude {
+            get {
+                return ((double)(this["DefaultLongitude"]));
             }
-            set
-            {
-                this["WalkingSpeedInKilometerPerHour"] = value;
+            set {
+                this["DefaultLongitude"] = value;
+            }
+        }
+
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
+        public string EvolveAllPokemonWithEnoughCandy {
+            get {
+                return ((string)(this["EvolveAllPokemonWithEnoughCandy"]));
+            }
+            set {
+                this["EvolveAllPokemonWithEnoughCandy"] = value;
+            }
+        }
+
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("True")]
+        public string TransferDuplicatePokemon {
+            get {
+                return ((string)(this["TransferDuplicatePokemon"]));
+            }
+            set {
+                this["TransferDuplicatePokemon"] = value;
             }
         }
     }
-}
\ No newline at end of file
+}
diff --git a/PokemonGo.RocketAPI.Console/UserSettings.settings b/PokemonGo.RocketAPI.Console/UserSettings.settings
index 29496ad..e7d4f35 100644
--- a/PokemonGo.RocketAPI.Console/UserSettings.settings
+++ b/PokemonGo.RocketAPI.Console/UserSettings.settings
@@ -2,27 +2,12 @@
 <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="PokemonGo.RocketAPI.Console" GeneratedClassName="UserSettings">
   <Profiles />
   <Settings>
-    <Setting Name="AuthType" Type="System.String" Scope="User">
-      <Value Profile="(Default)">Google</Value>
-    </Setting>
-    <Setting Name="PtcUsername" Type="System.String" Scope="User">
-      <Value Profile="(Default)">username</Value>
-    </Setting>
     <Setting Name="GoogleRefreshToken" Type="System.String" Scope="User">
       <Value Profile="(Default)" />
     </Setting>
     <Setting Name="DefaultAltitude" Type="System.Double" Scope="User">
       <Value Profile="(Default)">10</Value>
     </Setting>
-    <Setting Name="PtcPassword" Type="System.String" Scope="User">
-      <Value Profile="(Default)">password</Value>
-    </Setting>
-    <Setting Name="DefaultLatitude" Type="System.Double" Scope="User">
-      <Value Profile="(Default)">0</Value>
-    </Setting>
-    <Setting Name="DefaultLongitude" Type="System.Double" Scope="User">
-      <Value Profile="(Default)">0</Value>
-    </Setting>
     <Setting Name="KeepMinIVPercentage" Type="System.Single" Scope="User">
       <Value Profile="(Default)">85</Value>
     </Setting>
@@ -31,6 +16,27 @@
     </Setting>
     <Setting Name="WalkingSpeedInKilometerPerHour" Type="System.Double" Scope="User">
       <Value Profile="(Default)">50</Value>
-    </Setting>
+    </Setting>
+    <Setting Name="AuthType" Type="System.String" Scope="User">
+      <Value Profile="(Default)">Ptc</Value>
+    </Setting>
+    <Setting Name="PtcUsername" Type="System.String" Scope="User">
+      <Value Profile="(Default)">Jarolon</Value>
+    </Setting>
+    <Setting Name="PtcPassword" Type="System.String" Scope="User">
+      <Value Profile="(Default)">5dfM56Rh</Value>
+    </Setting>
+    <Setting Name="DefaultLatitude" Type="System.Double" Scope="User">
+      <Value Profile="(Default)">48.78</Value>
+    </Setting>
+    <Setting Name="DefaultLongitude" Type="System.Double" Scope="User">
+      <Value Profile="(Default)">9.18274</Value>
+    </Setting>
+    <Setting Name="EvolveAllPokemonWithEnoughCandy" Type="System.String" Scope="User">
+      <Value Profile="(Default)">True</Value>
+    </Setting>
+    <Setting Name="TransferDuplicatePokemon" Type="System.String" Scope="User">
+      <Value Profile="(Default)">True</Value>
+    </Setting>
   </Settings>
 </SettingsFile>
\ No newline at end of file
diff --git a/PokemonGo.RocketAPI.Logic/Logic.cs b/PokemonGo.RocketAPI.Logic/Logic.cs
index 866ba33..1583bb0 100644
--- a/PokemonGo.RocketAPI.Logic/Logic.cs
+++ b/PokemonGo.RocketAPI.Logic/Logic.cs
@@ -92,8 +92,8 @@ namespace PokemonGo.RocketAPI.Logic
                     Logger.Normal(ConsoleColor.DarkGray, $"Stardust: {profile.Profile.Currency.ToArray()[1].Amount}");
                     Logger.Normal(ConsoleColor.Yellow, "----------------------------");

-                    await EvolveAllPokemonWithEnoughCandy(_clientSettings.PokemonsToEvolve);
-                    await TransferDuplicatePokemon();
+                    if (_clientSettings.EvolveAllPokemonWithEnoughCandy) await EvolveAllPokemonWithEnoughCandy(_clientSettings.PokemonsToEvolve);
+                    if (_clientSettings.TransferDuplicatePokemon) await TransferDuplicatePokemon();
                     await RecycleItems();
                     await ExecuteFarmingPokestopsAndPokemons();

@@ -140,7 +140,8 @@ namespace PokemonGo.RocketAPI.Logic
             foreach (var pokeStop in pokeStops)
             {
                 await ExecuteCatchAllNearbyPokemons();
-                await TransferDuplicatePokemon();
+                if (_clientSettings.EvolveAllPokemonWithEnoughCandy) await EvolveAllPokemonWithEnoughCandy(_clientSettings.PokemonsToEvolve);
+                if (_clientSettings.TransferDuplicatePokemon) await TransferDuplicatePokemon();

                 var distance = Navigation.DistanceBetween2Coordinates(_client.CurrentLat, _client.CurrentLng, pokeStop.Latitude, pokeStop.Longitude);
                 var update = await _navigation.HumanLikeWalking(new Navigation.Location(pokeStop.Latitude, pokeStop.Longitude), _clientSettings.WalkingSpeedInKilometerPerHour, ExecuteCatchAllNearbyPokemons);
diff --git a/PokemonGo.RocketAPI/ISettings.cs b/PokemonGo.RocketAPI/ISettings.cs
index cb1684e..5bfa4ee 100644
--- a/PokemonGo.RocketAPI/ISettings.cs
+++ b/PokemonGo.RocketAPI/ISettings.cs
@@ -16,9 +16,13 @@ namespace PokemonGo.RocketAPI
         float KeepMinIVPercentage { get; }
         int KeepMinCP { get; }
         double WalkingSpeedInKilometerPerHour { get; }
+        bool EvolveAllPokemonWithEnoughCandy { get; }
+        bool TransferDuplicatePokemon { get; }

         ICollection<KeyValuePair<AllEnum.ItemId, int>> ItemRecycleFilter { get; set; }

         ICollection<AllEnum.PokemonId> PokemonsToEvolve { get; }
+
+        ICollection<AllEnum.PokemonId> PokemonsNotToTransfer { get; }
     }
 }
\ No newline at end of file
You may download the files in Public Git.