diff --git a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
index bfeb935..6926060 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs
@@ -41,7 +41,7 @@
this.showAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.showAllToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.gMapControl1 = new GMap.NET.WindowsForms.GMapControl();
- this.objectListView1 = new BrightIdeasSoftware.ObjectListView();
+ this.olvPokemonList = new BrightIdeasSoftware.ObjectListView();
this.pkmnName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.pkmnCP = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.pkmnAtkIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
@@ -53,29 +53,39 @@
this.pkmnEvolveButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.largePokemonImageList = new System.Windows.Forms.ImageList(this.components);
this.smallPokemonImageList = new System.Windows.Forms.ImageList(this.components);
- this.button1 = new System.Windows.Forms.Button();
- this.tabControl1 = new System.Windows.Forms.TabControl();
- this.tabPage1 = new System.Windows.Forms.TabPage();
- this.label1 = new System.Windows.Forms.Label();
- this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.btnRefresh = new System.Windows.Forms.Button();
+ this.splitContainer1 = new System.Windows.Forms.SplitContainer();
+ this.splitContainer2 = new System.Windows.Forms.SplitContainer();
+ this.lblPokemonList = new System.Windows.Forms.Label();
+ this.pkmnCandy = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnCandyToEvolve = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.pkmnEvolveTimes = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
+ this.cmsPokemonList = new System.Windows.Forms.ContextMenuStrip(this.components);
this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
- this.tabControl1.SuspendLayout();
- this.tabPage1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.olvPokemonList)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+ this.splitContainer1.Panel1.SuspendLayout();
+ this.splitContainer1.Panel2.SuspendLayout();
+ this.splitContainer1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
+ this.splitContainer2.Panel1.SuspendLayout();
+ this.splitContainer2.Panel2.SuspendLayout();
+ this.splitContainer2.SuspendLayout();
this.SuspendLayout();
//
// logTextBox
//
this.logTextBox.BackColor = System.Drawing.Color.Black;
this.logTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.logTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.logTextBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.logTextBox.ForeColor = System.Drawing.Color.White;
this.logTextBox.ImeMode = System.Windows.Forms.ImeMode.Off;
- this.logTextBox.Location = new System.Drawing.Point(0, 24);
+ this.logTextBox.Location = new System.Drawing.Point(0, 0);
this.logTextBox.Name = "logTextBox";
this.logTextBox.ReadOnly = true;
- this.logTextBox.Size = new System.Drawing.Size(668, 338);
+ this.logTextBox.Size = new System.Drawing.Size(422, 294);
this.logTextBox.TabIndex = 0;
this.logTextBox.Text = "";
this.logTextBox.TextChanged += new System.EventHandler(this.logTextBox_TextChanged);
@@ -85,16 +95,16 @@
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.statusLabel});
- this.statusStrip1.Location = new System.Drawing.Point(0, 615);
+ this.statusStrip1.Location = new System.Drawing.Point(0, 541);
this.statusStrip1.Name = "statusStrip1";
- this.statusStrip1.Size = new System.Drawing.Size(1012, 22);
+ this.statusStrip1.Size = new System.Drawing.Size(1254, 22);
this.statusStrip1.TabIndex = 1;
this.statusStrip1.Text = "statusStrip1";
//
// statusLabel
//
this.statusLabel.Name = "statusLabel";
- this.statusLabel.Size = new System.Drawing.Size(43, 17);
+ this.statusLabel.Size = new System.Drawing.Size(39, 17);
this.statusLabel.Text = "Status";
//
// menuStrip1
@@ -107,35 +117,35 @@
this.forceUnbanToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
- this.menuStrip1.Size = new System.Drawing.Size(1012, 25);
+ this.menuStrip1.Size = new System.Drawing.Size(1254, 24);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// startStopBotToolStripMenuItem
//
this.startStopBotToolStripMenuItem.Name = "startStopBotToolStripMenuItem";
- this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(85, 21);
+ this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(77, 20);
this.startStopBotToolStripMenuItem.Text = "▶ Start Bot";
this.startStopBotToolStripMenuItem.Click += new System.EventHandler(this.startStopBotToolStripMenuItem_Click);
//
// todoToolStripMenuItem
//
this.todoToolStripMenuItem.Name = "todoToolStripMenuItem";
- this.todoToolStripMenuItem.Size = new System.Drawing.Size(66, 21);
+ this.todoToolStripMenuItem.Size = new System.Drawing.Size(61, 20);
this.todoToolStripMenuItem.Text = "Settings";
this.todoToolStripMenuItem.Click += new System.EventHandler(this.todoToolStripMenuItem_Click);
//
// useLuckyEggToolStripMenuItem
//
this.useLuckyEggToolStripMenuItem.Name = "useLuckyEggToolStripMenuItem";
- this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(105, 21);
+ this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(95, 20);
this.useLuckyEggToolStripMenuItem.Text = "Use Lucky Egg";
this.useLuckyEggToolStripMenuItem.Click += new System.EventHandler(this.useLuckyEggToolStripMenuItem_Click);
//
// forceUnbanToolStripMenuItem
//
this.forceUnbanToolStripMenuItem.Name = "forceUnbanToolStripMenuItem";
- this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(94, 21);
+ this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(86, 20);
this.forceUnbanToolStripMenuItem.Text = "Force Unban";
this.forceUnbanToolStripMenuItem.Click += new System.EventHandler(this.forceUnbanToolStripMenuItem_Click);
//
@@ -151,14 +161,16 @@
//
// gMapControl1
//
- this.gMapControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.gMapControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
this.gMapControl1.Bearing = 0F;
this.gMapControl1.CanDragMap = true;
this.gMapControl1.EmptyTileColor = System.Drawing.Color.Navy;
this.gMapControl1.GrayScaleMode = false;
this.gMapControl1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
this.gMapControl1.LevelsKeepInMemmory = 5;
- this.gMapControl1.Location = new System.Drawing.Point(674, 24);
+ this.gMapControl1.Location = new System.Drawing.Point(3, 3);
this.gMapControl1.MarkersEnabled = true;
this.gMapControl1.MaxZoom = 2;
this.gMapControl1.MinZoom = 2;
@@ -171,50 +183,56 @@
this.gMapControl1.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
this.gMapControl1.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
this.gMapControl1.ShowTileGridLines = false;
- this.gMapControl1.Size = new System.Drawing.Size(338, 338);
+ this.gMapControl1.Size = new System.Drawing.Size(416, 216);
this.gMapControl1.TabIndex = 23;
this.gMapControl1.Zoom = 0D;
//
- // objectListView1
- //
- this.objectListView1.AllColumns.Add(this.pkmnName);
- this.objectListView1.AllColumns.Add(this.pkmnCP);
- this.objectListView1.AllColumns.Add(this.pkmnAtkIV);
- this.objectListView1.AllColumns.Add(this.pkmnDefIV);
- this.objectListView1.AllColumns.Add(this.pkmnStaIV);
- this.objectListView1.AllColumns.Add(this.pkmnIV);
- this.objectListView1.AllColumns.Add(this.pkmnTransferButton);
- this.objectListView1.AllColumns.Add(this.pkmnPowerUpButton);
- this.objectListView1.AllColumns.Add(this.pkmnEvolveButton);
- this.objectListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ // olvPokemonList
+ //
+ this.olvPokemonList.AllColumns.Add(this.pkmnName);
+ this.olvPokemonList.AllColumns.Add(this.pkmnCP);
+ this.olvPokemonList.AllColumns.Add(this.pkmnAtkIV);
+ this.olvPokemonList.AllColumns.Add(this.pkmnDefIV);
+ this.olvPokemonList.AllColumns.Add(this.pkmnStaIV);
+ this.olvPokemonList.AllColumns.Add(this.pkmnIV);
+ this.olvPokemonList.AllColumns.Add(this.pkmnCandy);
+ this.olvPokemonList.AllColumns.Add(this.pkmnCandyToEvolve);
+ this.olvPokemonList.AllColumns.Add(this.pkmnEvolveTimes);
+ this.olvPokemonList.AllColumns.Add(this.pkmnTransferButton);
+ this.olvPokemonList.AllColumns.Add(this.pkmnPowerUpButton);
+ this.olvPokemonList.AllColumns.Add(this.pkmnEvolveButton);
+ this.olvPokemonList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.objectListView1.CellEditUseWholeCell = false;
- this.objectListView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+ this.olvPokemonList.CellEditUseWholeCell = false;
+ this.olvPokemonList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.pkmnName,
this.pkmnCP,
this.pkmnAtkIV,
this.pkmnDefIV,
this.pkmnStaIV,
this.pkmnIV,
+ this.pkmnCandy,
+ this.pkmnCandyToEvolve,
+ this.pkmnEvolveTimes,
this.pkmnTransferButton,
this.pkmnPowerUpButton,
this.pkmnEvolveButton});
- this.objectListView1.Cursor = System.Windows.Forms.Cursors.Default;
- this.objectListView1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.objectListView1.FullRowSelect = true;
- this.objectListView1.GridLines = true;
- this.objectListView1.LargeImageList = this.largePokemonImageList;
- this.objectListView1.Location = new System.Drawing.Point(0, 368);
- this.objectListView1.MultiSelect = false;
- this.objectListView1.Name = "objectListView1";
- this.objectListView1.RowHeight = 32;
- this.objectListView1.ShowGroups = false;
- this.objectListView1.Size = new System.Drawing.Size(668, 220);
- this.objectListView1.SmallImageList = this.smallPokemonImageList;
- this.objectListView1.TabIndex = 25;
- this.objectListView1.UseCompatibleStateImageBehavior = false;
- this.objectListView1.View = System.Windows.Forms.View.Details;
+ this.olvPokemonList.ContextMenuStrip = this.cmsPokemonList;
+ this.olvPokemonList.Cursor = System.Windows.Forms.Cursors.Default;
+ this.olvPokemonList.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.olvPokemonList.FullRowSelect = true;
+ this.olvPokemonList.GridLines = true;
+ this.olvPokemonList.LargeImageList = this.largePokemonImageList;
+ this.olvPokemonList.Location = new System.Drawing.Point(3, 3);
+ this.olvPokemonList.Name = "olvPokemonList";
+ this.olvPokemonList.RowHeight = 32;
+ this.olvPokemonList.ShowGroups = false;
+ this.olvPokemonList.Size = new System.Drawing.Size(822, 464);
+ this.olvPokemonList.SmallImageList = this.smallPokemonImageList;
+ this.olvPokemonList.TabIndex = 25;
+ this.olvPokemonList.UseCompatibleStateImageBehavior = false;
+ this.olvPokemonList.View = System.Windows.Forms.View.Details;
//
// pkmnName
//
@@ -252,7 +270,6 @@
this.pkmnIV.AspectName = "GetIV";
this.pkmnIV.AspectToStringFormat = "{0:P2}";
this.pkmnIV.Text = "IV %";
- this.pkmnIV.Width = 50;
//
// pkmnTransferButton
//
@@ -290,82 +307,102 @@
this.smallPokemonImageList.ImageSize = new System.Drawing.Size(32, 32);
this.smallPokemonImageList.TransparentColor = System.Drawing.Color.Transparent;
//
- // button1
+ // btnRefresh
//
- this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
- this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.button1.Location = new System.Drawing.Point(0, 588);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(668, 26);
- this.button1.TabIndex = 26;
- this.button1.Text = "Refresh";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // tabControl1
- //
- this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom;
- this.tabControl1.Controls.Add(this.tabPage1);
- this.tabControl1.Controls.Add(this.tabPage2);
- this.tabControl1.Enabled = false;
- this.tabControl1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.tabControl1.Location = new System.Drawing.Point(674, 368);
- this.tabControl1.Name = "tabControl1";
- this.tabControl1.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.tabControl1.SelectedIndex = 0;
- this.tabControl1.Size = new System.Drawing.Size(338, 244);
- this.tabControl1.TabIndex = 27;
- //
- // tabPage1
- //
- this.tabPage1.Controls.Add(this.label1);
- this.tabPage1.Location = new System.Drawing.Point(4, 4);
- this.tabPage1.Name = "tabPage1";
- this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage1.Size = new System.Drawing.Size(330, 216);
- this.tabPage1.TabIndex = 0;
- this.tabPage1.Text = "Incoming Feature";
- this.tabPage1.UseVisualStyleBackColor = true;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label1.Location = new System.Drawing.Point(67, 102);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(189, 25);
- this.label1.TabIndex = 0;
- this.label1.Text = "Incoming Features";
- //
- // tabPage2
- //
- this.tabPage2.Location = new System.Drawing.Point(4, 4);
- this.tabPage2.Name = "tabPage2";
- this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
- this.tabPage2.Size = new System.Drawing.Size(330, 216);
- this.tabPage2.TabIndex = 1;
- this.tabPage2.Text = ":3";
- this.tabPage2.UseVisualStyleBackColor = true;
+ this.btnRefresh.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+ this.btnRefresh.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btnRefresh.Location = new System.Drawing.Point(3, 486);
+ this.btnRefresh.Name = "btnRefresh";
+ this.btnRefresh.Size = new System.Drawing.Size(822, 28);
+ this.btnRefresh.TabIndex = 26;
+ this.btnRefresh.Text = "Refresh";
+ this.btnRefresh.UseVisualStyleBackColor = true;
+ this.btnRefresh.Click += new System.EventHandler(this.button1_Click);
+ //
+ // splitContainer1
+ //
+ this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer1.Location = new System.Drawing.Point(0, 24);
+ this.splitContainer1.Name = "splitContainer1";
+ //
+ // splitContainer1.Panel1
+ //
+ this.splitContainer1.Panel1.Controls.Add(this.splitContainer2);
+ //
+ // splitContainer1.Panel2
+ //
+ this.splitContainer1.Panel2.Controls.Add(this.lblPokemonList);
+ this.splitContainer1.Panel2.Controls.Add(this.olvPokemonList);
+ this.splitContainer1.Panel2.Controls.Add(this.btnRefresh);
+ this.splitContainer1.Size = new System.Drawing.Size(1254, 517);
+ this.splitContainer1.SplitterDistance = 422;
+ this.splitContainer1.TabIndex = 27;
+ //
+ // splitContainer2
+ //
+ this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.splitContainer2.Location = new System.Drawing.Point(0, 0);
+ this.splitContainer2.Name = "splitContainer2";
+ this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
+ //
+ // splitContainer2.Panel1
+ //
+ this.splitContainer2.Panel1.Controls.Add(this.logTextBox);
+ //
+ // splitContainer2.Panel2
+ //
+ this.splitContainer2.Panel2.Controls.Add(this.gMapControl1);
+ this.splitContainer2.Size = new System.Drawing.Size(422, 517);
+ this.splitContainer2.SplitterDistance = 294;
+ this.splitContainer2.TabIndex = 0;
+ //
+ // lblPokemonList
+ //
+ this.lblPokemonList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.lblPokemonList.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lblPokemonList.Location = new System.Drawing.Point(3, 470);
+ this.lblPokemonList.Name = "lblPokemonList";
+ this.lblPokemonList.Size = new System.Drawing.Size(822, 13);
+ this.lblPokemonList.TabIndex = 27;
+ this.lblPokemonList.Text = "0 / 0";
+ this.lblPokemonList.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ //
+ // pkmnCandy
+ //
+ this.pkmnCandy.AspectName = "Candy";
+ this.pkmnCandy.Text = "Candy";
+ //
+ // pkmnCandyToEvolve
+ //
+ this.pkmnCandyToEvolve.AspectName = "CandyToEvolve";
+ this.pkmnCandyToEvolve.Text = "CtE";
+ //
+ // pkmnEvolveTimes
+ //
+ this.pkmnEvolveTimes.AspectName = "EvolveTimes";
+ this.pkmnEvolveTimes.Text = "# Evolves";
+ this.pkmnEvolveTimes.Width = 70;
+ //
+ // cmsPokemonList
+ //
+ this.cmsPokemonList.Name = "cmsPokemonList";
+ this.cmsPokemonList.ShowImageMargin = false;
+ this.cmsPokemonList.Size = new System.Drawing.Size(36, 4);
//
// MainForm
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1012, 637);
- this.Controls.Add(this.gMapControl1);
- this.Controls.Add(this.logTextBox);
- this.Controls.Add(this.button1);
- this.Controls.Add(this.objectListView1);
+ this.ClientSize = new System.Drawing.Size(1254, 563);
+ this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
- this.Controls.Add(this.tabControl1);
this.ForeColor = System.Drawing.SystemColors.ControlText;
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MainMenuStrip = this.menuStrip1;
- this.MaximizeBox = false;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "PokemonGo Rocket API";
@@ -374,10 +411,15 @@
this.statusStrip1.PerformLayout();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
- this.tabControl1.ResumeLayout(false);
- this.tabPage1.ResumeLayout(false);
- this.tabPage1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.olvPokemonList)).EndInit();
+ this.splitContainer1.Panel1.ResumeLayout(false);
+ this.splitContainer1.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
+ this.splitContainer1.ResumeLayout(false);
+ this.splitContainer2.Panel1.ResumeLayout(false);
+ this.splitContainer2.Panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
+ this.splitContainer2.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -396,7 +438,7 @@
private System.Windows.Forms.ToolStripMenuItem useLuckyEggToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem forceUnbanToolStripMenuItem;
private GMap.NET.WindowsForms.GMapControl gMapControl1;
- private BrightIdeasSoftware.ObjectListView objectListView1;
+ private BrightIdeasSoftware.ObjectListView olvPokemonList;
private BrightIdeasSoftware.OLVColumn pkmnName;
private BrightIdeasSoftware.OLVColumn pkmnCP;
private BrightIdeasSoftware.OLVColumn pkmnAtkIV;
@@ -404,14 +446,17 @@
private BrightIdeasSoftware.OLVColumn pkmnStaIV;
private BrightIdeasSoftware.OLVColumn pkmnIV;
private BrightIdeasSoftware.OLVColumn pkmnTransferButton;
- private System.Windows.Forms.Button button1;
+ private System.Windows.Forms.Button btnRefresh;
private System.Windows.Forms.ImageList smallPokemonImageList;
private System.Windows.Forms.ImageList largePokemonImageList;
private BrightIdeasSoftware.OLVColumn pkmnPowerUpButton;
private BrightIdeasSoftware.OLVColumn pkmnEvolveButton;
- private System.Windows.Forms.TabControl tabControl1;
- private System.Windows.Forms.TabPage tabPage1;
- private System.Windows.Forms.TabPage tabPage2;
- private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.SplitContainer splitContainer1;
+ private System.Windows.Forms.SplitContainer splitContainer2;
+ private System.Windows.Forms.Label lblPokemonList;
+ private BrightIdeasSoftware.OLVColumn pkmnCandy;
+ private BrightIdeasSoftware.OLVColumn pkmnCandyToEvolve;
+ private BrightIdeasSoftware.OLVColumn pkmnEvolveTimes;
+ private System.Windows.Forms.ContextMenuStrip cmsPokemonList;
}
}
diff --git a/PokemonGo/RocketAPI/Window/MainForm.cs b/PokemonGo/RocketAPI/Window/MainForm.cs
index 91ee305..e939cf3 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.cs
+++ b/PokemonGo/RocketAPI/Window/MainForm.cs
@@ -27,7 +27,7 @@ using POGOProtos.Map.Fort;
using POGOProtos.Map.Pokemon;
using POGOProtos.Networking.Responses;
using static System.Reflection.Assembly;
-
+using System.ComponentModel;
namespace PokemonGo.RocketAPI.Window
{
@@ -1342,30 +1342,119 @@ namespace PokemonGo.RocketAPI.Window
private void InitializePokemonForm()
{
- objectListView1.ButtonClick += PokemonListButton_Click;
+ olvPokemonList.ButtonClick += PokemonListButton_Click;
pkmnName.ImageGetter = delegate (object rowObject)
{
- var pokemon = (PokemonData)rowObject;
+ var pokemon = rowObject as PokemonObject;
var key = pokemon.PokemonId.ToString();
- if (!objectListView1.SmallImageList.Images.ContainsKey(key))
+ if (!olvPokemonList.SmallImageList.Images.ContainsKey(key))
{
var img = GetPokemonImage((int)pokemon.PokemonId);
- objectListView1.SmallImageList.Images.Add(key, img);
+ olvPokemonList.SmallImageList.Images.Add(key, img);
}
return key;
};
- objectListView1.CellToolTipShowing += delegate (object sender, ToolTipShowingEventArgs args)
- {
- var pokemon = (PokemonData)args.Model;
+ olvPokemonList.FormatRow += delegate (object sender, FormatRowEventArgs e) {
+ var pok = e.Model as PokemonObject;
+ if (
+ olvPokemonList.Objects.Cast<PokemonObject>()
+ .Select(i => i.PokemonId)
+ .Where(p => p == pok.PokemonId)
+ .Count() > 1)
+ e.Item.BackColor = Color.LightGreen;
+
+ foreach (OLVListSubItem sub in e.Item.SubItems) {
+ if (sub.Text.Equals("Evolve") && !pok.CanEvolve) {
+ sub.CellPadding = new Rectangle(100, 100, 0, 0);
+ }
+ }
+ };
+
+ cmsPokemonList.Opening += delegate (object sender, CancelEventArgs e) {
+ e.Cancel = false;
+ cmsPokemonList.Items.Clear();
+
+ var pokemons = olvPokemonList.SelectedObjects.Cast<PokemonObject>().Select(o => o.PokemonData);
+ var canAllEvolve =
+ olvPokemonList.SelectedObjects.Cast<PokemonObject>()
+ .Select(o => o)
+ .Where(o => o.CanEvolve == false)
+ .Count() == 0;
+ var count = pokemons.Count();
+
+ if (count < 1) {
+ e.Cancel = true;
+ return;
+ }
+
+ var pokemonObject = olvPokemonList.SelectedObjects.Cast<PokemonObject>().Select(o => o).First();
- var family = families
- .Where(i => (int)i.FamilyId <= (int)pokemon.PokemonId)
- .First();
+ var item = new ToolStripMenuItem();
+ var separator = new ToolStripSeparator();
+ item.Text = "Transfer " + count + " pokemon";
+ item.Click += delegate { TransferPokemon(pokemons); };
+ cmsPokemonList.Items.Add(item);
- args.Text = $"You have {family.Candy_} {(PokemonId)family.FamilyId} Candy";
+ if (canAllEvolve) {
+ item = new ToolStripMenuItem();
+ item.Text = "Evolve " + count + " pokemon";
+ item.Click += delegate { EvolvePokemon(pokemons); };
+ cmsPokemonList.Items.Add(item);
+ }
+
+ if (count == 1) {
+ item = new ToolStripMenuItem();
+ item.Text = "PowerUp";
+ item.Click += delegate { PowerUpPokemon(pokemons); };
+ cmsPokemonList.Items.Add(item);
+
+ cmsPokemonList.Items.Add(separator);
+
+ item = new ToolStripMenuItem();
+ item.Text = "Transfer Clean Up (Keep highest IV)";
+ item.Click += delegate {
+ CleanUpTransferPokemon(pokemonObject, "IV");
+ };
+ cmsPokemonList.Items.Add(item);
+
+ item = new ToolStripMenuItem();
+ item.Text = "Transfer Clean Up (Keep highest CP)";
+ item.Click += delegate {
+ CleanUpTransferPokemon(pokemonObject, "CP");
+ };
+ cmsPokemonList.Items.Add(item);
+
+ item = new ToolStripMenuItem();
+ item.Text = "Evolve Clean Up (Highest IV)";
+ item.Click += delegate {
+ CleanUpEvolvePokemon(pokemonObject, "IV");
+ };
+ cmsPokemonList.Items.Add(item);
+
+ item = new ToolStripMenuItem();
+ item.Text = "Evolve Clean Up (Highest CP)";
+ item.Click += delegate {
+ CleanUpEvolvePokemon(pokemonObject, "CP");
+ };
+ cmsPokemonList.Items.Add(item);
+ /*
+ cmsPokemonList.Items.Add(separator);
+
+ item = new ToolStripMenuItem();
+ item.Text = "Rename";
+ item.Click += delegate (object obj, EventArgs args) {
+
+ using (var form = new NicknamePokemonForm(pokemonObject)) {
+ if (form.ShowDialog() == DialogResult.OK) {
+ NicknamePokemon(pokemonObject, form.txtNickname.Text);
+ }
+ }
+ };*/
+ cmsPokemonList.Items.Add(item);
+ }
};
}
@@ -1374,28 +1463,63 @@ namespace PokemonGo.RocketAPI.Window
return (Image)Properties.Resources.ResourceManager.GetObject("Pokemon_" + pokemonId);
}
+ private void SetState(bool state) {
+ btnRefresh.Enabled = state;
+ olvPokemonList.Enabled = state;
+ //flpItems.Enabled = state;
+ }
+
private async Task ReloadPokemonList()
{
- button1.Enabled = false;
- objectListView1.Enabled = false;
+ btnRefresh.Enabled = false;
+ olvPokemonList.Enabled = false;
try
{
_client2 = new Client(ClientSettings, new ApiFailureStrategy());
await _client2.Login.DoLogin();
+
var inventory = await _client2.Inventory.GetInventory();
+ var profile = await _client2.Player.GetPlayer();
+ var itemTemplates = await _client2.Download.GetItemTemplates();
+
+ PokemonObject.Initilize(itemTemplates);
+
var pokemons =
inventory.InventoryDelta.InventoryItems.Select(i => i?.InventoryItemData?.PokemonData)
.Where(p => p != null && p?.PokemonId > 0)
- .OrderByDescending(key => key.Cp);
+ .OrderByDescending(key => key.GetIV())
+ .OrderByDescending(key => key.Cp)
+ .OrderBy(key => key.PokemonId);
families = inventory.InventoryDelta.InventoryItems
.Select(i => i.InventoryItemData.Candy)
.Where(p => p != null && p.FamilyId > 0)
.OrderByDescending(p => p.FamilyId);
- var prevTopItem = objectListView1.TopItemIndex;
- objectListView1.SetObjects(pokemons);
- objectListView1.TopItemIndex = prevTopItem;
+ var pokemonObjects = new List<PokemonObject>();
+ foreach (var pokemon in pokemons) {
+ var pokemonObject = new PokemonObject(pokemon);
+ var family =
+ families.Where(i => (int) i.FamilyId <= (int) pokemon.PokemonId)
+ .First();
+ pokemonObject.Candy = family.Candy_;
+ pokemonObjects.Add(pokemonObject);
+ }
+
+ var prevTopItem = olvPokemonList.TopItemIndex;
+ olvPokemonList.SetObjects(pokemonObjects);
+ olvPokemonList.TopItemIndex = prevTopItem;
+
+ var pokemoncount =
+ inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.PokemonData)
+ .Where(p => p != null && p?.PokemonId > 0)
+ .Count();
+ var eggcount =
+ inventory.InventoryDelta.InventoryItems.Select(i => i.InventoryItemData?.PokemonData)
+ .Where(p => p != null && p?.IsEgg == true)
+ .Count();
+ lblPokemonList.Text = pokemoncount + eggcount + " / " + profile.PlayerData.MaxPokemonStorage + " (" +
+ pokemoncount + " pokemon, " + eggcount + " eggs)";
}
catch (GoogleException ex)
{
@@ -1415,26 +1539,27 @@ namespace PokemonGo.RocketAPI.Window
_client2 = null;
}
- button1.Enabled = true;
- objectListView1.Enabled = true;
+ btnRefresh.Enabled = true;
+ olvPokemonList.Enabled = true;
}
private void PokemonListButton_Click(object sender, CellClickEventArgs e)
{
try
{
- var pokemon = (PokemonData)e.Model;
- if (e.ColumnIndex == 6)
+ var pokemon = e.Model as PokemonObject;
+ var cName = olvPokemonList.AllColumns[e.ColumnIndex].AspectToStringFormat;
+ if (cName.Equals("Transfer"))
{
- TransferPokemon(pokemon);
+ TransferPokemon(new List<PokemonData> { pokemon.PokemonData });
}
- else if (e.ColumnIndex == 7)
+ else if (cName.Equals("Power Up"))
{
- PowerUpPokemon(pokemon);
+ PowerUpPokemon(new List<PokemonData> { pokemon.PokemonData });
}
- else if (e.ColumnIndex == 8)
+ else if (cName.Equals("Evolve"))
{
- EvolvePokemon(pokemon);
+ EvolvePokemon(new List<PokemonData> { pokemon.PokemonData });
}
}
catch (Exception ex)
@@ -1445,55 +1570,117 @@ namespace PokemonGo.RocketAPI.Window
}
}
- private async void TransferPokemon(PokemonData pokemon)
+ private async void TransferPokemon(IEnumerable<PokemonData> pokemons)
{
- if (
- MessageBox.Show($"Are you sure you want to transfer {pokemon.PokemonId} with {pokemon.Cp} CP?",
- "Confirmation", MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
+ SetState(false);
+ foreach (var pokemon in pokemons) {
var transferPokemonResponse = await _client2.Inventory.TransferPokemon(pokemon.Id);
-
- if (transferPokemonResponse.Result == ReleasePokemonResponse.Types.Result.Success)
- {
+ if (transferPokemonResponse.Result == ReleasePokemonResponse.Types.Result.Success) {
ColoredConsoleWrite(Color.Magenta,
$"{pokemon.PokemonId} was transferred. {transferPokemonResponse.CandyAwarded} candy awarded");
- ReloadPokemonList();
- }
- else
- {
+ } else {
ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be transferred");
}
}
+ ReloadPokemonList();
}
- private async void PowerUpPokemon(PokemonData pokemon)
+ private async void PowerUpPokemon(IEnumerable<PokemonData> pokemons)
{
- var evolvePokemonResponse = await _client2.Inventory.UpgradePokemon(pokemon.Id);
+ SetState(false);
+ foreach (var pokemon in pokemons) {
+ var evolvePokemonResponse = await _client2.Inventory.UpgradePokemon(pokemon.Id);
+ if (evolvePokemonResponse.Result == UpgradePokemonResponse.Types.Result.Success) {
+ ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} successfully upgraded.");
+ } else {
+ ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be upgraded");
+ }
+ }
+ ReloadPokemonList();
+ }
- if (evolvePokemonResponse.Result == UpgradePokemonResponse.Types.Result.Success)
- {
- ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} successfully upgraded.");
+ private async void EvolvePokemon(IEnumerable<PokemonData> pokemons)
+ {
+ SetState(false);
+ foreach (var pokemon in pokemons) {
+ var evolvePokemonResponse = await _client2.Inventory.EvolvePokemon(pokemon.Id);
+ if (evolvePokemonResponse.Result == EvolvePokemonResponse.Types.Result.Success) {
+ ColoredConsoleWrite(Color.Magenta,
+ $"{pokemon.PokemonId} successfully evolved into {evolvePokemonResponse.EvolvedPokemonData.PokemonId}\n{evolvePokemonResponse.ExperienceAwarded} experience awarded\n{evolvePokemonResponse.CandyAwarded} candy awarded");
+
+ } else {
+ ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be evolved");
+ }
+ }
+ ReloadPokemonList();
+ }
+
+ private void CleanUpTransferPokemon(PokemonObject pokemon, string type) {
+ int ET = pokemon.EvolveTimes;
+ int pokemonCount =
+ olvPokemonList.Objects.Cast<PokemonObject>()
+ .Where(p => p.PokemonId == pokemon.PokemonId)
+ .Count();
+
+ if (pokemonCount < ET) {
ReloadPokemonList();
+ return;
}
- else
- {
- ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be upgraded");
+
+ if (ET == 0)
+ ET = 1;
+
+ if (type.Equals("IV")) {
+ var pokemons =
+ olvPokemonList.Objects.Cast<PokemonObject>()
+ .Where(p => p.PokemonId == pokemon.PokemonId)
+ .Select(p => p.PokemonData)
+ .OrderBy(p => p.Cp)
+ .OrderBy(p => p.GetIV())
+ .Take(pokemonCount - ET);
+
+ TransferPokemon(pokemons);
+ } else if (type.Equals("CP")) {
+ var pokemons =
+ olvPokemonList.Objects.Cast<PokemonObject>()
+ .Where(p => p.PokemonId == pokemon.PokemonId)
+ .Select(p => p.PokemonData)
+ .OrderBy(p => p.GetIV())
+ .OrderBy(p => p.Cp)
+ .Take(pokemonCount - ET);
+
+ TransferPokemon(pokemons);
}
}
- private async void EvolvePokemon(PokemonData pokemon)
- {
- var evolvePokemonResponse = await _client2.Inventory.EvolvePokemon(pokemon.Id);
+ private void CleanUpEvolvePokemon(PokemonObject pokemon, string type) {
+ int ET = pokemon.EvolveTimes;
- if (evolvePokemonResponse.Result == EvolvePokemonResponse.Types.Result.Success)
- {
- ColoredConsoleWrite(Color.Magenta,
- $"{pokemon.PokemonId} successfully evolved into {evolvePokemonResponse.EvolvedPokemonData.PokemonId}\n{evolvePokemonResponse.ExperienceAwarded} experience awarded\n{evolvePokemonResponse.CandyAwarded} candy awarded");
+ if (ET < 1) {
ReloadPokemonList();
+ return;
}
- else
- {
- ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be evolved");
+
+ if (type.Equals("IV")) {
+ var pokemons =
+ olvPokemonList.Objects.Cast<PokemonObject>()
+ .Where(p => p.PokemonId == pokemon.PokemonId)
+ .Select(p => p.PokemonData)
+ .OrderByDescending(p => p.Cp)
+ .OrderByDescending(p => p.GetIV())
+ .Take(ET);
+
+ EvolvePokemon(pokemons);
+ } else if (type.Equals("CP")) {
+ var pokemons =
+ olvPokemonList.Objects.Cast<PokemonObject>()
+ .Where(p => p.PokemonId == pokemon.PokemonId)
+ .Select(p => p.PokemonData)
+ .OrderByDescending(p => p.GetIV())
+ .OrderByDescending(p => p.Cp)
+ .Take(ET);
+
+ EvolvePokemon(pokemons);
}
}
@@ -1628,20 +1815,6 @@ namespace PokemonGo.RocketAPI.Window
private async void button1_Click(object sender, EventArgs e)
{
- if (pkmnIV.AspectGetter == null)
- {
- pkmnIV.AspectGetter = delegate (object rowObject)
- {
- var data = rowObject as PokemonData;
- if (data != null)
- {
- return data.GetIV();
- }
-
- return 0.0f;
- };
- }
-
await ReloadPokemonList();
}
diff --git a/PokemonGo/RocketAPI/Window/MainForm.resx b/PokemonGo/RocketAPI/Window/MainForm.resx
index 1821e28..da88d67 100644
--- a/PokemonGo/RocketAPI/Window/MainForm.resx
+++ b/PokemonGo/RocketAPI/Window/MainForm.resx
@@ -123,6 +123,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 18</value>
</metadata>
+ <metadata name="cmsPokemonList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>540, 18</value>
+ </metadata>
<metadata name="largePokemonImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>357, 18</value>
</metadata>
diff --git a/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj b/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj
index 0803b4c..40131f1 100644
--- a/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj
+++ b/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj
@@ -88,6 +88,7 @@
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
+ <Compile Include="PokemonObject.cs" />
<Compile Include="RouteOptimizer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
diff --git a/PokemonGo/RocketAPI/Window/PokemonObject.cs b/PokemonGo/RocketAPI/Window/PokemonObject.cs
new file mode 100644
index 0000000..c913f95
--- /dev/null
+++ b/PokemonGo/RocketAPI/Window/PokemonObject.cs
@@ -0,0 +1,108 @@
+using POGOProtos.Data;
+using POGOProtos.Enums;
+using POGOProtos.Networking.Responses;
+using System.Collections.Generic;
+
+namespace PokemonGo.RocketAPI.Window
+{
+ public class PokemonObject
+ {
+ private static bool initialized;
+ public static Dictionary<PokemonId, int> candyToEvolveDict = new Dictionary<PokemonId, int>();
+
+ public PokemonObject(PokemonData pokemonData)
+ {
+ PokemonData = pokemonData;
+ }
+
+ public PokemonData PokemonData { get; }
+
+ public ulong Id
+ {
+ get { return PokemonData.Id; }
+ }
+
+ public PokemonId PokemonId
+ {
+ get { return PokemonData.PokemonId; }
+ }
+
+ public int Cp
+ {
+ get { return PokemonData.Cp; }
+ }
+
+ public int IndividualAttack
+ {
+ get { return PokemonData.IndividualAttack; }
+ }
+
+ public int IndividualDefense
+ {
+ get { return PokemonData.IndividualDefense; }
+ }
+
+ public int IndividualStamina
+ {
+ get { return PokemonData.IndividualStamina; }
+ }
+
+ public float GetIV
+ {
+ get { return (IndividualAttack + IndividualDefense + IndividualStamina) / 45f; }
+ }
+
+ public string Nickname {
+ get { return PokemonData.Nickname; }
+ }
+
+ public int Candy { get; set; } = 0;
+
+ public int CandyToEvolve
+ {
+ get
+ {
+ if (candyToEvolveDict.ContainsKey(PokemonData.PokemonId))
+ {
+ return candyToEvolveDict[PokemonData.PokemonId];
+ }
+ return 0;
+ }
+ }
+
+ public int EvolveTimes
+ {
+ get
+ {
+ if (CandyToEvolve > 0)
+ {
+ return Candy/CandyToEvolve;
+ }
+ return 0;
+ }
+ }
+
+ public bool CanEvolve
+ {
+ get { return EvolveTimes > 0; }
+ }
+
+ public static void Initilize(DownloadItemTemplatesResponse itemtemplates)
+ {
+ if (!initialized)
+ {
+ foreach (var t in itemtemplates.ItemTemplates)
+ {
+ if (t != null)
+ {
+ if (t.PokemonSettings != null)
+ {
+ candyToEvolveDict.Add(t.PokemonSettings.PokemonId, t.PokemonSettings.CandyToEvolve);
+ }
+ }
+ }
+ initialized = true;
+ }
+ }
+ }
+}
\ No newline at end of file
You may download the files in Public Git.