Remove RamWatchNewWatch dialog
This commit is contained in:
parent
2910878d05
commit
0cbfe849f5
|
@ -675,12 +675,6 @@
|
|||
<Compile Include="tools\Watch\RamSearch.Designer.cs">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.Designer.cs">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\Watch.cs" />
|
||||
<Compile Include="tools\Watch\WatchCommon.cs" />
|
||||
<Compile Include="tools\Watch\WatchEditor.cs">
|
||||
|
@ -877,9 +871,6 @@
|
|||
<EmbeddedResource Include="tools\Watch\RamSearch.resx">
|
||||
<DependentUpon>RamSearch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamWatchNewWatch.resx">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\WatchEditor.resx">
|
||||
<DependentUpon>WatchEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -677,12 +677,6 @@
|
|||
<Compile Include="tools\Watch\RamWatch.Designer.cs">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\RamWatchNewWatch.Designer.cs">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="tools\Watch\Watch.cs" />
|
||||
<Compile Include="tools\Watch\WatchCommon.cs" />
|
||||
<Compile Include="tools\Watch\WatchEditor.cs">
|
||||
|
@ -877,9 +871,6 @@
|
|||
<EmbeddedResource Include="tools\Watch\RamWatch.resx">
|
||||
<DependentUpon>RamWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\RamWatchNewWatch.resx">
|
||||
<DependentUpon>RamWatchNewWatch.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="tools\Watch\WatchEditor.resx">
|
||||
<DependentUpon>WatchEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
|
@ -1,314 +0,0 @@
|
|||
namespace BizHawk.MultiClient
|
||||
{
|
||||
partial class RamWatchNewWatch
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RamWatchNewWatch));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.AddressBox = new BizHawk.HexTextBox();
|
||||
this.NotesBox = new System.Windows.Forms.TextBox();
|
||||
this.DataTypeGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.HexRadio = new System.Windows.Forms.RadioButton();
|
||||
this.UnsignedRadio = new System.Windows.Forms.RadioButton();
|
||||
this.SignedRadio = new System.Windows.Forms.RadioButton();
|
||||
this.DataSizeBox = new System.Windows.Forms.GroupBox();
|
||||
this.Byte4Radio = new System.Windows.Forms.RadioButton();
|
||||
this.Byte2Radio = new System.Windows.Forms.RadioButton();
|
||||
this.Byte1Radio = new System.Windows.Forms.RadioButton();
|
||||
this.EndianBox = new System.Windows.Forms.GroupBox();
|
||||
this.LittleEndianRadio = new System.Windows.Forms.RadioButton();
|
||||
this.BigEndianRadio = new System.Windows.Forms.RadioButton();
|
||||
this.OK = new System.Windows.Forms.Button();
|
||||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.DomainComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.DataTypeGroupBox.SuspendLayout();
|
||||
this.DataSizeBox.SuspendLayout();
|
||||
this.EndianBox.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(9, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(62, 13);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Address: 0x";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(9, 35);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(38, 13);
|
||||
this.label2.TabIndex = 1;
|
||||
this.label2.Text = "Notes:";
|
||||
//
|
||||
// AddressBox
|
||||
//
|
||||
this.AddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
|
||||
this.AddressBox.Location = new System.Drawing.Point(69, 6);
|
||||
this.AddressBox.MaxLength = 8;
|
||||
this.AddressBox.Name = "AddressBox";
|
||||
this.AddressBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.AddressBox.TabIndex = 2;
|
||||
this.AddressBox.Text = "00000000";
|
||||
this.AddressBox.Leave += new System.EventHandler(this.AddressBox_Leave);
|
||||
//
|
||||
// NotesBox
|
||||
//
|
||||
this.NotesBox.Location = new System.Drawing.Point(69, 32);
|
||||
this.NotesBox.MaxLength = 256;
|
||||
this.NotesBox.Name = "NotesBox";
|
||||
this.NotesBox.Size = new System.Drawing.Size(100, 20);
|
||||
this.NotesBox.TabIndex = 3;
|
||||
//
|
||||
// DataTypeGroupBox
|
||||
//
|
||||
this.DataTypeGroupBox.Controls.Add(this.HexRadio);
|
||||
this.DataTypeGroupBox.Controls.Add(this.UnsignedRadio);
|
||||
this.DataTypeGroupBox.Controls.Add(this.SignedRadio);
|
||||
this.DataTypeGroupBox.Location = new System.Drawing.Point(12, 67);
|
||||
this.DataTypeGroupBox.Name = "DataTypeGroupBox";
|
||||
this.DataTypeGroupBox.Size = new System.Drawing.Size(95, 79);
|
||||
this.DataTypeGroupBox.TabIndex = 4;
|
||||
this.DataTypeGroupBox.TabStop = false;
|
||||
this.DataTypeGroupBox.Text = "Data Type";
|
||||
//
|
||||
// HexRadio
|
||||
//
|
||||
this.HexRadio.AutoSize = true;
|
||||
this.HexRadio.Location = new System.Drawing.Point(4, 51);
|
||||
this.HexRadio.Name = "HexRadio";
|
||||
this.HexRadio.Size = new System.Drawing.Size(86, 17);
|
||||
this.HexRadio.TabIndex = 2;
|
||||
this.HexRadio.Text = "Hexadecimal";
|
||||
this.HexRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// UnsignedRadio
|
||||
//
|
||||
this.UnsignedRadio.AutoSize = true;
|
||||
this.UnsignedRadio.Checked = true;
|
||||
this.UnsignedRadio.Location = new System.Drawing.Point(4, 34);
|
||||
this.UnsignedRadio.Name = "UnsignedRadio";
|
||||
this.UnsignedRadio.Size = new System.Drawing.Size(70, 17);
|
||||
this.UnsignedRadio.TabIndex = 1;
|
||||
this.UnsignedRadio.TabStop = true;
|
||||
this.UnsignedRadio.Text = "Unsigned";
|
||||
this.UnsignedRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// SignedRadio
|
||||
//
|
||||
this.SignedRadio.AutoSize = true;
|
||||
this.SignedRadio.Location = new System.Drawing.Point(4, 17);
|
||||
this.SignedRadio.Name = "SignedRadio";
|
||||
this.SignedRadio.Size = new System.Drawing.Size(58, 17);
|
||||
this.SignedRadio.TabIndex = 0;
|
||||
this.SignedRadio.Text = "Signed";
|
||||
this.SignedRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// DataSizeBox
|
||||
//
|
||||
this.DataSizeBox.Controls.Add(this.Byte4Radio);
|
||||
this.DataSizeBox.Controls.Add(this.Byte2Radio);
|
||||
this.DataSizeBox.Controls.Add(this.Byte1Radio);
|
||||
this.DataSizeBox.Location = new System.Drawing.Point(115, 67);
|
||||
this.DataSizeBox.Name = "DataSizeBox";
|
||||
this.DataSizeBox.Size = new System.Drawing.Size(83, 79);
|
||||
this.DataSizeBox.TabIndex = 5;
|
||||
this.DataSizeBox.TabStop = false;
|
||||
this.DataSizeBox.Text = "Data Size:";
|
||||
//
|
||||
// Byte4Radio
|
||||
//
|
||||
this.Byte4Radio.AutoSize = true;
|
||||
this.Byte4Radio.Location = new System.Drawing.Point(5, 51);
|
||||
this.Byte4Radio.Name = "Byte4Radio";
|
||||
this.Byte4Radio.Size = new System.Drawing.Size(60, 17);
|
||||
this.Byte4Radio.TabIndex = 2;
|
||||
this.Byte4Radio.Text = "4 Bytes";
|
||||
this.Byte4Radio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Byte2Radio
|
||||
//
|
||||
this.Byte2Radio.AutoSize = true;
|
||||
this.Byte2Radio.Location = new System.Drawing.Point(5, 34);
|
||||
this.Byte2Radio.Name = "Byte2Radio";
|
||||
this.Byte2Radio.Size = new System.Drawing.Size(60, 17);
|
||||
this.Byte2Radio.TabIndex = 1;
|
||||
this.Byte2Radio.Text = "2 Bytes";
|
||||
this.Byte2Radio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Byte1Radio
|
||||
//
|
||||
this.Byte1Radio.AutoSize = true;
|
||||
this.Byte1Radio.Checked = true;
|
||||
this.Byte1Radio.Location = new System.Drawing.Point(5, 17);
|
||||
this.Byte1Radio.Name = "Byte1Radio";
|
||||
this.Byte1Radio.Size = new System.Drawing.Size(55, 17);
|
||||
this.Byte1Radio.TabIndex = 0;
|
||||
this.Byte1Radio.TabStop = true;
|
||||
this.Byte1Radio.Text = "1 Byte";
|
||||
this.Byte1Radio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EndianBox
|
||||
//
|
||||
this.EndianBox.Controls.Add(this.LittleEndianRadio);
|
||||
this.EndianBox.Controls.Add(this.BigEndianRadio);
|
||||
this.EndianBox.Location = new System.Drawing.Point(12, 152);
|
||||
this.EndianBox.Name = "EndianBox";
|
||||
this.EndianBox.Size = new System.Drawing.Size(117, 55);
|
||||
this.EndianBox.TabIndex = 6;
|
||||
this.EndianBox.TabStop = false;
|
||||
this.EndianBox.Text = "Endian";
|
||||
//
|
||||
// LittleEndianRadio
|
||||
//
|
||||
this.LittleEndianRadio.AutoSize = true;
|
||||
this.LittleEndianRadio.Location = new System.Drawing.Point(4, 35);
|
||||
this.LittleEndianRadio.Name = "LittleEndianRadio";
|
||||
this.LittleEndianRadio.Size = new System.Drawing.Size(83, 17);
|
||||
this.LittleEndianRadio.TabIndex = 1;
|
||||
this.LittleEndianRadio.Text = "Little Endian";
|
||||
this.LittleEndianRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BigEndianRadio
|
||||
//
|
||||
this.BigEndianRadio.AutoSize = true;
|
||||
this.BigEndianRadio.Checked = true;
|
||||
this.BigEndianRadio.Location = new System.Drawing.Point(4, 18);
|
||||
this.BigEndianRadio.Name = "BigEndianRadio";
|
||||
this.BigEndianRadio.Size = new System.Drawing.Size(76, 17);
|
||||
this.BigEndianRadio.TabIndex = 0;
|
||||
this.BigEndianRadio.TabStop = true;
|
||||
this.BigEndianRadio.Text = "Big Endian";
|
||||
this.BigEndianRadio.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// OK
|
||||
//
|
||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.OK.Location = new System.Drawing.Point(12, 260);
|
||||
this.OK.Name = "OK";
|
||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
||||
this.OK.TabIndex = 7;
|
||||
this.OK.Text = "Ok";
|
||||
this.OK.UseVisualStyleBackColor = true;
|
||||
this.OK.Click += new System.EventHandler(this.OK_Click);
|
||||
//
|
||||
// Cancel
|
||||
//
|
||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Cancel.Location = new System.Drawing.Point(123, 260);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.Cancel.TabIndex = 8;
|
||||
this.Cancel.Text = "Cancel";
|
||||
this.Cancel.UseVisualStyleBackColor = true;
|
||||
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(11, 214);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(83, 13);
|
||||
this.label6.TabIndex = 15;
|
||||
this.label6.Text = "Memory Domain";
|
||||
//
|
||||
// DomainComboBox
|
||||
//
|
||||
this.DomainComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.DomainComboBox.FormattingEnabled = true;
|
||||
this.DomainComboBox.Location = new System.Drawing.Point(12, 230);
|
||||
this.DomainComboBox.Name = "DomainComboBox";
|
||||
this.DomainComboBox.Size = new System.Drawing.Size(141, 21);
|
||||
this.DomainComboBox.TabIndex = 14;
|
||||
this.DomainComboBox.SelectedIndexChanged += new System.EventHandler(this.DomainComboBox_SelectedIndexChanged);
|
||||
//
|
||||
// RamWatchNewWatch
|
||||
//
|
||||
this.AcceptButton = this.OK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.Cancel;
|
||||
this.ClientSize = new System.Drawing.Size(213, 296);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.DomainComboBox);
|
||||
this.Controls.Add(this.Cancel);
|
||||
this.Controls.Add(this.OK);
|
||||
this.Controls.Add(this.EndianBox);
|
||||
this.Controls.Add(this.DataSizeBox);
|
||||
this.Controls.Add(this.DataTypeGroupBox);
|
||||
this.Controls.Add(this.NotesBox);
|
||||
this.Controls.Add(this.AddressBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "RamWatchNewWatch";
|
||||
this.Text = "New Watch";
|
||||
this.Load += new System.EventHandler(this.RamWatchNewWatch_Load);
|
||||
this.DataTypeGroupBox.ResumeLayout(false);
|
||||
this.DataTypeGroupBox.PerformLayout();
|
||||
this.DataSizeBox.ResumeLayout(false);
|
||||
this.DataSizeBox.PerformLayout();
|
||||
this.EndianBox.ResumeLayout(false);
|
||||
this.EndianBox.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private HexTextBox AddressBox;
|
||||
private System.Windows.Forms.TextBox NotesBox;
|
||||
private System.Windows.Forms.GroupBox DataTypeGroupBox;
|
||||
private System.Windows.Forms.RadioButton SignedRadio;
|
||||
private System.Windows.Forms.RadioButton UnsignedRadio;
|
||||
private System.Windows.Forms.RadioButton HexRadio;
|
||||
private System.Windows.Forms.GroupBox DataSizeBox;
|
||||
private System.Windows.Forms.RadioButton Byte1Radio;
|
||||
private System.Windows.Forms.RadioButton Byte2Radio;
|
||||
private System.Windows.Forms.RadioButton Byte4Radio;
|
||||
private System.Windows.Forms.GroupBox EndianBox;
|
||||
private System.Windows.Forms.RadioButton BigEndianRadio;
|
||||
private System.Windows.Forms.RadioButton LittleEndianRadio;
|
||||
private System.Windows.Forms.Button OK;
|
||||
private System.Windows.Forms.Button Cancel;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.ComboBox DomainComboBox;
|
||||
}
|
||||
}
|
|
@ -1,248 +0,0 @@
|
|||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System.Globalization;
|
||||
|
||||
namespace BizHawk.MultiClient
|
||||
{
|
||||
public partial class RamWatchNewWatch : Form
|
||||
{
|
||||
public Watch_Legacy Watch = new Watch_Legacy();
|
||||
public bool SelectionWasMade = false;
|
||||
public Point location = new Point();
|
||||
|
||||
private bool DoNotResetAddress;
|
||||
|
||||
public RamWatchNewWatch()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetWatch(Watch_Legacy watch, string message = "New Watch")
|
||||
{
|
||||
DoNotResetAddress = true; //Hack for the drop down event changing when initializing the drop down
|
||||
Watch = new Watch_Legacy(watch);
|
||||
Text = message;
|
||||
|
||||
NotesBox.Text = watch.Notes;
|
||||
setTypeRadio();
|
||||
setSignedRadio();
|
||||
setEndianBox();
|
||||
setDomainSelection();
|
||||
setAddressBox();
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
private void RamWatchNewWatch_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (location.X > 0 && location.Y > 0)
|
||||
{
|
||||
Location = location;
|
||||
}
|
||||
|
||||
populateMemoryDomainComboBox();
|
||||
DoNotResetAddress = false;
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelectionWasMade = false;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void OK_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Put user settings in the watch file
|
||||
SelectionWasMade = true;
|
||||
if (InputValidate.IsValidHexNumber(AddressBox.Text))
|
||||
{
|
||||
Watch.Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Not a valid address (enter a valid Hex number)", "Invalid Address", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
AddressBox.Focus();
|
||||
AddressBox.SelectAll();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (SignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.SIGNED;
|
||||
}
|
||||
else if (UnsignedRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.UNSIGNED;
|
||||
}
|
||||
else if (HexRadio.Checked)
|
||||
{
|
||||
Watch.Signed = Watch_Legacy.DISPTYPE.HEX;
|
||||
}
|
||||
|
||||
if (Byte1Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch_Legacy.TYPE.BYTE;
|
||||
}
|
||||
else if (Byte2Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch_Legacy.TYPE.WORD;
|
||||
}
|
||||
else if (Byte4Radio.Checked)
|
||||
{
|
||||
Watch.Type = Watch_Legacy.TYPE.DWORD;
|
||||
}
|
||||
|
||||
if (BigEndianRadio.Checked)
|
||||
{
|
||||
Watch.BigEndian = true;
|
||||
}
|
||||
else if (LittleEndianRadio.Checked)
|
||||
{
|
||||
Watch.BigEndian = false;
|
||||
}
|
||||
|
||||
Watch.Domain = Global.Emulator.MemoryDomains[DomainComboBox.SelectedIndex];
|
||||
Watch.Notes = NotesBox.Text;
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
private void AddressBox_Leave(object sender, EventArgs e)
|
||||
{
|
||||
AddressBox.Text = AddressBox.Text.Replace(" ", "");
|
||||
if (!InputValidate.IsValidHexNumber(AddressBox.Text))
|
||||
{
|
||||
AddressBox.Focus();
|
||||
AddressBox.SelectAll();
|
||||
ToolTip t = new ToolTip();
|
||||
t.Show("Must be a valid hexadecimal vaue", AddressBox, 5000);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Watch.Address = int.Parse(AddressBox.Text, NumberStyles.HexNumber);
|
||||
AddressBox.Text = String.Format("{0:X" + getNumDigits(Watch.Domain.Size - 1) + "}", Watch.Address);
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DomainComboBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!DoNotResetAddress)
|
||||
{
|
||||
Watch.Domain = Global.Emulator.MemoryDomains[DomainComboBox.SelectedIndex];
|
||||
Watch.Address = 0;
|
||||
Watch.Value = 0;
|
||||
setAddressBox();
|
||||
AddressBox.MaxLength = getNumDigits(Watch.Domain.Size);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Helpers
|
||||
|
||||
private void setTypeRadio()
|
||||
{
|
||||
switch (Watch.Type)
|
||||
{
|
||||
case Watch_Legacy.TYPE.BYTE:
|
||||
Byte1Radio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.TYPE.WORD:
|
||||
Byte2Radio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.TYPE.DWORD:
|
||||
Byte4Radio.Checked = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void setEndianBox()
|
||||
{
|
||||
if (Watch.BigEndian == true)
|
||||
{
|
||||
BigEndianRadio.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LittleEndianRadio.Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void setDomainSelection()
|
||||
{
|
||||
//Counts should always be the same, but just in case, let's check
|
||||
int max;
|
||||
if (Global.Emulator.MemoryDomains.Count < DomainComboBox.Items.Count)
|
||||
{
|
||||
max = Global.Emulator.MemoryDomains.Count;
|
||||
}
|
||||
else
|
||||
{
|
||||
max = DomainComboBox.Items.Count;
|
||||
}
|
||||
|
||||
for (int i = 0; i < max; i++)
|
||||
{
|
||||
if (Watch.Domain.ToString() == DomainComboBox.Items[i].ToString())
|
||||
{
|
||||
DomainComboBox.SelectedIndex = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void populateMemoryDomainComboBox()
|
||||
{
|
||||
DomainComboBox.Items.Clear();
|
||||
if (Global.Emulator.MemoryDomains.Count > 0)
|
||||
{
|
||||
foreach (MemoryDomain t in Global.Emulator.MemoryDomains)
|
||||
{
|
||||
DomainComboBox.Items.Add(t.ToString());
|
||||
}
|
||||
}
|
||||
setDomainSelection();
|
||||
}
|
||||
|
||||
private void setAddressBox()
|
||||
{
|
||||
AddressBox.Text = String.Format("{0:X" + getNumDigits(Watch.Domain.Size - 1) + "}", Watch.Address);
|
||||
}
|
||||
|
||||
private void setSignedRadio()
|
||||
{
|
||||
switch (Watch.Signed)
|
||||
{
|
||||
case Watch_Legacy.DISPTYPE.SIGNED:
|
||||
SignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.DISPTYPE.UNSIGNED:
|
||||
UnsignedRadio.Checked = true;
|
||||
break;
|
||||
case Watch_Legacy.DISPTYPE.HEX:
|
||||
HexRadio.Checked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private int getNumDigits(Int32 i)
|
||||
{
|
||||
if (i < 0x10000) return 4;
|
||||
if (i < 0x1000000) return 6;
|
||||
if (i < 0x10000000) return 7;
|
||||
else return 8;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,149 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAAAABMLAAATCwAAAAEAAAAA
|
||||
AAB2LggAcTANAHUxDAB3NxQAezUQAHw5FQB+PBcAfDsYAHw9HAB+Px8AfkAgAIREIQCFRCEAhEYmAIZG
|
||||
JACHRyQAh0gmAIdJKQCGSikAh0ooAIpLKQCMTy0Ai08wAIpRMQCOVTYAjlc5AI9YOQCRUzEAkVQxAJBX
|
||||
NwCWWDYAk1o7AJRaOwCSWzwAlV8/AJdmSgCbZkkAnWtPAJ9rTgCebE4ApmxNAKBwVwCjclcAr3VTAKx2
|
||||
VQCtdlYApHdaALV/XwCgeWEAqHtjAKp9YwCrfmIArH5jALmAXwCwhWwAvIlsAK6HcACwiXIAsolwALKN
|
||||
dgC1jHQAtY94ALaRewC3kXoAuZJ8ALmVfwC6ln8Aw5F1AL2ahgC9nosAt6KTAM2ehADBn4oAyqCJAMui
|
||||
iwDNo4wA0KKHAMSlkQDQqZMA3b+vAN7DsQDfxLIA4Ma6AOPIuADkyLgA59LHAO7SwQDs2M0A8NXEAObZ
|
||||
0gDr4t8A7+biAPXo4QDx6OUA9/DqAPn08QD79vMA/fbwAPv5+AD8+voA/v39AP///wAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZGZkYpKWYwLiIaGQkKZjMzIychFwFmPmNTSzUK
|
||||
ZmYzM1tSTisQZj5jU0s1CmZmZjNdWk83EmY+Y1NLNQpmZmYzXVpPNxJmRGRcVEcKZmZmM11aTzcSZkU2
|
||||
JhsRDQUEOCYcFAgDHWZIOWVVSigGOztZV0ksBzxmSEBeYVgvEAQ7ZWBWLQ9mZmY9QTQkFSAeMToqEwsy
|
||||
ZmZmZkJiUEMMAEJiUUwOZmZmZmZIPyUWEmZNPyUWEmZmZmZmZh9fAgVmBR9fAmZmZmZmZmZIOhhmZmZI
|
||||
OhhmZmZmZmZmZmZmZmZmZmZmZmZmZv//fAD/0X8AAQF/AAMBdQADgYYAA4GLAAOBkwAAAYQAAAGKAAAD
|
||||
iQCAA4sAwAeMAMEHhwDhD5EA44+TAP//rwA=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in New Issue