Lua console - simplify some
This commit is contained in:
parent
d15dc56e15
commit
825f10d52c
|
@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
LuaImp.GuiLibrary.DrawFinish();
|
||||
CloseLua();
|
||||
LuaImp?.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -432,11 +432,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
return path;
|
||||
}
|
||||
|
||||
private void CloseLua()
|
||||
{
|
||||
LuaImp?.Close();
|
||||
}
|
||||
|
||||
private static FileInfo GetFileFromUser(string filter)
|
||||
{
|
||||
var ofd = new OpenFileDialog
|
||||
|
@ -520,34 +515,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
});
|
||||
}
|
||||
|
||||
public void SelectAll()
|
||||
{
|
||||
if (!OutputBox.IsHandleCreated || OutputBox.IsDisposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
OutputBox.Invoke(() =>
|
||||
{
|
||||
OutputBox.SelectAll();
|
||||
OutputBox.Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
public void Copy()
|
||||
{
|
||||
if (!OutputBox.IsHandleCreated || OutputBox.IsDisposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
OutputBox.Invoke(() =>
|
||||
{
|
||||
OutputBox.Copy();
|
||||
OutputBox.Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
public bool LoadLuaSession(string path)
|
||||
{
|
||||
var result = LuaImp.ScriptList.LoadLuaSession(path);
|
||||
|
@ -1226,12 +1193,30 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void SelectAllContextItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
SelectAll();
|
||||
if (!OutputBox.IsHandleCreated || OutputBox.IsDisposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
OutputBox.Invoke(() =>
|
||||
{
|
||||
OutputBox.SelectAll();
|
||||
OutputBox.Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
private void CopyContextItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
Copy();
|
||||
if (!OutputBox.IsHandleCreated || OutputBox.IsDisposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
OutputBox.Invoke(() =>
|
||||
{
|
||||
OutputBox.Copy();
|
||||
OutputBox.Refresh();
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue