Added UI components for specifying comparision values. Added logic to control enabling them.

This commit is contained in:
Adam Sturge 2016-01-16 16:22:39 -08:00
parent e484eee95b
commit a7f24179cb
2 changed files with 1139 additions and 837 deletions

View File

@ -76,22 +76,14 @@
this.AttemptsLabel = new System.Windows.Forms.Label();
this.FramesLabel = new System.Windows.Forms.Label();
this.GoalGroupBox = new System.Windows.Forms.GroupBox();
this.Tiebreak3Operator = new System.Windows.Forms.ComboBox();
this.Tiebreak2Operator = new System.Windows.Forms.ComboBox();
this.Tiebreak1Operator = new System.Windows.Forms.ComboBox();
this.mainOperator = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.TieBreaker1Box = new BizHawk.Client.EmuHawk.HexTextBox();
this.TieBreaker2Box = new BizHawk.Client.EmuHawk.HexTextBox();
this.TieBreaker3Box = new BizHawk.Client.EmuHawk.HexTextBox();
this.label5 = new System.Windows.Forms.Label();
this.MaximizeAddressBox = new BizHawk.Client.EmuHawk.HexTextBox();
this.maximizeLabeltext = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.FrameLengthNumeric = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
@ -102,6 +94,30 @@
this.panel2 = new System.Windows.Forms.Panel();
this.StatsContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ClearStatsContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel3 = new System.Windows.Forms.Panel();
this.mainOperator = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.MaximizeAddressBox = new BizHawk.Client.EmuHawk.HexTextBox();
this.maximizeLabeltext = new System.Windows.Forms.Label();
this.mainBestRadio = new System.Windows.Forms.RadioButton();
this.mainValueRadio = new System.Windows.Forms.RadioButton();
this.mainValueNumeric = new System.Windows.Forms.NumericUpDown();
this.panel4 = new System.Windows.Forms.Panel();
this.tiebreak1Numeric = new System.Windows.Forms.NumericUpDown();
this.tiebreak1ValueRadio = new System.Windows.Forms.RadioButton();
this.tiebreak1BestRadio = new System.Windows.Forms.RadioButton();
this.panel5 = new System.Windows.Forms.Panel();
this.tiebreak2Numeric = new System.Windows.Forms.NumericUpDown();
this.tiebreak2ValueRadio = new System.Windows.Forms.RadioButton();
this.tiebreak2BestRadio = new System.Windows.Forms.RadioButton();
this.panel6 = new System.Windows.Forms.Panel();
this.tiebreak3Numeric = new System.Windows.Forms.NumericUpDown();
this.tiebreak3ValueRadio = new System.Windows.Forms.RadioButton();
this.tiebreak3BestRadio = new System.Windows.Forms.RadioButton();
this.Tiebreak3Operator = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.TieBreaker3Box = new BizHawk.Client.EmuHawk.HexTextBox();
this.BotMenu.SuspendLayout();
this.BotStatusStrip.SuspendLayout();
this.ControlsBox.SuspendLayout();
@ -112,6 +128,14 @@
this.ControlGroupBox.SuspendLayout();
this.panel2.SuspendLayout();
this.StatsContextMenu.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.mainValueNumeric)).BeginInit();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tiebreak1Numeric)).BeginInit();
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tiebreak2Numeric)).BeginInit();
this.panel6.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tiebreak3Numeric)).BeginInit();
this.SuspendLayout();
//
// BotMenu
@ -122,7 +146,7 @@
this.OptionsSubMenu});
this.BotMenu.Location = new System.Drawing.Point(0, 0);
this.BotMenu.Name = "BotMenu";
this.BotMenu.Size = new System.Drawing.Size(587, 24);
this.BotMenu.Size = new System.Drawing.Size(842, 24);
this.BotMenu.TabIndex = 0;
this.BotMenu.Text = "menuStrip1";
//
@ -302,7 +326,7 @@
this.MessageLabel});
this.BotStatusStrip.Location = new System.Drawing.Point(0, 565);
this.BotStatusStrip.Name = "BotStatusStrip";
this.BotStatusStrip.Size = new System.Drawing.Size(587, 22);
this.BotStatusStrip.Size = new System.Drawing.Size(842, 22);
this.BotStatusStrip.TabIndex = 2;
this.BotStatusStrip.Text = "statusStrip1";
//
@ -331,7 +355,7 @@
this.ControlsBox.Controls.Add(this.ControlProbabilityPanel);
this.ControlsBox.Location = new System.Drawing.Point(12, 183);
this.ControlsBox.Name = "ControlsBox";
this.ControlsBox.Size = new System.Drawing.Size(312, 369);
this.ControlsBox.Size = new System.Drawing.Size(567, 369);
this.ControlsBox.TabIndex = 3;
this.ControlsBox.TabStop = false;
this.ControlsBox.Text = "Controls";
@ -344,7 +368,7 @@
this.ControlProbabilityPanel.AutoScroll = true;
this.ControlProbabilityPanel.Location = new System.Drawing.Point(6, 19);
this.ControlProbabilityPanel.Name = "ControlProbabilityPanel";
this.ControlProbabilityPanel.Size = new System.Drawing.Size(299, 344);
this.ControlProbabilityPanel.Size = new System.Drawing.Size(554, 344);
this.ControlProbabilityPanel.TabIndex = 0;
//
// BestGroupBox
@ -364,7 +388,7 @@
this.BestGroupBox.Controls.Add(this.label15);
this.BestGroupBox.Controls.Add(this.label14);
this.BestGroupBox.Controls.Add(this.label13);
this.BestGroupBox.Location = new System.Drawing.Point(330, 183);
this.BestGroupBox.Location = new System.Drawing.Point(585, 183);
this.BestGroupBox.Name = "BestGroupBox";
this.BestGroupBox.Size = new System.Drawing.Size(245, 369);
this.BestGroupBox.TabIndex = 4;
@ -514,7 +538,7 @@
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(119, 16);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(53, 13);
this.label13.Size = new System.Drawing.Size(63, 13);
this.label13.TabIndex = 0;
this.label13.Text = "Main Value:";
//
@ -558,47 +582,20 @@
//
this.GoalGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.GoalGroupBox.Controls.Add(this.Tiebreak3Operator);
this.GoalGroupBox.Controls.Add(this.Tiebreak2Operator);
this.GoalGroupBox.Controls.Add(this.Tiebreak1Operator);
this.GoalGroupBox.Controls.Add(this.mainOperator);
this.GoalGroupBox.Controls.Add(this.label12);
this.GoalGroupBox.Controls.Add(this.label11);
this.GoalGroupBox.Controls.Add(this.label10);
this.GoalGroupBox.Controls.Add(this.label9);
this.GoalGroupBox.Controls.Add(this.label7);
this.GoalGroupBox.Controls.Add(this.label6);
this.GoalGroupBox.Controls.Add(this.TieBreaker1Box);
this.GoalGroupBox.Controls.Add(this.TieBreaker2Box);
this.GoalGroupBox.Controls.Add(this.TieBreaker3Box);
this.GoalGroupBox.Controls.Add(this.label5);
this.GoalGroupBox.Controls.Add(this.MaximizeAddressBox);
this.GoalGroupBox.Controls.Add(this.maximizeLabeltext);
this.GoalGroupBox.Controls.Add(this.panel6);
this.GoalGroupBox.Controls.Add(this.label4);
this.GoalGroupBox.Controls.Add(this.FrameLengthNumeric);
this.GoalGroupBox.Controls.Add(this.label3);
this.GoalGroupBox.Controls.Add(this.panel3);
this.GoalGroupBox.Controls.Add(this.panel4);
this.GoalGroupBox.Controls.Add(this.panel5);
this.GoalGroupBox.Location = new System.Drawing.Point(12, 27);
this.GoalGroupBox.Name = "GoalGroupBox";
this.GoalGroupBox.Size = new System.Drawing.Size(312, 150);
this.GoalGroupBox.Size = new System.Drawing.Size(567, 150);
this.GoalGroupBox.TabIndex = 9;
this.GoalGroupBox.TabStop = false;
this.GoalGroupBox.Text = " ";
//
// Tiebreak3Operator
//
this.Tiebreak3Operator.FormattingEnabled = true;
this.Tiebreak3Operator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.Tiebreak3Operator.Location = new System.Drawing.Point(266, 119);
this.Tiebreak3Operator.Name = "Tiebreak3Operator";
this.Tiebreak3Operator.Size = new System.Drawing.Size(40, 21);
this.Tiebreak3Operator.TabIndex = 1009;
Tiebreak3Operator.SelectedIndex = 0;
//
// Tiebreak2Operator
//
this.Tiebreak2Operator.FormattingEnabled = true;
@ -608,11 +605,10 @@
"=",
"<=",
"<"});
this.Tiebreak2Operator.Location = new System.Drawing.Point(266, 98);
this.Tiebreak2Operator.Location = new System.Drawing.Point(262, 3);
this.Tiebreak2Operator.Name = "Tiebreak2Operator";
this.Tiebreak2Operator.Size = new System.Drawing.Size(40, 21);
this.Tiebreak2Operator.TabIndex = 1008;
Tiebreak2Operator.SelectedIndex = 0;
//
// Tiebreak1Operator
//
@ -623,40 +619,15 @@
"=",
"<=",
"<"});
this.Tiebreak1Operator.Location = new System.Drawing.Point(266, 76);
this.Tiebreak1Operator.Location = new System.Drawing.Point(262, 3);
this.Tiebreak1Operator.Name = "Tiebreak1Operator";
this.Tiebreak1Operator.Size = new System.Drawing.Size(40, 21);
this.Tiebreak1Operator.TabIndex = 1007;
Tiebreak1Operator.SelectedIndex = 0;
//
// mainOperator
//
this.mainOperator.FormattingEnabled = true;
this.mainOperator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.mainOperator.Location = new System.Drawing.Point(266, 54);
this.mainOperator.Name = "mainOperator";
this.mainOperator.Size = new System.Drawing.Size(40, 21);
this.mainOperator.TabIndex = 1006;
mainOperator.SelectedIndex = 0;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(74, 122);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(59, 13);
this.label12.TabIndex = 14;
this.label12.Text = "Address 0x";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(73, 101);
this.label11.Location = new System.Drawing.Point(67, 7);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(59, 13);
this.label11.TabIndex = 13;
@ -665,34 +636,16 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(73, 79);
this.label10.Location = new System.Drawing.Point(67, 7);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(59, 13);
this.label10.TabIndex = 12;
this.label10.Text = "Address 0x";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(73, 57);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(59, 13);
this.label9.TabIndex = 11;
this.label9.Text = "Address 0x";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(6, 122);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(61, 13);
this.label7.TabIndex = 10;
this.label7.Text = "Tiebreak 3:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(6, 101);
this.label6.Location = new System.Drawing.Point(1, 7);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(61, 13);
this.label6.TabIndex = 9;
@ -703,10 +656,10 @@
this.TieBreaker1Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TieBreaker1Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.TieBreaker1Box.Location = new System.Drawing.Point(139, 76);
this.TieBreaker1Box.Location = new System.Drawing.Point(133, 4);
this.TieBreaker1Box.Name = "TieBreaker1Box";
this.TieBreaker1Box.Nullable = true;
this.TieBreaker1Box.Size = new System.Drawing.Size(121, 20);
this.TieBreaker1Box.Size = new System.Drawing.Size(123, 20);
this.TieBreaker1Box.TabIndex = 1002;
//
// TieBreaker2Box
@ -714,53 +667,21 @@
this.TieBreaker2Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TieBreaker2Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.TieBreaker2Box.Location = new System.Drawing.Point(139, 98);
this.TieBreaker2Box.Location = new System.Drawing.Point(133, 4);
this.TieBreaker2Box.Name = "TieBreaker2Box";
this.TieBreaker2Box.Nullable = true;
this.TieBreaker2Box.Size = new System.Drawing.Size(121, 20);
this.TieBreaker2Box.Size = new System.Drawing.Size(123, 20);
this.TieBreaker2Box.TabIndex = 1003;
//
// TieBreaker3Box
//
this.TieBreaker3Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TieBreaker3Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.TieBreaker3Box.Location = new System.Drawing.Point(139, 119);
this.TieBreaker3Box.Name = "TieBreaker3Box";
this.TieBreaker3Box.Nullable = true;
this.TieBreaker3Box.Size = new System.Drawing.Size(121, 20);
this.TieBreaker3Box.TabIndex = 1004;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 79);
this.label5.Location = new System.Drawing.Point(1, 7);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(61, 13);
this.label5.TabIndex = 5;
this.label5.Text = "Tiebreak 1:";
//
// MaximizeAddressBox
//
this.MaximizeAddressBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MaximizeAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.MaximizeAddressBox.Location = new System.Drawing.Point(139, 54);
this.MaximizeAddressBox.Name = "MaximizeAddressBox";
this.MaximizeAddressBox.Nullable = true;
this.MaximizeAddressBox.Size = new System.Drawing.Size(121, 20);
this.MaximizeAddressBox.TabIndex = 1001;
this.MaximizeAddressBox.TextChanged += new System.EventHandler(this.FrameLengthNumeric_ValueChanged);
//
// maximizeLabeltext
//
this.maximizeLabeltext.AutoSize = true;
this.maximizeLabeltext.Location = new System.Drawing.Point(7, 57);
this.maximizeLabeltext.Name = "maximizeLabeltext";
this.maximizeLabeltext.Size = new System.Drawing.Size(63, 13);
this.maximizeLabeltext.TabIndex = 3;
this.maximizeLabeltext.Text = "Main Value:";
//
// label4
//
this.label4.AutoSize = true;
@ -847,7 +768,7 @@
this.ControlGroupBox.Controls.Add(this.RunBtn);
this.ControlGroupBox.Controls.Add(this.StartFromSlotBox);
this.ControlGroupBox.Controls.Add(this.label8);
this.ControlGroupBox.Location = new System.Drawing.Point(329, 27);
this.ControlGroupBox.Location = new System.Drawing.Point(584, 27);
this.ControlGroupBox.Name = "ControlGroupBox";
this.ControlGroupBox.Size = new System.Drawing.Size(245, 150);
this.ControlGroupBox.TabIndex = 2004;
@ -880,11 +801,281 @@
this.ClearStatsContextMenuItem.Text = "&Clear";
this.ClearStatsContextMenuItem.Click += new System.EventHandler(this.ClearStatsContextMenuItem_Click);
//
// panel3
//
this.panel3.Controls.Add(this.mainValueNumeric);
this.panel3.Controls.Add(this.mainValueRadio);
this.panel3.Controls.Add(this.mainBestRadio);
this.panel3.Controls.Add(this.mainOperator);
this.panel3.Controls.Add(this.label9);
this.panel3.Controls.Add(this.MaximizeAddressBox);
this.panel3.Controls.Add(this.maximizeLabeltext);
this.panel3.Location = new System.Drawing.Point(9, 51);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(546, 26);
this.panel3.TabIndex = 0;
//
// mainOperator
//
this.mainOperator.FormattingEnabled = true;
this.mainOperator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.mainOperator.Location = new System.Drawing.Point(262, 3);
this.mainOperator.Name = "mainOperator";
this.mainOperator.Size = new System.Drawing.Size(40, 21);
this.mainOperator.TabIndex = 1010;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(67, 7);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(59, 13);
this.label9.TabIndex = 1008;
this.label9.Text = "Address 0x";
//
// MaximizeAddressBox
//
this.MaximizeAddressBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.MaximizeAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.MaximizeAddressBox.Location = new System.Drawing.Point(133, 4);
this.MaximizeAddressBox.Name = "MaximizeAddressBox";
this.MaximizeAddressBox.Nullable = true;
this.MaximizeAddressBox.Size = new System.Drawing.Size(123, 20);
this.MaximizeAddressBox.TabIndex = 1009;
//
// maximizeLabeltext
//
this.maximizeLabeltext.AutoSize = true;
this.maximizeLabeltext.Location = new System.Drawing.Point(1, 7);
this.maximizeLabeltext.Name = "maximizeLabeltext";
this.maximizeLabeltext.Size = new System.Drawing.Size(63, 13);
this.maximizeLabeltext.TabIndex = 1007;
this.maximizeLabeltext.Text = "Main Value:";
//
// mainBestRadio
//
this.mainBestRadio.AutoSize = true;
this.mainBestRadio.Checked = true;
this.mainBestRadio.Location = new System.Drawing.Point(307, 6);
this.mainBestRadio.Name = "mainBestRadio";
this.mainBestRadio.Size = new System.Drawing.Size(46, 17);
this.mainBestRadio.TabIndex = 1011;
this.mainBestRadio.TabStop = true;
this.mainBestRadio.Text = "Best";
this.mainBestRadio.UseVisualStyleBackColor = true;
this.mainBestRadio.CheckedChanged += new System.EventHandler(this.mainBestRadio_CheckedChanged);
//
// mainValueRadio
//
this.mainValueRadio.AutoSize = true;
this.mainValueRadio.Location = new System.Drawing.Point(359, 6);
this.mainValueRadio.Name = "mainValueRadio";
this.mainValueRadio.Size = new System.Drawing.Size(52, 17);
this.mainValueRadio.TabIndex = 1012;
this.mainValueRadio.Text = "Value";
this.mainValueRadio.UseVisualStyleBackColor = true;
this.mainValueRadio.CheckedChanged += new System.EventHandler(this.mainValueRadio_CheckedChanged);
//
// mainValueNumeric
//
this.mainValueNumeric.Enabled = false;
this.mainValueNumeric.Location = new System.Drawing.Point(417, 4);
this.mainValueNumeric.Name = "mainValueNumeric";
this.mainValueNumeric.Size = new System.Drawing.Size(120, 20);
this.mainValueNumeric.TabIndex = 1013;
//
// panel4
//
this.panel4.Controls.Add(this.tiebreak1Numeric);
this.panel4.Controls.Add(this.tiebreak1ValueRadio);
this.panel4.Controls.Add(this.Tiebreak1Operator);
this.panel4.Controls.Add(this.tiebreak1BestRadio);
this.panel4.Controls.Add(this.label5);
this.panel4.Controls.Add(this.TieBreaker1Box);
this.panel4.Controls.Add(this.label10);
this.panel4.Location = new System.Drawing.Point(9, 74);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(546, 26);
this.panel4.TabIndex = 1;
//
// tiebreak1Numeric
//
this.tiebreak1Numeric.Enabled = false;
this.tiebreak1Numeric.Location = new System.Drawing.Point(417, 4);
this.tiebreak1Numeric.Name = "tiebreak1Numeric";
this.tiebreak1Numeric.Size = new System.Drawing.Size(120, 20);
this.tiebreak1Numeric.TabIndex = 1013;
//
// tiebreak1ValueRadio
//
this.tiebreak1ValueRadio.AutoSize = true;
this.tiebreak1ValueRadio.Location = new System.Drawing.Point(359, 6);
this.tiebreak1ValueRadio.Name = "tiebreak1ValueRadio";
this.tiebreak1ValueRadio.Size = new System.Drawing.Size(52, 17);
this.tiebreak1ValueRadio.TabIndex = 1012;
this.tiebreak1ValueRadio.Text = "Value";
this.tiebreak1ValueRadio.UseVisualStyleBackColor = true;
this.tiebreak1ValueRadio.CheckedChanged += new System.EventHandler(this.tiebreak1ValueRadio_CheckedChanged);
//
// tiebreak1BestRadio
//
this.tiebreak1BestRadio.AutoSize = true;
this.tiebreak1BestRadio.Checked = true;
this.tiebreak1BestRadio.Location = new System.Drawing.Point(307, 6);
this.tiebreak1BestRadio.Name = "tiebreak1BestRadio";
this.tiebreak1BestRadio.Size = new System.Drawing.Size(46, 17);
this.tiebreak1BestRadio.TabIndex = 1011;
this.tiebreak1BestRadio.TabStop = true;
this.tiebreak1BestRadio.Text = "Best";
this.tiebreak1BestRadio.UseVisualStyleBackColor = true;
this.tiebreak1BestRadio.CheckedChanged += new System.EventHandler(this.tiebreak1BestRadio_CheckedChanged);
//
// panel5
//
this.panel5.Controls.Add(this.tiebreak2Numeric);
this.panel5.Controls.Add(this.Tiebreak2Operator);
this.panel5.Controls.Add(this.tiebreak2ValueRadio);
this.panel5.Controls.Add(this.tiebreak2BestRadio);
this.panel5.Controls.Add(this.label11);
this.panel5.Controls.Add(this.label6);
this.panel5.Controls.Add(this.TieBreaker2Box);
this.panel5.Location = new System.Drawing.Point(9, 97);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(546, 26);
this.panel5.TabIndex = 2;
//
// tiebreak2Numeric
//
this.tiebreak2Numeric.Enabled = false;
this.tiebreak2Numeric.Location = new System.Drawing.Point(417, 4);
this.tiebreak2Numeric.Name = "tiebreak2Numeric";
this.tiebreak2Numeric.Size = new System.Drawing.Size(120, 20);
this.tiebreak2Numeric.TabIndex = 1013;
//
// tiebreak2ValueRadio
//
this.tiebreak2ValueRadio.AutoSize = true;
this.tiebreak2ValueRadio.Location = new System.Drawing.Point(359, 6);
this.tiebreak2ValueRadio.Name = "tiebreak2ValueRadio";
this.tiebreak2ValueRadio.Size = new System.Drawing.Size(52, 17);
this.tiebreak2ValueRadio.TabIndex = 1012;
this.tiebreak2ValueRadio.Text = "Value";
this.tiebreak2ValueRadio.UseVisualStyleBackColor = true;
this.tiebreak2ValueRadio.CheckedChanged += new System.EventHandler(this.tiebreak2ValueRadio_CheckedChanged);
//
// tiebreak2BestRadio
//
this.tiebreak2BestRadio.AutoSize = true;
this.tiebreak2BestRadio.Checked = true;
this.tiebreak2BestRadio.Location = new System.Drawing.Point(307, 6);
this.tiebreak2BestRadio.Name = "tiebreak2BestRadio";
this.tiebreak2BestRadio.Size = new System.Drawing.Size(46, 17);
this.tiebreak2BestRadio.TabIndex = 1011;
this.tiebreak2BestRadio.TabStop = true;
this.tiebreak2BestRadio.Text = "Best";
this.tiebreak2BestRadio.UseVisualStyleBackColor = true;
this.tiebreak2BestRadio.CheckedChanged += new System.EventHandler(this.tiebreak2BestRadio_CheckedChanged);
//
// panel6
//
this.panel6.Controls.Add(this.Tiebreak3Operator);
this.panel6.Controls.Add(this.label12);
this.panel6.Controls.Add(this.label7);
this.panel6.Controls.Add(this.TieBreaker3Box);
this.panel6.Controls.Add(this.tiebreak3Numeric);
this.panel6.Controls.Add(this.tiebreak3ValueRadio);
this.panel6.Controls.Add(this.tiebreak3BestRadio);
this.panel6.Location = new System.Drawing.Point(9, 120);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(546, 26);
this.panel6.TabIndex = 3;
//
// tiebreak3Numeric
//
this.tiebreak3Numeric.Enabled = false;
this.tiebreak3Numeric.Location = new System.Drawing.Point(417, 4);
this.tiebreak3Numeric.Name = "tiebreak3Numeric";
this.tiebreak3Numeric.Size = new System.Drawing.Size(120, 20);
this.tiebreak3Numeric.TabIndex = 1013;
//
// tiebreak3ValueRadio
//
this.tiebreak3ValueRadio.AutoSize = true;
this.tiebreak3ValueRadio.Location = new System.Drawing.Point(359, 6);
this.tiebreak3ValueRadio.Name = "tiebreak3ValueRadio";
this.tiebreak3ValueRadio.Size = new System.Drawing.Size(52, 17);
this.tiebreak3ValueRadio.TabIndex = 1012;
this.tiebreak3ValueRadio.Text = "Value";
this.tiebreak3ValueRadio.UseVisualStyleBackColor = true;
this.tiebreak3ValueRadio.CheckedChanged += new System.EventHandler(this.tiebreak3ValueRadio_CheckedChanged);
//
// tiebreak3BestRadio
//
this.tiebreak3BestRadio.AutoSize = true;
this.tiebreak3BestRadio.Checked = true;
this.tiebreak3BestRadio.Location = new System.Drawing.Point(307, 6);
this.tiebreak3BestRadio.Name = "tiebreak3BestRadio";
this.tiebreak3BestRadio.Size = new System.Drawing.Size(46, 17);
this.tiebreak3BestRadio.TabIndex = 1011;
this.tiebreak3BestRadio.TabStop = true;
this.tiebreak3BestRadio.Text = "Best";
this.tiebreak3BestRadio.UseVisualStyleBackColor = true;
this.tiebreak3BestRadio.CheckedChanged += new System.EventHandler(this.tiebreak3BestRadio_CheckedChanged);
//
// Tiebreak3Operator
//
this.Tiebreak3Operator.FormattingEnabled = true;
this.Tiebreak3Operator.Items.AddRange(new object[] {
">",
">=",
"=",
"<=",
"<"});
this.Tiebreak3Operator.Location = new System.Drawing.Point(262, 3);
this.Tiebreak3Operator.Name = "Tiebreak3Operator";
this.Tiebreak3Operator.Size = new System.Drawing.Size(40, 21);
this.Tiebreak3Operator.TabIndex = 1017;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(67, 7);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(59, 13);
this.label12.TabIndex = 1015;
this.label12.Text = "Address 0x";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(1, 7);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(61, 13);
this.label7.TabIndex = 1014;
this.label7.Text = "Tiebreak 3:";
//
// TieBreaker3Box
//
this.TieBreaker3Box.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TieBreaker3Box.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.TieBreaker3Box.Location = new System.Drawing.Point(133, 4);
this.TieBreaker3Box.Name = "TieBreaker3Box";
this.TieBreaker3Box.Nullable = true;
this.TieBreaker3Box.Size = new System.Drawing.Size(123, 20);
this.TieBreaker3Box.TabIndex = 1016;
//
// BasicBot
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(587, 587);
this.ClientSize = new System.Drawing.Size(842, 587);
this.Controls.Add(this.ControlGroupBox);
this.Controls.Add(this.GoalGroupBox);
this.Controls.Add(this.BestGroupBox);
@ -914,6 +1105,18 @@
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.StatsContextMenu.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.mainValueNumeric)).EndInit();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tiebreak1Numeric)).EndInit();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tiebreak2Numeric)).EndInit();
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tiebreak3Numeric)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -939,24 +1142,18 @@
private System.Windows.Forms.Label FramesLabel;
private System.Windows.Forms.ToolStripMenuItem OptionsSubMenu;
private System.Windows.Forms.GroupBox GoalGroupBox;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private HexTextBox TieBreaker1Box;
private HexTextBox TieBreaker2Box;
private HexTextBox TieBreaker3Box;
private System.Windows.Forms.Label label5;
private HexTextBox MaximizeAddressBox;
private System.Windows.Forms.Label maximizeLabeltext;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.NumericUpDown FrameLengthNumeric;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button StopBtn;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox StartFromSlotBox;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox BestTieBreak3Box;
private System.Windows.Forms.TextBox BestTieBreak2Box;
private System.Windows.Forms.TextBox BestTieBreak1Box;
@ -989,9 +1186,31 @@
private System.Windows.Forms.ToolStripMenuItem _1ByteMenuItem;
private System.Windows.Forms.ToolStripMenuItem _2ByteMenuItem;
private System.Windows.Forms.ToolStripMenuItem _4ByteMenuItem;
private System.Windows.Forms.ComboBox Tiebreak3Operator;
private System.Windows.Forms.ComboBox Tiebreak2Operator;
private System.Windows.Forms.ComboBox Tiebreak1Operator;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.ComboBox Tiebreak3Operator;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label7;
private HexTextBox TieBreaker3Box;
private System.Windows.Forms.NumericUpDown tiebreak3Numeric;
private System.Windows.Forms.RadioButton tiebreak3ValueRadio;
private System.Windows.Forms.RadioButton tiebreak3BestRadio;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.NumericUpDown tiebreak2Numeric;
private System.Windows.Forms.RadioButton tiebreak2ValueRadio;
private System.Windows.Forms.RadioButton tiebreak2BestRadio;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.NumericUpDown tiebreak1Numeric;
private System.Windows.Forms.RadioButton tiebreak1ValueRadio;
private System.Windows.Forms.RadioButton tiebreak1BestRadio;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.NumericUpDown mainValueNumeric;
private System.Windows.Forms.RadioButton mainValueRadio;
private System.Windows.Forms.RadioButton mainBestRadio;
private System.Windows.Forms.ComboBox mainOperator;
private System.Windows.Forms.Label label9;
private HexTextBox MaximizeAddressBox;
private System.Windows.Forms.Label maximizeLabeltext;
}
}

View File

@ -44,6 +44,7 @@ namespace BizHawk.Client.EmuHawk
private bool _oldCountingSetting = false;
private BotAttempt _currentBotAttempt = null;
private BotAttempt _bestBotAttempt = null;
private BotAttempt _comparisonBotAttempt = null;
private bool _replayMode = false;
private int _startFrame = 0;
private string _lastRom = string.Empty;
@ -93,6 +94,8 @@ namespace BizHawk.Client.EmuHawk
InitializeComponent();
Text = DialogTitle;
Settings = new BasicBotSettings();
_comparisonBotAttempt = new BotAttempt();
}
private void BasicBot_Load(object sender, EventArgs e)
@ -1101,5 +1104,85 @@ namespace BizHawk.Client.EmuHawk
&& !string.IsNullOrWhiteSpace(MaximizeAddressBox.Text)
&& ControlProbabilities.Any(kvp => kvp.Value > 0);
}
private void mainBestRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.mainValueNumeric.Enabled = false;
_comparisonBotAttempt.Maximize = _bestBotAttempt == null ? 0 : _bestBotAttempt.Maximize;
}
}
private void tiebreak1BestRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.tiebreak1Numeric.Enabled = false;
_comparisonBotAttempt.TieBreak1 = _bestBotAttempt == null ? 0 : _bestBotAttempt.TieBreak1;
}
}
private void tiebreak2BestRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.tiebreak2Numeric.Enabled = false;
_comparisonBotAttempt.TieBreak2 = _bestBotAttempt == null ? 0 : _bestBotAttempt.TieBreak2;
}
}
private void tiebreak3BestRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.tiebreak3Numeric.Enabled = false;
_comparisonBotAttempt.TieBreak3 = _bestBotAttempt == null ? 0 : _bestBotAttempt.TieBreak3;
}
}
private void mainValueRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.mainValueNumeric.Enabled = true;
_comparisonBotAttempt.Maximize = (int)this.mainValueNumeric.Value;
}
}
private void tiebreak1ValueRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.tiebreak1Numeric.Enabled = true;
_comparisonBotAttempt.TieBreak1 = (int)this.tiebreak1Numeric.Value;
}
}
private void tiebreak2ValueRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.tiebreak2Numeric.Enabled = true;
_comparisonBotAttempt.TieBreak2 = (int)this.tiebreak2Numeric.Value;
}
}
private void tiebreak3ValueRadio_CheckedChanged(object sender, EventArgs e)
{
RadioButton radioButton = (RadioButton)sender;
if (radioButton.Checked)
{
this.tiebreak3Numeric.Enabled = true;
_comparisonBotAttempt.TieBreak3 = (int)this.tiebreak3Numeric.Value;
}
}
}
}