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 void UpdateValues()
|
|
|
|
|
{
|
2014-08-30 18:42:14 +00:00
|
|
|
|
if (!IsHandleCreated || IsDisposed || _currentTasMovie == null)
|
2014-08-23 20:17:06 +00:00
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-19 19:24:17 +00:00
|
|
|
|
if (_currentTasMovie.IsRecording)
|
2014-07-09 15:04:16 +00:00
|
|
|
|
{
|
2014-08-30 18:42:14 +00:00
|
|
|
|
TasView.LastVisibleRow = _currentTasMovie.InputLogLength - 1;
|
2014-07-09 15:04:16 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2014-08-30 18:42:14 +00:00
|
|
|
|
TasView.LastVisibleRow = Global.Emulator.Frame;
|
2014-07-09 15:04:16 +00:00
|
|
|
|
}
|
2014-08-23 15:19:48 +00:00
|
|
|
|
|
|
|
|
|
RefreshDialog();
|
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
|
|
|
|
|
2014-08-19 19:24:17 +00:00
|
|
|
|
if (_currentTasMovie != null)
|
2014-07-10 20:06:23 +00:00
|
|
|
|
{
|
|
|
|
|
RefreshDialog();
|
|
|
|
|
}
|
2014-07-09 15:04:16 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-08-19 19:24:17 +00:00
|
|
|
|
|
|
|
|
|
public bool AskSaveChanges()
|
2014-07-09 15:04:16 +00:00
|
|
|
|
{
|
2014-08-19 19:24:17 +00:00
|
|
|
|
if (_currentTasMovie != null && _currentTasMovie.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-08-19 19:24:17 +00:00
|
|
|
|
_currentTasMovie.ClearChanges();
|
2014-07-09 15:04:16 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (result == DialogResult.Cancel)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2014-08-19 19:24:17 +00:00
|
|
|
|
|
|
|
|
|
public bool UpdateBefore { get { return false; } }
|
2014-07-09 15:04:16 +00:00
|
|
|
|
}
|
|
|
|
|
}
|