tastudio - some reorg
This commit is contained in:
parent
5843a8f396
commit
9cc1fb4404
|
@ -835,6 +835,14 @@
|
||||||
<Compile Include="tools\TAStudio\LuaBox.Designer.cs">
|
<Compile Include="tools\TAStudio\LuaBox.Designer.cs">
|
||||||
<DependentUpon>LuaBox.cs</DependentUpon>
|
<DependentUpon>LuaBox.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="tools\TAStudio\TAStudio.IControlMainForm.cs">
|
||||||
|
<DependentUpon>TAStudio.cs</DependentUpon>
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="tools\TAStudio\TAStudio.IToolForm.cs">
|
||||||
|
<DependentUpon>TAStudio.cs</DependentUpon>
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="tools\TAStudio\Marker.cs" />
|
<Compile Include="tools\TAStudio\Marker.cs" />
|
||||||
<Compile Include="tools\TAStudio\MarkerControl.cs">
|
<Compile Include="tools\TAStudio\MarkerControl.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
namespace BizHawk.Client.EmuHawk
|
||||||
|
{
|
||||||
|
public partial class TAStudio : IControlMainform
|
||||||
|
{
|
||||||
|
public void ToggleReadOnly()
|
||||||
|
{
|
||||||
|
GlobalWin.OSD.AddMessage("TAStudio does not allow manual readonly toggle");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
TasView.ItemCount = _tas.InputLogLength;
|
||||||
|
if (_tas.IsRecording)
|
||||||
|
{
|
||||||
|
TasView.ensureVisible(_tas.InputLogLength - 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TasView.ensureVisible(Global.Emulator.Frame - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Restart()
|
||||||
|
{
|
||||||
|
if (!IsHandleCreated || IsDisposed)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AskSave()
|
||||||
|
{
|
||||||
|
if (_tas.Changes)
|
||||||
|
{
|
||||||
|
GlobalWin.Sound.StopSound();
|
||||||
|
var result = MessageBox.Show("Save Changes?", "Tastudio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
|
||||||
|
GlobalWin.Sound.StartSound();
|
||||||
|
if (result == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
SaveTasMenuItem_Click(null, null);
|
||||||
|
}
|
||||||
|
else if (result == DialogResult.No)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (result == DialogResult.Cancel)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -70,74 +70,6 @@ namespace BizHawk.Client.EmuHawk
|
||||||
TasView.PointedCellChanged += TasView_PointedCellChanged;
|
TasView.PointedCellChanged += TasView_PointedCellChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IToolForm implementation
|
|
||||||
|
|
||||||
public bool AskSave()
|
|
||||||
{
|
|
||||||
if (_tas.Changes)
|
|
||||||
{
|
|
||||||
GlobalWin.Sound.StopSound();
|
|
||||||
var result = MessageBox.Show("Save Changes?", "Tastudio", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3);
|
|
||||||
GlobalWin.Sound.StartSound();
|
|
||||||
if (result == DialogResult.Yes)
|
|
||||||
{
|
|
||||||
SaveTasMenuItem_Click(null, null);
|
|
||||||
}
|
|
||||||
else if (result == DialogResult.No)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if (result == DialogResult.Cancel)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool UpdateBefore
|
|
||||||
{
|
|
||||||
get { return false; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public void UpdateValues()
|
|
||||||
{
|
|
||||||
if (!IsHandleCreated || IsDisposed)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
TasView.ItemCount = _tas.InputLogLength;
|
|
||||||
if (_tas.IsRecording)
|
|
||||||
{
|
|
||||||
TasView.ensureVisible(_tas.InputLogLength - 1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TasView.ensureVisible(Global.Emulator.Frame - 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Restart()
|
|
||||||
{
|
|
||||||
if (!IsHandleCreated || IsDisposed)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IControlMainform implementation
|
|
||||||
|
|
||||||
public void ToggleReadOnly()
|
|
||||||
{
|
|
||||||
GlobalWin.OSD.AddMessage("TAStudio does not allow manual readonly toggle");
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private void TasView_QueryItemBkColor(int index, int column, ref Color color)
|
private void TasView_QueryItemBkColor(int index, int column, ref Color color)
|
||||||
{
|
{
|
||||||
var record = _tas[index];
|
var record = _tas[index];
|
||||||
|
|
Loading…
Reference in New Issue