toolify TAStudio

This commit is contained in:
adelikat 2013-11-03 00:16:46 +00:00
parent 6d8f1b88ce
commit 35f2dcfd77
3 changed files with 11 additions and 21 deletions

View File

@ -52,7 +52,7 @@ namespace BizHawk.MultiClient
Global.MovieSession.Movie.StartPlayback();
}
SetMainformMovieInfo();
TAStudio1.Restart();
GlobalWinF.Tools.Restart<TAStudio>();
GlobalWinF.Tools.Restart<VirtualPadForm>();
GlobalWinF.DisplayManager.NeedsToPaint = true;
}

View File

@ -87,12 +87,10 @@ namespace BizHawk.MultiClient
//tool dialogs
private ToolBox _toolbox;
private TI83KeyPad _ti83pad;
private TAStudio _tastudio;
//TODO: this is a lazy way to refactor things, but works for now. The point is to not have these objects created until needed, without refactoring a lot of code
public ToolBox ToolBox1 { get { if (_toolbox == null) _toolbox = new ToolBox(); return _toolbox; } set { _toolbox = value; } }
public TI83KeyPad TI83KeyPad1 { get { if (_ti83pad == null) _ti83pad = new TI83KeyPad(); return _ti83pad; } set { _ti83pad = value; } }
public TAStudio TAStudio1 { get { if (_tastudio == null) _tastudio = new TAStudio(); return _tastudio; } set { _tastudio = value; } }
//TODO: clean me up
public void Cheats_Restart()
@ -1580,7 +1578,6 @@ namespace BizHawk.MultiClient
GlobalWinF.Tools.Restart();
if (_ti83pad != null) TI83KeyPad1.Restart();
if (_tastudio != null) TAStudio1.Restart();
Cheats_Restart();
if (_toolbox != null) ToolBox1.Restart();
@ -2326,10 +2323,6 @@ namespace BizHawk.MultiClient
#endif
GlobalWinF.Tools.UpdateAfter();
//The other tool updates are earlier, TAStudio needs to be later so it can display the latest
//frame of execution in its list view.
if (_tastudio != null) TAStudio1.UpdateValues();
HandleToggleLight();
#if WINDOWS
if (_luaconsole != null)
@ -2954,7 +2947,6 @@ namespace BizHawk.MultiClient
public void CloseTools()
{
CloseForm(TI83KeyPad1);
CloseForm(TAStudio1); Global.MovieSession.EditorMode = false;
#if WINDOWS
CloseForm(LuaConsole1);
#endif
@ -3030,16 +3022,8 @@ namespace BizHawk.MultiClient
public void LoadTAStudio()
{
if (!TAStudio1.IsHandleCreated || TAStudio1.IsDisposed)
{
TAStudio1 = new TAStudio();
Global.MovieSession.EditorMode = true;
TAStudio1.Show();
}
else
{
TAStudio1.Focus();
}
Global.MovieSession.EditorMode = true;
GlobalWinF.Tools.Load<TAStudio>();
}
private void VolumeUp()

View File

@ -8,7 +8,7 @@ using BizHawk.Client.Common;
namespace BizHawk.MultiClient
{
public partial class TAStudio : Form
public partial class TAStudio : Form, IToolForm
{
//TODO:
//Slicer Section:
@ -39,6 +39,13 @@ namespace BizHawk.MultiClient
//List<string> TimeLines - list of movie files
//List<string> Bookmarks - list of savestate files
public bool AskSave()
{
return true;
//TODO: eventually we want to do this
}
public bool UpdateBefore { get { return false; } }
public TAStudio()
{
InitializeComponent();
@ -48,7 +55,6 @@ namespace BizHawk.MultiClient
TASView.VirtualMode = true;
}
//TODO: move me
public class ClipboardEntry
{