From 8628ab678959eda594b627e20fa9558e1c895a9a Mon Sep 17 00:00:00 2001 From: Jacob Fliss Date: Sun, 20 Feb 2022 09:29:48 -0500 Subject: [PATCH] TestApp now works in 1.23 and fixed crash --- .../MemoryTestApp/Classes/Processing.cs | 2 +- .../Forms/TrainerForm.Designer.cs | 229 +++++++----------- .../MemoryTestApp/Forms/TrainerForm.cs | 24 +- 3 files changed, 110 insertions(+), 145 deletions(-) diff --git a/Test/TestApp/MemoryTestApp/Classes/Processing.cs b/Test/TestApp/MemoryTestApp/Classes/Processing.cs index 35c7c00..71fa50d 100644 --- a/Test/TestApp/MemoryTestApp/Classes/Processing.cs +++ b/Test/TestApp/MemoryTestApp/Classes/Processing.cs @@ -42,7 +42,7 @@ public void ProcUIUpdate() public void GetModuleList() { ModuleList.Items.Clear(); - foreach (KeyValuePair kvp in m.mProc.Modules) // iterate through process module list + foreach (KeyValuePair kvp in m.mProc.Process.Modules) // iterate through process module list { string[] arr = new string[4]; ListViewItem itm; diff --git a/Test/TestApp/MemoryTestApp/Forms/TrainerForm.Designer.cs b/Test/TestApp/MemoryTestApp/Forms/TrainerForm.Designer.cs index 9c8f1d1..805ec82 100644 --- a/Test/TestApp/MemoryTestApp/Forms/TrainerForm.Designer.cs +++ b/Test/TestApp/MemoryTestApp/Forms/TrainerForm.Designer.cs @@ -85,10 +85,9 @@ private void InitializeComponent() // // ProcTextBox // - this.ProcTextBox.Location = new System.Drawing.Point(68, 18); - this.ProcTextBox.Margin = new System.Windows.Forms.Padding(2); + this.ProcTextBox.Location = new System.Drawing.Point(102, 28); this.ProcTextBox.Name = "ProcTextBox"; - this.ProcTextBox.Size = new System.Drawing.Size(120, 20); + this.ProcTextBox.Size = new System.Drawing.Size(178, 26); this.ProcTextBox.TabIndex = 0; this.ProcTextBox.Text = "Xae\'s Quest"; this.ProcTextBox.TextChanged += new System.EventHandler(this.ProcTextBox_TextChanged); @@ -96,19 +95,17 @@ private void InitializeComponent() // label1 // this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(16, 20); - this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label1.Location = new System.Drawing.Point(24, 31); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(48, 13); + this.label1.Size = new System.Drawing.Size(70, 20); this.label1.TabIndex = 1; this.label1.Text = "Process:"; // // OpenProcessBtn // - this.OpenProcessBtn.Location = new System.Drawing.Point(286, 15); - this.OpenProcessBtn.Margin = new System.Windows.Forms.Padding(2); + this.OpenProcessBtn.Location = new System.Drawing.Point(429, 23); this.OpenProcessBtn.Name = "OpenProcessBtn"; - this.OpenProcessBtn.Size = new System.Drawing.Size(85, 26); + this.OpenProcessBtn.Size = new System.Drawing.Size(128, 40); this.OpenProcessBtn.TabIndex = 2; this.OpenProcessBtn.Text = "Open Process"; this.OpenProcessBtn.UseVisualStyleBackColor = true; @@ -121,11 +118,12 @@ private void InitializeComponent() this.ProcTypeBox.Items.AddRange(new object[] { "Name", "ID"}); - this.ProcTypeBox.Location = new System.Drawing.Point(191, 18); - this.ProcTypeBox.Margin = new System.Windows.Forms.Padding(2); + this.ProcTypeBox.Location = new System.Drawing.Point(286, 28); this.ProcTypeBox.Name = "ProcTypeBox"; - this.ProcTypeBox.Size = new System.Drawing.Size(92, 21); + this.ProcTypeBox.Size = new System.Drawing.Size(136, 28); this.ProcTypeBox.TabIndex = 3; + this.ProcTypeBox.SelectedIndexChanged += new System.EventHandler(this.ProcTypeBox_SelectedIndexChanged); + this.ProcTypeBox.SelectionChangeCommitted += new System.EventHandler(this.ProcTypeBox_SelectionChangeCommitted); // // WriteTypeBox // @@ -137,18 +135,16 @@ private void InitializeComponent() "int", "string", "float"}); - this.WriteTypeBox.Location = new System.Drawing.Point(209, 24); - this.WriteTypeBox.Margin = new System.Windows.Forms.Padding(2); + this.WriteTypeBox.Location = new System.Drawing.Point(314, 37); this.WriteTypeBox.Name = "WriteTypeBox"; - this.WriteTypeBox.Size = new System.Drawing.Size(68, 21); + this.WriteTypeBox.Size = new System.Drawing.Size(100, 28); this.WriteTypeBox.TabIndex = 7; // // WriteButton // - this.WriteButton.Location = new System.Drawing.Point(280, 24); - this.WriteButton.Margin = new System.Windows.Forms.Padding(2); + this.WriteButton.Location = new System.Drawing.Point(420, 37); this.WriteButton.Name = "WriteButton"; - this.WriteButton.Size = new System.Drawing.Size(44, 20); + this.WriteButton.Size = new System.Drawing.Size(66, 31); this.WriteButton.TabIndex = 6; this.WriteButton.Text = "Write"; this.WriteButton.UseVisualStyleBackColor = true; @@ -157,19 +153,17 @@ private void InitializeComponent() // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(2, 26); - this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label2.Location = new System.Drawing.Point(3, 40); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(48, 13); + this.label2.Size = new System.Drawing.Size(72, 20); this.label2.TabIndex = 5; this.label2.Text = "Address:"; // // WriteTextBox // - this.WriteTextBox.Location = new System.Drawing.Point(50, 24); - this.WriteTextBox.Margin = new System.Windows.Forms.Padding(2); + this.WriteTextBox.Location = new System.Drawing.Point(75, 37); this.WriteTextBox.Name = "WriteTextBox"; - this.WriteTextBox.Size = new System.Drawing.Size(156, 20); + this.WriteTextBox.Size = new System.Drawing.Size(232, 26); this.WriteTextBox.TabIndex = 4; this.WriteTextBox.Text = "00000000"; // @@ -182,10 +176,9 @@ private void InitializeComponent() this.AddrHeader, this.NameHeader}); this.ModuleList.HideSelection = false; - this.ModuleList.Location = new System.Drawing.Point(4, 17); - this.ModuleList.Margin = new System.Windows.Forms.Padding(2); + this.ModuleList.Location = new System.Drawing.Point(6, 26); this.ModuleList.Name = "ModuleList"; - this.ModuleList.Size = new System.Drawing.Size(266, 485); + this.ModuleList.Size = new System.Drawing.Size(397, 744); this.ModuleList.TabIndex = 8; this.ModuleList.UseCompatibleStateImageBehavior = false; this.ModuleList.View = System.Windows.Forms.View.Details; @@ -207,11 +200,9 @@ private void InitializeComponent() | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.UpdateModulesButton); this.groupBox1.Controls.Add(this.ModuleList); - this.groupBox1.Location = new System.Drawing.Point(14, 48); - this.groupBox1.Margin = new System.Windows.Forms.Padding(2); + this.groupBox1.Location = new System.Drawing.Point(21, 74); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(2); - this.groupBox1.Size = new System.Drawing.Size(274, 532); + this.groupBox1.Size = new System.Drawing.Size(411, 818); this.groupBox1.TabIndex = 9; this.groupBox1.TabStop = false; this.groupBox1.Text = "Process Module List"; @@ -219,9 +210,10 @@ private void InitializeComponent() // UpdateModulesButton // this.UpdateModulesButton.Dock = System.Windows.Forms.DockStyle.Bottom; - this.UpdateModulesButton.Location = new System.Drawing.Point(2, 507); + this.UpdateModulesButton.Location = new System.Drawing.Point(3, 780); + this.UpdateModulesButton.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.UpdateModulesButton.Name = "UpdateModulesButton"; - this.UpdateModulesButton.Size = new System.Drawing.Size(270, 23); + this.UpdateModulesButton.Size = new System.Drawing.Size(405, 35); this.UpdateModulesButton.TabIndex = 9; this.UpdateModulesButton.Text = "Get New Modules List"; this.UpdateModulesButton.UseVisualStyleBackColor = true; @@ -240,18 +232,16 @@ private void InitializeComponent() "UInt", "byte", "2 byte"}); - this.ReadTypeBox.Location = new System.Drawing.Point(209, 17); - this.ReadTypeBox.Margin = new System.Windows.Forms.Padding(2); + this.ReadTypeBox.Location = new System.Drawing.Point(314, 26); this.ReadTypeBox.Name = "ReadTypeBox"; - this.ReadTypeBox.Size = new System.Drawing.Size(68, 21); + this.ReadTypeBox.Size = new System.Drawing.Size(100, 28); this.ReadTypeBox.TabIndex = 13; // // ReadButton // - this.ReadButton.Location = new System.Drawing.Point(280, 17); - this.ReadButton.Margin = new System.Windows.Forms.Padding(2); + this.ReadButton.Location = new System.Drawing.Point(420, 26); this.ReadButton.Name = "ReadButton"; - this.ReadButton.Size = new System.Drawing.Size(44, 20); + this.ReadButton.Size = new System.Drawing.Size(66, 31); this.ReadButton.TabIndex = 12; this.ReadButton.Text = "Read"; this.ReadButton.UseVisualStyleBackColor = true; @@ -260,36 +250,32 @@ private void InitializeComponent() // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(4, 20); - this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label3.Location = new System.Drawing.Point(6, 31); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(48, 13); + this.label3.Size = new System.Drawing.Size(72, 20); this.label3.TabIndex = 11; this.label3.Text = "Address:"; // // ReadTextBox // - this.ReadTextBox.Location = new System.Drawing.Point(50, 18); - this.ReadTextBox.Margin = new System.Windows.Forms.Padding(2); + this.ReadTextBox.Location = new System.Drawing.Point(75, 28); this.ReadTextBox.Name = "ReadTextBox"; - this.ReadTextBox.Size = new System.Drawing.Size(156, 20); + this.ReadTextBox.Size = new System.Drawing.Size(232, 26); this.ReadTextBox.TabIndex = 10; this.ReadTextBox.Text = "00000000"; // // WriteValueBox // - this.WriteValueBox.Location = new System.Drawing.Point(50, 48); - this.WriteValueBox.Margin = new System.Windows.Forms.Padding(2); + this.WriteValueBox.Location = new System.Drawing.Point(75, 74); this.WriteValueBox.Name = "WriteValueBox"; - this.WriteValueBox.Size = new System.Drawing.Size(275, 20); + this.WriteValueBox.Size = new System.Drawing.Size(410, 26); this.WriteValueBox.TabIndex = 14; // // ReadValueBox // - this.ReadValueBox.Location = new System.Drawing.Point(50, 41); - this.ReadValueBox.Margin = new System.Windows.Forms.Padding(2); + this.ReadValueBox.Location = new System.Drawing.Point(75, 63); this.ReadValueBox.Name = "ReadValueBox"; - this.ReadValueBox.Size = new System.Drawing.Size(275, 20); + this.ReadValueBox.Size = new System.Drawing.Size(410, 26); this.ReadValueBox.TabIndex = 15; // // groupBox2 @@ -301,11 +287,9 @@ private void InitializeComponent() this.groupBox2.Controls.Add(this.label2); this.groupBox2.Controls.Add(this.WriteButton); this.groupBox2.Controls.Add(this.WriteTypeBox); - this.groupBox2.Location = new System.Drawing.Point(293, 48); - this.groupBox2.Margin = new System.Windows.Forms.Padding(2); + this.groupBox2.Location = new System.Drawing.Point(440, 74); this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(2); - this.groupBox2.Size = new System.Drawing.Size(328, 73); + this.groupBox2.Size = new System.Drawing.Size(492, 112); this.groupBox2.TabIndex = 16; this.groupBox2.TabStop = false; this.groupBox2.Text = "Write To Address"; @@ -313,10 +297,9 @@ private void InitializeComponent() // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(13, 50); - this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label4.Location = new System.Drawing.Point(20, 77); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(37, 13); + this.label4.Size = new System.Drawing.Size(54, 20); this.label4.TabIndex = 15; this.label4.Text = "Value:"; // @@ -329,11 +312,9 @@ private void InitializeComponent() this.groupBox3.Controls.Add(this.label3); this.groupBox3.Controls.Add(this.ReadTypeBox); this.groupBox3.Controls.Add(this.ReadButton); - this.groupBox3.Location = new System.Drawing.Point(293, 125); - this.groupBox3.Margin = new System.Windows.Forms.Padding(2); + this.groupBox3.Location = new System.Drawing.Point(440, 192); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Padding = new System.Windows.Forms.Padding(2); - this.groupBox3.Size = new System.Drawing.Size(328, 67); + this.groupBox3.Size = new System.Drawing.Size(492, 103); this.groupBox3.TabIndex = 17; this.groupBox3.TabStop = false; this.groupBox3.Text = "Read From Address"; @@ -341,10 +322,9 @@ private void InitializeComponent() // label5 // this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(13, 43); - this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label5.Location = new System.Drawing.Point(20, 66); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(37, 13); + this.label5.Size = new System.Drawing.Size(54, 20); this.label5.TabIndex = 16; this.label5.Text = "Value:"; // @@ -360,48 +340,42 @@ private void InitializeComponent() this.groupBox4.Controls.Add(this.AobScanTextBox); this.groupBox4.Controls.Add(this.label7); this.groupBox4.Controls.Add(this.ScanButton); - this.groupBox4.Location = new System.Drawing.Point(293, 306); - this.groupBox4.Margin = new System.Windows.Forms.Padding(2); + this.groupBox4.Location = new System.Drawing.Point(440, 471); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Padding = new System.Windows.Forms.Padding(2); - this.groupBox4.Size = new System.Drawing.Size(328, 274); + this.groupBox4.Size = new System.Drawing.Size(492, 422); this.groupBox4.TabIndex = 17; this.groupBox4.TabStop = false; this.groupBox4.Text = "Array of Bytes (AoB) / Pattern Scan"; // // EndAddrBox // - this.EndAddrBox.Location = new System.Drawing.Point(209, 46); - this.EndAddrBox.Margin = new System.Windows.Forms.Padding(2); + this.EndAddrBox.Location = new System.Drawing.Point(314, 71); this.EndAddrBox.Name = "EndAddrBox"; - this.EndAddrBox.Size = new System.Drawing.Size(116, 20); + this.EndAddrBox.Size = new System.Drawing.Size(172, 26); this.EndAddrBox.TabIndex = 19; // // label10 // this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(181, 48); - this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label10.Location = new System.Drawing.Point(272, 74); this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(29, 13); + this.label10.Size = new System.Drawing.Size(42, 20); this.label10.TabIndex = 18; this.label10.Text = "End:"; // // StartAddrBox // - this.StartAddrBox.Location = new System.Drawing.Point(50, 46); - this.StartAddrBox.Margin = new System.Windows.Forms.Padding(2); + this.StartAddrBox.Location = new System.Drawing.Point(75, 71); this.StartAddrBox.Name = "StartAddrBox"; - this.StartAddrBox.Size = new System.Drawing.Size(123, 20); + this.StartAddrBox.Size = new System.Drawing.Size(182, 26); this.StartAddrBox.TabIndex = 17; // // label9 // this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(15, 47); - this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label9.Location = new System.Drawing.Point(22, 72); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(32, 13); + this.label9.Size = new System.Drawing.Size(48, 20); this.label9.TabIndex = 16; this.label9.Text = "Start:"; // @@ -410,10 +384,9 @@ private void InitializeComponent() this.AobScanList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.columnHeader1}); this.AobScanList.HideSelection = false; - this.AobScanList.Location = new System.Drawing.Point(50, 68); - this.AobScanList.Margin = new System.Windows.Forms.Padding(2); + this.AobScanList.Location = new System.Drawing.Point(75, 105); this.AobScanList.Name = "AobScanList"; - this.AobScanList.Size = new System.Drawing.Size(275, 201); + this.AobScanList.Size = new System.Drawing.Size(410, 307); this.AobScanList.TabIndex = 9; this.AobScanList.UseCompatibleStateImageBehavior = false; this.AobScanList.View = System.Windows.Forms.View.Details; @@ -426,38 +399,34 @@ private void InitializeComponent() // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(10, 72); - this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label6.Location = new System.Drawing.Point(15, 111); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(40, 13); + this.label6.Size = new System.Drawing.Size(59, 20); this.label6.TabIndex = 15; this.label6.Text = "Found:"; // // AobScanTextBox // - this.AobScanTextBox.Location = new System.Drawing.Point(50, 24); - this.AobScanTextBox.Margin = new System.Windows.Forms.Padding(2); + this.AobScanTextBox.Location = new System.Drawing.Point(75, 37); this.AobScanTextBox.Name = "AobScanTextBox"; - this.AobScanTextBox.Size = new System.Drawing.Size(227, 20); + this.AobScanTextBox.Size = new System.Drawing.Size(338, 26); this.AobScanTextBox.TabIndex = 4; this.AobScanTextBox.Text = "00 00 00 00"; // // label7 // this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(6, 26); - this.label7.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label7.Location = new System.Drawing.Point(9, 40); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(44, 13); + this.label7.Size = new System.Drawing.Size(65, 20); this.label7.TabIndex = 5; this.label7.Text = "Pattern:"; // // ScanButton // - this.ScanButton.Location = new System.Drawing.Point(280, 24); - this.ScanButton.Margin = new System.Windows.Forms.Padding(2); + this.ScanButton.Location = new System.Drawing.Point(420, 37); this.ScanButton.Name = "ScanButton"; - this.ScanButton.Size = new System.Drawing.Size(44, 20); + this.ScanButton.Size = new System.Drawing.Size(66, 31); this.ScanButton.TabIndex = 6; this.ScanButton.Text = "Scan"; this.ScanButton.UseVisualStyleBackColor = true; @@ -466,10 +435,9 @@ private void InitializeComponent() // label8 // this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(385, 21); - this.label8.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label8.Location = new System.Drawing.Point(578, 32); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(40, 13); + this.label8.Size = new System.Drawing.Size(60, 20); this.label8.TabIndex = 18; this.label8.Text = "Status:"; // @@ -478,10 +446,9 @@ private void InitializeComponent() this.ProcStatus.AutoSize = true; this.ProcStatus.BackColor = System.Drawing.Color.Transparent; this.ProcStatus.ForeColor = System.Drawing.Color.Red; - this.ProcStatus.Location = new System.Drawing.Point(421, 21); - this.ProcStatus.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ProcStatus.Location = new System.Drawing.Point(632, 32); this.ProcStatus.Name = "ProcStatus"; - this.ProcStatus.Size = new System.Drawing.Size(39, 13); + this.ProcStatus.Size = new System.Drawing.Size(58, 20); this.ProcStatus.TabIndex = 19; this.ProcStatus.Text = "Closed"; // @@ -502,21 +469,18 @@ private void InitializeComponent() this.groupBox5.Controls.Add(this.DLLTextBox); this.groupBox5.Controls.Add(this.label12); this.groupBox5.Controls.Add(this.BrowseDLLButton); - this.groupBox5.Location = new System.Drawing.Point(293, 196); - this.groupBox5.Margin = new System.Windows.Forms.Padding(2); + this.groupBox5.Location = new System.Drawing.Point(440, 302); this.groupBox5.Name = "groupBox5"; - this.groupBox5.Padding = new System.Windows.Forms.Padding(2); - this.groupBox5.Size = new System.Drawing.Size(328, 67); + this.groupBox5.Size = new System.Drawing.Size(492, 103); this.groupBox5.TabIndex = 18; this.groupBox5.TabStop = false; this.groupBox5.Text = "Inject DLL and NamedPipe"; // // SendPipeButton // - this.SendPipeButton.Location = new System.Drawing.Point(275, 42); - this.SendPipeButton.Margin = new System.Windows.Forms.Padding(2); + this.SendPipeButton.Location = new System.Drawing.Point(412, 65); this.SendPipeButton.Name = "SendPipeButton"; - this.SendPipeButton.Size = new System.Drawing.Size(48, 20); + this.SendPipeButton.Size = new System.Drawing.Size(72, 31); this.SendPipeButton.TabIndex = 20; this.SendPipeButton.Text = "Send"; this.SendPipeButton.UseVisualStyleBackColor = true; @@ -525,28 +489,25 @@ private void InitializeComponent() // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(135, 45); - this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label13.Location = new System.Drawing.Point(202, 69); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(30, 13); + this.label13.Size = new System.Drawing.Size(43, 20); this.label13.TabIndex = 19; this.label13.Text = "Msg:"; // // PipeMsgTextBox // - this.PipeMsgTextBox.Location = new System.Drawing.Point(166, 42); - this.PipeMsgTextBox.Margin = new System.Windows.Forms.Padding(2); + this.PipeMsgTextBox.Location = new System.Drawing.Point(249, 65); this.PipeMsgTextBox.Name = "PipeMsgTextBox"; - this.PipeMsgTextBox.Size = new System.Drawing.Size(104, 20); + this.PipeMsgTextBox.Size = new System.Drawing.Size(154, 26); this.PipeMsgTextBox.TabIndex = 18; this.PipeMsgTextBox.Text = "gameassembly"; // // InjectButton // - this.InjectButton.Location = new System.Drawing.Point(275, 18); - this.InjectButton.Margin = new System.Windows.Forms.Padding(2); + this.InjectButton.Location = new System.Drawing.Point(412, 28); this.InjectButton.Name = "InjectButton"; - this.InjectButton.Size = new System.Drawing.Size(49, 20); + this.InjectButton.Size = new System.Drawing.Size(74, 31); this.InjectButton.TabIndex = 17; this.InjectButton.Text = "Inject"; this.InjectButton.UseVisualStyleBackColor = true; @@ -555,46 +516,41 @@ private void InitializeComponent() // label11 // this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(15, 45); - this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label11.Location = new System.Drawing.Point(22, 69); this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(31, 13); + this.label11.Size = new System.Drawing.Size(44, 20); this.label11.TabIndex = 16; this.label11.Text = "Pipe:"; // // PipeNameTextBox // - this.PipeNameTextBox.Location = new System.Drawing.Point(50, 42); - this.PipeNameTextBox.Margin = new System.Windows.Forms.Padding(2); + this.PipeNameTextBox.Location = new System.Drawing.Point(75, 65); this.PipeNameTextBox.Name = "PipeNameTextBox"; - this.PipeNameTextBox.Size = new System.Drawing.Size(83, 20); + this.PipeNameTextBox.Size = new System.Drawing.Size(122, 26); this.PipeNameTextBox.TabIndex = 15; this.PipeNameTextBox.Text = "EQTPipe"; // // DLLTextBox // - this.DLLTextBox.Location = new System.Drawing.Point(50, 18); - this.DLLTextBox.Margin = new System.Windows.Forms.Padding(2); + this.DLLTextBox.Location = new System.Drawing.Point(75, 28); this.DLLTextBox.Name = "DLLTextBox"; - this.DLLTextBox.Size = new System.Drawing.Size(160, 20); + this.DLLTextBox.Size = new System.Drawing.Size(238, 26); this.DLLTextBox.TabIndex = 10; // // label12 // this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(16, 21); - this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.label12.Location = new System.Drawing.Point(24, 32); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(30, 13); + this.label12.Size = new System.Drawing.Size(43, 20); this.label12.TabIndex = 11; this.label12.Text = "DLL:"; // // BrowseDLLButton // - this.BrowseDLLButton.Location = new System.Drawing.Point(214, 18); - this.BrowseDLLButton.Margin = new System.Windows.Forms.Padding(2); + this.BrowseDLLButton.Location = new System.Drawing.Point(321, 28); this.BrowseDLLButton.Name = "BrowseDLLButton"; - this.BrowseDLLButton.Size = new System.Drawing.Size(57, 20); + this.BrowseDLLButton.Size = new System.Drawing.Size(86, 31); this.BrowseDLLButton.TabIndex = 12; this.BrowseDLLButton.Text = "Browse"; this.BrowseDLLButton.UseVisualStyleBackColor = true; @@ -610,9 +566,9 @@ private void InitializeComponent() // // TrainerForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(632, 596); + this.ClientSize = new System.Drawing.Size(948, 917); this.Controls.Add(this.groupBox5); this.Controls.Add(this.ProcStatus); this.Controls.Add(this.label8); @@ -624,8 +580,7 @@ private void InitializeComponent() this.Controls.Add(this.OpenProcessBtn); this.Controls.Add(this.label1); this.Controls.Add(this.ProcTextBox); - this.Margin = new System.Windows.Forms.Padding(2); - this.MinimumSize = new System.Drawing.Size(586, 535); + this.MinimumSize = new System.Drawing.Size(868, 793); this.Name = "TrainerForm"; this.Text = "Memory.dll Test Trainer"; this.Shown += new System.EventHandler(this.TrainerForm_Shown); diff --git a/Test/TestApp/MemoryTestApp/Forms/TrainerForm.cs b/Test/TestApp/MemoryTestApp/Forms/TrainerForm.cs index a32f7f9..ad41264 100644 --- a/Test/TestApp/MemoryTestApp/Forms/TrainerForm.cs +++ b/Test/TestApp/MemoryTestApp/Forms/TrainerForm.cs @@ -30,7 +30,7 @@ public TrainerForm() Mem m = new Mem(); // Declare m as our Memory.dll function reference variable. bool StopWorker = false; - string ProcNameOrID; + string ProcNameOrID = ""; private void TrainerForm_Shown(object sender, EventArgs e) { @@ -105,13 +105,8 @@ private void BackgroundWork_DoWork(object sender, DoWorkEventArgs e) // infinite loop that checks if the process is available and open, if not, modify the UI. while (true) { - if (String.Compare(ProcTypeBox.Text, "Name") == 0) // if combobox set to Name, use string - ProcOpen = m.OpenProcess(ProcNameOrID); - else // if combobox set to ID, use integer - ProcOpen = m.OpenProcess(Convert.ToInt32(ProcNameOrID)); - BackgroundWork.ReportProgress(0); // do UI thread stuff - Thread.Sleep(1000); + Thread.Sleep(1000); // prevent memory leak } } @@ -133,6 +128,11 @@ private void BackgroundWork_RunWorkerCompleted(object sender, RunWorkerCompleted private void BackgroundWork_ProgressChanged(object sender, ProgressChangedEventArgs e) { + if (String.Compare(ProcTypeBox.Text, "Name") == 0) // if combobox set to Name, use string + ProcOpen = m.OpenProcess(ProcNameOrID); + else // if combobox set to ID, use integer + ProcOpen = m.OpenProcess(Convert.ToInt32(ProcNameOrID)); + ProcUIUpdate(); } @@ -140,5 +140,15 @@ private void ProcTextBox_TextChanged(object sender, EventArgs e) { StopWorker = true; // stop worker if we're changing process name } + + private void ProcTypeBox_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void ProcTypeBox_SelectionChangeCommitted(object sender, EventArgs e) + { + + } } }