Merge pull request #381 from ilaborde/show_pokemons_count_on_pokeui

Detective Squirrel [2016-07-28 06:24:45]
Merge pull request #381 from ilaborde/show_pokemons_count_on_pokeui

Show pokemons count on PokeUI
Filename
PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
PokemonGo/RocketAPI/Window/PokeUi.cs
diff --git a/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs b/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
index d12f59b..fbf9fac 100644
--- a/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
+++ b/PokemonGo/RocketAPI/Window/PokeUi.Designer.cs
@@ -28,69 +28,94 @@
         /// </summary>
         private void InitializeComponent()
         {
-            this.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PokeUi));
-            this.listView1 = new System.Windows.Forms.ListView();
-            this.button1 = new System.Windows.Forms.Button();
-            this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
-            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
-            this.contextMenuStrip1.SuspendLayout();
-            this.SuspendLayout();
-            //
-            // listView1
-            //
-            this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+			this.components = new System.ComponentModel.Container();
+			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PokeUi));
+			this.listView1 = new System.Windows.Forms.ListView();
+			this.button1 = new System.Windows.Forms.Button();
+			this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
+			this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
+			this.label1 = new System.Windows.Forms.Label();
+			this.lblPokemonsCount = new System.Windows.Forms.Label();
+			this.contextMenuStrip1.SuspendLayout();
+			this.SuspendLayout();
+			//
+			// listView1
+			//
+			this.listView1.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.listView1.Location = new System.Drawing.Point(12, 12);
-            this.listView1.Name = "listView1";
-            this.listView1.Size = new System.Drawing.Size(411, 314);
-            this.listView1.TabIndex = 0;
-            this.listView1.UseCompatibleStateImageBehavior = false;
-            this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
-            this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
-            //
-            // button1
-            //
-            this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+			this.listView1.Location = new System.Drawing.Point(16, 50);
+			this.listView1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+			this.listView1.Name = "listView1";
+			this.listView1.Size = new System.Drawing.Size(547, 418);
+			this.listView1.TabIndex = 0;
+			this.listView1.UseCompatibleStateImageBehavior = false;
+			this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
+			this.listView1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseClick);
+			//
+			// button1
+			//
+			this.button1.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.Location = new System.Drawing.Point(12, 332);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(411, 26);
-            this.button1.TabIndex = 3;
-            this.button1.Text = "Reload";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
-            //
-            // contextMenuStrip1
-            //
-            this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
-            this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+			this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+			this.button1.Location = new System.Drawing.Point(16, 476);
+			this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+			this.button1.Name = "button1";
+			this.button1.Size = new System.Drawing.Size(548, 32);
+			this.button1.TabIndex = 3;
+			this.button1.Text = "Reload";
+			this.button1.UseVisualStyleBackColor = true;
+			this.button1.Click += new System.EventHandler(this.button1_Click);
+			//
+			// contextMenuStrip1
+			//
+			this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
+			this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.toolStripMenuItem1});
-            this.contextMenuStrip1.Name = "contextMenuStrip1";
-            this.contextMenuStrip1.Size = new System.Drawing.Size(118, 26);
-            //
-            // toolStripMenuItem1
-            //
-            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
-            this.toolStripMenuItem1.Size = new System.Drawing.Size(117, 22);
-            this.toolStripMenuItem1.Text = "Transfer";
-            this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
-            //
-            // PokeUi
-            //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(435, 363);
-            this.Controls.Add(this.button1);
-            this.Controls.Add(this.listView1);
-            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Name = "PokeUi";
-            this.Text = "PokeUi";
-            this.Load += new System.EventHandler(this.PokeUi_Load);
-            this.contextMenuStrip1.ResumeLayout(false);
-            this.ResumeLayout(false);
+			this.contextMenuStrip1.Name = "contextMenuStrip1";
+			this.contextMenuStrip1.Size = new System.Drawing.Size(131, 28);
+			//
+			// toolStripMenuItem1
+			//
+			this.toolStripMenuItem1.Name = "toolStripMenuItem1";
+			this.toolStripMenuItem1.Size = new System.Drawing.Size(130, 24);
+			this.toolStripMenuItem1.Text = "Transfer";
+			this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
+			//
+			// label1
+			//
+			this.label1.AutoSize = true;
+			this.label1.Location = new System.Drawing.Point(13, 19);
+			this.label1.Name = "label1";
+			this.label1.Size = new System.Drawing.Size(75, 17);
+			this.label1.TabIndex = 4;
+			this.label1.Text = "Pokemon: ";
+			//
+			// lblPokemonsCount
+			//
+			this.lblPokemonsCount.AutoSize = true;
+			this.lblPokemonsCount.Location = new System.Drawing.Point(90, 19);
+			this.lblPokemonsCount.Name = "lblPokemonsCount";
+			this.lblPokemonsCount.Size = new System.Drawing.Size(0, 17);
+			this.lblPokemonsCount.TabIndex = 5;
+			//
+			// PokeUi
+			//
+			this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+			this.ClientSize = new System.Drawing.Size(580, 514);
+			this.Controls.Add(this.lblPokemonsCount);
+			this.Controls.Add(this.label1);
+			this.Controls.Add(this.button1);
+			this.Controls.Add(this.listView1);
+			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+			this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+			this.Name = "PokeUi";
+			this.Text = "PokeUi";
+			this.Load += new System.EventHandler(this.PokeUi_Load);
+			this.contextMenuStrip1.ResumeLayout(false);
+			this.ResumeLayout(false);
+			this.PerformLayout();

         }

@@ -100,5 +125,7 @@
         private System.Windows.Forms.Button button1;
         private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
         private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
-    }
+		private System.Windows.Forms.Label label1;
+		private System.Windows.Forms.Label lblPokemonsCount;
+	}
 }
\ No newline at end of file
diff --git a/PokemonGo/RocketAPI/Window/PokeUi.cs b/PokemonGo/RocketAPI/Window/PokeUi.cs
index 8f2d7b6..523b3b0 100644
--- a/PokemonGo/RocketAPI/Window/PokeUi.cs
+++ b/PokemonGo/RocketAPI/Window/PokeUi.cs
@@ -61,9 +61,9 @@ namespace PokemonGo.RocketAPI.Window
                     .OrderByDescending(p => (int)p.FamilyId);


+				lblPokemonsCount.Text = pokemons.Count().ToString();

-
-                var imageList = new ImageList { ImageSize = new Size(50, 50) };
+				var imageList = new ImageList { ImageSize = new Size(50, 50) };
                 listView1.ShowItemToolTips = true;

                 foreach (var pokemon in pokemons)
You may download the files in Public Git.