BizHawk/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IToolForm.cs

80 lines
1.4 KiB
C#
Raw Normal View History

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()
{
if (!IsHandleCreated || IsDisposed)
{
return;
}
if (_currentTasMovie.IsRecording)
2014-07-09 15:04:16 +00:00
{
2014-08-23 16:00:56 +00:00
TasView.LastVisibleIndex = _currentTasMovie.InputLogLength - 1;
2014-07-09 15:04:16 +00:00
}
else
{
2014-08-23 16:00:56 +00:00
TasView.LastVisibleIndex = Global.Emulator.Frame;
2014-07-09 15:04:16 +00:00
}
RefreshDialog();
2014-07-09 15:04:16 +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;
}
if (_currentTasMovie != null)
{
RefreshDialog();
}
2014-07-09 15:04:16 +00:00
}
public bool AskSaveChanges()
2014-07-09 15:04:16 +00:00
{
if (_currentTasMovie != null && _currentTasMovie.Changes)
2014-07-09 15:04:16 +00:00
{
GlobalWin.Sound.StopSound();
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)
{
_currentTasMovie.ClearChanges();
2014-07-09 15:04:16 +00:00
return true;
}
else if (result == DialogResult.Cancel)
{
return false;
}
}
return true;
}
public bool UpdateBefore { get { return false; } }
2014-07-09 15:04:16 +00:00
}
}