From 26f006b1c93c29fb2fcbfd188f5828aa3b03aa86 Mon Sep 17 00:00:00 2001 From: "andres.delikat" Date: Wed, 16 Mar 2011 03:56:22 +0000 Subject: [PATCH] Start Cheats tool --- .../BizHawk.MultiClient.csproj | 11 + BizHawk.MultiClient/MainForm.Designer.cs | 38 +- BizHawk.MultiClient/MainForm.cs | 17 + BizHawk.MultiClient/tools/Cheat.cs | 44 ++ BizHawk.MultiClient/tools/Cheats.Designer.cs | 384 ++++++++++++++++++ BizHawk.MultiClient/tools/Cheats.cs | 35 ++ BizHawk.MultiClient/tools/Cheats.resx | 199 +++++++++ 7 files changed, 718 insertions(+), 10 deletions(-) create mode 100644 BizHawk.MultiClient/tools/Cheat.cs create mode 100644 BizHawk.MultiClient/tools/Cheats.Designer.cs create mode 100644 BizHawk.MultiClient/tools/Cheats.cs create mode 100644 BizHawk.MultiClient/tools/Cheats.resx diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index 6a22772039..e29b4e296b 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -213,6 +213,13 @@ HotkeyWindow.cs + + + Form + + + Cheats.cs + Form @@ -324,6 +331,10 @@ HotkeyWindow.cs Designer + + Cheats.cs + Designer + HexEditor.cs Designer diff --git a/BizHawk.MultiClient/MainForm.Designer.cs b/BizHawk.MultiClient/MainForm.Designer.cs index 46639da53d..7134fd53bb 100644 --- a/BizHawk.MultiClient/MainForm.Designer.cs +++ b/BizHawk.MultiClient/MainForm.Designer.cs @@ -161,6 +161,8 @@ this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator11 = new System.Windows.Forms.ToolStripSeparator(); + this.cheatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // @@ -883,26 +885,26 @@ // controllersToolStripMenuItem // this.controllersToolStripMenuItem.Name = "controllersToolStripMenuItem"; - this.controllersToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.controllersToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.controllersToolStripMenuItem.Text = "&Controllers"; this.controllersToolStripMenuItem.Click += new System.EventHandler(this.controllersToolStripMenuItem_Click); // // hotkeysToolStripMenuItem // this.hotkeysToolStripMenuItem.Name = "hotkeysToolStripMenuItem"; - this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.hotkeysToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.hotkeysToolStripMenuItem.Text = "&Hotkeys"; this.hotkeysToolStripMenuItem.Click += new System.EventHandler(this.hotkeysToolStripMenuItem_Click); // // toolStripSeparator9 // this.toolStripSeparator9.Name = "toolStripSeparator9"; - this.toolStripSeparator9.Size = new System.Drawing.Size(140, 6); + this.toolStripSeparator9.Size = new System.Drawing.Size(149, 6); // // soundToolStripMenuItem // this.soundToolStripMenuItem.Name = "soundToolStripMenuItem"; - this.soundToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.soundToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.soundToolStripMenuItem.Text = "&Sound"; this.soundToolStripMenuItem.Click += new System.EventHandler(this.soundToolStripMenuItem_Click); // @@ -914,7 +916,7 @@ this.startPausedToolStripMenuItem, this.enableRewindToolStripMenuItem}); this.gUIToolStripMenuItem.Name = "gUIToolStripMenuItem"; - this.gUIToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.gUIToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.gUIToolStripMenuItem.Text = "GUI"; this.gUIToolStripMenuItem.DropDownOpened += new System.EventHandler(this.gUIToolStripMenuItem_DropDownOpened); // @@ -970,7 +972,7 @@ this.miSpeed150, this.miSpeed200}); this.frameSkipToolStripMenuItem.Name = "frameSkipToolStripMenuItem"; - this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.frameSkipToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.frameSkipToolStripMenuItem.Text = "Speed/Skip"; this.frameSkipToolStripMenuItem.DropDownOpened += new System.EventHandler(this.frameSkipToolStripMenuItem_DropDownOpened); // @@ -1113,19 +1115,19 @@ // toolStripSeparator10 // this.toolStripSeparator10.Name = "toolStripSeparator10"; - this.toolStripSeparator10.Size = new System.Drawing.Size(140, 6); + this.toolStripSeparator10.Size = new System.Drawing.Size(149, 6); // // saveConfigToolStripMenuItem // this.saveConfigToolStripMenuItem.Name = "saveConfigToolStripMenuItem"; - this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.saveConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.saveConfigToolStripMenuItem.Text = "Save Config"; this.saveConfigToolStripMenuItem.Click += new System.EventHandler(this.saveConfigToolStripMenuItem_Click); // // loadConfigToolStripMenuItem // this.loadConfigToolStripMenuItem.Name = "loadConfigToolStripMenuItem"; - this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(143, 22); + this.loadConfigToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.loadConfigToolStripMenuItem.Text = "Load Config"; // // toolsToolStripMenuItem @@ -1135,7 +1137,9 @@ this.rAMSearchToolStripMenuItem, this.rAMPokeToolStripMenuItem, this.hexEditorToolStripMenuItem, - this.luaConsoleToolStripMenuItem}); + this.luaConsoleToolStripMenuItem, + this.toolStripSeparator11, + this.cheatsToolStripMenuItem}); this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; this.toolsToolStripMenuItem.Size = new System.Drawing.Size(44, 20); this.toolsToolStripMenuItem.Text = "&Tools"; @@ -1222,6 +1226,18 @@ this.aboutToolStripMenuItem.Text = "&About"; this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); // + // toolStripSeparator11 + // + this.toolStripSeparator11.Name = "toolStripSeparator11"; + this.toolStripSeparator11.Size = new System.Drawing.Size(149, 6); + // + // cheatsToolStripMenuItem + // + this.cheatsToolStripMenuItem.Name = "cheatsToolStripMenuItem"; + this.cheatsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.cheatsToolStripMenuItem.Text = "Cheats"; + this.cheatsToolStripMenuItem.Click += new System.EventHandler(this.cheatsToolStripMenuItem_Click); + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1377,6 +1393,8 @@ private System.Windows.Forms.ToolStripMenuItem pPUViewerToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem gameGenieCodesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem enableRewindToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator11; + private System.Windows.Forms.ToolStripMenuItem cheatsToolStripMenuItem; } } diff --git a/BizHawk.MultiClient/MainForm.cs b/BizHawk.MultiClient/MainForm.cs index 21fc9908da..54594a6fa1 100644 --- a/BizHawk.MultiClient/MainForm.cs +++ b/BizHawk.MultiClient/MainForm.cs @@ -44,6 +44,7 @@ namespace BizHawk.MultiClient public RamSearch RamSearch1 = new RamSearch(); public HexEditor HexEditor1 = new HexEditor(); public NESPPU NESPPU1 = new NESPPU(); + public Cheats Cheats1 = new Cheats(); public MainForm(string[] args) { @@ -1004,6 +1005,17 @@ namespace BizHawk.MultiClient NESPPU1.Focus(); } + public void LoadCheatsWindow() + { + if (!Cheats1.IsHandleCreated || Cheats1.IsDisposed) + { + Cheats1 = new Cheats(); + Cheats1.Show(); + } + else + NESPPU1.Focus(); + } + private int lastWidth = -1; private int lastHeight = -1; @@ -1229,5 +1241,10 @@ namespace BizHawk.MultiClient NESGameGenie g = new NESGameGenie(); g.Show(); } + + private void cheatsToolStripMenuItem_Click(object sender, EventArgs e) + { + LoadCheatsWindow(); + } } } \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/Cheat.cs b/BizHawk.MultiClient/tools/Cheat.cs new file mode 100644 index 0000000000..5f34bd67b4 --- /dev/null +++ b/BizHawk.MultiClient/tools/Cheat.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace BizHawk.MultiClient +{ + class Cheat + { + public string name { get; set; } + public int address { get; set; } + public int value { get; set; } + public int compare { get; set; } + public bool enabled { get; set; } + + public Cheat() + { + name = ""; + address = 0; + value = 0; + compare = 0; + enabled = false; + } + + public Cheat(Cheat c) + { + name = c.name; + address = c.address; + value = c.value; + compare = c.compare; + enabled = c.enabled; + } + + public Cheat(string cname, int addr, int val, int comp, bool e) + { + name = cname; + address = addr; + value = val; + compare = comp; + enabled = e; + } + + } +} diff --git a/BizHawk.MultiClient/tools/Cheats.Designer.cs b/BizHawk.MultiClient/tools/Cheats.Designer.cs new file mode 100644 index 0000000000..9458861e67 --- /dev/null +++ b/BizHawk.MultiClient/tools/Cheats.Designer.cs @@ -0,0 +1,384 @@ +namespace BizHawk.MultiClient +{ + partial class Cheats + { + /// + /// 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Cheats)); + this.CheatListView = new System.Windows.Forms.ListView(); + this.CheatName = new System.Windows.Forms.ColumnHeader(); + this.Address = new System.Windows.Forms.ColumnHeader(); + this.Value = new System.Windows.Forms.ColumnHeader(); + this.Compare = new System.Windows.Forms.ColumnHeader(); + this.CheatsMenu = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.appendFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.cheatsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addCheatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeCheatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.duplicateToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.insertSeparatorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.moveUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.moveDownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.newToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.openToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.saveToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.cutToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.copyToolStripButton = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButtonMoveUp = new System.Windows.Forms.ToolStripButton(); + this.toolStripButtonMoveDown = new System.Windows.Forms.ToolStripButton(); + this.toolStripButtonSeparator = new System.Windows.Forms.ToolStripButton(); + this.CheatsMenu.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // CheatListView + // + this.CheatListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.CheatName, + this.Address, + this.Value, + this.Compare}); + this.CheatListView.GridLines = true; + this.CheatListView.Location = new System.Drawing.Point(12, 56); + this.CheatListView.Name = "CheatListView"; + this.CheatListView.Size = new System.Drawing.Size(294, 293); + this.CheatListView.TabIndex = 0; + this.CheatListView.UseCompatibleStateImageBehavior = false; + this.CheatListView.View = System.Windows.Forms.View.Details; + // + // Name + // + this.CheatName.Text = "Name"; + this.CheatName.Width = 110; + // + // Address + // + this.Address.Text = "Address"; + // + // Value + // + this.Value.Text = "Value"; + // + // Compare + // + this.Compare.Text = "Compare"; + // + // CheatsMenu + // + this.CheatsMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.cheatsToolStripMenuItem}); + this.CheatsMenu.Location = new System.Drawing.Point(0, 0); + this.CheatsMenu.Name = "CheatsMenu"; + this.CheatsMenu.Size = new System.Drawing.Size(509, 24); + this.CheatsMenu.TabIndex = 1; + this.CheatsMenu.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.openToolStripMenuItem, + this.saveToolStripMenuItem, + this.saveAsToolStripMenuItem, + this.appendFileToolStripMenuItem, + this.toolStripSeparator1, + this.exitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); + this.fileToolStripMenuItem.Text = "&File"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N))); + this.newToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.newToolStripMenuItem.Text = "&New"; + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); + this.openToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.openToolStripMenuItem.Text = "&Open..."; + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); + this.saveToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.saveToolStripMenuItem.Text = "&Save"; + // + // saveAsToolStripMenuItem + // + this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem"; + this.saveAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.S))); + this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.saveAsToolStripMenuItem.Text = "Save &As..."; + // + // appendFileToolStripMenuItem + // + this.appendFileToolStripMenuItem.Name = "appendFileToolStripMenuItem"; + this.appendFileToolStripMenuItem.Size = new System.Drawing.Size(204, 22); + this.appendFileToolStripMenuItem.Text = "Append File"; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(201, 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(204, 22); + this.exitToolStripMenuItem.Text = "E&xit"; + // + // cheatsToolStripMenuItem + // + this.cheatsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addCheatToolStripMenuItem, + this.removeCheatToolStripMenuItem, + this.duplicateToolStripMenuItem, + this.insertSeparatorToolStripMenuItem, + this.toolStripSeparator3, + this.moveUpToolStripMenuItem, + this.moveDownToolStripMenuItem}); + this.cheatsToolStripMenuItem.Name = "cheatsToolStripMenuItem"; + this.cheatsToolStripMenuItem.Size = new System.Drawing.Size(53, 20); + this.cheatsToolStripMenuItem.Text = "&Cheats"; + // + // addCheatToolStripMenuItem + // + this.addCheatToolStripMenuItem.Name = "addCheatToolStripMenuItem"; + this.addCheatToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.addCheatToolStripMenuItem.Text = "&Add Cheat"; + // + // removeCheatToolStripMenuItem + // + this.removeCheatToolStripMenuItem.Name = "removeCheatToolStripMenuItem"; + this.removeCheatToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.removeCheatToolStripMenuItem.Text = "&Remove Cheat"; + // + // duplicateToolStripMenuItem + // + this.duplicateToolStripMenuItem.Name = "duplicateToolStripMenuItem"; + this.duplicateToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.duplicateToolStripMenuItem.Text = "&Duplicate"; + // + // insertSeparatorToolStripMenuItem + // + this.insertSeparatorToolStripMenuItem.Name = "insertSeparatorToolStripMenuItem"; + this.insertSeparatorToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.insertSeparatorToolStripMenuItem.Text = "Insert Separator"; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(162, 6); + // + // moveUpToolStripMenuItem + // + this.moveUpToolStripMenuItem.Name = "moveUpToolStripMenuItem"; + this.moveUpToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.moveUpToolStripMenuItem.Text = "Move &Up"; + // + // moveDownToolStripMenuItem + // + this.moveDownToolStripMenuItem.Name = "moveDownToolStripMenuItem"; + this.moveDownToolStripMenuItem.Size = new System.Drawing.Size(165, 22); + this.moveDownToolStripMenuItem.Text = "Move &Down"; + // + // toolStrip1 + // + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripButton, + this.openToolStripButton, + this.saveToolStripButton, + this.toolStripSeparator, + this.cutToolStripButton, + this.copyToolStripButton, + this.toolStripButtonSeparator, + this.toolStripSeparator2, + this.toolStripButtonMoveUp, + this.toolStripButtonMoveDown}); + this.toolStrip1.Location = new System.Drawing.Point(0, 24); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(509, 25); + this.toolStrip1.TabIndex = 2; + this.toolStrip1.Text = "toolStrip1"; + // + // newToolStripButton + // + this.newToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image"))); + this.newToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.newToolStripButton.Name = "newToolStripButton"; + this.newToolStripButton.Size = new System.Drawing.Size(23, 22); + this.newToolStripButton.Text = "&New"; + // + // openToolStripButton + // + this.openToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image"))); + this.openToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.openToolStripButton.Name = "openToolStripButton"; + this.openToolStripButton.Size = new System.Drawing.Size(23, 22); + this.openToolStripButton.Text = "&Open"; + // + // saveToolStripButton + // + this.saveToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image"))); + this.saveToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.saveToolStripButton.Name = "saveToolStripButton"; + this.saveToolStripButton.Size = new System.Drawing.Size(23, 22); + this.saveToolStripButton.Text = "&Save"; + // + // toolStripSeparator + // + this.toolStripSeparator.Name = "toolStripSeparator"; + this.toolStripSeparator.Size = new System.Drawing.Size(6, 25); + // + // cutToolStripButton + // + this.cutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image"))); + this.cutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.cutToolStripButton.Name = "cutToolStripButton"; + this.cutToolStripButton.Size = new System.Drawing.Size(23, 22); + this.cutToolStripButton.Text = "&Remove"; + // + // copyToolStripButton + // + this.copyToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image"))); + this.copyToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.copyToolStripButton.Name = "copyToolStripButton"; + this.copyToolStripButton.Size = new System.Drawing.Size(23, 22); + this.copyToolStripButton.Text = "&Duplicate"; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); + // + // toolStripButtonMoveUp + // + this.toolStripButtonMoveUp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButtonMoveUp.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_moveup; + this.toolStripButtonMoveUp.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonMoveUp.Name = "toolStripButtonMoveUp"; + this.toolStripButtonMoveUp.Size = new System.Drawing.Size(23, 22); + this.toolStripButtonMoveUp.Text = "toolStripButton1"; + // + // toolStripButtonMoveDown + // + this.toolStripButtonMoveDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButtonMoveDown.Image = global::BizHawk.MultiClient.Properties.Resources.BuilderDialog_movedown; + this.toolStripButtonMoveDown.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonMoveDown.Name = "toolStripButtonMoveDown"; + this.toolStripButtonMoveDown.Size = new System.Drawing.Size(23, 22); + this.toolStripButtonMoveDown.Text = "Move Down"; + // + // toolStripButtonSeparator + // + this.toolStripButtonSeparator.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButtonSeparator.Image = global::BizHawk.MultiClient.Properties.Resources.InserSeparator; + this.toolStripButtonSeparator.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButtonSeparator.Name = "toolStripButtonSeparator"; + this.toolStripButtonSeparator.Size = new System.Drawing.Size(23, 22); + this.toolStripButtonSeparator.Text = "Insert Separator"; + // + // Cheats + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(509, 370); + this.Controls.Add(this.toolStrip1); + this.Controls.Add(this.CheatListView); + this.Controls.Add(this.CheatsMenu); + this.MainMenuStrip = this.CheatsMenu; + this.Text = "Cheats"; + this.CheatsMenu.ResumeLayout(false); + this.CheatsMenu.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListView CheatListView; + private System.Windows.Forms.MenuStrip CheatsMenu; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem appendFileToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem cheatsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addCheatToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem removeCheatToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveUpToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem moveDownToolStripMenuItem; + private System.Windows.Forms.ColumnHeader CheatName; + private System.Windows.Forms.ColumnHeader Address; + private System.Windows.Forms.ColumnHeader Value; + private System.Windows.Forms.ColumnHeader Compare; + private System.Windows.Forms.ToolStripMenuItem duplicateToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton newToolStripButton; + private System.Windows.Forms.ToolStripButton openToolStripButton; + private System.Windows.Forms.ToolStripButton saveToolStripButton; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator; + private System.Windows.Forms.ToolStripButton cutToolStripButton; + private System.Windows.Forms.ToolStripButton copyToolStripButton; + private System.Windows.Forms.ToolStripMenuItem insertSeparatorToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripButton toolStripButtonMoveUp; + private System.Windows.Forms.ToolStripButton toolStripButtonSeparator; + private System.Windows.Forms.ToolStripButton toolStripButtonMoveDown; + } +} \ No newline at end of file diff --git a/BizHawk.MultiClient/tools/Cheats.cs b/BizHawk.MultiClient/tools/Cheats.cs new file mode 100644 index 0000000000..05bca2634c --- /dev/null +++ b/BizHawk.MultiClient/tools/Cheats.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace BizHawk.MultiClient +{ + public partial class Cheats : Form + { + int defaultWidth; //For saving the default size of the dialog, so the user can restore if desired + int defaultHeight; + + List cheatList = new List(); + string currentCheatFile = ""; + bool changes = false; + /* + public List GetCheatList() + { + List c = new List(); + for (int x = 0; x < cheatList.Count; x++) + c.Add(new Cheat(cheatList[x])); + + return c; + } + */ + public Cheats() + { + InitializeComponent(); + } + } +} diff --git a/BizHawk.MultiClient/tools/Cheats.resx b/BizHawk.MultiClient/tools/Cheats.resx new file mode 100644 index 0000000000..9602cb55b9 --- /dev/null +++ b/BizHawk.MultiClient/tools/Cheats.resx @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 129, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAQ9JREFUOE+t09lq + wkAUBmBfyr5DfY32jaReSOmFCyKCgkKLFrVUBZeKiEbshqRuaNw1xiXmLxMJBJ0Zc+GBw9zMfDPnHMZm + u1ZE35s4zXCqjmC8Al+sgHLjD9y7yGFWPIbecOO45yORtMAEHnxxJHL1IyKI9JeEXqtMwOl50Q8bSS0l + 8PzBBPbqAQQxICrgjeapgKZpkJUdBmNZB+y3d/QSnsIZKrDdqZjMFYj9OR9wB1NngHrQsJC36EkrfIkT + PuDyJ84AZbOHNF2j1Z2h9i3xAVKfOUjjZssN2oMFmq0xSkLfOmBu3E97iurnENlKxzpgbpzwO0Kh1kOy + KFoDjHmzVuYYjRmTDZfyWh9Yd/4B2Mz2w1z7EGUAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAlpJREFUOE+tk21I + k1EYhif0oyA0sqIQCix/+GcQFFH9CCmiUBTLLEjShJofVBgL2fxoU9Pp5ubUlS5rU9f8rCyjsA+pUCRC + TR1ppmVFUSlmhq78unrnQF1KGHTg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M2l4h + 1t2DI3WAP7oGoSYE3kwSPQofljcqm/kxjK4SCH0OXSMetItsUC26wZuOVptYhI0eEOuz1YI2gZnKBdpr + 6iR9V2jkKOkBQpeiCryhFFr4eioft16iU7qNho4h1Dc00QOqlRuwpSSa+UawuZXdByIZsPoUaOmWwrUf + owcOozlwZeto7ZXDuXvCfHV/+dGfqqrf44qgu28AAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAeJJREFUOE+lk9FP + klEYxv1TSsecde0f0FpZrTbbal7URVvZuuJCr7pq2WzLNWy0iSHNwtIB9qG0ltLSYRJpBomUgZPMGSyU + 8SmJIOiv7zssCdrAzXd77s77e5/nnPdUVR20HBPfUCWNB4QsI176HB8IL/9iX2y1ubTMwx6utz0nuLhc + GWIfCxT153Z26ep/g9Md4FJLZ2WIZdQnAM4QSJ/BH5Z5aH6NNCljm0hgdSV4MppAPxQXCq5kil31OTx7 + DjLbOeSNNJFYUgBKq31glfpmN76F9QLEZHOJc73ubXQjMreln7Q+DdP/du0/QIsxhmNK5mjTMJ/m43mI + Qcmr5t5MZVlNpFiKrPM1vIbpVVQAOqSckF+ZekUX5UjTS+ouDFLb+CwPUPNupbN7k7WmEDcMX3hgXSpy + IP/OsrCyhXtuA6M0g+bc4wJATqaZ/x7DF4zg8f9g/OMibb355701kERriHL5fojzd2aFjNI0mjPdBUD9 + 6auUqlU/KwBZJV4skWUuvMmYV8b+Ls6jQQ81DfryO3KtfUoA/p3810G37T3VJ3TlARdvukhldjANeemx + z2B8MS0mq80GyySHj98rD2jQOpXbtgrVNprRnO2h5lQX1Sc7leYODh27W3nN9/WZDnroDx0A5wwhdtmt + AAAAAElFTkSuQmCC + + + \ No newline at end of file