2011-05-06 23:08:50 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.MultiClient
|
|
|
|
|
{
|
2012-03-23 19:44:47 +00:00
|
|
|
|
class LuaFile
|
2012-01-10 03:12:01 +00:00
|
|
|
|
{
|
|
|
|
|
public string Name;
|
|
|
|
|
public string Path;
|
|
|
|
|
public bool Enabled;
|
2012-03-24 10:53:26 +00:00
|
|
|
|
public bool Paused;
|
2012-01-10 03:12:01 +00:00
|
|
|
|
public bool IsSeparator;
|
2012-03-23 19:44:47 +00:00
|
|
|
|
public LuaInterface.Lua Thread;
|
2012-03-23 23:03:39 +00:00
|
|
|
|
public bool FrameWaiting;
|
2011-05-06 23:08:50 +00:00
|
|
|
|
|
2012-03-23 19:44:47 +00:00
|
|
|
|
public LuaFile(string path)
|
2012-01-10 03:12:01 +00:00
|
|
|
|
{
|
|
|
|
|
Name = "";
|
|
|
|
|
Path = path;
|
|
|
|
|
Enabled = true;
|
2012-03-24 10:53:26 +00:00
|
|
|
|
Paused = false;
|
2012-03-23 23:03:39 +00:00
|
|
|
|
FrameWaiting = false;
|
2012-01-10 03:12:01 +00:00
|
|
|
|
}
|
2011-05-06 23:08:50 +00:00
|
|
|
|
|
2012-03-23 19:44:47 +00:00
|
|
|
|
public void Stop()
|
|
|
|
|
{
|
|
|
|
|
Enabled = false;
|
|
|
|
|
Thread = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public LuaFile(string name, string path)
|
2012-01-10 03:12:01 +00:00
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
Path = path;
|
|
|
|
|
IsSeparator = false;
|
|
|
|
|
}
|
2011-05-07 00:07:27 +00:00
|
|
|
|
|
2012-03-23 19:44:47 +00:00
|
|
|
|
public LuaFile(bool isSeparator)
|
2012-01-10 03:12:01 +00:00
|
|
|
|
{
|
|
|
|
|
IsSeparator = isSeparator;
|
|
|
|
|
Name = "";
|
|
|
|
|
Path = "";
|
|
|
|
|
Enabled = false;
|
|
|
|
|
}
|
2011-05-06 23:08:50 +00:00
|
|
|
|
|
2012-03-23 19:44:47 +00:00
|
|
|
|
public LuaFile(LuaFile l)
|
2012-01-10 03:12:01 +00:00
|
|
|
|
{
|
|
|
|
|
Name = l.Name;
|
|
|
|
|
Path = l.Path;
|
|
|
|
|
Enabled = l.Enabled;
|
2012-03-24 10:53:26 +00:00
|
|
|
|
Paused = l.Paused;
|
2012-01-10 03:12:01 +00:00
|
|
|
|
IsSeparator = l.IsSeparator;
|
|
|
|
|
}
|
2011-05-06 23:08:50 +00:00
|
|
|
|
|
2012-01-10 03:12:01 +00:00
|
|
|
|
public void Toggle()
|
|
|
|
|
{
|
|
|
|
|
Enabled ^= true;
|
2012-03-24 10:53:26 +00:00
|
|
|
|
if (Enabled)
|
|
|
|
|
Paused = false;
|
2012-01-10 03:12:01 +00:00
|
|
|
|
}
|
2012-03-24 10:53:26 +00:00
|
|
|
|
|
|
|
|
|
public void TogglePause()
|
|
|
|
|
{
|
|
|
|
|
Paused ^= true;
|
|
|
|
|
}
|
2012-01-10 03:12:01 +00:00
|
|
|
|
}
|
2011-05-06 23:08:50 +00:00
|
|
|
|
}
|