Lua Console - output window - context menu with a clear option
This commit is contained in:
parent
63ceeff646
commit
1380cccd7a
File diff suppressed because it is too large
Load Diff
|
@ -90,12 +90,12 @@ namespace BizHawk.MultiClient
|
||||||
LoadConfigSettings();
|
LoadConfigSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StopScript(int x)
|
private void StopScript(int x)
|
||||||
{
|
{
|
||||||
luaList[x].Enabled = false;
|
luaList[x].Enabled = false;
|
||||||
LuaImp.Close();
|
LuaImp.Close();
|
||||||
LuaImp = new LuaImplementation(this);
|
LuaImp = new LuaImplementation(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StopAllScripts()
|
private void StopAllScripts()
|
||||||
{
|
{
|
||||||
|
@ -152,8 +152,8 @@ namespace BizHawk.MultiClient
|
||||||
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.LuaPath, "");
|
ofd.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.LuaPath, "");
|
||||||
ofd.Filter = filter;
|
ofd.Filter = filter;
|
||||||
ofd.RestoreDirectory = true;
|
ofd.RestoreDirectory = true;
|
||||||
|
|
||||||
|
|
||||||
if (!Directory.Exists(ofd.InitialDirectory))
|
if (!Directory.Exists(ofd.InitialDirectory))
|
||||||
Directory.CreateDirectory(ofd.InitialDirectory);
|
Directory.CreateDirectory(ofd.InitialDirectory);
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ namespace BizHawk.MultiClient
|
||||||
luaList.Add(l);
|
luaList.Add(l);
|
||||||
LuaListView.ItemCount = luaList.Count;
|
LuaListView.ItemCount = luaList.Count;
|
||||||
LuaListView.Refresh();
|
LuaListView.Refresh();
|
||||||
Global.Config.RecentLua.Add(path);
|
Global.Config.RecentLua.Add(path);
|
||||||
LuaImp.DoLuaFile(path);
|
LuaImp.DoLuaFile(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,14 +227,14 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
for (int x = 0; x < luaList.Count; x++)
|
for (int x = 0; x < luaList.Count; x++)
|
||||||
{
|
{
|
||||||
if (luaList[x].Enabled)
|
if (luaList[x].Enabled)
|
||||||
{
|
{
|
||||||
LuaImp.DoLuaFile(luaList[x].Path);
|
LuaImp.DoLuaFile(luaList[x].Path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StopScript(x);
|
StopScript(x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ namespace BizHawk.MultiClient
|
||||||
|
|
||||||
private void LuaListView_DoubleClick(object sender, EventArgs e)
|
private void LuaListView_DoubleClick(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
MessageBox.Show("");
|
MessageBox.Show("");
|
||||||
//Toggle();
|
//Toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,7 +519,7 @@ namespace BizHawk.MultiClient
|
||||||
private void EditScript()
|
private void EditScript()
|
||||||
{
|
{
|
||||||
ListView.SelectedIndexCollection indexes = LuaListView.SelectedIndices;
|
ListView.SelectedIndexCollection indexes = LuaListView.SelectedIndices;
|
||||||
if (indexes.Count == 0)
|
if (indexes.Count == 0)
|
||||||
return;
|
return;
|
||||||
System.Diagnostics.Process.Start(luaList[indexes[0]].Path);
|
System.Diagnostics.Process.Start(luaList[indexes[0]].Path);
|
||||||
}
|
}
|
||||||
|
@ -585,7 +585,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
if (!OutputBox.IsHandleCreated || OutputBox.IsDisposed)
|
if (!OutputBox.IsHandleCreated || OutputBox.IsDisposed)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OutputBox.Text = "";
|
OutputBox.Text = "";
|
||||||
OutputBox.Refresh();
|
OutputBox.Refresh();
|
||||||
}
|
}
|
||||||
|
@ -690,9 +690,14 @@ namespace BizHawk.MultiClient
|
||||||
OpenLuaFile();
|
OpenLuaFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LuaListView_ItemActivate(object sender, EventArgs e)
|
private void LuaListView_ItemActivate(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Toggle();
|
Toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void clearToolStripMenuItem2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
OutputBox.Text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,6 +123,9 @@
|
||||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>333, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>228, 17</value>
|
<value>228, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|
Loading…
Reference in New Issue