lua console - a bit of cleanup

This commit is contained in:
adelikat 2019-11-16 11:55:05 -06:00
parent 358ad68357
commit 6024af5dbc
1 changed files with 9 additions and 10 deletions

View File

@ -23,6 +23,9 @@ namespace BizHawk.Client.EmuHawk
private const string ScriptColumnName = "Script";
private const string PathColumnName = "PathName";
private readonly LuaAutocompleteInstaller _luaAutoInstaller = new LuaAutocompleteInstaller();
private readonly List<FileSystemWatcher> _watches = new List<FileSystemWatcher>();
[RequiredService]
private IEmulator Emulator { get; set; }
@ -227,8 +230,6 @@ namespace BizHawk.Client.EmuHawk
UpdateDialog();
}
private readonly List<FileSystemWatcher> _watches = new List<FileSystemWatcher>();
private void SetColumns()
{
foreach (var column in Settings.Columns)
@ -1139,16 +1140,14 @@ namespace BizHawk.Client.EmuHawk
}
}
private readonly LuaAutocompleteInstaller LuaAutoInstaller = new LuaAutocompleteInstaller();
private void RegisterToTextEditorsSubMenu_DropDownOpened(object sender, EventArgs e)
{
// Hide until this one is implemented
RegisterNotePadMenuItem.Visible = false;
if (LuaAutoInstaller.IsInstalled(LuaAutocompleteInstaller.TextEditors.Sublime2))
if (_luaAutoInstaller.IsInstalled(LuaAutocompleteInstaller.TextEditors.Sublime2))
{
if (LuaAutoInstaller.IsBizLuaRegistered(LuaAutocompleteInstaller.TextEditors.Sublime2))
if (_luaAutoInstaller.IsBizLuaRegistered(LuaAutocompleteInstaller.TextEditors.Sublime2))
{
RegisterSublimeText2MenuItem.Text = "Sublime Text 2 (installed)";
RegisterSublimeText2MenuItem.Font = new Font(RegisterSublimeText2MenuItem.Font, FontStyle.Regular);
@ -1168,9 +1167,9 @@ namespace BizHawk.Client.EmuHawk
RegisterSublimeText2MenuItem.Image = null;
}
if (LuaAutoInstaller.IsInstalled(LuaAutocompleteInstaller.TextEditors.NotePad))
if (_luaAutoInstaller.IsInstalled(LuaAutocompleteInstaller.TextEditors.NotePad))
{
if (LuaAutoInstaller.IsBizLuaRegistered(LuaAutocompleteInstaller.TextEditors.NotePad))
if (_luaAutoInstaller.IsBizLuaRegistered(LuaAutocompleteInstaller.TextEditors.NotePad))
{
RegisterNotePadMenuItem.Text = "Notepad++ (installed)";
RegisterNotePadMenuItem.Font = new Font(RegisterNotePadMenuItem.Font, FontStyle.Regular);
@ -1193,12 +1192,12 @@ namespace BizHawk.Client.EmuHawk
private void RegisterSublimeText2MenuItem_Click(object sender, EventArgs e)
{
LuaAutoInstaller.InstallBizLua(LuaAutocompleteInstaller.TextEditors.Sublime2);
_luaAutoInstaller.InstallBizLua(LuaAutocompleteInstaller.TextEditors.Sublime2);
}
private void RegisterNotePadMenuItem_Click(object sender, EventArgs e)
{
LuaAutoInstaller.InstallBizLua(LuaAutocompleteInstaller.TextEditors.NotePad);
_luaAutoInstaller.InstallBizLua(LuaAutocompleteInstaller.TextEditors.NotePad);
}
#endregion