2011-04-07 00:46:10 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Windows.Forms;
|
2013-10-25 00:57:23 +00:00
|
|
|
|
|
|
|
|
|
using BizHawk.Client.Common;
|
2011-04-30 21:19:11 +00:00
|
|
|
|
using BizHawk.Emulation.Consoles.Nintendo;
|
|
|
|
|
using BizHawk.Emulation.Consoles.Calculator;
|
2012-09-29 16:25:28 +00:00
|
|
|
|
using BizHawk.Emulation.Consoles.Nintendo.SNES;
|
2013-04-24 20:41:23 +00:00
|
|
|
|
using BizHawk.Emulation.Consoles.Sega;
|
2011-04-07 00:46:10 +00:00
|
|
|
|
|
2011-04-07 01:30:42 +00:00
|
|
|
|
namespace BizHawk.MultiClient
|
2011-04-07 00:46:10 +00:00
|
|
|
|
{
|
2013-11-03 00:31:16 +00:00
|
|
|
|
public partial class ToolBox : Form, IToolForm
|
2011-09-10 21:48:27 +00:00
|
|
|
|
{
|
|
|
|
|
public ToolBox()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
2011-04-07 01:30:42 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void ToolBox_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
int x = GlobalWinF.MainForm.Location.X + GlobalWinF.MainForm.Size.Width;
|
|
|
|
|
int y = GlobalWinF.MainForm.Location.Y;
|
2011-09-10 21:48:27 +00:00
|
|
|
|
Location = new Point(x, y);
|
2012-01-10 02:11:17 +00:00
|
|
|
|
HideShowIcons();
|
|
|
|
|
}
|
|
|
|
|
|
2013-11-03 00:31:16 +00:00
|
|
|
|
public bool AskSave() { return true; }
|
|
|
|
|
public bool UpdateBefore { get { return false; } }
|
|
|
|
|
public void UpdateValues() { }
|
2012-01-10 02:11:17 +00:00
|
|
|
|
public void Restart()
|
|
|
|
|
{
|
|
|
|
|
HideShowIcons();
|
|
|
|
|
}
|
2012-01-10 02:02:11 +00:00
|
|
|
|
|
2012-01-10 02:11:17 +00:00
|
|
|
|
private void HideShowIcons()
|
|
|
|
|
{
|
2013-10-20 18:02:43 +00:00
|
|
|
|
if (Global.Emulator is NES)
|
2011-09-10 21:48:27 +00:00
|
|
|
|
{
|
|
|
|
|
NESPPU.Visible = true;
|
|
|
|
|
NESDebugger.Visible = true;
|
|
|
|
|
NESGameGenie.Visible = true;
|
|
|
|
|
NESNameTable.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
NESPPU.Visible = false;
|
|
|
|
|
NESDebugger.Visible = false;
|
|
|
|
|
NESGameGenie.Visible = false;
|
|
|
|
|
NESNameTable.Visible = false;
|
|
|
|
|
}
|
2012-01-10 02:11:17 +00:00
|
|
|
|
|
2013-10-20 18:02:43 +00:00
|
|
|
|
if (Global.Emulator is TI83)
|
2011-09-10 21:48:27 +00:00
|
|
|
|
{
|
|
|
|
|
KeypadTool.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
KeypadTool.Visible = false;
|
|
|
|
|
}
|
2012-09-29 16:25:28 +00:00
|
|
|
|
|
2013-10-20 18:02:43 +00:00
|
|
|
|
if (Global.Emulator is LibsnesCore)
|
2012-09-29 16:25:28 +00:00
|
|
|
|
{
|
|
|
|
|
SNESGraphicsDebuggerButton.Visible = true;
|
2013-04-23 09:09:49 +00:00
|
|
|
|
SNESGameGenie.Visible = true;
|
2012-09-29 16:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
SNESGraphicsDebuggerButton.Visible = false;
|
2013-04-23 09:09:49 +00:00
|
|
|
|
SNESGameGenie.Visible = false;
|
2012-09-29 16:25:28 +00:00
|
|
|
|
}
|
2013-04-24 20:41:23 +00:00
|
|
|
|
if (Global.Game.System == "GG")
|
|
|
|
|
{
|
|
|
|
|
GGGameGenie.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
GGGameGenie.Visible = false;
|
|
|
|
|
}
|
|
|
|
|
if (Global.Game.System == "GB")
|
|
|
|
|
{
|
|
|
|
|
GBGameGenie.Visible = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
GBGameGenie.Visible = false;
|
|
|
|
|
}
|
2012-11-18 05:31:31 +00:00
|
|
|
|
|
2013-04-14 23:56:45 +00:00
|
|
|
|
Size = new Size(Size.Width, toolStrip1.Size.Height + 50);
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-30 21:19:11 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void toolStripButton1_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-11-02 20:48:24 +00:00
|
|
|
|
GlobalWinF.Tools.Load<Cheats>();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-30 21:19:11 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void toolStripButton2_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
GlobalWinF.MainForm.LoadRamWatch(true);
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-07 01:30:42 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void toolStripButton3_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-11-02 20:13:53 +00:00
|
|
|
|
GlobalWinF.Tools.Load<RamSearch>();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-07 01:30:42 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void HexEditor_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-11-02 20:25:53 +00:00
|
|
|
|
GlobalWinF.Tools.Load<HexEditor>();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-07 01:30:42 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void toolStripButton5_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
GlobalWinF.MainForm.OpenLuaConsole();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-30 20:18:42 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void NESPPU_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-11-02 21:31:04 +00:00
|
|
|
|
GlobalWinF.Tools.Load<NESPPU>();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-30 20:18:42 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void NESDebugger_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-11-02 21:31:04 +00:00
|
|
|
|
GlobalWinF.Tools.Load<NESDebugger>();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-30 21:19:11 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void NESGameGenie_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
GlobalWinF.MainForm.LoadGameGenieEC();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-30 21:19:11 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void NESNameTable_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-11-02 21:31:04 +00:00
|
|
|
|
GlobalWinF.Tools.Load<NESNameTableViewer>();
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-30 21:19:11 +00:00
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
private void KeyPadTool_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-20 18:02:43 +00:00
|
|
|
|
if (Global.Emulator is TI83)
|
2012-09-29 16:25:28 +00:00
|
|
|
|
{
|
2013-11-03 00:31:16 +00:00
|
|
|
|
GlobalWinF.Tools.Load<TI83KeyPad>();
|
2012-09-29 16:25:28 +00:00
|
|
|
|
}
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2012-01-10 01:30:17 +00:00
|
|
|
|
|
|
|
|
|
private void TAStudioButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
GlobalWinF.MainForm.LoadTAStudio();
|
2012-01-10 01:30:17 +00:00
|
|
|
|
}
|
2012-09-29 16:25:28 +00:00
|
|
|
|
|
|
|
|
|
private void SNESGraphicsDebuggerButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-20 18:02:43 +00:00
|
|
|
|
if (Global.Emulator is LibsnesCore)
|
2012-09-29 16:25:28 +00:00
|
|
|
|
{
|
2013-11-02 22:13:37 +00:00
|
|
|
|
GlobalWinF.Tools.Load<SNESGraphicsDebugger>();
|
2012-09-29 16:25:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2012-11-18 05:31:31 +00:00
|
|
|
|
|
2013-11-02 21:31:04 +00:00
|
|
|
|
private void VirtualPadButton_Click(object sender, EventArgs e)
|
2012-11-18 05:31:31 +00:00
|
|
|
|
{
|
2013-11-02 21:31:04 +00:00
|
|
|
|
GlobalWinF.Tools.Load<VirtualPadForm>();
|
2012-11-18 05:31:31 +00:00
|
|
|
|
}
|
2013-04-23 09:09:49 +00:00
|
|
|
|
|
|
|
|
|
private void SNESGameGenie_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
GlobalWinF.MainForm.LoadGameGenieEC();
|
2013-04-23 09:09:49 +00:00
|
|
|
|
}
|
2013-04-24 20:41:23 +00:00
|
|
|
|
|
|
|
|
|
private void GGGameGenie_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
GlobalWinF.MainForm.LoadGameGenieEC();
|
2013-04-24 20:41:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void GBGameGenie_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2013-10-25 00:57:23 +00:00
|
|
|
|
GlobalWinF.MainForm.LoadGameGenieEC();
|
2013-04-24 20:41:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2011-09-10 21:48:27 +00:00
|
|
|
|
}
|
2011-04-07 00:46:10 +00:00
|
|
|
|
}
|