simplify some closing closing logic in some tools

This commit is contained in:
adelikat 2020-07-24 14:36:34 -05:00
parent 4f2bf8071e
commit 0ed95429cb
3 changed files with 3 additions and 18 deletions

View File

@ -58,7 +58,7 @@ namespace BizHawk.Client.EmuHawk
Closing += (o, e) =>
{
SaveConfigSettings();
Settings.Columns = CheatListView.AllColumns;
};
CheatListView.QueryItemText += CheatListView_QueryItemText;
@ -200,11 +200,6 @@ namespace BizHawk.Client.EmuHawk
}
}
private void SaveConfigSettings()
{
Settings.Columns = CheatListView.AllColumns;
}
private void LoadConfigSettings()
{
CheatListView.AllColumns.Clear();

View File

@ -21,12 +21,7 @@ namespace BizHawk.Client.EmuHawk
InitializeComponent();
Icon = Properties.Resources.TextDocIcon;
StartPosition = FormStartPosition.CenterParent;
Closing += (o, e) => CloseThis();
}
private void CloseThis()
{
_luaImp.WindowClosed(Handle);
Closing += (o, e) => { _luaImp.WindowClosed(Handle); };
}
public void DoLuaEvent(IntPtr handle)

View File

@ -84,7 +84,7 @@ namespace BizHawk.Client.EmuHawk
WatchListView.QueryItemText += ListView_QueryItemText;
WatchListView.QueryItemBkColor += ListView_QueryItemBkColor;
Closing += (o, e) => SaveConfigSettings();
Closing += (o, e) => { Settings.Columns = WatchListView.AllColumns; };
_sortedColumn = "";
_sortReverse = false;
@ -316,11 +316,6 @@ namespace BizHawk.Client.EmuHawk
HardSetDisplayTypeDropDown(_settings.Type);
}
private void SaveConfigSettings()
{
Settings.Columns = WatchListView.AllColumns;
}
public void NewSearch()
{
var compareTo = _searches.CompareTo;