From e634d9558a3861072f0eb0bb062d65339d1966c1 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 31 Jan 2014 02:26:09 +0000 Subject: [PATCH] Gameboy Game Genie dialog - top most and floating window, and refactor to use ToolSettingsDialog, and some code cleanup --- BizHawk.Client.Common/config/Config.cs | 5 +- .../tools/GB/GBGameGenie.Designer.cs | 1014 +++++++++-------- .../tools/GB/GBGameGenie.cs | 603 +++++----- 3 files changed, 861 insertions(+), 761 deletions(-) diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 9b9b7ff0d2..0052eb6443 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -481,10 +481,9 @@ namespace BizHawk.Client.Common public int SNESGGWndy = -1; // GB/GG Game Genie Encoder/Decoder + public ToolDialogSettings GbGGSettings = new ToolDialogSettings(); public bool GBGGAutoload = false; - public bool GBGGSaveWindowPosition = true; - public int GBGGWndx = -1; - public int GBGGWndy = -1; + // GEN Game Genie Encoder/Decoder public bool GENGGAutoload = false; diff --git a/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.Designer.cs b/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.Designer.cs index 6e65b94afe..3baf27e5e3 100644 --- a/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.Designer.cs +++ b/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.Designer.cs @@ -28,496 +28,521 @@ /// private void InitializeComponent() { - this.GameGenieCodeBox = new System.Windows.Forms.GroupBox(); - this.GGCodeMaskBox = new System.Windows.Forms.MaskedTextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.ValueBox = new BizHawk.Client.EmuHawk.HexTextBox(); - this.AddressBox = new BizHawk.Client.EmuHawk.HexTextBox(); - this.addcheatbt = new System.Windows.Forms.Button(); - this.ButtonPanel = new System.Windows.Forms.Panel(); - this.BF = new System.Windows.Forms.Button(); - this.BD = new System.Windows.Forms.Button(); - this.BB = new System.Windows.Forms.Button(); - this.B9 = new System.Windows.Forms.Button(); - this.B7 = new System.Windows.Forms.Button(); - this.B5 = new System.Windows.Forms.Button(); - this.B3 = new System.Windows.Forms.Button(); - this.BE = new System.Windows.Forms.Button(); - this.B6 = new System.Windows.Forms.Button(); - this.B1 = new System.Windows.Forms.Button(); - this.BC = new System.Windows.Forms.Button(); - this.BA = new System.Windows.Forms.Button(); - this.B8 = new System.Windows.Forms.Button(); - this.B4 = new System.Windows.Forms.Button(); - this.B2 = new System.Windows.Forms.Button(); - this.B0 = new System.Windows.Forms.Button(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.CompareBox = new BizHawk.Client.EmuHawk.HexTextBox(); - this.label6 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.ClearButton = new System.Windows.Forms.Button(); - this.menuStrip1 = new MenuStripEx(); - this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.autoloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveWindowPositionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.cheatname = new System.Windows.Forms.TextBox(); - this.GameGenieCodeBox.SuspendLayout(); - this.ButtonPanel.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.SuspendLayout(); - // - // GameGenieCodeBox - // - this.GameGenieCodeBox.Controls.Add(this.GGCodeMaskBox); - this.GameGenieCodeBox.Location = new System.Drawing.Point(31, 103); - this.GameGenieCodeBox.Name = "GameGenieCodeBox"; - this.GameGenieCodeBox.Size = new System.Drawing.Size(118, 54); - this.GameGenieCodeBox.TabIndex = 1; - this.GameGenieCodeBox.TabStop = false; - this.GameGenieCodeBox.Text = "Game Genie Code"; - // - // GGCodeMaskBox - // - this.GGCodeMaskBox.Location = new System.Drawing.Point(25, 26); - this.GGCodeMaskBox.Margin = new System.Windows.Forms.Padding(2); - this.GGCodeMaskBox.Mask = ">AAA-AAA-AAA"; - this.GGCodeMaskBox.Name = "GGCodeMaskBox"; - this.GGCodeMaskBox.Size = new System.Drawing.Size(75, 20); - this.GGCodeMaskBox.TabIndex = 10; - this.GGCodeMaskBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.GGCodeMaskBox.TextMaskFormat = System.Windows.Forms.MaskFormat.ExcludePromptAndLiterals; - this.GGCodeMaskBox.TextChanged += new System.EventHandler(this.GGCodeMaskBox_TextChanged); - this.GGCodeMaskBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.GGCodeMaskBox_KeyPress); - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(8, 65); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(34, 13); - this.label3.TabIndex = 5; - this.label3.Text = "Value"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(8, 20); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(45, 13); - this.label1.TabIndex = 3; - this.label1.Text = "Address"; - // - // ValueBox - // - this.ValueBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.ValueBox.Location = new System.Drawing.Point(105, 61); - this.ValueBox.MaxLength = 2; - this.ValueBox.Name = "ValueBox"; - this.ValueBox.Nullable = true; - this.ValueBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.ValueBox.Size = new System.Drawing.Size(27, 20); - this.ValueBox.TabIndex = 23; - this.ValueBox.TextChanged += new System.EventHandler(this.ValueBox_TextChanged); - // - // AddressBox - // - this.AddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.AddressBox.Location = new System.Drawing.Point(88, 16); - this.AddressBox.MaxLength = 4; - this.AddressBox.Name = "AddressBox"; - this.AddressBox.Nullable = true; - this.AddressBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.AddressBox.Size = new System.Drawing.Size(44, 20); - this.AddressBox.TabIndex = 21; - this.AddressBox.TextChanged += new System.EventHandler(this.AddressBox_TextChanged); - // - // addcheatbt - // - this.addcheatbt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.addcheatbt.Enabled = false; - this.addcheatbt.Location = new System.Drawing.Point(84, 163); - this.addcheatbt.Margin = new System.Windows.Forms.Padding(0); - this.addcheatbt.Name = "addcheatbt"; - this.addcheatbt.Size = new System.Drawing.Size(65, 26); - this.addcheatbt.TabIndex = 33; - this.addcheatbt.Text = "&Add Cheat"; - this.addcheatbt.UseVisualStyleBackColor = true; - this.addcheatbt.Click += new System.EventHandler(this.AddCheatClick); - // - // ButtonPanel - // - this.ButtonPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.ButtonPanel.Controls.Add(this.BF); - this.ButtonPanel.Controls.Add(this.BD); - this.ButtonPanel.Controls.Add(this.BB); - this.ButtonPanel.Controls.Add(this.B9); - this.ButtonPanel.Controls.Add(this.B7); - this.ButtonPanel.Controls.Add(this.B5); - this.ButtonPanel.Controls.Add(this.B3); - this.ButtonPanel.Controls.Add(this.BE); - this.ButtonPanel.Controls.Add(this.B6); - this.ButtonPanel.Controls.Add(this.B1); - this.ButtonPanel.Controls.Add(this.BC); - this.ButtonPanel.Controls.Add(this.BA); - this.ButtonPanel.Controls.Add(this.B8); - this.ButtonPanel.Controls.Add(this.B4); - this.ButtonPanel.Controls.Add(this.B2); - this.ButtonPanel.Controls.Add(this.B0); - this.ButtonPanel.Location = new System.Drawing.Point(35, 30); - this.ButtonPanel.Name = "ButtonPanel"; - this.ButtonPanel.Size = new System.Drawing.Size(240, 67); - this.ButtonPanel.TabIndex = 4; - // - // BF - // - this.BF.Location = new System.Drawing.Point(206, 35); - this.BF.Name = "BF"; - this.BF.Size = new System.Drawing.Size(26, 23); - this.BF.TabIndex = 16; - this.BF.Text = "F"; - this.BF.UseVisualStyleBackColor = true; - this.BF.Click += new System.EventHandler(this.Keypad_Click); - // - // BD - // - this.BD.Location = new System.Drawing.Point(149, 35); - this.BD.Name = "BD"; - this.BD.Size = new System.Drawing.Size(26, 23); - this.BD.TabIndex = 14; - this.BD.Text = "D"; - this.BD.UseVisualStyleBackColor = true; - this.BD.Click += new System.EventHandler(this.Keypad_Click); - // - // BB - // - this.BB.Location = new System.Drawing.Point(91, 35); - this.BB.Name = "BB"; - this.BB.Size = new System.Drawing.Size(26, 23); - this.BB.TabIndex = 12; - this.BB.Text = "B"; - this.BB.UseVisualStyleBackColor = true; - this.BB.Click += new System.EventHandler(this.Keypad_Click); - // - // B9 - // - this.B9.Location = new System.Drawing.Point(34, 35); - this.B9.Name = "B9"; - this.B9.Size = new System.Drawing.Size(26, 23); - this.B9.TabIndex = 10; - this.B9.Text = "9"; - this.B9.UseVisualStyleBackColor = true; - this.B9.Click += new System.EventHandler(this.Keypad_Click); - // - // B7 - // - this.B7.Location = new System.Drawing.Point(206, 5); - this.B7.Name = "B7"; - this.B7.Size = new System.Drawing.Size(26, 23); - this.B7.TabIndex = 8; - this.B7.Text = "7"; - this.B7.UseVisualStyleBackColor = true; - this.B7.Click += new System.EventHandler(this.Keypad_Click); - // - // B5 - // - this.B5.Location = new System.Drawing.Point(149, 6); - this.B5.Name = "B5"; - this.B5.Size = new System.Drawing.Size(26, 23); - this.B5.TabIndex = 6; - this.B5.Text = "5"; - this.B5.UseVisualStyleBackColor = true; - this.B5.Click += new System.EventHandler(this.Keypad_Click); - // - // B3 - // - this.B3.Location = new System.Drawing.Point(91, 6); - this.B3.Name = "B3"; - this.B3.Size = new System.Drawing.Size(26, 23); - this.B3.TabIndex = 4; - this.B3.Text = "3"; - this.B3.UseVisualStyleBackColor = true; - this.B3.Click += new System.EventHandler(this.Keypad_Click); - // - // BE - // - this.BE.Location = new System.Drawing.Point(178, 35); - this.BE.Name = "BE"; - this.BE.Size = new System.Drawing.Size(26, 23); - this.BE.TabIndex = 15; - this.BE.Text = "E"; - this.BE.UseVisualStyleBackColor = true; - this.BE.Click += new System.EventHandler(this.Keypad_Click); - // - // B6 - // - this.B6.Location = new System.Drawing.Point(178, 5); - this.B6.Name = "B6"; - this.B6.Size = new System.Drawing.Size(26, 23); - this.B6.TabIndex = 7; - this.B6.Text = "6"; - this.B6.UseVisualStyleBackColor = true; - this.B6.Click += new System.EventHandler(this.Keypad_Click); - // - // B1 - // - this.B1.Location = new System.Drawing.Point(34, 6); - this.B1.Name = "B1"; - this.B1.Size = new System.Drawing.Size(26, 23); - this.B1.TabIndex = 2; - this.B1.Text = "1"; - this.B1.UseVisualStyleBackColor = true; - this.B1.Click += new System.EventHandler(this.Keypad_Click); - // - // BC - // - this.BC.Location = new System.Drawing.Point(121, 35); - this.BC.Name = "BC"; - this.BC.Size = new System.Drawing.Size(26, 23); - this.BC.TabIndex = 13; - this.BC.Text = "C"; - this.BC.UseVisualStyleBackColor = true; - this.BC.Click += new System.EventHandler(this.Keypad_Click); - // - // BA - // - this.BA.Location = new System.Drawing.Point(63, 35); - this.BA.Name = "BA"; - this.BA.Size = new System.Drawing.Size(26, 23); - this.BA.TabIndex = 11; - this.BA.Text = "A"; - this.BA.UseVisualStyleBackColor = true; - this.BA.Click += new System.EventHandler(this.Keypad_Click); - // - // B8 - // - this.B8.Location = new System.Drawing.Point(6, 35); - this.B8.Name = "B8"; - this.B8.Size = new System.Drawing.Size(26, 23); - this.B8.TabIndex = 9; - this.B8.Text = "8"; - this.B8.UseVisualStyleBackColor = true; - this.B8.Click += new System.EventHandler(this.Keypad_Click); - // - // B4 - // - this.B4.Location = new System.Drawing.Point(121, 6); - this.B4.Name = "B4"; - this.B4.Size = new System.Drawing.Size(26, 23); - this.B4.TabIndex = 5; - this.B4.Text = "4"; - this.B4.UseVisualStyleBackColor = true; - this.B4.Click += new System.EventHandler(this.Keypad_Click); - // - // B2 - // - this.B2.Location = new System.Drawing.Point(63, 6); - this.B2.Name = "B2"; - this.B2.Size = new System.Drawing.Size(26, 23); - this.B2.TabIndex = 3; - this.B2.Text = "2"; - this.B2.UseVisualStyleBackColor = true; - this.B2.Click += new System.EventHandler(this.Keypad_Click); - // - // B0 - // - this.B0.Location = new System.Drawing.Point(6, 5); - this.B0.Name = "B0"; - this.B0.Size = new System.Drawing.Size(26, 23); - this.B0.TabIndex = 1; - this.B0.Text = "0"; - this.B0.UseVisualStyleBackColor = true; - this.B0.Click += new System.EventHandler(this.Keypad_Click); - // - // groupBox1 - // - this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Controls.Add(this.label5); - this.groupBox1.Controls.Add(this.CompareBox); - this.groupBox1.Controls.Add(this.label6); - this.groupBox1.Controls.Add(this.label4); - this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.label1); - this.groupBox1.Controls.Add(this.AddressBox); - this.groupBox1.Controls.Add(this.ValueBox); - this.groupBox1.Location = new System.Drawing.Point(155, 103); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(137, 82); - this.groupBox1.TabIndex = 5; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Decoded Value"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(87, 42); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(18, 13); - this.label2.TabIndex = 25; - this.label2.Text = "0x"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(8, 42); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(49, 13); - this.label5.TabIndex = 24; - this.label5.Text = "Compare"; - // - // CompareBox - // - this.CompareBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; - this.CompareBox.Location = new System.Drawing.Point(105, 38); - this.CompareBox.MaxLength = 2; - this.CompareBox.Name = "CompareBox"; - this.CompareBox.Nullable = true; - this.CompareBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.CompareBox.Size = new System.Drawing.Size(27, 20); - this.CompareBox.TabIndex = 26; - this.CompareBox.TextChanged += new System.EventHandler(this.CompareBox_TextChanged); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(87, 65); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(18, 13); - this.label6.TabIndex = 9; - this.label6.Text = "0x"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(57, 20); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(18, 13); - this.label4.TabIndex = 7; - this.label4.Text = "0x"; - // - // ClearButton - // - this.ClearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.ClearButton.Location = new System.Drawing.Point(31, 163); - this.ClearButton.Margin = new System.Windows.Forms.Padding(2); - this.ClearButton.Name = "ClearButton"; - this.ClearButton.Size = new System.Drawing.Size(52, 26); - this.ClearButton.TabIndex = 32; - this.ClearButton.Text = "&Clear"; - this.ClearButton.UseVisualStyleBackColor = true; - this.ClearButton.Click += new System.EventHandler(this.ClearButton_Click); - // - // menuStrip1 - // - this.menuStrip1.ClickThrough = true; - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.optionsToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(302, 24); - this.menuStrip1.TabIndex = 8; - this.menuStrip1.Text = "menuStrip1"; - // - // optionsToolStripMenuItem - // - this.optionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.autoloadToolStripMenuItem, - this.saveWindowPositionToolStripMenuItem, + this.GameGenieCodeBox = new System.Windows.Forms.GroupBox(); + this.GGCodeMaskBox = new System.Windows.Forms.MaskedTextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.ValueBox = new BizHawk.Client.EmuHawk.HexTextBox(); + this.AddressBox = new BizHawk.Client.EmuHawk.HexTextBox(); + this.addcheatbt = new System.Windows.Forms.Button(); + this.ButtonPanel = new System.Windows.Forms.Panel(); + this.BF = new System.Windows.Forms.Button(); + this.BD = new System.Windows.Forms.Button(); + this.BB = new System.Windows.Forms.Button(); + this.B9 = new System.Windows.Forms.Button(); + this.B7 = new System.Windows.Forms.Button(); + this.B5 = new System.Windows.Forms.Button(); + this.B3 = new System.Windows.Forms.Button(); + this.BE = new System.Windows.Forms.Button(); + this.B6 = new System.Windows.Forms.Button(); + this.B1 = new System.Windows.Forms.Button(); + this.BC = new System.Windows.Forms.Button(); + this.BA = new System.Windows.Forms.Button(); + this.B8 = new System.Windows.Forms.Button(); + this.B4 = new System.Windows.Forms.Button(); + this.B2 = new System.Windows.Forms.Button(); + this.B0 = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.CompareBox = new BizHawk.Client.EmuHawk.HexTextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.ClearButton = new System.Windows.Forms.Button(); + this.menuStrip1 = new MenuStripEx(); + this.OptionsSubMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.AutoloadMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.SaveWindowPositionMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.AlwaysOnTopMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.FloatingWindowMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.ExitMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.cheatname = new System.Windows.Forms.TextBox(); + this.GameGenieCodeBox.SuspendLayout(); + this.ButtonPanel.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.SuspendLayout(); + // + // GameGenieCodeBox + // + this.GameGenieCodeBox.Controls.Add(this.GGCodeMaskBox); + this.GameGenieCodeBox.Location = new System.Drawing.Point(31, 103); + this.GameGenieCodeBox.Name = "GameGenieCodeBox"; + this.GameGenieCodeBox.Size = new System.Drawing.Size(118, 54); + this.GameGenieCodeBox.TabIndex = 1; + this.GameGenieCodeBox.TabStop = false; + this.GameGenieCodeBox.Text = "Game Genie Code"; + // + // GGCodeMaskBox + // + this.GGCodeMaskBox.Location = new System.Drawing.Point(25, 26); + this.GGCodeMaskBox.Margin = new System.Windows.Forms.Padding(2); + this.GGCodeMaskBox.Mask = ">AAA-AAA-AAA"; + this.GGCodeMaskBox.Name = "GGCodeMaskBox"; + this.GGCodeMaskBox.Size = new System.Drawing.Size(75, 20); + this.GGCodeMaskBox.TabIndex = 10; + this.GGCodeMaskBox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.GGCodeMaskBox.TextMaskFormat = System.Windows.Forms.MaskFormat.ExcludePromptAndLiterals; + this.GGCodeMaskBox.TextChanged += new System.EventHandler(this.GGCodeMaskBox_TextChanged); + this.GGCodeMaskBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.GGCodeMaskBox_KeyPress); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(8, 65); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(34, 13); + this.label3.TabIndex = 5; + this.label3.Text = "Value"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(8, 20); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(45, 13); + this.label1.TabIndex = 3; + this.label1.Text = "Address"; + // + // ValueBox + // + this.ValueBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; + this.ValueBox.Location = new System.Drawing.Point(105, 61); + this.ValueBox.MaxLength = 2; + this.ValueBox.Name = "ValueBox"; + this.ValueBox.Nullable = true; + this.ValueBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.ValueBox.Size = new System.Drawing.Size(27, 20); + this.ValueBox.TabIndex = 23; + this.ValueBox.TextChanged += new System.EventHandler(this.ValueBox_TextChanged); + // + // AddressBox + // + this.AddressBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; + this.AddressBox.Location = new System.Drawing.Point(88, 16); + this.AddressBox.MaxLength = 4; + this.AddressBox.Name = "AddressBox"; + this.AddressBox.Nullable = true; + this.AddressBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.AddressBox.Size = new System.Drawing.Size(44, 20); + this.AddressBox.TabIndex = 21; + this.AddressBox.TextChanged += new System.EventHandler(this.AddressBox_TextChanged); + // + // addcheatbt + // + this.addcheatbt.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.addcheatbt.Enabled = false; + this.addcheatbt.Location = new System.Drawing.Point(84, 163); + this.addcheatbt.Margin = new System.Windows.Forms.Padding(0); + this.addcheatbt.Name = "addcheatbt"; + this.addcheatbt.Size = new System.Drawing.Size(65, 26); + this.addcheatbt.TabIndex = 33; + this.addcheatbt.Text = "&Add Cheat"; + this.addcheatbt.UseVisualStyleBackColor = true; + this.addcheatbt.Click += new System.EventHandler(this.AddCheatClick); + // + // ButtonPanel + // + this.ButtonPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.ButtonPanel.Controls.Add(this.BF); + this.ButtonPanel.Controls.Add(this.BD); + this.ButtonPanel.Controls.Add(this.BB); + this.ButtonPanel.Controls.Add(this.B9); + this.ButtonPanel.Controls.Add(this.B7); + this.ButtonPanel.Controls.Add(this.B5); + this.ButtonPanel.Controls.Add(this.B3); + this.ButtonPanel.Controls.Add(this.BE); + this.ButtonPanel.Controls.Add(this.B6); + this.ButtonPanel.Controls.Add(this.B1); + this.ButtonPanel.Controls.Add(this.BC); + this.ButtonPanel.Controls.Add(this.BA); + this.ButtonPanel.Controls.Add(this.B8); + this.ButtonPanel.Controls.Add(this.B4); + this.ButtonPanel.Controls.Add(this.B2); + this.ButtonPanel.Controls.Add(this.B0); + this.ButtonPanel.Location = new System.Drawing.Point(35, 30); + this.ButtonPanel.Name = "ButtonPanel"; + this.ButtonPanel.Size = new System.Drawing.Size(240, 67); + this.ButtonPanel.TabIndex = 4; + // + // BF + // + this.BF.Location = new System.Drawing.Point(206, 35); + this.BF.Name = "BF"; + this.BF.Size = new System.Drawing.Size(26, 23); + this.BF.TabIndex = 16; + this.BF.Text = "F"; + this.BF.UseVisualStyleBackColor = true; + this.BF.Click += new System.EventHandler(this.Keypad_Click); + // + // BD + // + this.BD.Location = new System.Drawing.Point(149, 35); + this.BD.Name = "BD"; + this.BD.Size = new System.Drawing.Size(26, 23); + this.BD.TabIndex = 14; + this.BD.Text = "D"; + this.BD.UseVisualStyleBackColor = true; + this.BD.Click += new System.EventHandler(this.Keypad_Click); + // + // BB + // + this.BB.Location = new System.Drawing.Point(91, 35); + this.BB.Name = "BB"; + this.BB.Size = new System.Drawing.Size(26, 23); + this.BB.TabIndex = 12; + this.BB.Text = "B"; + this.BB.UseVisualStyleBackColor = true; + this.BB.Click += new System.EventHandler(this.Keypad_Click); + // + // B9 + // + this.B9.Location = new System.Drawing.Point(34, 35); + this.B9.Name = "B9"; + this.B9.Size = new System.Drawing.Size(26, 23); + this.B9.TabIndex = 10; + this.B9.Text = "9"; + this.B9.UseVisualStyleBackColor = true; + this.B9.Click += new System.EventHandler(this.Keypad_Click); + // + // B7 + // + this.B7.Location = new System.Drawing.Point(206, 5); + this.B7.Name = "B7"; + this.B7.Size = new System.Drawing.Size(26, 23); + this.B7.TabIndex = 8; + this.B7.Text = "7"; + this.B7.UseVisualStyleBackColor = true; + this.B7.Click += new System.EventHandler(this.Keypad_Click); + // + // B5 + // + this.B5.Location = new System.Drawing.Point(149, 6); + this.B5.Name = "B5"; + this.B5.Size = new System.Drawing.Size(26, 23); + this.B5.TabIndex = 6; + this.B5.Text = "5"; + this.B5.UseVisualStyleBackColor = true; + this.B5.Click += new System.EventHandler(this.Keypad_Click); + // + // B3 + // + this.B3.Location = new System.Drawing.Point(91, 6); + this.B3.Name = "B3"; + this.B3.Size = new System.Drawing.Size(26, 23); + this.B3.TabIndex = 4; + this.B3.Text = "3"; + this.B3.UseVisualStyleBackColor = true; + this.B3.Click += new System.EventHandler(this.Keypad_Click); + // + // BE + // + this.BE.Location = new System.Drawing.Point(178, 35); + this.BE.Name = "BE"; + this.BE.Size = new System.Drawing.Size(26, 23); + this.BE.TabIndex = 15; + this.BE.Text = "E"; + this.BE.UseVisualStyleBackColor = true; + this.BE.Click += new System.EventHandler(this.Keypad_Click); + // + // B6 + // + this.B6.Location = new System.Drawing.Point(178, 5); + this.B6.Name = "B6"; + this.B6.Size = new System.Drawing.Size(26, 23); + this.B6.TabIndex = 7; + this.B6.Text = "6"; + this.B6.UseVisualStyleBackColor = true; + this.B6.Click += new System.EventHandler(this.Keypad_Click); + // + // B1 + // + this.B1.Location = new System.Drawing.Point(34, 6); + this.B1.Name = "B1"; + this.B1.Size = new System.Drawing.Size(26, 23); + this.B1.TabIndex = 2; + this.B1.Text = "1"; + this.B1.UseVisualStyleBackColor = true; + this.B1.Click += new System.EventHandler(this.Keypad_Click); + // + // BC + // + this.BC.Location = new System.Drawing.Point(121, 35); + this.BC.Name = "BC"; + this.BC.Size = new System.Drawing.Size(26, 23); + this.BC.TabIndex = 13; + this.BC.Text = "C"; + this.BC.UseVisualStyleBackColor = true; + this.BC.Click += new System.EventHandler(this.Keypad_Click); + // + // BA + // + this.BA.Location = new System.Drawing.Point(63, 35); + this.BA.Name = "BA"; + this.BA.Size = new System.Drawing.Size(26, 23); + this.BA.TabIndex = 11; + this.BA.Text = "A"; + this.BA.UseVisualStyleBackColor = true; + this.BA.Click += new System.EventHandler(this.Keypad_Click); + // + // B8 + // + this.B8.Location = new System.Drawing.Point(6, 35); + this.B8.Name = "B8"; + this.B8.Size = new System.Drawing.Size(26, 23); + this.B8.TabIndex = 9; + this.B8.Text = "8"; + this.B8.UseVisualStyleBackColor = true; + this.B8.Click += new System.EventHandler(this.Keypad_Click); + // + // B4 + // + this.B4.Location = new System.Drawing.Point(121, 6); + this.B4.Name = "B4"; + this.B4.Size = new System.Drawing.Size(26, 23); + this.B4.TabIndex = 5; + this.B4.Text = "4"; + this.B4.UseVisualStyleBackColor = true; + this.B4.Click += new System.EventHandler(this.Keypad_Click); + // + // B2 + // + this.B2.Location = new System.Drawing.Point(63, 6); + this.B2.Name = "B2"; + this.B2.Size = new System.Drawing.Size(26, 23); + this.B2.TabIndex = 3; + this.B2.Text = "2"; + this.B2.UseVisualStyleBackColor = true; + this.B2.Click += new System.EventHandler(this.Keypad_Click); + // + // B0 + // + this.B0.Location = new System.Drawing.Point(6, 5); + this.B0.Name = "B0"; + this.B0.Size = new System.Drawing.Size(26, 23); + this.B0.TabIndex = 1; + this.B0.Text = "0"; + this.B0.UseVisualStyleBackColor = true; + this.B0.Click += new System.EventHandler(this.Keypad_Click); + // + // groupBox1 + // + this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Controls.Add(this.CompareBox); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.label4); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.label1); + this.groupBox1.Controls.Add(this.AddressBox); + this.groupBox1.Controls.Add(this.ValueBox); + this.groupBox1.Location = new System.Drawing.Point(155, 103); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(137, 82); + this.groupBox1.TabIndex = 5; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Decoded Value"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(87, 42); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(18, 13); + this.label2.TabIndex = 25; + this.label2.Text = "0x"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(8, 42); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(49, 13); + this.label5.TabIndex = 24; + this.label5.Text = "Compare"; + // + // CompareBox + // + this.CompareBox.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper; + this.CompareBox.Location = new System.Drawing.Point(105, 38); + this.CompareBox.MaxLength = 2; + this.CompareBox.Name = "CompareBox"; + this.CompareBox.Nullable = true; + this.CompareBox.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.CompareBox.Size = new System.Drawing.Size(27, 20); + this.CompareBox.TabIndex = 26; + this.CompareBox.TextChanged += new System.EventHandler(this.CompareBox_TextChanged); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(87, 65); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(18, 13); + this.label6.TabIndex = 9; + this.label6.Text = "0x"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(57, 20); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(18, 13); + this.label4.TabIndex = 7; + this.label4.Text = "0x"; + // + // ClearButton + // + this.ClearButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.ClearButton.Location = new System.Drawing.Point(31, 163); + this.ClearButton.Margin = new System.Windows.Forms.Padding(2); + this.ClearButton.Name = "ClearButton"; + this.ClearButton.Size = new System.Drawing.Size(52, 26); + this.ClearButton.TabIndex = 32; + this.ClearButton.Text = "&Clear"; + this.ClearButton.UseVisualStyleBackColor = true; + this.ClearButton.Click += new System.EventHandler(this.ClearButton_Click); + // + // menuStrip1 + // + this.menuStrip1.ClickThrough = true; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.OptionsSubMenu}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(292, 24); + this.menuStrip1.TabIndex = 8; + this.menuStrip1.Text = "menuStrip1"; + // + // OptionsSubMenu + // + this.OptionsSubMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.AutoloadMenuItem, + this.toolStripSeparator2, + this.SaveWindowPositionMenuItem, + this.AlwaysOnTopMenuItem, + this.FloatingWindowMenuItem, this.toolStripSeparator1, - this.exitToolStripMenuItem}); - this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; - this.optionsToolStripMenuItem.Size = new System.Drawing.Size(61, 20); - this.optionsToolStripMenuItem.Text = "&Options"; - this.optionsToolStripMenuItem.DropDownOpened += new System.EventHandler(this.optionsToolStripMenuItem_DropDownOpened); - // - // autoloadToolStripMenuItem - // - this.autoloadToolStripMenuItem.Name = "autoloadToolStripMenuItem"; - this.autoloadToolStripMenuItem.Size = new System.Drawing.Size(191, 22); - this.autoloadToolStripMenuItem.Text = "Auto-load"; - this.autoloadToolStripMenuItem.Click += new System.EventHandler(this.autoloadToolStripMenuItem_Click); - // - // saveWindowPositionToolStripMenuItem - // - this.saveWindowPositionToolStripMenuItem.Name = "saveWindowPositionToolStripMenuItem"; - this.saveWindowPositionToolStripMenuItem.Size = new System.Drawing.Size(191, 22); - this.saveWindowPositionToolStripMenuItem.Text = "Save Window Position"; - this.saveWindowPositionToolStripMenuItem.Click += new System.EventHandler(this.saveWindowPositionToolStripMenuItem_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(188, 6); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); - this.exitToolStripMenuItem.Size = new System.Drawing.Size(191, 22); - this.exitToolStripMenuItem.Text = "E&xit"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.cheatname); - this.groupBox2.Location = new System.Drawing.Point(31, 197); - this.groupBox2.Margin = new System.Windows.Forms.Padding(2); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Padding = new System.Windows.Forms.Padding(2); - this.groupBox2.Size = new System.Drawing.Size(262, 50); - this.groupBox2.TabIndex = 24; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Cheat Title (Uses GG code if left empty)"; - // - // cheatname - // - this.cheatname.Location = new System.Drawing.Point(18, 23); - this.cheatname.Margin = new System.Windows.Forms.Padding(2); - this.cheatname.Name = "cheatname"; - this.cheatname.Size = new System.Drawing.Size(227, 20); - this.cheatname.TabIndex = 0; - // - // GBGameGenie - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(302, 262); - this.Controls.Add(this.groupBox2); - this.Controls.Add(this.ClearButton); - this.Controls.Add(this.groupBox1); - this.Controls.Add(this.ButtonPanel); - this.Controls.Add(this.addcheatbt); - this.Controls.Add(this.GameGenieCodeBox); - this.Controls.Add(this.menuStrip1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; - this.MainMenuStrip = this.menuStrip1; - this.MaximizeBox = false; - this.MaximumSize = new System.Drawing.Size(312, 294); - this.MinimumSize = new System.Drawing.Size(312, 294); - this.Name = "GBGameGenie"; - this.ShowIcon = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Game Boy/Game Gear Game Genie Encoder / Decoder"; - this.Load += new System.EventHandler(this.GBGameGenie_Load_1); - this.GameGenieCodeBox.ResumeLayout(false); - this.GameGenieCodeBox.PerformLayout(); - this.ButtonPanel.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); + this.ExitMenuItem}); + this.OptionsSubMenu.Name = "OptionsSubMenu"; + this.OptionsSubMenu.Size = new System.Drawing.Size(61, 20); + this.OptionsSubMenu.Text = "&Options"; + this.OptionsSubMenu.DropDownOpened += new System.EventHandler(this.OptionsSubMenu_DropDownOpened); + // + // AutoloadMenuItem + // + this.AutoloadMenuItem.Name = "AutoloadMenuItem"; + this.AutoloadMenuItem.Size = new System.Drawing.Size(191, 22); + this.AutoloadMenuItem.Text = "Auto-load"; + this.AutoloadMenuItem.Click += new System.EventHandler(this.AutoloadMenuItem_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(188, 6); + // + // SaveWindowPositionMenuItem + // + this.SaveWindowPositionMenuItem.Name = "SaveWindowPositionMenuItem"; + this.SaveWindowPositionMenuItem.Size = new System.Drawing.Size(191, 22); + this.SaveWindowPositionMenuItem.Text = "Save Window Position"; + this.SaveWindowPositionMenuItem.Click += new System.EventHandler(this.SaveWindowPositionMenuItem_Click); + // + // AlwaysOnTopMenuItem + // + this.AlwaysOnTopMenuItem.Name = "AlwaysOnTopMenuItem"; + this.AlwaysOnTopMenuItem.Size = new System.Drawing.Size(191, 22); + this.AlwaysOnTopMenuItem.Text = "Always On Top"; + this.AlwaysOnTopMenuItem.Click += new System.EventHandler(this.AlwaysOnTopMenuItem_Click); + // + // FloatingWindowMenuItem + // + this.FloatingWindowMenuItem.Name = "FloatingWindowMenuItem"; + this.FloatingWindowMenuItem.Size = new System.Drawing.Size(191, 22); + this.FloatingWindowMenuItem.Text = "Floating Window"; + this.FloatingWindowMenuItem.Click += new System.EventHandler(this.FloatingWindowMenuItem_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(188, 6); + // + // ExitMenuItem + // + this.ExitMenuItem.Name = "ExitMenuItem"; + this.ExitMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); + this.ExitMenuItem.Size = new System.Drawing.Size(191, 22); + this.ExitMenuItem.Text = "E&xit"; + this.ExitMenuItem.Click += new System.EventHandler(this.ExitMenuItem_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.cheatname); + this.groupBox2.Location = new System.Drawing.Point(31, 197); + this.groupBox2.Margin = new System.Windows.Forms.Padding(2); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Padding = new System.Windows.Forms.Padding(2); + this.groupBox2.Size = new System.Drawing.Size(262, 50); + this.groupBox2.TabIndex = 24; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Cheat Title (Uses GG code if left empty)"; + // + // cheatname + // + this.cheatname.Location = new System.Drawing.Point(18, 23); + this.cheatname.Margin = new System.Windows.Forms.Padding(2); + this.cheatname.Name = "cheatname"; + this.cheatname.Size = new System.Drawing.Size(227, 20); + this.cheatname.TabIndex = 0; + // + // GBGameGenie + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(292, 252); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.ClearButton); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.ButtonPanel); + this.Controls.Add(this.addcheatbt); + this.Controls.Add(this.GameGenieCodeBox); + this.Controls.Add(this.menuStrip1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D; + this.MainMenuStrip = this.menuStrip1; + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(312, 294); + this.MinimumSize = new System.Drawing.Size(312, 294); + this.Name = "GBGameGenie"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Game Boy/Game Gear Game Genie Encoder / Decoder"; + this.Load += new System.EventHandler(this.GBGameGenie_Load); + this.GameGenieCodeBox.ResumeLayout(false); + this.GameGenieCodeBox.PerformLayout(); + this.ButtonPanel.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); } @@ -551,16 +576,19 @@ private System.Windows.Forms.Label label4; private System.Windows.Forms.Button ClearButton; private MenuStripEx menuStrip1; - private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem autoloadToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveWindowPositionToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem OptionsSubMenu; + private System.Windows.Forms.ToolStripMenuItem AutoloadMenuItem; + private System.Windows.Forms.ToolStripMenuItem SaveWindowPositionMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ExitMenuItem; private System.Windows.Forms.MaskedTextBox GGCodeMaskBox; private System.Windows.Forms.GroupBox groupBox2; private System.Windows.Forms.TextBox cheatname; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label5; private HexTextBox CompareBox; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripMenuItem AlwaysOnTopMenuItem; + private System.Windows.Forms.ToolStripMenuItem FloatingWindowMenuItem; } } \ No newline at end of file diff --git a/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.cs b/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.cs index 7aa4fa6dfc..0a7f5a3c21 100644 --- a/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.cs +++ b/BizHawk.Client.EmuHawk/tools/GB/GBGameGenie.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; -using System.Drawing; -using System.Windows.Forms; using System.Globalization; using System.Text.RegularExpressions; +using System.Windows.Forms; using BizHawk.Client.Common; @@ -14,6 +13,8 @@ namespace BizHawk.Client.EmuHawk private readonly Dictionary _gameGenieTable = new Dictionary(); private bool _processing; + #region Public + public bool AskSave() { return true; } public bool UpdateBefore { get { return false; } } @@ -38,34 +39,34 @@ namespace BizHawk.Client.EmuHawk { InitializeComponent(); Closing += (o, e) => SaveConfigSettings(); + TopMost = Global.Config.GbGGSettings.TopMost; - _gameGenieTable.Add('0', 0); //0000 - _gameGenieTable.Add('1', 1); //0001 - _gameGenieTable.Add('2', 2); //0010 - _gameGenieTable.Add('3', 3); //0011 - _gameGenieTable.Add('4', 4); //0100 - _gameGenieTable.Add('5', 5); //0101 - _gameGenieTable.Add('6', 6); //0110 - _gameGenieTable.Add('7', 7); //0111 - _gameGenieTable.Add('8', 8); //1000 - _gameGenieTable.Add('9', 9); //1001 - _gameGenieTable.Add('A', 10); //1010 - _gameGenieTable.Add('B', 11); //1011 - _gameGenieTable.Add('C', 12); //1100 - _gameGenieTable.Add('D', 13); //1101 - _gameGenieTable.Add('E', 14); //1110 - _gameGenieTable.Add('F', 15); //1111 + _gameGenieTable.Add('0', 0); // 0000 + _gameGenieTable.Add('1', 1); // 0001 + _gameGenieTable.Add('2', 2); // 0010 + _gameGenieTable.Add('3', 3); // 0011 + _gameGenieTable.Add('4', 4); // 0100 + _gameGenieTable.Add('5', 5); // 0101 + _gameGenieTable.Add('6', 6); // 0110 + _gameGenieTable.Add('7', 7); // 0111 + _gameGenieTable.Add('8', 8); // 1000 + _gameGenieTable.Add('9', 9); // 1001 + _gameGenieTable.Add('A', 10); // 1010 + _gameGenieTable.Add('B', 11); // 1011 + _gameGenieTable.Add('C', 12); // 1100 + _gameGenieTable.Add('D', 13); // 1101 + _gameGenieTable.Add('E', 14); // 1110 + _gameGenieTable.Add('F', 15); // 1111 } public void GBGGDecode(string code, ref int val, ref int add, ref int cmp) { - //No cypher on value - //Char # | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | - //Bit # |3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0| - //maps to| Value |A|B|C|D|E|F|G|H|I|J|K|L|XOR 0xF|a|b|c|c|NotUsed|e|f|g|h| - //proper | Value |XOR 0xF|A|B|C|D|E|F|G|H|I|J|K|L|g|h|a|b|Nothing|c|d|e|f| - + // No cypher on value + // Char # | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | + // Bit # |3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0|3|2|1|0| + // maps to| Value |A|B|C|D|E|F|G|H|I|J|K|L|XOR 0xF|a|b|c|c|NotUsed|e|f|g|h| + // proper | Value |XOR 0xF|A|B|C|D|E|F|G|H|I|J|K|L|g|h|a|b|Nothing|c|d|e|f| int x; // Getting Value if (code.Length > 0) @@ -79,19 +80,21 @@ namespace BizHawk.Client.EmuHawk _gameGenieTable.TryGetValue(code[1], out x); val |= x; } - //Address + // Address if (code.Length > 2) { _gameGenieTable.TryGetValue(code[2], out x); - add = (x << 8); + add = x << 8; } else + { add = -1; + } if (code.Length > 3) { _gameGenieTable.TryGetValue(code[3], out x); - add |= (x << 4); + add |= x << 4; } if (code.Length > 4) @@ -103,220 +106,201 @@ namespace BizHawk.Client.EmuHawk if (code.Length > 5) { _gameGenieTable.TryGetValue(code[5], out x); - add |= ((x ^ 0xF) << 12); + add |= (x ^ 0xF) << 12; } + // compare need to be full if (code.Length > 8) { int comp = 0; _gameGenieTable.TryGetValue(code[6], out x); - comp = (x << 2); + comp = x << 2; + // 8th character ignored _gameGenieTable.TryGetValue(code[8], out x); - comp |= ((x & 0xC) >> 2); - comp |= ((x & 0x3) << 6); + comp |= (x & 0xC) >> 2; + comp |= (x & 0x3) << 6; cmp = comp ^ 0xBA; } else + { cmp = -1; + } + } + + #endregion - } - private string GBGGEncode(int val, int add, int cmp) { char[] letters = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; - string code = ""; + string code = string.Empty; int[] num = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; num[0] = (val & 0xF0) >> 4; num[1] = val & 0x0F; num[2] = (add & 0x0F00) >> 8; num[3] = (add & 0x00F0) >> 4; - num[4] = (add & 0x000F); - num[5] = (((add & 0xF000) >> 12) ^ 0xF); + num[4] = add & 0x000F; + num[5] = ((add & 0xF000) >> 12) ^ 0xF; if (cmp > -1) { + int xoredcomp = (cmp & 0xFF) ^ 0xBA; + num[6] = (xoredcomp & 0x30) >> 2; + num[6] |= (xoredcomp & 0x0C) >> 2; - int xoredcomp = ((cmp & 0xFF) ^ 0xBA); - num[6] = ((xoredcomp & 0x30) >> 2); - num[6] |= ((xoredcomp & 0x0C) >> 2); // 8th char has no real use (its value is not reflected in the address:value:compare // probably a protection to stop people making code up, xor the 7th digit with 0x8 // to get back what the original code had (Might be more to it) num[7] = num[6] ^ 8; - num[8] = ((xoredcomp & 0xC0) >> 6); - num[8] |= ((xoredcomp & 0x03) << 2); - for (int x = 0; x < 9; x++) - code += letters[num[x]]; + num[8] = (xoredcomp & 0xC0) >> 6; + num[8] |= (xoredcomp & 0x03) << 2; + + for (int i = 0; i < 9; i++) + { + code += letters[num[i]]; + } } else { - for (int x = 0; x < 6; x++) - code += letters[num[x]]; + for (int i = 0; i < 6; i++) + { + code += letters[num[i]]; + } } + return code; } + private void GBGameGenie_Load(object sender, EventArgs e) { addcheatbt.Enabled = false; - if (Global.Config.GBGGSaveWindowPosition && Global.Config.GBGGWndx >= 0 && Global.Config.GBGGWndy >= 0) - Location = new Point(Global.Config.GBGGWndx, Global.Config.GBGGWndy); + if (Global.Config.GbGGSettings.UseWindowPosition) + { + Location = Global.Config.GbGGSettings.WindowPosition; + } } private void SaveConfigSettings() { - Global.Config.GBGGWndx = Location.X; - Global.Config.GBGGWndy = Location.Y; + Global.Config.GbGGSettings.Wndx = Location.X; + Global.Config.GbGGSettings.Wndy = Location.Y; } - private void GGCodeMaskBox_KeyPress(object sender, KeyPressEventArgs e) + private void RefreshFloatingWindowControl() { - // Find a better way to remove all NON HEX char, while still allowing copy/paste - //Right now its all done through removing em GGCodeMaskBox_TextChanged + Owner = Global.Config.GbGGSettings.FloatingWindow ? null : GlobalWin.MainForm; } - private void GGCodeMaskBox_TextChanged(object sender, EventArgs e) - { + #region Events - if (_processing == false) + #region Menu + + private void OptionsSubMenu_DropDownOpened(object sender, EventArgs e) + { + AutoloadMenuItem.Checked = Global.Config.GBGGAutoload; + SaveWindowPositionMenuItem.Checked = Global.Config.GbGGSettings.SaveWindowPosition; + AlwaysOnTopMenuItem.Checked = Global.Config.GbGGSettings.TopMost; + FloatingWindowMenuItem.Checked = Global.Config.GbGGSettings.FloatingWindow; + } + + private void AutoloadMenuItem_Click(object sender, EventArgs e) + { + Global.Config.GBGGAutoload ^= true; + } + + private void SaveWindowPositionMenuItem_Click(object sender, EventArgs e) + { + Global.Config.GbGGSettings.SaveWindowPosition ^= true; + } + + private void AlwaysOnTopMenuItem_Click(object sender, EventArgs e) + { + Global.Config.GbGGSettings.TopMost ^= true; + TopMost = Global.Config.GbGGSettings.TopMost; + } + + private void FloatingWindowMenuItem_Click(object sender, EventArgs e) + { + Global.Config.GbGGSettings.FloatingWindow ^= true; + RefreshFloatingWindowControl(); + } + + private void ExitMenuItem_Click(object sender, EventArgs e) + { + Close(); + } + + #endregion + + #region Dialog and Controls + + private void AddCheatClick(object sender, EventArgs e) + { + if ((Global.Emulator.SystemId == "GB") || (Global.Game.System == "GG")) { - _processing = true; - //insert REGEX Remove non HEXA char - if (Regex.IsMatch(GGCodeMaskBox.Text, @"[^a-fA-F0-9]")) - { - string temp = Regex.Replace(GGCodeMaskBox.Text, @"[^a-fA-F0-9]", string.Empty); - GGCodeMaskBox.Text = temp; - } + string name; + var address = 0; + var value = 0; + int? compare = null; - if (GGCodeMaskBox.Text.Length > 0) + if (!string.IsNullOrWhiteSpace(cheatname.Text)) { - int val = -1; - int add = -1; - int cmp = -1; - GBGGDecode(GGCodeMaskBox.Text, ref val, ref add, ref cmp); - if (add > -1) - AddressBox.Text = String.Format("{0:X4}", add); - if (val > -1) - ValueBox.Text = String.Format("{0:X2}", val); - if (cmp > -1) - CompareBox.Text = String.Format("{0:X2}", cmp); - else - CompareBox.Text = ""; - - addcheatbt.Enabled = true; + name = cheatname.Text; } else { - AddressBox.Text = ""; - ValueBox.Text = ""; - CompareBox.Text = ""; - addcheatbt.Enabled = false; + _processing = true; + GGCodeMaskBox.TextMaskFormat = MaskFormat.IncludeLiterals; + name = GGCodeMaskBox.Text; + GGCodeMaskBox.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals; + _processing = false; } - _processing = false; + + if (!string.IsNullOrWhiteSpace(AddressBox.Text)) + { + address = int.Parse(AddressBox.Text, NumberStyles.HexNumber); + } + + if (!string.IsNullOrWhiteSpace(ValueBox.Text)) + { + value = (byte)int.Parse(ValueBox.Text, NumberStyles.HexNumber); + } + + if (!string.IsNullOrWhiteSpace(CompareBox.Text)) + { + try + { + compare = byte.Parse(CompareBox.Text, NumberStyles.HexNumber); + } + catch + { + compare = null; + } + } + + var watch = Watch.GenerateWatch( + Global.Emulator.MemoryDomains["System Bus"], + address, + Watch.WatchSize.Byte, + Watch.DisplayType.Hex, + name, + false); + + Global.CheatList.Add(new Cheat( + watch, + value, + compare)); } } - private void Keypad_Click(object sender, EventArgs e) + private void ClearButton_Click(object sender, EventArgs e) { - if (GGCodeMaskBox.Text.Length < 9) - { - string code = ""; - if (sender == B0) code = "0"; - if (sender == B1) code = "1"; - if (sender == B2) code = "2"; - if (sender == B3) code = "3"; - if (sender == B4) code = "4"; - if (sender == B5) code = "5"; - if (sender == B6) code = "6"; - if (sender == B7) code = "7"; - if (sender == B8) code = "8"; - if (sender == B9) code = "9"; - if (sender == BA) code = "A"; - if (sender == BB) code = "B"; - if (sender == BC) code = "C"; - if (sender == BD) code = "D"; - if (sender == BE) code = "E"; - if (sender == BF) code = "F"; - - GGCodeMaskBox.Text += code; - //int x = GGCodeMaskBox.SelectionStart; - //GGCodeMaskBox.Text = GGCodeMaskBox.Text.Insert(x, code); - //GGCodeMaskBox.SelectionStart = x + 1; - } - } - - private void AddressBox_TextChanged(object sender, EventArgs e) - { - //remove invalid character when pasted - if (_processing == false) - { - _processing = true; - if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]")) - { - string temp = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", string.Empty); - AddressBox.Text = temp; - } - if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) - { - int val = 0; - int add = 0; - int cmp = -1; - if (ValueBox.Text.Length > 0) - val = int.Parse(ValueBox.Text, NumberStyles.HexNumber); - if (AddressBox.Text.Length > 0) - add = int.Parse(AddressBox.Text, NumberStyles.HexNumber); - if (CompareBox.Text.Length == 2) - cmp = int.Parse(CompareBox.Text, NumberStyles.HexNumber); - - GGCodeMaskBox.Text = GBGGEncode(val, add, cmp); - addcheatbt.Enabled = true; - } - else - { - GGCodeMaskBox.Text = ""; - addcheatbt.Enabled = false; - } - _processing = false; - } - - } - - - private void ValueBox_TextChanged(object sender, EventArgs e) - { - if (_processing == false) - { - _processing = true; - //remove invalid character when pasted - if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]")) - { - string temp = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", string.Empty); - ValueBox.Text = temp; - } - if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) - { - int val = 0; - int add = 0; - int cmp = -1; - if (ValueBox.Text.Length > 0) - val = int.Parse(ValueBox.Text, NumberStyles.HexNumber); - if (AddressBox.Text.Length > 0) - add = int.Parse(AddressBox.Text, NumberStyles.HexNumber); - if (CompareBox.Text.Length == 2) - cmp = int.Parse(CompareBox.Text, NumberStyles.HexNumber); - GGCodeMaskBox.Text = GBGGEncode(val, add, cmp); - addcheatbt.Enabled = true; - - } - else - { - GGCodeMaskBox.Text = ""; - addcheatbt.Enabled = false; - } - _processing = false; - } - + AddressBox.Text = string.Empty; + ValueBox.Text = string.Empty; + CompareBox.Text = string.Empty; + GGCodeMaskBox.Text = string.Empty; + addcheatbt.Enabled = false; } private void CompareBox_TextChanged(object sender, EventArgs e) @@ -324,12 +308,13 @@ namespace BizHawk.Client.EmuHawk if (_processing == false) { _processing = true; - //remove invalid character when pasted + + // remove invalid character when pasted if (Regex.IsMatch(CompareBox.Text, @"[^a-fA-F0-9]")) { - string temp = Regex.Replace(CompareBox.Text, @"[^a-fA-F0-9]", string.Empty); - CompareBox.Text = temp; + CompareBox.Text = Regex.Replace(CompareBox.Text, @"[^a-fA-F0-9]", string.Empty); } + if ((CompareBox.Text.Length == 2) || (CompareBox.Text.Length == 0)) { if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) @@ -338,129 +323,217 @@ namespace BizHawk.Client.EmuHawk int add = 0; int cmp = -1; if (ValueBox.Text.Length > 0) + { val = int.Parse(ValueBox.Text, NumberStyles.HexNumber); + } + if (AddressBox.Text.Length > 0) + { add = int.Parse(AddressBox.Text, NumberStyles.HexNumber); + } + if (CompareBox.Text.Length == 2) + { cmp = int.Parse(CompareBox.Text, NumberStyles.HexNumber); + } + GGCodeMaskBox.Text = GBGGEncode(val, add, cmp); addcheatbt.Enabled = true; - } else { - GGCodeMaskBox.Text = ""; + GGCodeMaskBox.Text = string.Empty; addcheatbt.Enabled = false; } } + _processing = false; } } - private void ClearButton_Click(object sender, EventArgs e) + private void ValueBox_TextChanged(object sender, EventArgs e) { - AddressBox.Text = ""; - ValueBox.Text = ""; - CompareBox.Text = ""; - GGCodeMaskBox.Text = ""; - addcheatbt.Enabled = false; - } - - private void AddCheatClick(object sender, EventArgs e) - { - if ((Global.Emulator.SystemId == "GB") || (Global.Game.System == "GG")) + if (_processing == false) { - string NAME; - int ADDRESS = 0; - int VALUE = 0; - int? COMPARE = null; - int sysBusIndex = 0; + _processing = true; - if (!String.IsNullOrWhiteSpace(cheatname.Text)) + // remove invalid character when pasted + if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]")) { - NAME = cheatname.Text; + ValueBox.Text = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", string.Empty); + } + + if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) + { + var val = 0; + var add = 0; + var cmp = -1; + if (ValueBox.Text.Length > 0) + { + val = int.Parse(ValueBox.Text, NumberStyles.HexNumber); + } + + if (AddressBox.Text.Length > 0) + { + add = int.Parse(AddressBox.Text, NumberStyles.HexNumber); + } + + if (CompareBox.Text.Length == 2) + { + cmp = int.Parse(CompareBox.Text, NumberStyles.HexNumber); + } + + GGCodeMaskBox.Text = GBGGEncode(val, add, cmp); + addcheatbt.Enabled = true; } else { - _processing = true; - GGCodeMaskBox.TextMaskFormat = MaskFormat.IncludeLiterals; - NAME = GGCodeMaskBox.Text; - GGCodeMaskBox.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals; - _processing = false; + GGCodeMaskBox.Text = string.Empty; + addcheatbt.Enabled = false; } - if (!String.IsNullOrWhiteSpace(AddressBox.Text)) - { - ADDRESS = int.Parse(AddressBox.Text, NumberStyles.HexNumber); - } - - if (!String.IsNullOrWhiteSpace(ValueBox.Text)) - { - VALUE = (byte)(int.Parse(ValueBox.Text, NumberStyles.HexNumber)); - } - - if (!String.IsNullOrWhiteSpace(CompareBox.Text)) - { - try - { - COMPARE = byte.Parse(CompareBox.Text, NumberStyles.HexNumber); - } - catch - { - COMPARE = null; - } - } - - for (int i = 0; i < Global.Emulator.MemoryDomains.Count; i++) - { - if (Global.Emulator.MemoryDomains[i].ToString() == "System Bus") - { - sysBusIndex = i; - break; - } - } - - Watch watch = Watch.GenerateWatch( - Global.Emulator.MemoryDomains[sysBusIndex], - ADDRESS, - Watch.WatchSize.Byte, - Watch.DisplayType.Hex, - NAME, - false); - - Global.CheatList.Add(new Cheat( - watch, - VALUE, - COMPARE)); + _processing = false; } } - private void exitToolStripMenuItem_Click(object sender, EventArgs e) + private void AddressBox_TextChanged(object sender, EventArgs e) { - Close(); + // remove invalid character when pasted + if (_processing == false) + { + _processing = true; + if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]")) + { + AddressBox.Text = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", string.Empty); + } + + if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) + { + var val = 0; + var add = 0; + var cmp = -1; + + if (ValueBox.Text.Length > 0) + { + val = int.Parse(ValueBox.Text, NumberStyles.HexNumber); + } + + if (AddressBox.Text.Length > 0) + { + add = int.Parse(AddressBox.Text, NumberStyles.HexNumber); + } + + if (CompareBox.Text.Length == 2) + { + cmp = int.Parse(CompareBox.Text, NumberStyles.HexNumber); + } + + GGCodeMaskBox.Text = GBGGEncode(val, add, cmp); + addcheatbt.Enabled = true; + } + else + { + GGCodeMaskBox.Text = string.Empty; + addcheatbt.Enabled = false; + } + + _processing = false; + } } - private void saveWindowPositionToolStripMenuItem_Click(object sender, EventArgs e) + private void Keypad_Click(object sender, EventArgs e) { - Global.Config.GBGGSaveWindowPosition ^= true; + if (GGCodeMaskBox.Text.Length < 9) + { + var code = string.Empty; + + if (sender == B0) { code = "0"; } + else if (sender == B1) { code = "1"; } + else if (sender == B2) { code = "2"; } + else if (sender == B3) { code = "3"; } + else if (sender == B4) { code = "4"; } + else if (sender == B5) { code = "5"; } + else if (sender == B6) { code = "6"; } + else if (sender == B7) { code = "7"; } + else if (sender == B8) { code = "8"; } + else if (sender == B9) { code = "9"; } + else if (sender == BA) { code = "A"; } + else if (sender == BB) { code = "B"; } + else if (sender == BC) { code = "C"; } + else if (sender == BD) { code = "D"; } + else if (sender == BE) { code = "E"; } + else if (sender == BF) { code = "F"; } + + GGCodeMaskBox.Text += code; + } } - private void autoloadToolStripMenuItem_Click(object sender, EventArgs e) + private void GGCodeMaskBox_KeyPress(object sender, KeyPressEventArgs e) { - Global.Config.GBGGAutoload ^= true; + // Find a better way to remove all NON HEX char, while still allowing copy/paste + // Right now its all done through removing em GGCodeMaskBox_TextChanged } - private void optionsToolStripMenuItem_DropDownOpened(object sender, EventArgs e) + private void GGCodeMaskBox_TextChanged(object sender, EventArgs e) { - autoloadToolStripMenuItem.Checked = Global.Config.GBGGAutoload; - saveWindowPositionToolStripMenuItem.Checked = Global.Config.GBGGSaveWindowPosition; + + if (_processing == false) + { + _processing = true; + + // insert REGEX Remove non HEXA char + if (Regex.IsMatch(GGCodeMaskBox.Text, @"[^a-fA-F0-9]")) + { + GGCodeMaskBox.Text = Regex.Replace(GGCodeMaskBox.Text, @"[^a-fA-F0-9]", string.Empty); + } + + if (GGCodeMaskBox.Text.Length > 0) + { + var val = -1; + var add = -1; + var cmp = -1; + GBGGDecode(GGCodeMaskBox.Text, ref val, ref add, ref cmp); + if (add > -1) + { + AddressBox.Text = string.Format("{0:X4}", add); + } + + if (val > -1) + { + ValueBox.Text = string.Format("{0:X2}", val); + } + + if (cmp > -1) + { + CompareBox.Text = string.Format("{0:X2}", cmp); + } + else + { + CompareBox.Text = string.Empty; + } + + addcheatbt.Enabled = true; + } + else + { + AddressBox.Text = string.Empty; + ValueBox.Text = string.Empty; + CompareBox.Text = string.Empty; + addcheatbt.Enabled = false; + } + + _processing = false; + } } - private void GBGameGenie_Load_1(object sender, EventArgs e) - { - - } + protected override void OnShown(EventArgs e) + { + RefreshFloatingWindowControl(); + base.OnShown(e); + } + #endregion + #endregion } }