From b5966aed8a28a640b1d15a3814c8fa52aab24c19 Mon Sep 17 00:00:00 2001 From: CJB Date: Wed, 10 Aug 2016 01:50:35 +0200 Subject: [PATCH 1/3] Implement new GUI options - Detailed candy information - Multi Transfer and Evolve --- .../RocketAPI/Window/MainForm.Designer.cs | 299 ++++++++++------- PokemonGo/RocketAPI/Window/MainForm.cs | 315 ++++++++++++++---- PokemonGo/RocketAPI/Window/MainForm.resx | 3 + .../Window/PokemonGo.RocketBot.csproj | 1 + PokemonGo/RocketAPI/Window/PokemonObject.cs | 108 ++++++ 5 files changed, 528 insertions(+), 198 deletions(-) create mode 100644 PokemonGo/RocketAPI/Window/PokemonObject.cs diff --git a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs index bfeb93578..6926060d6 100644 --- a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs +++ b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs @@ -41,7 +41,7 @@ private void InitializeComponent() 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 @@ private void InitializeComponent() 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 @@ private void InitializeComponent() 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 @@ private void InitializeComponent() 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 @@ private void InitializeComponent() // // 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 @@ private void InitializeComponent() 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 @@ private void InitializeComponent() this.pkmnIV.AspectName = "GetIV"; this.pkmnIV.AspectToStringFormat = "{0:P2}"; this.pkmnIV.Text = "IV %"; - this.pkmnIV.Width = 50; // // pkmnTransferButton // @@ -290,82 +307,102 @@ private void InitializeComponent() 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 @@ private void InitializeComponent() 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 void InitializeComponent() 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 void InitializeComponent() 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 91ee305ee..e939cf373 100644 --- a/PokemonGo/RocketAPI/Window/MainForm.cs +++ b/PokemonGo/RocketAPI/Window/MainForm.cs @@ -27,7 +27,7 @@ using POGOProtos.Map.Pokemon; using POGOProtos.Networking.Responses; using static System.Reflection.Assembly; - +using System.ComponentModel; namespace PokemonGo.RocketAPI.Window { @@ -1342,30 +1342,119 @@ private void pokeToolStripMenuItem_Click(object sender, EventArgs e) 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() + .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().Select(o => o.PokemonData); + var canAllEvolve = + olvPokemonList.SelectedObjects.Cast() + .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().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 @@ private Image GetPokemonImage(int pokemonId) 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(); + 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 @@ private async Task ReloadPokemonList() _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 { pokemon.PokemonData }); } - else if (e.ColumnIndex == 7) + else if (cName.Equals("Power Up")) { - PowerUpPokemon(pokemon); + PowerUpPokemon(new List { pokemon.PokemonData }); } - else if (e.ColumnIndex == 8) + else if (cName.Equals("Evolve")) { - EvolvePokemon(pokemon); + EvolvePokemon(new List { pokemon.PokemonData }); } } catch (Exception ex) @@ -1445,55 +1570,117 @@ private void PokemonListButton_Click(object sender, CellClickEventArgs e) } } - private async void TransferPokemon(PokemonData pokemon) + private async void TransferPokemon(IEnumerable 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 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 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() + .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() + .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() + .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() + .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() + .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 @@ private async Task GetBestBall(int? pokemonCP) 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 1821e2824..da88d67fa 100644 --- a/PokemonGo/RocketAPI/Window/MainForm.resx +++ b/PokemonGo/RocketAPI/Window/MainForm.resx @@ -123,6 +123,9 @@ 132, 18 + + 540, 18 + 357, 18 diff --git a/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj b/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj index 0803b4c97..40131f1b7 100644 --- a/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj +++ b/PokemonGo/RocketAPI/Window/PokemonGo.RocketBot.csproj @@ -88,6 +88,7 @@ MainForm.cs + diff --git a/PokemonGo/RocketAPI/Window/PokemonObject.cs b/PokemonGo/RocketAPI/Window/PokemonObject.cs new file mode 100644 index 000000000..c913f9524 --- /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 candyToEvolveDict = new Dictionary(); + + 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 From 3f751ccdac131badc5d6696652a7c614e220ad1a Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Aug 2016 19:55:43 -0700 Subject: [PATCH 2/3] Clean up & update assembly version --- PokemonGo/RocketAPI/Window/MainForm.cs | 227 ++++++++++-------- .../Window/Properties/AssemblyInfo.cs | 2 +- 2 files changed, 125 insertions(+), 104 deletions(-) diff --git a/PokemonGo/RocketAPI/Window/MainForm.cs b/PokemonGo/RocketAPI/Window/MainForm.cs index e939cf373..527390e1d 100644 --- a/PokemonGo/RocketAPI/Window/MainForm.cs +++ b/PokemonGo/RocketAPI/Window/MainForm.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Drawing; using System.IO; using System.Linq; using System.Net; -using System.Reflection; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -27,7 +27,6 @@ using POGOProtos.Map.Pokemon; using POGOProtos.Networking.Responses; using static System.Reflection.Assembly; -using System.ComponentModel; namespace PokemonGo.RocketAPI.Window { @@ -48,19 +47,19 @@ public partial class MainForm : Form public static DateTime InitSessionDateTime = DateTime.Now; private static bool _botStarted; + private readonly GMapOverlay _playerOverlay = new GMapOverlay("players"); + private readonly GMapOverlay _pokemonsOverlay = new GMapOverlay("pokemons"); + private readonly GMapOverlay _pokestopsOverlay = new GMapOverlay("pokestops"); + + private readonly GMapOverlay _searchAreaOverlay = new GMapOverlay("areas"); private Client _client; private Client _client2; private LocationManager _locationManager; private GMarkerGoogle _playerMarker; - private readonly GMapOverlay _playerOverlay = new GMapOverlay("players"); - private readonly GMapOverlay _pokemonsOverlay = new GMapOverlay("pokemons"); private IEnumerable _pokeStops; - private readonly GMapOverlay _pokestopsOverlay = new GMapOverlay("pokestops"); - - private readonly GMapOverlay _searchAreaOverlay = new GMapOverlay("areas"); private IEnumerable _wildPokemons; public MainForm() @@ -130,7 +129,7 @@ public static void ResetMap() public static double GetRuntime() { - return (DateTime.Now - TimeStarted).TotalSeconds / 3600; + return (DateTime.Now - TimeStarted).TotalSeconds/3600; } public void CheckVersion() @@ -152,7 +151,7 @@ public void CheckVersion() match.Groups[3], match.Groups[4])); // makes sense to display your version and say what the current one is on github - ColoredConsoleWrite(Color.Green, "Your version is " + Assembly.GetExecutingAssembly().GetName().Version); + ColoredConsoleWrite(Color.Green, "Your version is " + GetExecutingAssembly().GetName().Version); ColoredConsoleWrite(Color.Green, "Github version is " + gitVersion); ColoredConsoleWrite(Color.Green, "You can find it at www.GitHub.com/1461748123/Pokemon-Go-Rocket-API/releases"); @@ -500,7 +499,7 @@ private async Task ExecuteCatchAllNearbyPokemons(Client client) 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 @@ -585,7 +584,7 @@ private void UpdatePlayerLocation(double latitude, double longitude) { SynchronizationContext.Post(o => { - _playerMarker.Position = (PointLatLng)o; + _playerMarker.Position = (PointLatLng) o; _searchAreaOverlay.Polygons.Clear(); }, new PointLatLng(latitude, longitude)); @@ -774,7 +773,7 @@ private string GetFriendlyItemsString(IEnumerable items) 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}"); } @@ -785,7 +784,7 @@ private async Task TransferAllButStrongestUnwantedPokemon(Client client) var unwantedPokemonTypes = new List(); for (var i = 1; i <= 151; i++) { - unwantedPokemonTypes.Add((PokemonId)i); + unwantedPokemonTypes.Add((PokemonId) i); } var inventory = await client.Inventory.GetInventory(); @@ -810,7 +809,7 @@ private async Task TransferAllButStrongestUnwantedPokemon(Client client) public static float Perfect(PokemonData poke) { - return (poke.IndividualAttack + poke.IndividualDefense + poke.IndividualStamina) / (3.0f * 15.0f) * 100.0f; + return (poke.IndividualAttack + poke.IndividualDefense + poke.IndividualStamina)/(3.0f*15.0f)*100.0f; } private async Task TransferAllGivenPokemons(Client client, IEnumerable unwantedPokemons, @@ -844,7 +843,7 @@ private async Task TransferAllGivenPokemons(Client client, IEnumerable 60) { @@ -1077,8 +1076,8 @@ public async Task updateUserStatusBar(Client client) " | 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); @@ -1344,20 +1343,21 @@ private void InitializePokemonForm() { 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() @@ -1366,14 +1366,17 @@ private void InitializePokemonForm() .Count() > 1) e.Item.BackColor = Color.LightGreen; - foreach (OLVListSubItem sub in e.Item.SubItems) { - if (sub.Text.Equals("Evolve") && !pok.CanEvolve) { + 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) { + cmsPokemonList.Opening += delegate(object sender, CancelEventArgs e) + { e.Cancel = false; cmsPokemonList.Items.Clear(); @@ -1385,7 +1388,8 @@ private void InitializePokemonForm() .Count() == 0; var count = pokemons.Count(); - if (count < 1) { + if (count < 1) + { e.Cancel = true; return; } @@ -1398,14 +1402,16 @@ private void InitializePokemonForm() item.Click += delegate { TransferPokemon(pokemons); }; cmsPokemonList.Items.Add(item); - if (canAllEvolve) { + if (canAllEvolve) + { item = new ToolStripMenuItem(); item.Text = "Evolve " + count + " pokemon"; item.Click += delegate { EvolvePokemon(pokemons); }; cmsPokemonList.Items.Add(item); } - if (count == 1) { + if (count == 1) + { item = new ToolStripMenuItem(); item.Text = "PowerUp"; item.Click += delegate { PowerUpPokemon(pokemons); }; @@ -1415,30 +1421,22 @@ private void InitializePokemonForm() item = new ToolStripMenuItem(); item.Text = "Transfer Clean Up (Keep highest IV)"; - item.Click += delegate { - CleanUpTransferPokemon(pokemonObject, "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"); - }; + 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"); - }; + 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"); - }; + item.Click += delegate { CleanUpEvolvePokemon(pokemonObject, "CP"); }; cmsPokemonList.Items.Add(item); /* cmsPokemonList.Items.Add(separator); @@ -1460,10 +1458,11 @@ private void InitializePokemonForm() 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) { + private void SetState(bool state) + { btnRefresh.Enabled = state; olvPokemonList.Enabled = state; //flpItems.Enabled = state; @@ -1497,11 +1496,12 @@ private async Task ReloadPokemonList() .OrderByDescending(p => p.FamilyId); var pokemonObjects = new List(); - foreach (var pokemon in pokemons) { + foreach (var pokemon in pokemons) + { var pokemonObject = new PokemonObject(pokemon); - var family = + var family = families.Where(i => (int) i.FamilyId <= (int) pokemon.PokemonId) - .First(); + .First(); pokemonObject.Candy = family.Candy_; pokemonObjects.Add(pokemonObject); } @@ -1551,15 +1551,15 @@ private void PokemonListButton_Click(object sender, CellClickEventArgs e) var cName = olvPokemonList.AllColumns[e.ColumnIndex].AspectToStringFormat; if (cName.Equals("Transfer")) { - TransferPokemon(new List { pokemon.PokemonData }); + TransferPokemon(new List {pokemon.PokemonData}); } else if (cName.Equals("Power Up")) { - PowerUpPokemon(new List { pokemon.PokemonData }); + PowerUpPokemon(new List {pokemon.PokemonData}); } else if (cName.Equals("Evolve")) { - EvolvePokemon(new List { pokemon.PokemonData }); + EvolvePokemon(new List {pokemon.PokemonData}); } } catch (Exception ex) @@ -1573,12 +1573,16 @@ private void PokemonListButton_Click(object sender, CellClickEventArgs e) private async void TransferPokemon(IEnumerable pokemons) { SetState(false); - foreach (var pokemon in pokemons) { + 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"); - } else { + } + else + { ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be transferred"); } } @@ -1588,11 +1592,15 @@ private async void TransferPokemon(IEnumerable pokemons) private async void PowerUpPokemon(IEnumerable pokemons) { SetState(false); - foreach (var pokemon in pokemons) { + foreach (var pokemon in pokemons) + { var evolvePokemonResponse = await _client2.Inventory.UpgradePokemon(pokemon.Id); - if (evolvePokemonResponse.Result == UpgradePokemonResponse.Types.Result.Success) { + if (evolvePokemonResponse.Result == UpgradePokemonResponse.Types.Result.Success) + { ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} successfully upgraded."); - } else { + } + else + { ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be upgraded"); } } @@ -1602,27 +1610,32 @@ private async void PowerUpPokemon(IEnumerable pokemons) private async void EvolvePokemon(IEnumerable pokemons) { SetState(false); - foreach (var pokemon in pokemons) { + foreach (var pokemon in pokemons) + { var evolvePokemonResponse = await _client2.Inventory.EvolvePokemon(pokemon.Id); - if (evolvePokemonResponse.Result == EvolvePokemonResponse.Types.Result.Success) { + 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 { + } + else + { ColoredConsoleWrite(Color.Magenta, $"{pokemon.PokemonId} could not be evolved"); } } ReloadPokemonList(); } - private void CleanUpTransferPokemon(PokemonObject pokemon, string type) { - int ET = pokemon.EvolveTimes; - int pokemonCount = + private void CleanUpTransferPokemon(PokemonObject pokemon, string type) + { + var ET = pokemon.EvolveTimes; + var pokemonCount = olvPokemonList.Objects.Cast() - .Where(p => p.PokemonId == pokemon.PokemonId) - .Count(); + .Where(p => p.PokemonId == pokemon.PokemonId) + .Count(); - if (pokemonCount < ET) { + if (pokemonCount < ET) + { ReloadPokemonList(); return; } @@ -1630,55 +1643,63 @@ private void CleanUpTransferPokemon(PokemonObject pokemon, string type) { if (ET == 0) ET = 1; - if (type.Equals("IV")) { + if (type.Equals("IV")) + { var pokemons = olvPokemonList.Objects.Cast() - .Where(p => p.PokemonId == pokemon.PokemonId) - .Select(p => p.PokemonData) - .OrderBy(p => p.Cp) - .OrderBy(p => p.GetIV()) - .Take(pokemonCount - ET); + .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")) { + } + else if (type.Equals("CP")) + { var pokemons = olvPokemonList.Objects.Cast() - .Where(p => p.PokemonId == pokemon.PokemonId) - .Select(p => p.PokemonData) - .OrderBy(p => p.GetIV()) - .OrderBy(p => p.Cp) - .Take(pokemonCount - ET); + .Where(p => p.PokemonId == pokemon.PokemonId) + .Select(p => p.PokemonData) + .OrderBy(p => p.GetIV()) + .OrderBy(p => p.Cp) + .Take(pokemonCount - ET); TransferPokemon(pokemons); } } - private void CleanUpEvolvePokemon(PokemonObject pokemon, string type) { - int ET = pokemon.EvolveTimes; + private void CleanUpEvolvePokemon(PokemonObject pokemon, string type) + { + var ET = pokemon.EvolveTimes; - if (ET < 1) { + if (ET < 1) + { ReloadPokemonList(); return; } - if (type.Equals("IV")) { + if (type.Equals("IV")) + { var pokemons = olvPokemonList.Objects.Cast() - .Where(p => p.PokemonId == pokemon.PokemonId) - .Select(p => p.PokemonData) - .OrderByDescending(p => p.Cp) - .OrderByDescending(p => p.GetIV()) - .Take(ET); + .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")) { + } + else if (type.Equals("CP")) + { var pokemons = olvPokemonList.Objects.Cast() - .Where(p => p.PokemonId == pokemon.PokemonId) - .Select(p => p.PokemonData) - .OrderByDescending(p => p.GetIV()) - .OrderByDescending(p => p.Cp) - .Take(ET); + .Where(p => p.PokemonId == pokemon.PokemonId) + .Select(p => p.PokemonData) + .OrderByDescending(p => p.GetIV()) + .OrderByDescending(p => p.Cp) + .Take(ET); EvolvePokemon(pokemons); } @@ -1694,7 +1715,7 @@ public async Task> GetItems(Client client) public async Task> GetItemsToRecycle(ISettings _settings, Client client) { - var settings = (Settings)_settings; + var settings = (Settings) _settings; var myItems = await GetItems(client); return myItems @@ -1719,7 +1740,7 @@ public async Task RecycleItems(Client client) ColoredConsoleWrite(Color.DarkCyan, $"Recycled {item.Count}x {item.ItemId.ToString().Substring(4)}"); await Task.Delay(500); } - await Task.Delay(ClientSettings.RecycleItemsInterval * 1000); + await Task.Delay(ClientSettings.RecycleItemsInterval*1000); RecycleItems(client); } @@ -1754,20 +1775,20 @@ private async Task GetBestBall(int? pokemonCP) 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) diff --git a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs index 25f2f580e..904f8a4c3 100644 --- a/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs +++ b/PokemonGo/RocketAPI/Window/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.8.0.1")] +[assembly: AssemblyVersion("1.8.1.0")] [assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file From 102f9509e4f38b2478559c40765c0a7a313ae461 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 9 Aug 2016 20:16:30 -0700 Subject: [PATCH 3/3] Some general ui tweaks --- .../RocketAPI/Window/MainForm.Designer.cs | 105 ++++++------ .../RocketAPI/Window/SettingsForm.Designer.cs | 162 ++++++++++-------- 2 files changed, 147 insertions(+), 120 deletions(-) diff --git a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs index 6926060d6..b006b0c38 100644 --- a/PokemonGo/RocketAPI/Window/MainForm.Designer.cs +++ b/PokemonGo/RocketAPI/Window/MainForm.Designer.cs @@ -48,19 +48,19 @@ private void InitializeComponent() this.pkmnDefIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.pkmnStaIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.pkmnIV = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); + this.pkmnCandy = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); + this.pkmnCandyToEvolve = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); + this.pkmnEvolveTimes = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.pkmnTransferButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.pkmnPowerUpButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); this.pkmnEvolveButton = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn())); + this.cmsPokemonList = new System.Windows.Forms.ContextMenuStrip(this.components); this.largePokemonImageList = new System.Windows.Forms.ImageList(this.components); this.smallPokemonImageList = new System.Windows.Forms.ImageList(this.components); 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.olvPokemonList)).BeginInit(); @@ -85,7 +85,7 @@ private void InitializeComponent() this.logTextBox.Location = new System.Drawing.Point(0, 0); this.logTextBox.Name = "logTextBox"; this.logTextBox.ReadOnly = true; - this.logTextBox.Size = new System.Drawing.Size(422, 294); + this.logTextBox.Size = new System.Drawing.Size(554, 268); this.logTextBox.TabIndex = 0; this.logTextBox.Text = ""; this.logTextBox.TextChanged += new System.EventHandler(this.logTextBox_TextChanged); @@ -95,7 +95,7 @@ private void InitializeComponent() 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, 541); + this.statusStrip1.Location = new System.Drawing.Point(0, 498); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new System.Drawing.Size(1254, 22); this.statusStrip1.TabIndex = 1; @@ -104,7 +104,7 @@ private void InitializeComponent() // statusLabel // this.statusLabel.Name = "statusLabel"; - this.statusLabel.Size = new System.Drawing.Size(39, 17); + this.statusLabel.Size = new System.Drawing.Size(43, 17); this.statusLabel.Text = "Status"; // // menuStrip1 @@ -117,35 +117,35 @@ private void InitializeComponent() this.forceUnbanToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(1254, 24); + this.menuStrip1.Size = new System.Drawing.Size(1254, 25); this.menuStrip1.TabIndex = 2; this.menuStrip1.Text = "menuStrip1"; // // startStopBotToolStripMenuItem // this.startStopBotToolStripMenuItem.Name = "startStopBotToolStripMenuItem"; - this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(77, 20); + this.startStopBotToolStripMenuItem.Size = new System.Drawing.Size(85, 21); 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(61, 20); + this.todoToolStripMenuItem.Size = new System.Drawing.Size(66, 21); 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(95, 20); + this.useLuckyEggToolStripMenuItem.Size = new System.Drawing.Size(105, 21); 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(86, 20); + this.forceUnbanToolStripMenuItem.Size = new System.Drawing.Size(94, 21); this.forceUnbanToolStripMenuItem.Text = "Force Unban"; this.forceUnbanToolStripMenuItem.Click += new System.EventHandler(this.forceUnbanToolStripMenuItem_Click); // @@ -183,7 +183,7 @@ private void InitializeComponent() 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(416, 216); + this.gMapControl1.Size = new System.Drawing.Size(548, 195); this.gMapControl1.TabIndex = 23; this.gMapControl1.Zoom = 0D; // @@ -228,7 +228,7 @@ private void InitializeComponent() this.olvPokemonList.Name = "olvPokemonList"; this.olvPokemonList.RowHeight = 32; this.olvPokemonList.ShowGroups = false; - this.olvPokemonList.Size = new System.Drawing.Size(822, 464); + this.olvPokemonList.Size = new System.Drawing.Size(690, 425); this.olvPokemonList.SmallImageList = this.smallPokemonImageList; this.olvPokemonList.TabIndex = 25; this.olvPokemonList.UseCompatibleStateImageBehavior = false; @@ -245,31 +245,50 @@ private void InitializeComponent() // this.pkmnCP.AspectName = "Cp"; this.pkmnCP.Text = "CP"; - this.pkmnCP.Width = 50; + this.pkmnCP.Width = 40; // // pkmnAtkIV // this.pkmnAtkIV.AspectName = "IndividualAttack"; this.pkmnAtkIV.Text = "Atk IV"; - this.pkmnAtkIV.Width = 50; + this.pkmnAtkIV.Width = 45; // // pkmnDefIV // this.pkmnDefIV.AspectName = "IndividualDefense"; this.pkmnDefIV.Text = "Def IV"; - this.pkmnDefIV.Width = 50; + this.pkmnDefIV.Width = 45; // // pkmnStaIV // this.pkmnStaIV.AspectName = "IndividualStamina"; this.pkmnStaIV.Text = "Sta IV"; - this.pkmnStaIV.Width = 50; + this.pkmnStaIV.Width = 45; // // pkmnIV // this.pkmnIV.AspectName = "GetIV"; this.pkmnIV.AspectToStringFormat = "{0:P2}"; this.pkmnIV.Text = "IV %"; + this.pkmnIV.Width = 51; + // + // pkmnCandy + // + this.pkmnCandy.AspectName = "Candy"; + this.pkmnCandy.Text = "Candy"; + this.pkmnCandy.Width = 46; + // + // pkmnCandyToEvolve + // + this.pkmnCandyToEvolve.AspectName = "CandyToEvolve"; + this.pkmnCandyToEvolve.Text = "CtE"; + this.pkmnCandyToEvolve.Width = 31; + // + // pkmnEvolveTimes + // + this.pkmnEvolveTimes.AspectName = "EvolveTimes"; + this.pkmnEvolveTimes.Text = "# Evolves"; + this.pkmnEvolveTimes.Width = 66; // // pkmnTransferButton // @@ -295,6 +314,12 @@ private void InitializeComponent() this.pkmnEvolveButton.IsButton = true; this.pkmnEvolveButton.Text = ""; // + // cmsPokemonList + // + this.cmsPokemonList.Name = "cmsPokemonList"; + this.cmsPokemonList.ShowImageMargin = false; + this.cmsPokemonList.Size = new System.Drawing.Size(36, 4); + // // largePokemonImageList // this.largePokemonImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; @@ -313,9 +338,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); 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.Location = new System.Drawing.Point(3, 445); this.btnRefresh.Name = "btnRefresh"; - this.btnRefresh.Size = new System.Drawing.Size(822, 28); + this.btnRefresh.Size = new System.Drawing.Size(690, 26); this.btnRefresh.TabIndex = 26; this.btnRefresh.Text = "Refresh"; this.btnRefresh.UseVisualStyleBackColor = true; @@ -324,7 +349,7 @@ private void InitializeComponent() // splitContainer1 // this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(0, 24); + this.splitContainer1.Location = new System.Drawing.Point(0, 25); this.splitContainer1.Name = "splitContainer1"; // // splitContainer1.Panel1 @@ -336,8 +361,8 @@ private void InitializeComponent() 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.Size = new System.Drawing.Size(1254, 473); + this.splitContainer1.SplitterDistance = 554; this.splitContainer1.TabIndex = 27; // // splitContainer2 @@ -354,8 +379,8 @@ private void InitializeComponent() // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.gMapControl1); - this.splitContainer2.Size = new System.Drawing.Size(422, 517); - this.splitContainer2.SplitterDistance = 294; + this.splitContainer2.Size = new System.Drawing.Size(554, 473); + this.splitContainer2.SplitterDistance = 268; this.splitContainer2.TabIndex = 0; // // lblPokemonList @@ -363,40 +388,18 @@ private void InitializeComponent() 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.Location = new System.Drawing.Point(3, 431); this.lblPokemonList.Name = "lblPokemonList"; - this.lblPokemonList.Size = new System.Drawing.Size(822, 13); + this.lblPokemonList.Size = new System.Drawing.Size(690, 11); 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, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1254, 563); + this.ClientSize = new System.Drawing.Size(1254, 520); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.statusStrip1); this.Controls.Add(this.menuStrip1); diff --git a/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs b/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs index e95e991bb..a0275deca 100644 --- a/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs +++ b/PokemonGo/RocketAPI/Window/SettingsForm.Designer.cs @@ -1,4 +1,5 @@ -namespace PokemonGo.RocketAPI.Window +using System.Drawing; +namespace PokemonGo.RocketAPI.Window { partial class SettingsForm { @@ -69,9 +70,9 @@ private void InitializeComponent() // authTypeLabel // this.authTypeLabel.AutoSize = true; - this.authTypeLabel.Location = new System.Drawing.Point(3, 7); + this.authTypeLabel.Location = new System.Drawing.Point(3, 9); this.authTypeLabel.Name = "authTypeLabel"; - this.authTypeLabel.Size = new System.Drawing.Size(71, 12); + this.authTypeLabel.Size = new System.Drawing.Size(70, 15); this.authTypeLabel.TabIndex = 0; this.authTypeLabel.Text = "Login Type:"; this.authTypeLabel.Click += new System.EventHandler(this.authTypeLabel_Click); @@ -82,72 +83,73 @@ private void InitializeComponent() this.authTypeCb.Items.AddRange(new object[] { "google", "Ptc"}); - this.authTypeCb.Location = new System.Drawing.Point(82, 4); + this.authTypeCb.Location = new System.Drawing.Point(96, 5); + this.authTypeCb.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.authTypeCb.Name = "authTypeCb"; - this.authTypeCb.Size = new System.Drawing.Size(136, 20); + this.authTypeCb.Size = new System.Drawing.Size(158, 23); this.authTypeCb.TabIndex = 1; this.authTypeCb.SelectedIndexChanged += new System.EventHandler(this.authTypeCb_SelectedIndexChanged); // // UserLabel // this.UserLabel.AutoSize = true; - this.UserLabel.Location = new System.Drawing.Point(3, 33); + this.UserLabel.Location = new System.Drawing.Point(3, 41); this.UserLabel.Name = "UserLabel"; - this.UserLabel.Size = new System.Drawing.Size(59, 12); + this.UserLabel.Size = new System.Drawing.Size(68, 15); this.UserLabel.TabIndex = 2; this.UserLabel.Text = "Username:"; // // PasswordLabel // this.PasswordLabel.AutoSize = true; - this.PasswordLabel.Location = new System.Drawing.Point(3, 57); + this.PasswordLabel.Location = new System.Drawing.Point(3, 71); this.PasswordLabel.Name = "PasswordLabel"; - this.PasswordLabel.Size = new System.Drawing.Size(59, 12); + this.PasswordLabel.Size = new System.Drawing.Size(64, 15); this.PasswordLabel.TabIndex = 3; this.PasswordLabel.Text = "Password:"; // // latLabel // this.latLabel.AutoSize = true; - this.latLabel.Location = new System.Drawing.Point(3, 81); + this.latLabel.Location = new System.Drawing.Point(3, 101); this.latLabel.Name = "latLabel"; - this.latLabel.Size = new System.Drawing.Size(59, 12); + this.latLabel.Size = new System.Drawing.Size(54, 15); this.latLabel.TabIndex = 4; this.latLabel.Text = "Latitude:"; // // longiLabel // this.longiLabel.AutoSize = true; - this.longiLabel.Location = new System.Drawing.Point(3, 105); + this.longiLabel.Location = new System.Drawing.Point(3, 131); this.longiLabel.Name = "longiLabel"; - this.longiLabel.Size = new System.Drawing.Size(65, 12); + this.longiLabel.Size = new System.Drawing.Size(65, 15); this.longiLabel.TabIndex = 5; this.longiLabel.Text = "Longitude:"; // // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(3, 129); + this.label1.Location = new System.Drawing.Point(3, 161); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(95, 12); + this.label1.Size = new System.Drawing.Size(100, 15); this.label1.TabIndex = 6; this.label1.Text = "Razzberry Mode:"; // // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(3, 178); + this.label2.Location = new System.Drawing.Point(3, 222); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(89, 12); + this.label2.Size = new System.Drawing.Size(84, 15); this.label2.TabIndex = 7; this.label2.Text = "Transfer Type:"; // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(3, 296); + this.label3.Location = new System.Drawing.Point(3, 370); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(95, 12); + this.label3.Size = new System.Drawing.Size(101, 15); this.label3.TabIndex = 8; this.label3.Text = "Evolve Pokemon:"; this.label3.Click += new System.EventHandler(this.label3_Click); @@ -155,49 +157,53 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(3, 203); + this.label4.Location = new System.Drawing.Point(3, 254); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(83, 12); + this.label4.Size = new System.Drawing.Size(84, 15); this.label4.TabIndex = 9; this.label4.Text = "CP Threshold:"; // // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(3, 154); + this.label5.Location = new System.Drawing.Point(3, 192); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(113, 12); + this.label5.Size = new System.Drawing.Size(106, 15); this.label5.TabIndex = 10; this.label5.Text = "Razzberry Setting:"; // // UserLoginBox // - this.UserLoginBox.Location = new System.Drawing.Point(82, 31); + this.UserLoginBox.Location = new System.Drawing.Point(96, 39); + this.UserLoginBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.UserLoginBox.Name = "UserLoginBox"; - this.UserLoginBox.Size = new System.Drawing.Size(136, 21); + this.UserLoginBox.Size = new System.Drawing.Size(158, 21); this.UserLoginBox.TabIndex = 11; // // UserPasswordBox // - this.UserPasswordBox.Location = new System.Drawing.Point(82, 57); + this.UserPasswordBox.Location = new System.Drawing.Point(96, 71); + this.UserPasswordBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.UserPasswordBox.Name = "UserPasswordBox"; - this.UserPasswordBox.Size = new System.Drawing.Size(136, 21); + this.UserPasswordBox.Size = new System.Drawing.Size(158, 21); this.UserPasswordBox.TabIndex = 12; // // latitudeText // - this.latitudeText.Location = new System.Drawing.Point(118, 79); + this.latitudeText.Location = new System.Drawing.Point(138, 99); + this.latitudeText.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.latitudeText.Name = "latitudeText"; this.latitudeText.ReadOnly = true; - this.latitudeText.Size = new System.Drawing.Size(100, 21); + this.latitudeText.Size = new System.Drawing.Size(116, 21); this.latitudeText.TabIndex = 13; // // longitudeText // - this.longitudeText.Location = new System.Drawing.Point(118, 103); + this.longitudeText.Location = new System.Drawing.Point(138, 129); + this.longitudeText.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.longitudeText.Name = "longitudeText"; this.longitudeText.ReadOnly = true; - this.longitudeText.Size = new System.Drawing.Size(100, 21); + this.longitudeText.Size = new System.Drawing.Size(116, 21); this.longitudeText.TabIndex = 14; // // razzmodeCb @@ -206,16 +212,18 @@ private void InitializeComponent() this.razzmodeCb.Items.AddRange(new object[] { "probability", "cp"}); - this.razzmodeCb.Location = new System.Drawing.Point(118, 127); + this.razzmodeCb.Location = new System.Drawing.Point(138, 159); + this.razzmodeCb.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.razzmodeCb.Name = "razzmodeCb"; - this.razzmodeCb.Size = new System.Drawing.Size(100, 20); + this.razzmodeCb.Size = new System.Drawing.Size(116, 23); this.razzmodeCb.TabIndex = 15; // // razzSettingText // - this.razzSettingText.Location = new System.Drawing.Point(118, 152); + this.razzSettingText.Location = new System.Drawing.Point(138, 190); + this.razzSettingText.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.razzSettingText.Name = "razzSettingText"; - this.razzSettingText.Size = new System.Drawing.Size(100, 21); + this.razzSettingText.Size = new System.Drawing.Size(116, 21); this.razzSettingText.TabIndex = 16; this.razzSettingText.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.razzSettingText_KeyPress); // @@ -230,24 +238,27 @@ private void InitializeComponent() "Duplicate", "IV Duplicate", "All"}); - this.transferTypeCb.Location = new System.Drawing.Point(118, 176); + this.transferTypeCb.Location = new System.Drawing.Point(138, 220); + this.transferTypeCb.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.transferTypeCb.Name = "transferTypeCb"; - this.transferTypeCb.Size = new System.Drawing.Size(100, 20); + this.transferTypeCb.Size = new System.Drawing.Size(116, 23); this.transferTypeCb.TabIndex = 17; this.transferTypeCb.SelectedIndexChanged += new System.EventHandler(this.transferTypeCb_SelectedIndexChanged); // // transferCpThresText // - this.transferCpThresText.Location = new System.Drawing.Point(118, 202); + this.transferCpThresText.Location = new System.Drawing.Point(138, 252); + this.transferCpThresText.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.transferCpThresText.Name = "transferCpThresText"; - this.transferCpThresText.Size = new System.Drawing.Size(100, 21); + this.transferCpThresText.Size = new System.Drawing.Size(116, 21); this.transferCpThresText.TabIndex = 18; this.transferCpThresText.TextChanged += new System.EventHandler(this.transferCpThresText_TextChanged); // // evolveAllChk // this.evolveAllChk.AutoSize = true; - this.evolveAllChk.Location = new System.Drawing.Point(118, 296); + this.evolveAllChk.Location = new System.Drawing.Point(138, 370); + this.evolveAllChk.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.evolveAllChk.Name = "evolveAllChk"; this.evolveAllChk.Size = new System.Drawing.Size(15, 14); this.evolveAllChk.TabIndex = 19; @@ -258,9 +269,10 @@ private void InitializeComponent() // this.saveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.saveBtn.Location = new System.Drawing.Point(0, 315); + this.saveBtn.Location = new System.Drawing.Point(0, 394); + this.saveBtn.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.saveBtn.Name = "saveBtn"; - this.saveBtn.Size = new System.Drawing.Size(218, 88); + this.saveBtn.Size = new System.Drawing.Size(254, 110); this.saveBtn.TabIndex = 20; this.saveBtn.Text = "Save"; this.saveBtn.UseVisualStyleBackColor = true; @@ -275,7 +287,8 @@ private void InitializeComponent() this.gMapControl1.GrayScaleMode = false; this.gMapControl1.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow; this.gMapControl1.LevelsKeepInMemmory = 5; - this.gMapControl1.Location = new System.Drawing.Point(18, 15); + this.gMapControl1.Location = new System.Drawing.Point(21, 19); + this.gMapControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.gMapControl1.MarkersEnabled = true; this.gMapControl1.MaxZoom = 2; this.gMapControl1.MinZoom = 2; @@ -288,7 +301,7 @@ private void InitializeComponent() 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(468, 358); + this.gMapControl1.Size = new System.Drawing.Size(546, 448); this.gMapControl1.TabIndex = 22; this.gMapControl1.Zoom = 0D; this.gMapControl1.Load += new System.EventHandler(this.gMapControl1_Load); @@ -301,9 +314,11 @@ private void InitializeComponent() this.groupBox1.Controls.Add(this.trackBar); this.groupBox1.Controls.Add(this.gMapControl1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox1.Location = new System.Drawing.Point(233, 8); + this.groupBox1.Location = new System.Drawing.Point(271, 10); + this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(480, 408); + this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.groupBox1.Size = new System.Drawing.Size(561, 510); this.groupBox1.TabIndex = 25; this.groupBox1.TabStop = false; this.groupBox1.Text = "Location"; @@ -312,9 +327,10 @@ private void InitializeComponent() // this.FindAdressButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.FindAdressButton.Location = new System.Drawing.Point(355, 379); + this.FindAdressButton.Location = new System.Drawing.Point(414, 474); + this.FindAdressButton.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.FindAdressButton.Name = "FindAdressButton"; - this.FindAdressButton.Size = new System.Drawing.Size(119, 24); + this.FindAdressButton.Size = new System.Drawing.Size(140, 30); this.FindAdressButton.TabIndex = 25; this.FindAdressButton.Text = "Find Location"; this.FindAdressButton.UseVisualStyleBackColor = true; @@ -323,9 +339,10 @@ private void InitializeComponent() // AdressBox // this.AdressBox.ForeColor = System.Drawing.Color.Gray; - this.AdressBox.Location = new System.Drawing.Point(18, 379); + this.AdressBox.Location = new System.Drawing.Point(21, 474); + this.AdressBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.AdressBox.Name = "AdressBox"; - this.AdressBox.Size = new System.Drawing.Size(331, 21); + this.AdressBox.Size = new System.Drawing.Size(385, 21); this.AdressBox.TabIndex = 25; this.AdressBox.Text = "Enter an address or a coordinate"; this.AdressBox.Enter += new System.EventHandler(this.AdressBox_Enter); @@ -335,10 +352,11 @@ private void InitializeComponent() // this.trackBar.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.trackBar.BackColor = System.Drawing.SystemColors.Info; - this.trackBar.Location = new System.Drawing.Point(432, 15); + this.trackBar.Location = new System.Drawing.Point(505, 19); + this.trackBar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.trackBar.Name = "trackBar"; this.trackBar.Orientation = System.Windows.Forms.Orientation.Vertical; - this.trackBar.Size = new System.Drawing.Size(45, 96); + this.trackBar.Size = new System.Drawing.Size(45, 120); this.trackBar.TabIndex = 25; this.trackBar.TickStyle = System.Windows.Forms.TickStyle.TopLeft; this.trackBar.Scroll += new System.EventHandler(this.trackBar_Scroll); @@ -373,17 +391,19 @@ private void InitializeComponent() this.panel1.Controls.Add(this.UserLoginBox); this.panel1.Controls.Add(this.UserPasswordBox); this.panel1.Dock = System.Windows.Forms.DockStyle.Left; - this.panel1.Location = new System.Drawing.Point(9, 8); + this.panel1.Location = new System.Drawing.Point(10, 10); + this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(224, 408); + this.panel1.Size = new System.Drawing.Size(261, 510); this.panel1.TabIndex = 26; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // // TravelSpeedBox // - this.TravelSpeedBox.Location = new System.Drawing.Point(118, 251); + this.TravelSpeedBox.Location = new System.Drawing.Point(138, 314); + this.TravelSpeedBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.TravelSpeedBox.Name = "TravelSpeedBox"; - this.TravelSpeedBox.Size = new System.Drawing.Size(100, 21); + this.TravelSpeedBox.Size = new System.Drawing.Size(116, 21); this.TravelSpeedBox.TabIndex = 22; this.TravelSpeedBox.TextChanged += new System.EventHandler(this.textBox1_TextChanged); this.TravelSpeedBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TravelSpeedBox_KeyPress); @@ -391,7 +411,8 @@ private void InitializeComponent() // CatchPokemonBox // this.CatchPokemonBox.AutoSize = true; - this.CatchPokemonBox.Location = new System.Drawing.Point(118, 275); + this.CatchPokemonBox.Location = new System.Drawing.Point(138, 344); + this.CatchPokemonBox.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.CatchPokemonBox.Name = "CatchPokemonBox"; this.CatchPokemonBox.Size = new System.Drawing.Size(15, 14); this.CatchPokemonBox.TabIndex = 26; @@ -401,51 +422,54 @@ private void InitializeComponent() // CatchPokemonText // this.CatchPokemonText.AutoSize = true; - this.CatchPokemonText.Location = new System.Drawing.Point(3, 275); + this.CatchPokemonText.Location = new System.Drawing.Point(3, 344); this.CatchPokemonText.Name = "CatchPokemonText"; - this.CatchPokemonText.Size = new System.Drawing.Size(89, 12); + this.CatchPokemonText.Size = new System.Drawing.Size(97, 15); this.CatchPokemonText.TabIndex = 25; this.CatchPokemonText.Text = "Catch Pokemon:"; this.CatchPokemonText.Click += new System.EventHandler(this.label7_Click); // // transferIVThresText // - this.transferIVThresText.Location = new System.Drawing.Point(118, 203); + this.transferIVThresText.Location = new System.Drawing.Point(138, 254); + this.transferIVThresText.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); this.transferIVThresText.Name = "transferIVThresText"; - this.transferIVThresText.Size = new System.Drawing.Size(100, 21); + this.transferIVThresText.Size = new System.Drawing.Size(116, 21); this.transferIVThresText.TabIndex = 24; this.transferIVThresText.TextChanged += new System.EventHandler(this.textBox2_TextChanged); // // TravelSpeedText // this.TravelSpeedText.AutoSize = true; - this.TravelSpeedText.Location = new System.Drawing.Point(3, 254); + this.TravelSpeedText.Location = new System.Drawing.Point(3, 318); this.TravelSpeedText.Name = "TravelSpeedText"; - this.TravelSpeedText.Size = new System.Drawing.Size(113, 12); + this.TravelSpeedText.Size = new System.Drawing.Size(112, 15); this.TravelSpeedText.TabIndex = 23; this.TravelSpeedText.Text = "Travel Speed km/h:"; // // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(3, 203); + this.label6.Location = new System.Drawing.Point(3, 254); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(83, 12); + this.label6.Size = new System.Drawing.Size(78, 15); this.label6.TabIndex = 21; this.label6.Text = "IV Threshold:"; this.label6.Click += new System.EventHandler(this.label6_Click); // // SettingsForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(722, 424); + this.ClientSize = new System.Drawing.Size(842, 530); this.Controls.Add(this.groupBox1); this.Controls.Add(this.panel1); + this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MinimumSize = new System.Drawing.Size(630, 334); + this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.MinimumSize = new System.Drawing.Size(732, 408); this.Name = "SettingsForm"; - this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8); + this.Padding = new System.Windows.Forms.Padding(10, 10, 10, 10); this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Settings";