Copy Best Input to Clipboard

Added a Copy button in the Best Attempt group.  There is a tooltip on the copy button that explains it literally copies the input and can be put into a text file or into TasStudio.
This commit is contained in:
ShinobiWannabe 2019-07-14 03:51:26 -04:00
parent 68a58c1dd5
commit f7f3f65a19
3 changed files with 1064 additions and 1036 deletions

View File

@ -57,6 +57,7 @@
this.ControlsBox = new System.Windows.Forms.GroupBox();
this.ControlProbabilityPanel = new System.Windows.Forms.Panel();
this.BestGroupBox = new System.Windows.Forms.GroupBox();
this.btnCopyBestInput = new System.Windows.Forms.Button();
this.PlayBestButton = new System.Windows.Forms.Button();
this.ClearBestButton = new System.Windows.Forms.Button();
this.BestAttemptNumberLabel = new System.Windows.Forms.Label();
@ -118,6 +119,7 @@
this.panel2 = new System.Windows.Forms.Panel();
this.StatsContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ClearStatsContextMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.BotMenu.SuspendLayout();
this.BotStatusStrip.SuspendLayout();
this.ControlsBox.SuspendLayout();
@ -375,6 +377,7 @@
//
this.BestGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.BestGroupBox.Controls.Add(this.btnCopyBestInput);
this.BestGroupBox.Controls.Add(this.PlayBestButton);
this.BestGroupBox.Controls.Add(this.ClearBestButton);
this.BestGroupBox.Controls.Add(this.BestAttemptNumberLabel);
@ -395,6 +398,20 @@
this.BestGroupBox.TabStop = false;
this.BestGroupBox.Text = "Best";
//
// btnCopyBestInput
//
this.btnCopyBestInput.Image = global::BizHawk.Client.EmuHawk.Properties.Resources.search;
this.btnCopyBestInput.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCopyBestInput.Location = new System.Drawing.Point(11, 99);
this.btnCopyBestInput.Name = "btnCopyBestInput";
this.btnCopyBestInput.Size = new System.Drawing.Size(76, 23);
this.btnCopyBestInput.TabIndex = 2005;
this.btnCopyBestInput.Text = "&Copy";
this.toolTip1.SetToolTip(this.btnCopyBestInput, "Copy to Clipboard. Then possible to paste to text file or directly into TasStudi" +
"o.");
this.btnCopyBestInput.UseVisualStyleBackColor = true;
this.btnCopyBestInput.Click += new System.EventHandler(this.btnCopyBestInput_Click);
//
// PlayBestButton
//
this.PlayBestButton.Enabled = false;
@ -448,9 +465,9 @@
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel1.Controls.Add(this.BestAttemptLogLabel);
this.panel1.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.panel1.Location = new System.Drawing.Point(12, 112);
this.panel1.Location = new System.Drawing.Point(12, 129);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(212, 251);
this.panel1.Size = new System.Drawing.Size(212, 234);
this.panel1.TabIndex = 21;
//
// BestAttemptLogLabel
@ -536,7 +553,7 @@
//
this.label13.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(104, 16);
this.label13.Location = new System.Drawing.Point(94, 16);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(63, 13);
this.label13.TabIndex = 0;
@ -1262,5 +1279,7 @@
private System.Windows.Forms.Label label9;
private HexTextBox MaximizeAddressBox;
private System.Windows.Forms.Label maximizeLabeltext;
private System.Windows.Forms.Button btnCopyBestInput;
private System.Windows.Forms.ToolTip toolTip1;
}
}

View File

@ -1355,5 +1355,11 @@ namespace BizHawk.Client.EmuHawk
this._comparisonBotAttempt.TieBreak3 = (int)numericUpDown.Value;
}
//Copy to Clipboard
private void btnCopyBestInput_Click(object sender, EventArgs e)
{
Clipboard.SetText(BestAttemptLogLabel.Text);
}
}
}

View File

@ -139,6 +139,9 @@
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>400, 17</value>
</metadata>
<metadata name="StatsContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>248, 17</value>
</metadata>