Lua console - small nitpicky code cleanup, nothing useful here

This commit is contained in:
adelikat 2013-11-17 17:17:18 +00:00
parent f147cdf75c
commit fc19fe40a9
1 changed files with 11 additions and 5 deletions

View File

@ -383,7 +383,7 @@ namespace BizHawk.Client.EmuHawk
StopAllScripts(); StopAllScripts();
_luaList.Clear(); _luaList.Clear();
DisplayLuaList(); DisplayLuaList();
_currentSessionFile = ""; _currentSessionFile = String.Empty;
Changes(false); Changes(false);
} }
} }
@ -896,7 +896,7 @@ namespace BizHawk.Client.EmuHawk
public void ClearOutput() public void ClearOutput()
{ {
OutputBox.Text = ""; OutputBox.Text = String.Empty;
} }
private FileInfo GetSaveFileFromUser() private FileInfo GetSaveFileFromUser()
@ -911,7 +911,6 @@ namespace BizHawk.Client.EmuHawk
{ {
sfd.FileName = PathManager.FilesystemSafeName(Global.Game); sfd.FileName = PathManager.FilesystemSafeName(Global.Game);
sfd.InitialDirectory = PathManager.GetLuaPath(); sfd.InitialDirectory = PathManager.GetLuaPath();
} }
else else
{ {
@ -1010,7 +1009,7 @@ namespace BizHawk.Client.EmuHawk
public bool AskSave() public bool AskSave()
{ {
if (Global.Config.SupressAskSave) //User has elected to not be nagged if (Global.Config.SupressAskSave)
{ {
return true; return true;
} }
@ -1022,19 +1021,26 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Sound.StartSound(); GlobalWin.Sound.StartSound();
if (result == DialogResult.Yes) if (result == DialogResult.Yes)
{ {
if (string.Compare(_currentSessionFile, "") == 0) if (String.IsNullOrWhiteSpace(_currentSessionFile))
{ {
SaveAs(); SaveAs();
} }
else else
{
SaveSession(_currentSessionFile); SaveSession(_currentSessionFile);
}
return true; return true;
} }
else if (result == DialogResult.No) else if (result == DialogResult.No)
{
return true; return true;
}
else if (result == DialogResult.Cancel) else if (result == DialogResult.Cancel)
{
return false; return false;
} }
}
return true; return true;
} }