2014-07-09 15:04:16 +00:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using BizHawk.Client.Common;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
|
|
|
{
|
|
|
|
|
public partial class TAStudio : IToolForm
|
|
|
|
|
{
|
|
|
|
|
public bool UpdateBefore { get { return false; } }
|
|
|
|
|
|
|
|
|
|
public void UpdateValues()
|
|
|
|
|
{
|
|
|
|
|
if (!IsHandleCreated || IsDisposed)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-16 23:04:56 +00:00
|
|
|
|
RefreshDialog();
|
2014-07-09 15:04:16 +00:00
|
|
|
|
if (_tas.IsRecording)
|
|
|
|
|
{
|
|
|
|
|
TasView.ensureVisible(_tas.InputLogLength - 1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-07-10 20:15:46 +00:00
|
|
|
|
TasView.ensureVisible(Global.Emulator.Frame);
|
2014-07-09 15:04:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-25 01:55:21 +00:00
|
|
|
|
public void FastUpdate()
|
|
|
|
|
{
|
|
|
|
|
// TODO: think more about this
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-09 15:04:16 +00:00
|
|
|
|
public void Restart()
|
|
|
|
|
{
|
|
|
|
|
if (!IsHandleCreated || IsDisposed)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
2014-07-10 20:06:23 +00:00
|
|
|
|
|
|
|
|
|
if (_tas != null)
|
|
|
|
|
{
|
|
|
|
|
RefreshDialog();
|
|
|
|
|
}
|
2014-07-09 15:04:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool AskSave()
|
|
|
|
|
{
|
2014-07-09 21:56:27 +00:00
|
|
|
|
if (_tas != null && _tas.Changes)
|
2014-07-09 15:04:16 +00:00
|
|
|
|
{
|
|
|
|
|
GlobalWin.Sound.StopSound();
|
2014-07-27 15:11:59 +00:00
|
|
|
|
var result = MessageBox.Show(
|
|
|
|
|
"Save Changes?",
|
|
|
|
|
"Tastudio",
|
|
|
|
|
MessageBoxButtons.YesNoCancel,
|
|
|
|
|
MessageBoxIcon.Question,
|
|
|
|
|
MessageBoxDefaultButton.Button3);
|
|
|
|
|
|
2014-07-09 15:04:16 +00:00
|
|
|
|
GlobalWin.Sound.StartSound();
|
|
|
|
|
if (result == DialogResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
SaveTasMenuItem_Click(null, null);
|
|
|
|
|
}
|
|
|
|
|
else if (result == DialogResult.No)
|
|
|
|
|
{
|
2014-07-27 15:11:59 +00:00
|
|
|
|
_tas.ClearChanges();
|
2014-07-09 15:04:16 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (result == DialogResult.Cancel)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|