diff --git a/src/RocketBotGUI/MainForm.cs b/src/RocketBotGUI/MainForm.cs
index 300d78e..916fc67 100644
--- a/src/RocketBotGUI/MainForm.cs
+++ b/src/RocketBotGUI/MainForm.cs
@@ -5,6 +5,7 @@ using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
+using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
@@ -35,6 +36,9 @@ namespace PokemonGo.RocketAPI.Window
public static MainForm Instance;
public static SynchronizationContext SynchronizationContext;
+ //delay between actions, to similate human operation
+ private const int ACTIONDELAY = 1500;
+
public static Settings ClientSettings;
private static int _currentlevel = -1;
private static int _totalExperience;
@@ -131,7 +135,7 @@ namespace PokemonGo.RocketAPI.Window
public static double GetRuntime()
{
- return (DateTime.Now - TimeStarted).TotalSeconds/3600;
+ return (DateTime.Now - TimeStarted).TotalSeconds / 3600;
}
public void CheckVersion()
@@ -314,10 +318,10 @@ namespace PokemonGo.RocketAPI.Window
//Calculating the exp needed to level up
float expNextLvl = v.NextLevelXp - v.Experience;
//Calculating the exp made per second
- xpSec = Math.Round(_totalExperience/GetRuntime())/60/60;
+ xpSec = Math.Round(_totalExperience / GetRuntime()) / 60 / 60;
//Calculating the seconds left to level up
if (xpSec != 0)
- secondsLeft = Convert.ToInt32(expNextLvl/xpSec);
+ secondsLeft = Convert.ToInt32(expNextLvl / xpSec);
//formatting data to make an output like DateFormat
while (secondsLeft > 60)
{
@@ -340,8 +344,8 @@ namespace PokemonGo.RocketAPI.Window
_getSessionRuntimeInTimeFormat(), v.Experience - v.PrevLevelXp - XpDiff,
v.NextLevelXp - v.PrevLevelXp - XpDiff,
profile.PlayerData.Currencies.ToArray()[1].Amount) +
- " | XP/Hour: " + Math.Round(_totalExperience/GetRuntime()) + " | Pokemon/Hour: " +
- Math.Round(_totalPokemon/GetRuntime()) + " | NextLevel in: " + hoursLeft + ":" +
+ " | XP/Hour: " + Math.Round(_totalExperience / GetRuntime()) + " | Pokemon/Hour: " +
+ Math.Round(_totalPokemon / GetRuntime()) + " | NextLevel in: " + hoursLeft + ":" +
minutesLeft +
":" + secondsLeft);
}
@@ -587,7 +591,7 @@ namespace PokemonGo.RocketAPI.Window
var request =
(HttpWebRequest)
WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" + name_english);
- var response = (HttpWebResponse) request.GetResponse();
+ var response = (HttpWebResponse)request.GetResponse();
pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
}
else
@@ -685,7 +689,7 @@ namespace PokemonGo.RocketAPI.Window
{
SynchronizationContext.Post(o =>
{
- _playerMarker.Position = (PointLatLng) o;
+ _playerMarker.Position = (PointLatLng)o;
_searchAreaOverlay.Polygons.Clear();
}, new PointLatLng(latitude, longitude));
@@ -882,7 +886,7 @@ namespace PokemonGo.RocketAPI.Window
return string.Empty;
return enumerable.GroupBy(i => i.ItemId)
- .Select(kvp => new {ItemName = kvp.Key.ToString().Substring(4), Amount = kvp.Sum(x => x.ItemCount)})
+ .Select(kvp => new { ItemName = kvp.Key.ToString().Substring(4), Amount = kvp.Sum(x => x.ItemCount) })
.Select(y => $"{y.Amount}x {y.ItemName}")
.Aggregate((a, b) => $"{a}, {b}");
}
@@ -893,7 +897,7 @@ namespace PokemonGo.RocketAPI.Window
var unwantedPokemonTypes = new List<PokemonId>();
for (var i = 1; i <= 151; i++)
{
- unwantedPokemonTypes.Add((PokemonId) i);
+ unwantedPokemonTypes.Add((PokemonId)i);
}
var inventory = await client.Inventory.GetInventory();
@@ -920,7 +924,7 @@ namespace PokemonGo.RocketAPI.Window
{
if (poke == null)
return 0f;
- return (poke.IndividualAttack + poke.IndividualDefense + poke.IndividualStamina)/45f*100f;
+ return (poke.IndividualAttack + poke.IndividualDefense + poke.IndividualStamina) / 45f * 100f;
}
private async Task TransferAllGivenPokemons(Client client, IEnumerable<PokemonData> unwantedPokemons,
@@ -960,7 +964,7 @@ namespace PokemonGo.RocketAPI.Window
(HttpWebRequest)
WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" +
name_english);
- var response = (HttpWebResponse) request.GetResponse();
+ var response = (HttpWebResponse)request.GetResponse();
pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
}
else
@@ -992,7 +996,7 @@ namespace PokemonGo.RocketAPI.Window
inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.PokemonData)
.Where(p => p != null && p?.PokemonId > 0);
- var dupes = allpokemons.OrderBy(x => x.Cp).Select((x, i) => new {index = i, value = x})
+ var dupes = allpokemons.OrderBy(x => x.Cp).Select((x, i) => new { index = i, value = x })
.GroupBy(x => x.value.PokemonId)
.Where(x => x.Skip(1).Any());
@@ -1018,7 +1022,7 @@ namespace PokemonGo.RocketAPI.Window
(HttpWebRequest)
WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" +
name_english);
- var response = (HttpWebResponse) request.GetResponse();
+ var response = (HttpWebResponse)request.GetResponse();
pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
}
else
@@ -1039,7 +1043,7 @@ namespace PokemonGo.RocketAPI.Window
inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.PokemonData)
.Where(p => p != null && p?.PokemonId > 0);
- var dupes = allpokemons.OrderBy(x => Perfect(x)).Select((x, i) => new {index = i, value = x})
+ var dupes = allpokemons.OrderBy(x => Perfect(x)).Select((x, i) => new { index = i, value = x })
.GroupBy(x => x.value.PokemonId)
.Where(x => x.Skip(1).Any());
@@ -1065,7 +1069,7 @@ namespace PokemonGo.RocketAPI.Window
(HttpWebRequest)
WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" +
name_english);
- var response = (HttpWebResponse) request.GetResponse();
+ var response = (HttpWebResponse)request.GetResponse();
pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
}
else
@@ -1085,7 +1089,7 @@ namespace PokemonGo.RocketAPI.Window
inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.PokemonData)
.Where(p => p != null && p?.PokemonId > 0);
- var dupes = allpokemons.OrderBy(x => Perfect(x)).Select((x, i) => new {index = i, value = x})
+ var dupes = allpokemons.OrderBy(x => Perfect(x)).Select((x, i) => new { index = i, value = x })
.GroupBy(x => x.value.PokemonId)
.Where(x => x.Skip(1).Any());
@@ -1117,7 +1121,7 @@ namespace PokemonGo.RocketAPI.Window
(HttpWebRequest)
WebRequest.Create("http://boosting-service.de/pokemon/index.php?pokeName=" +
name_english);
- var response = (HttpWebResponse) request.GetResponse();
+ var response = (HttpWebResponse)request.GetResponse();
pokemonName = new StreamReader(response.GetResponseStream()).ReadToEnd();
}
else
@@ -1172,7 +1176,7 @@ namespace PokemonGo.RocketAPI.Window
await Task.Delay(1000);
else
- await Task.Delay(ClientSettings.LevelTimeInterval*1000);
+ await Task.Delay(ClientSettings.LevelTimeInterval * 1000);
// PrintLevel(client);
}
@@ -1199,10 +1203,10 @@ namespace PokemonGo.RocketAPI.Window
//Calculating the exp needed to level up
float expNextLvl = v.NextLevelXp - v.Experience;
//Calculating the exp made per second
- xpSec = Math.Round(_totalExperience/GetRuntime())/60/60;
+ xpSec = Math.Round(_totalExperience / GetRuntime()) / 60 / 60;
//Calculating the seconds left to level up
if (xpSec != 0)
- secondsLeft = Convert.ToInt32(expNextLvl/xpSec);
+ secondsLeft = Convert.ToInt32(expNextLvl / xpSec);
//formatting data to make an output like DateFormat
while (secondsLeft > 60)
{
@@ -1223,8 +1227,8 @@ namespace PokemonGo.RocketAPI.Window
" | Level: {0:0} - ({2:0} / {3:0}) | Runtime {1} | Stardust: {4:0}", v.Level,
_getSessionRuntimeInTimeFormat(), v.Experience - v.PrevLevelXp - XpDiff,
v.NextLevelXp - v.PrevLevelXp - XpDiff, profile.PlayerData.Currencies.ToArray()[1].Amount) +
- " | XP/Hour: " + Math.Round(_totalExperience/GetRuntime()) + " | Pokemon/Hour: " +
- Math.Round(_totalPokemon/GetRuntime()) + " | NextLevel in: " + hoursLeft + ":" + minutesLeft +
+ " | XP/Hour: " + Math.Round(_totalExperience / GetRuntime()) + " | Pokemon/Hour: " +
+ Math.Round(_totalPokemon / GetRuntime()) + " | NextLevel in: " + hoursLeft + ":" + minutesLeft +
":" + secondsLeft);
}
await Task.Delay(1000);
@@ -1434,24 +1438,23 @@ namespace PokemonGo.RocketAPI.Window
{
olvPokemonList.ButtonClick += PokemonListButton_Click;
- pkmnName.ImageGetter = delegate(object rowObject)
+ pkmnName.ImageGetter = delegate (object rowObject)
{
var pokemon = rowObject as PokemonObject;
var key = pokemon.PokemonId.ToString();
if (!olvPokemonList.SmallImageList.Images.ContainsKey(key))
{
- var img = GetPokemonImage((int) pokemon.PokemonId);
+ var img = GetPokemonImage((int)pokemon.PokemonId);
olvPokemonList.SmallImageList.Images.Add(key, img);
}
return key;
};
- olvPokemonList.FormatRow += delegate(object sender, FormatRowEventArgs e)
+ olvPokemonList.FormatRow += delegate (object sender, FormatRowEventArgs e)
{
var pok = e.Model as PokemonObject;
- if (
- olvPokemonList.Objects.Cast<PokemonObject>()
+ if (olvPokemonList.Objects.Cast<PokemonObject>()
.Select(i => i.PokemonId)
.Where(p => p == pok.PokemonId)
.Count() > 1)
@@ -1466,7 +1469,7 @@ namespace PokemonGo.RocketAPI.Window
}
};
- cmsPokemonList.Opening += delegate(object sender, CancelEventArgs e)
+ cmsPokemonList.Opening += delegate (object sender, CancelEventArgs e)
{
e.Cancel = false;
cmsPokemonList.Items.Clear();
@@ -1493,6 +1496,20 @@ namespace PokemonGo.RocketAPI.Window
item.Click += delegate { TransferPokemon(pokemons); };
cmsPokemonList.Items.Add(item);
+ item = new ToolStripMenuItem();
+ item.Text = "Rename";
+ item.Click += delegate
+ {
+ using (var form = count == 1 ? new NicknamePokemonForm(pokemonObject) : new NicknamePokemonForm())
+ {
+ if (form.ShowDialog() == DialogResult.OK)
+ {
+ NicknamePokemon(pokemons, form.txtNickname.Text);
+ }
+ }
+ };
+ cmsPokemonList.Items.Add(item);
+
if (canAllEvolve)
{
item = new ToolStripMenuItem();
@@ -1531,27 +1548,13 @@ namespace PokemonGo.RocketAPI.Window
cmsPokemonList.Items.Add(item);
cmsPokemonList.Items.Add(separator);
-
- item = new ToolStripMenuItem();
- item.Text = "Rename";
- item.Click += delegate
- {
- using (var form = new NicknamePokemonForm(pokemonObject))
- {
- if (form.ShowDialog() == DialogResult.OK)
- {
- NicknamePokemon(pokemonObject, form.txtNickname.Text);
- }
- }
- };
- cmsPokemonList.Items.Add(item);
}
};
}
private Image GetPokemonImage(int pokemonId)
{
- return (Image) Properties.Resources.ResourceManager.GetObject("Pokemon_" + pokemonId);
+ return (Image)Properties.Resources.ResourceManager.GetObject("Pokemon_" + pokemonId);
}
private void SetState(bool state)
@@ -1607,7 +1610,7 @@ namespace PokemonGo.RocketAPI.Window
{
var pokemonObject = new PokemonObject(pokemon);
var family =
- families.Where(i => (int) i.FamilyId <= (int) pokemon.PokemonId)
+ families.Where(i => (int)i.FamilyId <= (int)pokemon.PokemonId)
.First();
pokemonObject.Candy = family.Candy_;
pokemonObjects.Add(pokemonObject);
@@ -1674,7 +1677,7 @@ namespace PokemonGo.RocketAPI.Window
private async void ItemBox_ItemClick(object sender, EventArgs e)
{
- var item = (ItemData) sender;
+ var item = (ItemData)sender;
using (var form = new ItemForm(item))
{
@@ -1764,15 +1767,15 @@ namespace PokemonGo.RocketAPI.Window
var cName = olvPokemonList.AllColumns[e.ColumnIndex].AspectToStringFormat;
if (cName.Equals("Transfer"))
{
- TransferPokemon(new List<PokemonData> {pokemon.PokemonData});
+ TransferPokemon(new List<PokemonData> { pokemon.PokemonData });
}
else if (cName.Equals("Power Up"))
{
- PowerUpPokemon(new List<PokemonData> {pokemon.PokemonData});
+ PowerUpPokemon(new List<PokemonData> { pokemon.PokemonData });
}
else if (cName.Equals("Evolve"))
{
- EvolvePokemon(new List<PokemonData> {pokemon.PokemonData});
+ EvolvePokemon(new List<PokemonData> { pokemon.PokemonData });
}
}
catch (Exception ex)
@@ -1928,7 +1931,7 @@ namespace PokemonGo.RocketAPI.Window
public async Task<IEnumerable<ItemData>> GetItemsToRecycle(ISettings _settings, Client client)
{
- var settings = (Settings) _settings;
+ var settings = (Settings)_settings;
var myItems = await GetItems(client);
return myItems
@@ -1986,20 +1989,20 @@ namespace PokemonGo.RocketAPI.Window
var ballCollection = inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.Item)
.Where(p => p != null)
.GroupBy(i => i.ItemId)
- .Select(kvp => new {ItemId = kvp.Key, Amount = kvp.Sum(x => x.Count)})
+ .Select(kvp => new { ItemId = kvp.Key, Amount = kvp.Sum(x => x.Count) })
.Where(y => y.ItemId == ItemId.ItemPokeBall
|| y.ItemId == ItemId.ItemGreatBall
|| y.ItemId == ItemId.ItemUltraBall
|| y.ItemId == ItemId.ItemMasterBall);
var pokeBallsCount = ballCollection.Where(p => p.ItemId == ItemId.ItemPokeBall).
- DefaultIfEmpty(new {ItemId = ItemId.ItemPokeBall, Amount = 0}).FirstOrDefault().Amount;
+ DefaultIfEmpty(new { ItemId = ItemId.ItemPokeBall, Amount = 0 }).FirstOrDefault().Amount;
var greatBallsCount = ballCollection.Where(p => p.ItemId == ItemId.ItemGreatBall).
- DefaultIfEmpty(new {ItemId = ItemId.ItemGreatBall, Amount = 0}).FirstOrDefault().Amount;
+ DefaultIfEmpty(new { ItemId = ItemId.ItemGreatBall, Amount = 0 }).FirstOrDefault().Amount;
var ultraBallsCount = ballCollection.Where(p => p.ItemId == ItemId.ItemUltraBall).
- DefaultIfEmpty(new {ItemId = ItemId.ItemUltraBall, Amount = 0}).FirstOrDefault().Amount;
+ DefaultIfEmpty(new { ItemId = ItemId.ItemUltraBall, Amount = 0 }).FirstOrDefault().Amount;
var masterBallsCount = ballCollection.Where(p => p.ItemId == ItemId.ItemMasterBall).
- DefaultIfEmpty(new {ItemId = ItemId.ItemMasterBall, Amount = 0}).FirstOrDefault().Amount;
+ DefaultIfEmpty(new { ItemId = ItemId.ItemMasterBall, Amount = 0 }).FirstOrDefault().Amount;
// Use better balls for high CP pokemon
if (masterBallsCount > 0 && pokemonCP >= 1000)
@@ -2045,19 +2048,36 @@ namespace PokemonGo.RocketAPI.Window
return ItemId.ItemPokeBall;
}
- public async void NicknamePokemon(PokemonObject pokemon, string nickname)
+ public async void NicknamePokemon(IEnumerable<PokemonData> pokemons, string nickname)
{
SetState(false);
- var response = await _client2.Inventory.NicknamePokemon(pokemon.Id, nickname);
- if (response.Result == NicknamePokemonResponse.Types.Result.Success)
- {
- ColoredConsoleWrite(Color.Green, $"Successfully renamed {pokemon.PokemonId} to \"{nickname}\"");
- }
- else
+ foreach (var pokemon in pokemons)
{
- ColoredConsoleWrite(Color.Red, $"Failed renaming {pokemon.PokemonId} to \"{nickname}\"");
+ var newName = new StringBuilder(nickname);
+ newName.Replace("{Name}", Convert.ToString(pokemon.PokemonId));
+ newName.Replace("{CP}", Convert.ToString(pokemon.Cp));
+ newName.Replace("{IV}", Convert.ToString(Math.Round(Perfect(pokemon))));
+ newName.Replace("{IA}", Convert.ToString(pokemon.IndividualAttack));
+ newName.Replace("{ID}", Convert.ToString(pokemon.IndividualDefense));
+ newName.Replace("{IS}", Convert.ToString(pokemon.IndividualStamina));
+ nickname = newName.ToString();
+ if (nickname.Length > 12)
+ {
+ ColoredConsoleWrite(Color.Red, $"\"{nickname}\" is too long, please choose another name");
+ continue;
+ }
+ var response = await _client2.Inventory.NicknamePokemon(pokemon.Id, nickname);
+ if (response.Result == NicknamePokemonResponse.Types.Result.Success)
+ {
+ ColoredConsoleWrite(Color.Green, $"Successfully renamed {pokemon.PokemonId} to \"{nickname}\"");
+ }
+ else
+ {
+ ColoredConsoleWrite(Color.Red, $"Failed renaming {pokemon.PokemonId} to \"{nickname}\"");
+ }
+ await Task.Delay(ACTIONDELAY);
}
- ReloadPokemonList();
+ await ReloadPokemonList();
}
private async void button1_Click(object sender, EventArgs e)
diff --git a/src/RocketBotGUI/NicknamePokemonForm.Designer.cs b/src/RocketBotGUI/NicknamePokemonForm.Designer.cs
index 1c50675..2aefa2d 100644
--- a/src/RocketBotGUI/NicknamePokemonForm.Designer.cs
+++ b/src/RocketBotGUI/NicknamePokemonForm.Designer.cs
@@ -27,6 +27,9 @@
this.txtNickname = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnNickname = new System.Windows.Forms.Button();
+ this.label2 = new System.Windows.Forms.Label();
+ this.label3 = new System.Windows.Forms.Label();
+ this.label4 = new System.Windows.Forms.Label();
this.pnl.SuspendLayout();
this.SuspendLayout();
//
@@ -34,20 +37,23 @@
//
this.pnl.BackColor = System.Drawing.SystemColors.Window;
this.pnl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.pnl.Controls.Add(this.label4);
+ this.pnl.Controls.Add(this.label3);
+ this.pnl.Controls.Add(this.label2);
this.pnl.Controls.Add(this.txtNickname);
this.pnl.Controls.Add(this.label1);
this.pnl.Controls.Add(this.btnNickname);
this.pnl.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnl.Location = new System.Drawing.Point(0, 0);
this.pnl.Name = "pnl";
- this.pnl.Size = new System.Drawing.Size(401, 144);
+ this.pnl.Size = new System.Drawing.Size(401, 205);
this.pnl.TabIndex = 0;
//
// txtNickname
//
this.txtNickname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.txtNickname.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.txtNickname.Location = new System.Drawing.Point(16, 44);
+ this.txtNickname.Location = new System.Drawing.Point(16, 41);
this.txtNickname.Name = "txtNickname";
this.txtNickname.Size = new System.Drawing.Size(372, 35);
this.txtNickname.TabIndex = 0;
@@ -55,13 +61,13 @@
//
// label1
//
- this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
+ this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label1.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.ForeColor = System.Drawing.SystemColors.ControlDark;
- this.label1.Location = new System.Drawing.Point(11, 8);
+ this.label1.Location = new System.Drawing.Point(11, 7);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(377, 33);
+ this.label1.Size = new System.Drawing.Size(377, 30);
this.label1.TabIndex = 6;
this.label1.Text = "Nickname Pokemon";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
@@ -73,18 +79,52 @@
this.btnNickname.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNickname.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnNickname.ForeColor = System.Drawing.SystemColors.ControlDark;
- this.btnNickname.Location = new System.Drawing.Point(133, 95);
+ this.btnNickname.Location = new System.Drawing.Point(133, 160);
this.btnNickname.Name = "btnNickname";
- this.btnNickname.Size = new System.Drawing.Size(140, 35);
+ this.btnNickname.Size = new System.Drawing.Size(140, 32);
this.btnNickname.TabIndex = 1;
this.btnNickname.Text = "Rename";
this.btnNickname.UseVisualStyleBackColor = true;
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
+ this.label2.Location = new System.Drawing.Point(11, 79);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(105, 15);
+ this.label2.TabIndex = 7;
+ this.label2.Text = "Rename Template:";
+ //
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
+ this.label3.Location = new System.Drawing.Point(13, 98);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(142, 45);
+ this.label3.TabIndex = 8;
+ this.label3.Text = "{Name} : Pokemon Name\r\n{CP} : Pokemon CP\r\n{IV} : Pokemon IV %";
+ //
+ // label4
+ //
+ this.label4.AutoSize = true;
+ this.label4.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
+ this.label4.Location = new System.Drawing.Point(191, 98);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(186, 45);
+ this.label4.TabIndex = 9;
+ this.label4.Text = "{IA} : Pokemon Individual Attack\r\n{ID} : Pokemon Individual Defense\r\n{IS} : Pokem" +
+ "on Individual Stamina";
//
// NicknamePokemonForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(401, 144);
+ this.ClientSize = new System.Drawing.Size(401, 205);
this.Controls.Add(this.pnl);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "NicknamePokemonForm";
@@ -102,5 +142,8 @@
private System.Windows.Forms.Button btnNickname;
public System.Windows.Forms.TextBox txtNickname;
private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label3;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.Label label4;
}
}
\ No newline at end of file
diff --git a/src/RocketBotGUI/NicknamePokemonForm.cs b/src/RocketBotGUI/NicknamePokemonForm.cs
index 1bd3d54..b549819 100644
--- a/src/RocketBotGUI/NicknamePokemonForm.cs
+++ b/src/RocketBotGUI/NicknamePokemonForm.cs
@@ -4,6 +4,13 @@ namespace PokemonGo.RocketAPI.Window
{
public partial class NicknamePokemonForm : Form
{
+ public NicknamePokemonForm()
+ {
+ InitializeComponent();
+ txtNickname.Text = @"{IV}_{Name}";
+ txtNickname.KeyDown += TxtNickname_KeyDown;
+ }
+
public NicknamePokemonForm(PokemonObject pokemon)
{
InitializeComponent();
diff --git a/src/RocketBotGUI/NicknamePokemonForm.resx b/src/RocketBotGUI/NicknamePokemonForm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/src/RocketBotGUI/NicknamePokemonForm.resx
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/src/RocketBotGUI/PokemonGo.RocketBot.csproj b/src/RocketBotGUI/PokemonGo.RocketBot.csproj
index 24273d2..0cbf4da 100644
--- a/src/RocketBotGUI/PokemonGo.RocketBot.csproj
+++ b/src/RocketBotGUI/PokemonGo.RocketBot.csproj
@@ -120,6 +120,9 @@
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="NicknamePokemonForm.resx">
+ <DependentUpon>NicknamePokemonForm.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
You may download the files in Public Git.