Ram Search - text box cleanup - slight repositioning & sizing, make addressbox only uppercase, limit length, and focus & select all when the appropriate radio dial is selected by the user

This commit is contained in:
andres.delikat 2011-02-21 02:35:47 +00:00
parent 67dac99408
commit 94fd588191
3 changed files with 33 additions and 20 deletions

View File

@ -74,6 +74,7 @@
this.bigEndianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.littleEndianToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.CompareToBox = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.NumberOfChangesBox = new System.Windows.Forms.TextBox();
this.SpecificAddressBox = new System.Windows.Forms.TextBox();
this.SpecificValueBox = new System.Windows.Forms.TextBox();
@ -93,7 +94,6 @@
this.AutoSearchCheckBox = new System.Windows.Forms.CheckBox();
this.MemDomainLabel = new System.Windows.Forms.Label();
this.OutputLabel = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.SearchtoolStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
@ -545,18 +545,30 @@
this.CompareToBox.TabStop = false;
this.CompareToBox.Text = "Compare To / By";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(116, 67);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(18, 13);
this.label1.TabIndex = 10;
this.label1.Text = "0x";
//
// NumberOfChangesBox
//
this.NumberOfChangesBox.Enabled = false;
this.NumberOfChangesBox.Location = new System.Drawing.Point(135, 84);
this.NumberOfChangesBox.Location = new System.Drawing.Point(135, 82);
this.NumberOfChangesBox.MaxLength = 8;
this.NumberOfChangesBox.Name = "NumberOfChangesBox";
this.NumberOfChangesBox.Size = new System.Drawing.Size(65, 20);
this.NumberOfChangesBox.TabIndex = 6;
//
// SpecificAddressBox
//
this.SpecificAddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
this.SpecificAddressBox.Enabled = false;
this.SpecificAddressBox.Location = new System.Drawing.Point(135, 62);
this.SpecificAddressBox.Location = new System.Drawing.Point(135, 60);
this.SpecificAddressBox.MaxLength = 8;
this.SpecificAddressBox.Name = "SpecificAddressBox";
this.SpecificAddressBox.Size = new System.Drawing.Size(65, 20);
this.SpecificAddressBox.TabIndex = 5;
@ -564,7 +576,8 @@
// SpecificValueBox
//
this.SpecificValueBox.Enabled = false;
this.SpecificValueBox.Location = new System.Drawing.Point(135, 41);
this.SpecificValueBox.Location = new System.Drawing.Point(135, 38);
this.SpecificValueBox.MaxLength = 9;
this.SpecificValueBox.Name = "SpecificValueBox";
this.SpecificValueBox.Size = new System.Drawing.Size(65, 20);
this.SpecificValueBox.TabIndex = 4;
@ -636,9 +649,10 @@
// DifferentByBox
//
this.DifferentByBox.Enabled = false;
this.DifferentByBox.Location = new System.Drawing.Point(90, 129);
this.DifferentByBox.Location = new System.Drawing.Point(90, 131);
this.DifferentByBox.MaxLength = 9;
this.DifferentByBox.Name = "DifferentByBox";
this.DifferentByBox.Size = new System.Drawing.Size(40, 20);
this.DifferentByBox.Size = new System.Drawing.Size(50, 20);
this.DifferentByBox.TabIndex = 9;
//
// DifferentByRadio
@ -745,15 +759,6 @@
this.OutputLabel.TabIndex = 9;
this.OutputLabel.Text = " ";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(116, 68);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(18, 13);
this.label1.TabIndex = 10;
this.label1.Text = "0x";
//
// RamSearch
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@ -24,7 +24,7 @@ namespace BizHawk.MultiClient
//Implement Auto-Search
//Impelment File handling
//Implement Preview search
//Run Trim() and ToUpper() on specific/number/differentby boxes after user enters data, then don't do that when running the Get function
//Run Trim() on specific/number/differentby boxes after user enters data, then don't do that when running the Get function, do other forms of input validation
string systemID = "NULL";
List<Watch> searchList = new List<Watch>();
@ -135,6 +135,8 @@ namespace BizHawk.MultiClient
SpecificValueBox.Enabled = true;
SpecificAddressBox.Enabled = false;
NumberOfChangesBox.Enabled = false;
SpecificValueBox.Focus();
SpecificValueBox.SelectAll();
}
}
@ -155,6 +157,8 @@ namespace BizHawk.MultiClient
SpecificValueBox.Enabled = false;
SpecificAddressBox.Enabled = true;
NumberOfChangesBox.Enabled = false;
SpecificAddressBox.Focus();
SpecificAddressBox.SelectAll();
}
}
@ -165,6 +169,8 @@ namespace BizHawk.MultiClient
SpecificValueBox.Enabled = false;
SpecificAddressBox.Enabled = false;
NumberOfChangesBox.Enabled = true;
NumberOfChangesBox.Focus();
NumberOfChangesBox.SelectAll();
}
}
@ -174,6 +180,8 @@ namespace BizHawk.MultiClient
DifferentByBox.Enabled = true;
else
DifferentByBox.Enabled = false;
DifferentByBox.Focus();
DifferentByBox.SelectAll();
}
private void AddToRamWatch()
@ -689,7 +697,7 @@ namespace BizHawk.MultiClient
bool i = InputValidate.IsValidHexNumber(SpecificAddressBox.Text);
if (!i) return -1;
return int.Parse(SpecificAddressBox.Text.ToUpper().Trim(), NumberStyles.HexNumber);
return int.Parse(SpecificAddressBox.Text.Trim(), NumberStyles.HexNumber);
}
private int GetDifferentBy()

View File

@ -171,6 +171,9 @@
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>259, 17</value>
</metadata>
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>358, 17</value>
</metadata>
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@ -202,9 +205,6 @@
s1c0gHPmbrPTpHNJKOCo2G1mZs20zcwUJ5yp1AB5+8/zEwgF5GMVDxh4AAAAAElFTkSuQmCC
</value>
</data>
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>358, 17</value>
</metadata>
<data name="DataSizetoolStripSplitButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8