diff --git a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj index 7338784c6a..aa105d3893 100755 --- a/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj +++ b/src/BizHawk.Client.EmuHawk/BizHawk.Client.EmuHawk.csproj @@ -506,8 +506,6 @@ - - diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.Designer.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.Designer.cs deleted file mode 100644 index 7e3a1603ac..0000000000 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.Designer.cs +++ /dev/null @@ -1,214 +0,0 @@ -namespace BizHawk.Client.EmuHawk -{ - partial class WatchEditor - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.label1 = new BizHawk.WinForms.Controls.LocLabelEx(); - this.label2 = new BizHawk.WinForms.Controls.LocLabelEx(); - this.AddressBox = new BizHawk.Client.EmuHawk.HexTextBox(); - this.NotesBox = new System.Windows.Forms.TextBox(); - this.OK = new System.Windows.Forms.Button(); - this.Cancel = new System.Windows.Forms.Button(); - this.label6 = new BizHawk.WinForms.Controls.LocLabelEx(); - this.DomainDropDown = new System.Windows.Forms.ComboBox(); - this.label3 = new BizHawk.WinForms.Controls.LocLabelEx(); - this.SizeDropDown = new System.Windows.Forms.ComboBox(); - this.DisplayTypeLael = new BizHawk.WinForms.Controls.LocLabelEx(); - this.DisplayTypeDropDown = new System.Windows.Forms.ComboBox(); - this.BigEndianCheckBox = new System.Windows.Forms.CheckBox(); - this.SuspendLayout(); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(9, 9); - this.label1.Name = "label1"; - this.label1.Text = "Address: 0x"; - // - // label2 - // - this.label2.Location = new System.Drawing.Point(9, 35); - this.label2.Name = "label2"; - 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.Nullable = false; - this.AddressBox.Size = new System.Drawing.Size(100, 20); - this.AddressBox.TabIndex = 1; - this.AddressBox.Text = "00000000"; - // - // 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 = 5; - // - // 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 = 30; - 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 = 35; - this.Cancel.Text = "Cancel"; - this.Cancel.UseVisualStyleBackColor = true; - this.Cancel.Click += new System.EventHandler(this.Cancel_Click); - // - // label6 - // - this.label6.Location = new System.Drawing.Point(11, 214); - this.label6.Name = "label6"; - this.label6.Text = "Memory Domain"; - // - // DomainDropDown - // - this.DomainDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.DomainDropDown.FormattingEnabled = true; - this.DomainDropDown.Location = new System.Drawing.Point(12, 230); - this.DomainDropDown.Name = "DomainDropDown"; - this.DomainDropDown.Size = new System.Drawing.Size(141, 21); - this.DomainDropDown.TabIndex = 25; - this.DomainDropDown.SelectedIndexChanged += new System.EventHandler(this.DomainComboBox_SelectedIndexChanged); - // - // label3 - // - this.label3.Location = new System.Drawing.Point(9, 64); - this.label3.Name = "label3"; - this.label3.Text = "Size"; - // - // SizeDropDown - // - this.SizeDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.SizeDropDown.FormattingEnabled = true; - this.SizeDropDown.Items.AddRange(new object[] { - "1 Byte", - "2 Byte", - "4 Byte"}); - this.SizeDropDown.Location = new System.Drawing.Point(10, 80); - this.SizeDropDown.Name = "SizeDropDown"; - this.SizeDropDown.Size = new System.Drawing.Size(141, 21); - this.SizeDropDown.TabIndex = 10; - this.SizeDropDown.SelectedIndexChanged += new System.EventHandler(this.SizeDropDown_SelectedIndexChanged); - // - // DisplayTypeLael - // - this.DisplayTypeLael.Location = new System.Drawing.Point(11, 106); - this.DisplayTypeLael.Name = "DisplayTypeLael"; - this.DisplayTypeLael.Text = "Display Type"; - // - // DisplayTypeDropDown - // - this.DisplayTypeDropDown.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.DisplayTypeDropDown.FormattingEnabled = true; - this.DisplayTypeDropDown.Items.AddRange(new object[] { - "1 Byte", - "2 Byte", - "4 Byte"}); - this.DisplayTypeDropDown.Location = new System.Drawing.Point(12, 122); - this.DisplayTypeDropDown.Name = "DisplayTypeDropDown"; - this.DisplayTypeDropDown.Size = new System.Drawing.Size(141, 21); - this.DisplayTypeDropDown.TabIndex = 15; - this.DisplayTypeDropDown.SelectedIndexChanged += new System.EventHandler(this.DisplayTypeDropDown_SelectedIndexChanged); - // - // BigEndianCheckBox - // - this.BigEndianCheckBox.AutoSize = true; - this.BigEndianCheckBox.Location = new System.Drawing.Point(14, 159); - this.BigEndianCheckBox.Name = "BigEndianCheckBox"; - this.BigEndianCheckBox.Size = new System.Drawing.Size(77, 17); - this.BigEndianCheckBox.TabIndex = 20; - this.BigEndianCheckBox.Text = "Big Endian"; - this.BigEndianCheckBox.UseVisualStyleBackColor = true; - // - // WatchEditor - // - 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.BigEndianCheckBox); - this.Controls.Add(this.DisplayTypeLael); - this.Controls.Add(this.DisplayTypeDropDown); - this.Controls.Add(this.label3); - this.Controls.Add(this.SizeDropDown); - this.Controls.Add(this.label6); - this.Controls.Add(this.DomainDropDown); - this.Controls.Add(this.Cancel); - this.Controls.Add(this.OK); - 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.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "WatchEditor"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "New Watch"; - this.Load += new System.EventHandler(this.RamWatchNewWatch_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private BizHawk.WinForms.Controls.LocLabelEx label1; - private BizHawk.WinForms.Controls.LocLabelEx label2; - private HexTextBox AddressBox; - private System.Windows.Forms.TextBox NotesBox; - private System.Windows.Forms.Button OK; - private System.Windows.Forms.Button Cancel; - private BizHawk.WinForms.Controls.LocLabelEx label6; - private System.Windows.Forms.ComboBox DomainDropDown; - private BizHawk.WinForms.Controls.LocLabelEx label3; - private System.Windows.Forms.ComboBox SizeDropDown; - private BizHawk.WinForms.Controls.LocLabelEx DisplayTypeLael; - private System.Windows.Forms.ComboBox DisplayTypeDropDown; - private System.Windows.Forms.CheckBox BigEndianCheckBox; - } -} \ No newline at end of file diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs index e0dd13a435..a6e1a1aa2f 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.cs @@ -5,6 +5,7 @@ using System.Windows.Forms; using BizHawk.Client.Common; using BizHawk.Common.CollectionExtensions; +using BizHawk.WinForms.Controls; using Emu = BizHawk.Emulation.Common; @@ -26,10 +27,133 @@ namespace BizHawk.Client.EmuHawk public Point InitialLocation { get; set; } = new Point(0, 0); + private HexTextBox AddressBox = default!; + + private CheckBox BigEndianCheckBox = default!; + + private ComboBox DisplayTypeDropDown = default!; + + private ComboBox DomainDropDown = default!; + + private TextBox NotesBox = default!; + + private ComboBox SizeDropDown = default!; + public WatchEditor() { _changedDisplayType = false; - InitializeComponent(); + + SuspendLayout(); + + LocLabelEx label1 = new() { Location = new(9, 9), Text = "Address: 0x" }; + AddressBox = new() + { + CharacterCasing = CharacterCasing.Upper, + Location = new(69, 6), + MaxLength = 8, + Nullable = false, + Size = new(100, 20), + TabIndex = 1, + Text = "00000000", + }; + + LocLabelEx label2 = new() { Location = new(9, 35), Text = "Notes:" }; + NotesBox = new() { Location = new(69, 32), MaxLength = 256, Size = new(100, 20), TabIndex = 5 }; + + LocLabelEx label3 = new() { Location = new(9, 64), Text = "Size" }; + SizeDropDown = new() + { + DropDownStyle = ComboBoxStyle.DropDownList, + FormattingEnabled = true, + Items = { "1 Byte", "2 Byte", "4 Byte" }, + Location = new(10, 80), + Size = new(141, 21), + TabIndex = 10, + }; + SizeDropDown.SelectedIndexChanged += SizeDropDown_SelectedIndexChanged; + + LocLabelEx DisplayTypeLael = new() { Location = new(11, 106), Text = "Display Type" }; + DisplayTypeDropDown = new() + { + DropDownStyle = ComboBoxStyle.DropDownList, + FormattingEnabled = true, + Items = { "1 Byte", "2 Byte", "4 Byte" }, + Location = new(12, 122), + Size = new(141, 21), + TabIndex = 15, + }; + DisplayTypeDropDown.SelectedIndexChanged += DisplayTypeDropDown_SelectedIndexChanged; + + BigEndianCheckBox = new() + { + AutoSize = true, + Location = new(14, 159), + Size = new(77, 17), + TabIndex = 20, + Text = "Big Endian", + UseVisualStyleBackColor = true, + }; + + LocLabelEx label6 = new() { Location = new(11, 214), Text = "Memory Domain" }; + DomainDropDown = new() + { + DropDownStyle = ComboBoxStyle.DropDownList, + FormattingEnabled = true, + Location = new(12, 230), + Size = new(141, 21), + TabIndex = 25, + }; + DomainDropDown.SelectedIndexChanged += DomainComboBox_SelectedIndexChanged; + + Button OK = new() + { + Anchor = AnchorStyles.Bottom | AnchorStyles.Left, + Location = new(12, 260), + Size = new(75, 23), + TabIndex = 30, + Text = "OK", + UseVisualStyleBackColor = true, + }; + OK.Click += Ok_Click; + Button Cancel = new() + { + Anchor = AnchorStyles.Bottom | AnchorStyles.Right, + DialogResult = DialogResult.Cancel, + Location = new(123, 260), + Size = new(75, 23), + TabIndex = 35, + Text = "Cancel", + UseVisualStyleBackColor = true, + }; + Cancel.Click += Cancel_Click; + AcceptButton = OK; + AutoScaleDimensions = new(6F, 13F); + AutoScaleMode = AutoScaleMode.Font; + CancelButton = Cancel; + ClientSize = new(213, 296); + Controls.Add(BigEndianCheckBox); + Controls.Add(DisplayTypeLael); + Controls.Add(DisplayTypeDropDown); + Controls.Add(label3); + Controls.Add(SizeDropDown); + Controls.Add(label6); + Controls.Add(DomainDropDown); + Controls.Add(Cancel); + Controls.Add(OK); + Controls.Add(NotesBox); + Controls.Add(AddressBox); + Controls.Add(label2); + Controls.Add(label1); + FormBorderStyle = FormBorderStyle.FixedDialog; + MaximizeBox = false; + MinimizeBox = false; + Name = nameof(WatchEditor); + StartPosition = FormStartPosition.CenterParent; + Text = "New Watch"; + Load += RamWatchNewWatch_Load; + + ResumeLayout(performLayout: false); + PerformLayout(); } private void RamWatchNewWatch_Load(object sender, EventArgs e) diff --git a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.resx b/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.resx deleted file mode 100644 index 29dcb1b3a3..0000000000 --- a/src/BizHawk.Client.EmuHawk/tools/Watch/WatchEditor.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file