2013-12-05 20:06:06 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
2014-07-17 19:00:28 +00:00
|
|
|
|
using BizHawk.Client.Common;
|
|
|
|
|
|
2013-12-05 20:06:06 +00:00
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
|
|
|
{
|
|
|
|
|
public partial class PlaybackBox : UserControl
|
|
|
|
|
{
|
2015-03-16 20:42:14 +00:00
|
|
|
|
private bool _loading = true;
|
2014-07-27 19:07:13 +00:00
|
|
|
|
|
2014-07-17 19:00:28 +00:00
|
|
|
|
public TAStudio Tastudio { get; set; }
|
|
|
|
|
|
2014-08-29 23:48:10 +00:00
|
|
|
|
[Browsable(false)]
|
2014-07-28 16:43:47 +00:00
|
|
|
|
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
|
2014-07-27 17:49:25 +00:00
|
|
|
|
public bool TurboSeek
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return Global.Config.TurboSeek;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
TurboSeekCheckbox.Checked = Global.Config.TurboSeek = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-29 23:48:10 +00:00
|
|
|
|
[Browsable(false)]
|
2014-07-28 17:40:17 +00:00
|
|
|
|
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
|
|
|
|
|
public bool AutoRestore
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2015-01-01 18:24:35 +00:00
|
|
|
|
return Tastudio.Settings.AutoRestoreLastPosition;
|
2014-07-28 17:40:17 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
2015-01-01 18:24:35 +00:00
|
|
|
|
AutoRestoreCheckbox.Checked = Tastudio.Settings.AutoRestoreLastPosition = value;
|
2014-07-28 17:40:17 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-11 19:43:05 +00:00
|
|
|
|
[Browsable(false)]
|
|
|
|
|
[DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden)]
|
|
|
|
|
public bool FollowCursor
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2015-01-03 02:54:38 +00:00
|
|
|
|
return Tastudio.Settings.FollowCursor;
|
2014-10-11 19:43:05 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
set
|
|
|
|
|
{
|
2015-03-14 16:38:07 +00:00
|
|
|
|
FollowCursorCheckbox.Checked = value;
|
2014-10-11 19:43:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-02 21:25:10 +00:00
|
|
|
|
public PlaybackBox()
|
2013-12-05 20:06:06 +00:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
2015-01-02 17:28:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnLoad(EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
base.OnLoad(e);
|
|
|
|
|
|
2015-01-02 21:25:10 +00:00
|
|
|
|
if (Global.Config != null) // For the designer
|
|
|
|
|
{
|
|
|
|
|
TurboSeekCheckbox.Checked = Global.Config.TurboSeek;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Tastudio != null) // For the designer
|
|
|
|
|
{
|
2015-01-03 02:54:38 +00:00
|
|
|
|
AutoRestoreCheckbox.Checked = Tastudio.Settings.AutoRestoreLastPosition;
|
|
|
|
|
FollowCursorCheckbox.Checked = Tastudio.Settings.FollowCursor;
|
2015-01-02 21:25:10 +00:00
|
|
|
|
}
|
2015-01-02 17:28:51 +00:00
|
|
|
|
|
2015-03-16 20:42:14 +00:00
|
|
|
|
_loading = false;
|
2013-12-05 20:06:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-07-17 19:00:28 +00:00
|
|
|
|
private void PreviousMarkerButton_Click(object sender, EventArgs e)
|
2013-12-05 20:06:06 +00:00
|
|
|
|
{
|
2014-07-17 19:00:28 +00:00
|
|
|
|
Tastudio.GoToPreviousMarker();
|
|
|
|
|
}
|
2013-12-05 20:06:06 +00:00
|
|
|
|
|
2014-07-17 19:00:28 +00:00
|
|
|
|
private void RewindButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Tastudio.GoToPreviousFrame();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void PauseButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Tastudio.TogglePause();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void FrameAdvanceButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Tastudio.GoToNextFrame();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void NextMarkerButton_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
Tastudio.GoToNextMarker();
|
2013-12-05 20:06:06 +00:00
|
|
|
|
}
|
2014-07-27 17:49:25 +00:00
|
|
|
|
|
|
|
|
|
private void TurboSeekCheckbox_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2015-03-16 20:42:14 +00:00
|
|
|
|
if (!_loading)
|
2014-07-27 19:07:13 +00:00
|
|
|
|
{
|
|
|
|
|
Global.Config.TurboSeek ^= true;
|
|
|
|
|
}
|
2014-07-27 17:49:25 +00:00
|
|
|
|
}
|
2014-07-28 17:40:17 +00:00
|
|
|
|
|
|
|
|
|
private void AutoRestoreCheckbox_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2015-03-16 20:42:14 +00:00
|
|
|
|
if (!_loading)
|
2014-07-28 17:40:17 +00:00
|
|
|
|
{
|
2015-01-01 18:24:35 +00:00
|
|
|
|
Tastudio.Settings.AutoRestoreLastPosition ^= true;
|
2014-07-28 17:40:17 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2014-10-11 19:43:05 +00:00
|
|
|
|
|
|
|
|
|
private void FollowCursorCheckbox_CheckedChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
2015-03-16 20:42:14 +00:00
|
|
|
|
if (!_loading)
|
2014-10-11 19:43:05 +00:00
|
|
|
|
{
|
2015-03-16 20:42:14 +00:00
|
|
|
|
Tastudio.Settings.FollowCursor ^= true;
|
|
|
|
|
|
2015-01-01 18:24:35 +00:00
|
|
|
|
if (Tastudio.Settings.FollowCursor)
|
2014-10-11 19:43:05 +00:00
|
|
|
|
{
|
|
|
|
|
Tastudio.SetVisibleIndex();
|
|
|
|
|
Tastudio.RefreshDialog();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-12-05 20:06:06 +00:00
|
|
|
|
}
|
|
|
|
|
}
|