This commit is contained in:
nattthebear 2017-05-10 07:45:23 -04:00
parent 8bc067cbbe
commit ebe789eed2
128 changed files with 470 additions and 470 deletions

View File

@ -38,7 +38,7 @@ namespace BizHawk.Client.ApiHawk
/// <param name="name">Tool's name</param> /// <param name="name">Tool's name</param>
/// <param name="description">Small description about the tool itself</param> /// <param name="description">Small description about the tool itself</param>
public BizHawkExternalToolAttribute(string name, string description) public BizHawkExternalToolAttribute(string name, string description)
: this(name, description, string.Empty) : this(name, description, "")
{ } { }
/// <summary> /// <summary>
@ -46,7 +46,7 @@ namespace BizHawk.Client.ApiHawk
/// </summary> /// </summary>
/// <param name="name">Tool's name</param> /// <param name="name">Tool's name</param>
public BizHawkExternalToolAttribute(string name) public BizHawkExternalToolAttribute(string name)
:this(name, string.Empty, string.Empty) :this(name, "", "")
{} {}
#endregion #endregion

View File

@ -31,7 +31,7 @@ namespace BizHawk.Client.ApiHawk
{ {
throw new InvalidOperationException("A system must be set"); throw new InvalidOperationException("A system must be set");
} }
if (usage == BizHawkExternalToolUsage.GameSpecific && gameHash.Trim() == string.Empty) if (usage == BizHawkExternalToolUsage.GameSpecific && gameHash.Trim() == "")
{ {
throw new InvalidOperationException("A game hash must be set"); throw new InvalidOperationException("A game hash must be set");
} }
@ -47,14 +47,14 @@ namespace BizHawk.Client.ApiHawk
/// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param> /// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param>
/// <param name="system"><see cref="CoreSystem"/> that your external tool is used for</param> /// <param name="system"><see cref="CoreSystem"/> that your external tool is used for</param>
public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system) public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system)
:this(usage, system, string.Empty) :this(usage, system, "")
{} {}
/// <summary> /// <summary>
/// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/> /// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
/// </summary> /// </summary>
public BizHawkExternalToolUsageAttribute() public BizHawkExternalToolUsageAttribute()
:this(BizHawkExternalToolUsage.Global, CoreSystem.Null, string.Empty) :this(BizHawkExternalToolUsage.Global, CoreSystem.Null, "")
{ } { }

View File

@ -92,7 +92,7 @@ namespace BizHawk.Client.ApiHawk
BizHawkExternalToolAttribute attribute = (BizHawkExternalToolAttribute)attributes[0]; BizHawkExternalToolAttribute attribute = (BizHawkExternalToolAttribute)attributes[0];
item = new ToolStripMenuItem(attribute.Name); item = new ToolStripMenuItem(attribute.Name);
item.ToolTipText = attribute.Description; item.ToolTipText = attribute.Description;
if (attribute.IconResourceName != string.Empty) if (attribute.IconResourceName != "")
{ {
Stream s = externalToolFile.GetManifestResourceStream(string.Format("{0}.{1}", externalToolFile.GetName().Name, attribute.IconResourceName)); Stream s = externalToolFile.GetManifestResourceStream(string.Format("{0}.{1}", externalToolFile.GetName().Name, attribute.IconResourceName));
if (s != null) if (s != null)

View File

@ -330,7 +330,7 @@ namespace SevenZip
{ {
return "." + num.ToString(CultureInfo.InvariantCulture); return "." + num.ToString(CultureInfo.InvariantCulture);
} }
return String.Empty; return "";
} }
private int StreamNumberByOffset(long offset) private int StreamNumberByOffset(long offset)

View File

@ -19,7 +19,7 @@ namespace BizHawk.Client.Common
public string PathSubfile(string fname) public string PathSubfile(string fname)
{ {
return Path.Combine(SubfileDirectory ?? string.Empty, fname); return Path.Combine(SubfileDirectory ?? "", fname);
} }
public string DllPath() public string DllPath()

View File

@ -4,7 +4,7 @@ namespace BizHawk.Client.Common
{ {
public class NESGameGenieDecoder public class NESGameGenieDecoder
{ {
private readonly string _code = string.Empty; private readonly string _code = "";
private readonly Dictionary<char, int> _gameGenieTable = new Dictionary<char, int> private readonly Dictionary<char, int> _gameGenieTable = new Dictionary<char, int>
{ {
@ -134,7 +134,7 @@ namespace BizHawk.Client.Common
_value = value; _value = value;
_compare = compare; _compare = compare;
GameGenieCode = string.Empty; GameGenieCode = "";
} }
public string GameGenieCode { get; private set; } public string GameGenieCode { get; private set; }

View File

@ -183,7 +183,7 @@ namespace BizHawk.Client.Common
// Return drive letter only, working path must be absolute? // Return drive letter only, working path must be absolute?
} }
return string.Empty; return "";
} }
return path; return path;
@ -248,7 +248,7 @@ namespace BizHawk.Client.Common
{ {
var newStr = name; var newStr = name;
var chars = Path.GetInvalidFileNameChars(); var chars = Path.GetInvalidFileNameChars();
return chars.Aggregate(newStr, (current, c) => current.Replace(c.ToString(), string.Empty)); return chars.Aggregate(newStr, (current, c) => current.Replace(c.ToString(), ""));
} }
public static string FilesystemSafeName(GameInfo game) public static string FilesystemSafeName(GameInfo game)
@ -256,7 +256,7 @@ namespace BizHawk.Client.Common
var filesystemSafeName = game.Name var filesystemSafeName = game.Name
.Replace("|", "+") .Replace("|", "+")
.Replace(":", " -") // adelikat - Path.GetFileName scraps everything to the left of a colon unfortunately, so we need this hack here .Replace(":", " -") // adelikat - Path.GetFileName scraps everything to the left of a colon unfortunately, so we need this hack here
.Replace("\"", string.Empty); // adelikat - Ivan Ironman Stewart's Super Off-Road has quotes in game name .Replace("\"", ""); // adelikat - Ivan Ironman Stewart's Super Off-Road has quotes in game name
// zero 06-nov-2015 - regarding the below, i changed my mind. for libretro i want subdirectories here. // zero 06-nov-2015 - regarding the below, i changed my mind. for libretro i want subdirectories here.
var filesystemDir = Path.GetDirectoryName(filesystemSafeName); var filesystemDir = Path.GetDirectoryName(filesystemSafeName);
@ -297,7 +297,7 @@ namespace BizHawk.Client.Common
// hijinx here to get the core name out of the game name // hijinx here to get the core name out of the game name
var name = FilesystemSafeName(game); var name = FilesystemSafeName(game);
name = Path.GetDirectoryName(name); name = Path.GetDirectoryName(name);
if (name == string.Empty) if (name == "")
{ {
name = FilesystemSafeName(game); name = FilesystemSafeName(game);
} }
@ -318,7 +318,7 @@ namespace BizHawk.Client.Common
// hijinx here to get the core name out of the game name // hijinx here to get the core name out of the game name
var name = FilesystemSafeName(game); var name = FilesystemSafeName(game);
name = Path.GetDirectoryName(name); name = Path.GetDirectoryName(name);
if (name == string.Empty) if (name == "")
{ {
name = FilesystemSafeName(game); name = FilesystemSafeName(game);
} }

View File

@ -37,7 +37,7 @@ namespace BizHawk.Client.Common
public int Count => recentlist.Count; public int Count => recentlist.Count;
[JsonIgnore] [JsonIgnore]
public string MostRecent => recentlist.Any() ? recentlist[0] : string.Empty; public string MostRecent => recentlist.Any() ? recentlist[0] : "";
public string this[int index] public string this[int index]
{ {
@ -48,7 +48,7 @@ namespace BizHawk.Client.Common
return recentlist[index]; return recentlist[index];
} }
return string.Empty; return "";
} }
} }

View File

@ -196,7 +196,7 @@ namespace BizHawk.Client.Common
{ {
if (recursiveCount > 1) // hack to stop recursive calls from endlessly rerunning if we can't load it if (recursiveCount > 1) // hack to stop recursive calls from endlessly rerunning if we can't load it
{ {
DoLoadErrorCallback("Failed multiple attempts to load ROM.", string.Empty); DoLoadErrorCallback("Failed multiple attempts to load ROM.", "");
return false; return false;
} }
@ -364,7 +364,7 @@ namespace BizHawk.Client.Common
if (discMountJob.OUT_SlowLoadAborted) if (discMountJob.OUT_SlowLoadAborted)
{ {
DoLoadErrorCallback("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk", string.Empty, LoadErrorType.DiscError); DoLoadErrorCallback("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk", "", LoadErrorType.DiscError);
return false; return false;
} }
@ -432,7 +432,7 @@ namespace BizHawk.Client.Common
if (discMountJob.OUT_SlowLoadAborted) if (discMountJob.OUT_SlowLoadAborted)
{ {
DoLoadErrorCallback("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk", string.Empty, LoadErrorType.DiscError); DoLoadErrorCallback("This disc would take too long to load. Run it through discohawk first, or find a new rip because this one is probably junk", "", LoadErrorType.DiscError);
return false; return false;
} }
@ -654,7 +654,7 @@ namespace BizHawk.Client.Common
{ {
// need to get rid of this hack at some point // need to get rid of this hack at some point
rom = new RomGame(file); rom = new RomGame(file);
((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", string.Empty)); // Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename ((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", "")); // Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename
byte[] romData = null; byte[] romData = null;
byte[] xmlData = rom.FileData; byte[] xmlData = rom.FileData;
@ -769,7 +769,7 @@ namespace BizHawk.Client.Common
else else
{ {
// need to get rid of this hack at some point // need to get rid of this hack at some point
((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", String.Empty)); // Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename ((CoreFileProvider)nextComm.CoreFileProvider).SubfileDirectory = Path.GetDirectoryName(path.Replace("|", "")); // Dirty hack to get around archive filenames (since we are just getting the directory path, it is safe to mangle the filename
var romData = isXml ? null : rom.FileData; var romData = isXml ? null : rom.FileData;
var xmlData = isXml ? rom.FileData : null; var xmlData = isXml ? rom.FileData : null;
var snes = new LibsnesCore(game, romData, Deterministic, xmlData, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>()); var snes = new LibsnesCore(game, romData, Deterministic, xmlData, nextComm, GetCoreSettings<LibsnesCore>(), GetCoreSyncSettings<LibsnesCore>());

View File

@ -173,7 +173,7 @@ namespace BizHawk.Client.Common
bl.GetLump(BinaryStateLump.Framebuffer, false, PopulateFramebuffer); bl.GetLump(BinaryStateLump.Framebuffer, false, PopulateFramebuffer);
string userData = string.Empty; string userData = "";
bl.GetLump(BinaryStateLump.UserData, false, delegate(TextReader tr) bl.GetLump(BinaryStateLump.UserData, false, delegate(TextReader tr)
{ {
string line; string line;
@ -226,7 +226,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (str.Trim() == string.Empty) if (str.Trim() == "")
{ {
continue; continue;
} }

View File

@ -126,7 +126,7 @@ namespace BizHawk.Client.Common
/// <summary> /// <summary>
/// Gets the <see cref="SystemInfo"/> instance for Null (i.e. nothing is emulated) emulator /// Gets the <see cref="SystemInfo"/> instance for Null (i.e. nothing is emulated) emulator
/// </summary> /// </summary>
public static SystemInfo Null { get; } = new SystemInfo(string.Empty, CoreSystem.Null, 0); public static SystemInfo Null { get; } = new SystemInfo("", CoreSystem.Null, 0);
/// <summary> /// <summary>
/// Gets the <see cref="SystemInfo"/> instance for PCEngine (TurboGrafx-16) /// Gets the <see cref="SystemInfo"/> instance for PCEngine (TurboGrafx-16)

View File

@ -47,7 +47,7 @@ namespace BizHawk.Client.Common
}, },
Xml = x Xml = x
}; };
string fullpath = string.Empty; string fullpath = "";
var n = y.SelectSingleNode("./LoadAssets"); var n = y.SelectSingleNode("./LoadAssets");
if (n != null) if (n != null)
@ -82,7 +82,7 @@ namespace BizHawk.Client.Common
else else
{ {
// relative path // relative path
fullpath = Path.GetDirectoryName(f.CanonicalFullPath.Split('|').First()) ?? string.Empty; fullpath = Path.GetDirectoryName(f.CanonicalFullPath.Split('|').First()) ?? "";
fullpath = Path.Combine(fullpath, filename.Split('|').First()); fullpath = Path.Combine(fullpath, filename.Split('|').First());
try try
{ {

View File

@ -42,10 +42,10 @@ namespace BizHawk.Client.Common
// Core preference for generic file extension, key: file extension, value: a systemID or empty if no preference // Core preference for generic file extension, key: file extension, value: a systemID or empty if no preference
public Dictionary<string, string> PreferredPlatformsForExtensions = new Dictionary<string, string> public Dictionary<string, string> PreferredPlatformsForExtensions = new Dictionary<string, string>
{ {
{ ".bin", string.Empty }, { ".bin", "" },
{ ".rom", string.Empty }, { ".rom", "" },
{ ".iso", string.Empty }, { ".iso", "" },
{ ".img", string.Empty }, { ".img", "" },
}; };
// Path Settings ************************************/ // Path Settings ************************************/
@ -88,7 +88,7 @@ namespace BizHawk.Client.Common
public int TargetScanlineFilterIntensity = 128; // choose between 0 and 256 public int TargetScanlineFilterIntensity = 128; // choose between 0 and 256
public int TargetDisplayFilter = 0; public int TargetDisplayFilter = 0;
public int DispFinalFilter = 0; // None public int DispFinalFilter = 0; // None
public string DispUserFilterPath = string.Empty; public string DispUserFilterPath = "";
public RecentFiles RecentRoms = new RecentFiles(10); public RecentFiles RecentRoms = new RecentFiles(10);
public RecentFiles RecentRomSessions = new RecentFiles(8); // Only used for MultiHawk public RecentFiles RecentRomSessions = new RecentFiles(8); // Only used for MultiHawk
public bool PauseWhenMenuActivated = true; public bool PauseWhenMenuActivated = true;
@ -129,8 +129,8 @@ namespace BizHawk.Client.Common
public bool FirstBoot = true; public bool FirstBoot = true;
public bool Update_AutoCheckEnabled = false; public bool Update_AutoCheckEnabled = false;
public DateTime? Update_LastCheckTimeUTC = null; public DateTime? Update_LastCheckTimeUTC = null;
public string Update_LatestVersion = string.Empty; public string Update_LatestVersion = "";
public string Update_IgnoreVersion = string.Empty; public string Update_IgnoreVersion = "";
public bool CDLAutoSave = true, CDLAutoStart = true; public bool CDLAutoSave = true, CDLAutoStart = true;
////public bool TurboSeek = true; // When PauseOnFrame is set, this will decide whether the client goes into turbo mode or not ////public bool TurboSeek = true; // When PauseOnFrame is set, this will decide whether the client goes into turbo mode or not
@ -357,7 +357,7 @@ namespace BizHawk.Client.Common
public int SoundVolume = 100; // Range 0-100 public int SoundVolume = 100; // Range 0-100
public int SoundVolumeRWFF = 50; // Range 0-100 public int SoundVolumeRWFF = 50; // Range 0-100
public bool SoundThrottle = false; public bool SoundThrottle = false;
public string SoundDevice = string.Empty; public string SoundDevice = "";
public int SoundBufferSizeMs = 100; public int SoundBufferSizeMs = 100;
// Log Window // Log Window
@ -390,12 +390,12 @@ namespace BizHawk.Client.Common
public Color HexHighlightFreezeColor = Color.Violet; public Color HexHighlightFreezeColor = Color.Violet;
// Video dumping settings // Video dumping settings
public string VideoWriter = string.Empty; public string VideoWriter = "";
public int JMDCompression = 3; public int JMDCompression = 3;
public int JMDThreads = 3; public int JMDThreads = 3;
public string FFmpegFormat = string.Empty; public string FFmpegFormat = "";
public string FFmpegCustomCommand = "-c:a foo -c:v bar -f baz"; public string FFmpegCustomCommand = "-c:a foo -c:v bar -f baz";
public string AVICodecToken = string.Empty; public string AVICodecToken = "";
public int GifWriterFrameskip = 3; public int GifWriterFrameskip = 3;
public int GifWriterDelay = -1; public int GifWriterDelay = -1;

View File

@ -177,10 +177,10 @@ namespace BizHawk.Client.Common
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Tools", Path = Path.Combine(".", "Tools"), Ordinal = 7 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Tools", Path = Path.Combine(".", "Tools"), Ordinal = 7 },
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Lua", Path = Path.Combine(".", "Lua"), Ordinal = 8 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Lua", Path = Path.Combine(".", "Lua"), Ordinal = 8 },
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Watch (.wch)", Path = Path.Combine(".", "."), Ordinal = 9 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Watch (.wch)", Path = Path.Combine(".", "."), Ordinal = 9 },
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Debug Logs", Path = Path.Combine(".", string.Empty), Ordinal = 10 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Debug Logs", Path = Path.Combine(".", ""), Ordinal = 10 },
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Macros", Path = Path.Combine(".", "Movies", "Macros"), Ordinal = 11 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Macros", Path = Path.Combine(".", "Movies", "Macros"), Ordinal = 11 },
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "TAStudio states", Path = Path.Combine(".", "Movies", "TAStudio states"), Ordinal = 12 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "TAStudio states", Path = Path.Combine(".", "Movies", "TAStudio states"), Ordinal = 12 },
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Multi-Disk Bundles", Path = Path.Combine(".", string.Empty), Ordinal = 13 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "Multi-Disk Bundles", Path = Path.Combine(".", ""), Ordinal = 13 },
new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "External Tools", Path = Path.Combine(".", "ExternalTools"), Ordinal = 14 }, new PathEntry { System = "Global_NULL", SystemDisplayName = "Global", Type = "External Tools", Path = Path.Combine(".", "ExternalTools"), Ordinal = 14 },
new PathEntry { System = "INTV", SystemDisplayName = "Intellivision", Type = "Base", Path = Path.Combine(".", "Intellivision"), Ordinal = 0 }, new PathEntry { System = "INTV", SystemDisplayName = "Intellivision", Type = "Base", Path = Path.Combine(".", "Intellivision"), Ordinal = 0 },

View File

@ -340,7 +340,7 @@ namespace BizHawk.Client.Common
return RegionableCore.Region.ToString(); return RegionableCore.Region.ToString();
} }
return string.Empty; return "";
} }
} }
} }

View File

@ -27,10 +27,10 @@ namespace BizHawk.Client.Common
{ {
if (Global.Game != null) if (Global.Game != null)
{ {
return Global.Game.Name ?? string.Empty; return Global.Game.Name ?? "";
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(
@ -39,10 +39,10 @@ namespace BizHawk.Client.Common
{ {
if (Global.Game != null) if (Global.Game != null)
{ {
return Global.Game.Hash ?? string.Empty; return Global.Game.Hash ?? "";
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(
@ -66,7 +66,7 @@ namespace BizHawk.Client.Common
return Global.Game.Status.ToString(); return Global.Game.Status.ToString();
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(
@ -85,7 +85,7 @@ namespace BizHawk.Client.Common
"getboardtype", "returns identifying information about the 'mapper' or similar capability used for this game. empty if no such useful distinction can be drawn")] "getboardtype", "returns identifying information about the 'mapper' or similar capability used for this game. empty if no such useful distinction can be drawn")]
public string GetBoardType() public string GetBoardType()
{ {
return BoardInfo?.BoardName ?? string.Empty; return BoardInfo?.BoardName ?? "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(

View File

@ -84,7 +84,7 @@ namespace BizHawk.Client.Common
return lg.GenerateLogEntry(); return lg.GenerateLogEntry();
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(

View File

@ -158,7 +158,7 @@ __Types and notation__
public string ToNotepadPlusPlusAutoComplete() public string ToNotepadPlusPlusAutoComplete()
{ {
return string.Empty; // TODO return ""; // TODO
} }
} }
@ -228,10 +228,10 @@ __Types and notation__
private string TypeCleanup(string str) private string TypeCleanup(string str)
{ {
return str return str
.Replace("System", string.Empty) .Replace("System", "")
.Replace(" ", string.Empty) .Replace(" ", "")
.Replace(".", string.Empty) .Replace(".", "")
.Replace("LuaInterface", string.Empty) .Replace("LuaInterface", "")
.Replace("Object[]", "object[] ") .Replace("Object[]", "object[] ")
.Replace("Object", "object ") .Replace("Object", "object ")
.Replace("Nullable`1[Boolean]", "bool? ") .Replace("Nullable`1[Boolean]", "bool? ")

View File

@ -4,7 +4,7 @@
{ {
public LuaFile(string path) public LuaFile(string path)
{ {
Name = string.Empty; Name = "";
Path = path; Path = path;
State = RunState.Running; State = RunState.Running;
FrameWaiting = false; FrameWaiting = false;
@ -23,8 +23,8 @@
public LuaFile(bool isSeparator) public LuaFile(bool isSeparator)
{ {
IsSeparator = isSeparator; IsSeparator = isSeparator;
Name = string.Empty; Name = "";
Path = string.Empty; Path = "";
State = RunState.Disabled; State = RunState.Disabled;
} }

View File

@ -7,7 +7,7 @@ namespace BizHawk.Client.Common
{ {
public class LuaFileList : List<LuaFile> public class LuaFileList : List<LuaFile>
{ {
private string _filename = string.Empty; private string _filename = "";
private bool _changes; private bool _changes;
public Action ChangedCallback { get; set; } public Action ChangedCallback { get; set; }
@ -39,7 +39,7 @@ namespace BizHawk.Client.Common
set set
{ {
_filename = value ?? string.Empty; _filename = value ?? "";
} }
} }
@ -51,7 +51,7 @@ namespace BizHawk.Client.Common
public new void Clear() public new void Clear()
{ {
StopAllScripts(); StopAllScripts();
_filename = string.Empty; _filename = "";
Changes = false; Changes = false;
base.Clear(); base.Clear();
} }

View File

@ -15,7 +15,7 @@ namespace BizHawk.Client.Common
{ {
if (method.IsPublic) if (method.IsPublic)
{ {
table[method.Name] = lua.RegisterFunction(string.Empty, obj, method); table[method.Name] = lua.RegisterFunction("", obj, method);
} }
} }

View File

@ -60,7 +60,7 @@ namespace BizHawk.Client.Common
public static bool IsValidMovieExtension(string ext) public static bool IsValidMovieExtension(string ext)
{ {
if (MovieExtensions.Contains(ext.ToLower().Replace(".", string.Empty))) if (MovieExtensions.Contains(ext.ToLower().Replace(".", "")))
{ {
return true; return true;
} }

View File

@ -22,7 +22,7 @@ namespace BizHawk.Client.Common
{ {
if (!IsActive) if (!IsActive)
{ {
return string.Empty; return "";
} }
if (RecordAll) if (RecordAll)

View File

@ -75,7 +75,7 @@ namespace BizHawk.Client.Common
{ {
get get
{ {
var key = systemId + (pal ? "_PAL" : string.Empty); var key = systemId + (pal ? "_PAL" : "");
if (_rates.ContainsKey(key)) if (_rates.ContainsKey(key))
{ {
return _rates[key]; return _rates[key];

View File

@ -6,7 +6,7 @@ namespace BizHawk.Client.Common
{ {
public Subtitle() public Subtitle()
{ {
Message = string.Empty; Message = "";
X = 0; X = 0;
Y = 0; Y = 0;
Duration = 120; Duration = 120;

View File

@ -38,7 +38,7 @@ namespace BizHawk.Client.Common
var subparts = subtitleStr.Split(' '); var subparts = subtitleStr.Split(' ');
// Unfortunately I made the file format space delminated so this hack is necessary to get the message // Unfortunately I made the file format space delminated so this hack is necessary to get the message
var message = string.Empty; var message = "";
for (var i = 6; i < subparts.Length; i++) for (var i = 6; i < subparts.Length; i++)
{ {
message += subparts[i] + ' '; message += subparts[i] + ' ';

View File

@ -9,7 +9,7 @@ namespace BizHawk.Client.Common
{ {
public class Bk2ControllerAdapter : IMovieController public class Bk2ControllerAdapter : IMovieController
{ {
private readonly string _logKey = string.Empty; private readonly string _logKey = "";
private readonly WorkingDictionary<string, bool> MyBoolButtons = new WorkingDictionary<string, bool>(); private readonly WorkingDictionary<string, bool> MyBoolButtons = new WorkingDictionary<string, bool>();
private readonly WorkingDictionary<string, float> MyFloatControls = new WorkingDictionary<string, float>(); private readonly WorkingDictionary<string, float> MyFloatControls = new WorkingDictionary<string, float>();
@ -161,7 +161,7 @@ namespace BizHawk.Client.Common
if (!string.IsNullOrWhiteSpace(mnemonic)) if (!string.IsNullOrWhiteSpace(mnemonic))
{ {
var def = Global.Emulator.ControllerDefinition; var def = Global.Emulator.ControllerDefinition;
var trimmed = mnemonic.Replace("|", string.Empty); var trimmed = mnemonic.Replace("|", "");
var buttons = Definition.ControlsOrdered.SelectMany(x => x).ToList(); var buttons = Definition.ControlsOrdered.SelectMany(x => x).ToList();
var iterator = 0; var iterator = 0;

View File

@ -9,11 +9,11 @@ namespace BizHawk.Client.Common
get get
{ {
var key = button var key = button
.Replace("P1 ", string.Empty) .Replace("P1 ", "")
.Replace("P2 ", string.Empty) .Replace("P2 ", "")
.Replace("P3 ", string.Empty) .Replace("P3 ", "")
.Replace("P4 ", string.Empty) .Replace("P4 ", "")
.Replace("Key ", string.Empty); .Replace("Key ", "");
if (SystemOverrides.ContainsKey(Global.Emulator.SystemId) && SystemOverrides[Global.Emulator.SystemId].ContainsKey(key)) if (SystemOverrides.ContainsKey(Global.Emulator.SystemId) && SystemOverrides[Global.Emulator.SystemId].ContainsKey(key))
{ {

View File

@ -9,7 +9,7 @@ namespace BizHawk.Client.Common
{ {
get get
{ {
return this.ContainsKey(key) ? base[key] : string.Empty; return this.ContainsKey(key) ? base[key] : "";
} }
set set

View File

@ -12,7 +12,7 @@ namespace BizHawk.Client.Common
private readonly Bk2FloatConstants FloatLookup = new Bk2FloatConstants(); private readonly Bk2FloatConstants FloatLookup = new Bk2FloatConstants();
private IController _source; private IController _source;
private readonly string _logKey = string.Empty; private readonly string _logKey = "";
public Bk2LogEntryGenerator(string logKey) public Bk2LogEntryGenerator(string logKey)
{ {

View File

@ -8,7 +8,7 @@ namespace BizHawk.Client.Common
{ {
get get
{ {
var key = button.Replace("Key ", string.Empty); var key = button.Replace("Key ", "");
if (key.StartsWith("P") && key.Length > 1 && key[1] >= '0' && key[1] <= '9') if (key.StartsWith("P") && key.Length > 1 && key[1] >= '0' && key[1] <= '9')
{ {
key = key.Substring(3); key = key.Substring(3);

View File

@ -6,7 +6,7 @@ namespace BizHawk.Client.Common
public partial class Bk2Movie public partial class Bk2Movie
{ {
protected readonly Bk2Header Header = new Bk2Header(); protected readonly Bk2Header Header = new Bk2Header();
private string _syncSettingsJson = string.Empty; private string _syncSettingsJson = "";
public IDictionary<string, string> HeaderEntries => Header; public IDictionary<string, string> HeaderEntries => Header;
@ -111,7 +111,7 @@ namespace BizHawk.Client.Common
return Header[HeaderKeys.GAMENAME]; return Header[HeaderKeys.GAMENAME];
} }
return string.Empty; return "";
} }
set set
@ -133,7 +133,7 @@ namespace BizHawk.Client.Common
return Header[HeaderKeys.PLATFORM]; return Header[HeaderKeys.PLATFORM];
} }
return string.Empty; return "";
} }
set set

View File

@ -110,7 +110,7 @@ namespace BizHawk.Client.Common
bl.GetLump(BinaryStateLump.Input, true, delegate(TextReader tr) bl.GetLump(BinaryStateLump.Input, true, delegate(TextReader tr)
{ {
var errorMessage = string.Empty; var errorMessage = "";
IsCountingRerecords = false; IsCountingRerecords = false;
ExtractInputLog(tr, out errorMessage); ExtractInputLog(tr, out errorMessage);
IsCountingRerecords = true; IsCountingRerecords = true;
@ -214,7 +214,7 @@ namespace BizHawk.Client.Common
_log.Clear(); _log.Clear();
Subtitles.Clear(); Subtitles.Clear();
Comments.Clear(); Comments.Clear();
_syncSettingsJson = string.Empty; _syncSettingsJson = "";
TextSavestate = null; TextSavestate = null;
BinarySavestate = null; BinarySavestate = null;
} }

View File

@ -9,7 +9,7 @@ namespace BizHawk.Client.Common
public partial class Bk2Movie public partial class Bk2Movie
{ {
protected IStringLog _log; protected IStringLog _log;
protected string LogKey = string.Empty; protected string LogKey = "";
public string GetInputLog() public string GetInputLog()
{ {
@ -52,12 +52,12 @@ namespace BizHawk.Client.Common
return _log[getframe]; return _log[getframe];
} }
return string.Empty; return "";
} }
public virtual bool ExtractInputLog(TextReader reader, out string errorMessage) public virtual bool ExtractInputLog(TextReader reader, out string errorMessage)
{ {
errorMessage = string.Empty; errorMessage = "";
int? stateFrame = null; int? stateFrame = null;
// We are in record mode so replace the movie log with the one from the savestate // We are in record mode so replace the movie log with the one from the savestate
@ -201,7 +201,7 @@ namespace BizHawk.Client.Common
public bool CheckTimeLines(TextReader reader, out string errorMessage) public bool CheckTimeLines(TextReader reader, out string errorMessage)
{ {
// This function will compare the movie data to the savestate movie data to see if they match // This function will compare the movie data to the savestate movie data to see if they match
errorMessage = string.Empty; errorMessage = "";
var newLog = new List<string>(); var newLog = new List<string>();
var stateFrame = 0; var stateFrame = 0;
while (true) while (true)
@ -212,7 +212,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (line.Trim() == string.Empty) if (line.Trim() == "")
{ {
continue; continue;
} }

View File

@ -21,7 +21,7 @@ namespace BizHawk.Client.Common
Subtitles = new SubtitleList(); Subtitles = new SubtitleList();
Comments = new List<string>(); Comments = new List<string>();
Filename = string.Empty; Filename = "";
IsCountingRerecords = true; IsCountingRerecords = true;
_mode = Moviemode.Inactive; _mode = Moviemode.Inactive;
MakeBackup = true; MakeBackup = true;

View File

@ -236,7 +236,7 @@ namespace BizHawk.Client.Common
{ {
return; return;
} }
string prefix = string.Empty; string prefix = "";
if (ControlType != "Gameboy Controller" && ControlType != "TI83 Controller") if (ControlType != "Gameboy Controller" && ControlType != "TI83 Controller")
{ {
prefix = "P" + player + " "; prefix = "P" + player + " ";

View File

@ -11,9 +11,9 @@ namespace BizHawk.Client.Common
Subtitles = new SubtitleList(); Subtitles = new SubtitleList();
this[HeaderKeys.EMULATIONVERSION] = VersionInfo.GetEmuVersion(); this[HeaderKeys.EMULATIONVERSION] = VersionInfo.GetEmuVersion();
this[HeaderKeys.PLATFORM] = Global.Emulator != null ? Global.Emulator.SystemId : string.Empty; this[HeaderKeys.PLATFORM] = Global.Emulator != null ? Global.Emulator.SystemId : "";
this[HeaderKeys.GAMENAME] = string.Empty; this[HeaderKeys.GAMENAME] = "";
this[HeaderKeys.AUTHOR] = string.Empty; this[HeaderKeys.AUTHOR] = "";
this[HeaderKeys.RERECORDS] = "0"; this[HeaderKeys.RERECORDS] = "0";
} }
@ -97,7 +97,7 @@ namespace BizHawk.Client.Common
return this[HeaderKeys.GAMENAME]; return this[HeaderKeys.GAMENAME];
} }
return string.Empty; return "";
} }
set set
@ -115,7 +115,7 @@ namespace BizHawk.Client.Common
return this[HeaderKeys.PLATFORM]; return this[HeaderKeys.PLATFORM];
} }
return string.Empty; return "";
} }
set set
@ -128,7 +128,7 @@ namespace BizHawk.Client.Common
{ {
get get
{ {
return this.ContainsKey(key) ? base[key] : string.Empty; return this.ContainsKey(key) ? base[key] : "";
} }
set set

View File

@ -163,7 +163,7 @@ namespace BizHawk.Client.Common
for (int player = 1; player <= BkmMnemonicConstants.PLAYERS[_controlType]; player++) for (int player = 1; player <= BkmMnemonicConstants.PLAYERS[_controlType]; player++)
{ {
var prefix = string.Empty; var prefix = "";
if (_controlType != "Gameboy Controller" && _controlType != "TI83 Controller") if (_controlType != "Gameboy Controller" && _controlType != "TI83 Controller")
{ {
prefix = "P" + player + " "; prefix = "P" + player + " ";
@ -199,7 +199,7 @@ namespace BizHawk.Client.Common
{ {
return GenerateLogEntry() return GenerateLogEntry()
.Replace(".", " ") .Replace(".", " ")
.Replace("|", string.Empty) .Replace("|", "")
.Replace(" 000, 000", " "); .Replace(" 000, 000", " ");
} }

View File

@ -77,7 +77,7 @@ namespace BizHawk.Client.Common
while ((line = sr.ReadLine()) != null) while ((line = sr.ReadLine()) != null)
{ {
if (line == string.Empty) if (line == "")
{ {
continue; continue;
} }

View File

@ -38,12 +38,12 @@ namespace BizHawk.Client.Common
return _log[frame]; return _log[frame];
} }
return string.Empty; return "";
} }
public bool ExtractInputLog(TextReader reader, out string errorMessage) public bool ExtractInputLog(TextReader reader, out string errorMessage)
{ {
errorMessage = string.Empty; errorMessage = "";
int? stateFrame = null; int? stateFrame = null;
// We are in record mode so replace the movie log with the one from the savestate // We are in record mode so replace the movie log with the one from the savestate
@ -64,7 +64,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (line.Trim() == string.Empty || line == "[Input]") if (line.Trim() == "" || line == "[Input]")
{ {
continue; continue;
} }
@ -117,7 +117,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (line.Trim() == string.Empty || line == "[Input]") if (line.Trim() == "" || line == "[Input]")
{ {
continue; continue;
} }
@ -196,7 +196,7 @@ namespace BizHawk.Client.Common
public bool CheckTimeLines(TextReader reader, out string errorMessage) public bool CheckTimeLines(TextReader reader, out string errorMessage)
{ {
// This function will compare the movie data to the savestate movie data to see if they match // This function will compare the movie data to the savestate movie data to see if they match
errorMessage = string.Empty; errorMessage = "";
var log = new List<string>(); var log = new List<string>();
var stateFrame = 0; var stateFrame = 0;
while (true) while (true)
@ -207,7 +207,7 @@ namespace BizHawk.Client.Common
return false; return false;
} }
if (line.Trim() == string.Empty) if (line.Trim() == "")
{ {
continue; continue;
} }

View File

@ -19,7 +19,7 @@ namespace BizHawk.Client.Common
public BkmMovie() public BkmMovie()
{ {
Header = new BkmHeader { [HeaderKeys.MOVIEVERSION] = "BizHawk v0.0.1" }; Header = new BkmHeader { [HeaderKeys.MOVIEVERSION] = "BizHawk v0.0.1" };
Filename = string.Empty; Filename = "";
_preloadFramecount = 0; _preloadFramecount = 0;
IsCountingRerecords = true; IsCountingRerecords = true;

View File

@ -25,7 +25,7 @@ namespace BizHawk.Client.Common
{ {
lineNum++; lineNum++;
if (line == string.Empty) if (line == "")
{ {
continue; continue;
} }

View File

@ -69,9 +69,9 @@ namespace BizHawk.Client.Common
// Attempt to import another type of movie file into a movie object. // Attempt to import another type of movie file into a movie object.
public static Bk2Movie ImportFile(string path, out string errorMsg, out string warningMsg) public static Bk2Movie ImportFile(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = string.Empty; errorMsg = "";
warningMsg = string.Empty; warningMsg = "";
string ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty; string ext = path != null ? Path.GetExtension(path).ToUpper() : "";
if (UsesLegacyImporter(ext)) if (UsesLegacyImporter(ext))
{ {
@ -133,8 +133,8 @@ namespace BizHawk.Client.Common
private static BkmMovie LegacyImportFile(string ext, string path, out string errorMsg, out string warningMsg) private static BkmMovie LegacyImportFile(string ext, string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = string.Empty; errorMsg = "";
warningMsg = string.Empty; warningMsg = "";
BkmMovie m = new BkmMovie(); BkmMovie m = new BkmMovie();
@ -261,8 +261,8 @@ namespace BizHawk.Client.Common
private static BkmMovie ImportTextFrame(string line, int lineNum, BkmMovie m, string path, string platform, ref string warningMsg) private static BkmMovie ImportTextFrame(string line, int lineNum, BkmMovie m, string path, string platform, ref string warningMsg)
{ {
string[] buttons = { }; string[] buttons = { };
var controller = string.Empty; var controller = "";
var ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty; var ext = path != null ? Path.GetExtension(path).ToUpper() : "";
switch (ext) switch (ext)
{ {
case ".FM2": case ".FM2":
@ -327,7 +327,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (warningMsg != string.Empty) if (warningMsg != "")
{ {
warningMsg = "Unable to import " + warningMsg + " command on line " + lineNum + "."; warningMsg = "Unable to import " + warningMsg + " command on line " + lineNum + ".";
} }
@ -339,7 +339,7 @@ namespace BizHawk.Client.Common
char[] off = { '.', ' ', '\t', '\n', '\r' }; char[] off = { '.', ' ', '\t', '\n', '\r' };
if (flags.Length == 0 || off.Contains(flags[0])) if (flags.Length == 0 || off.Contains(flags[0]))
{ {
if (warningMsg == string.Empty) if (warningMsg == "")
{ {
warningMsg = "Unable to import subframe."; warningMsg = "Unable to import subframe.";
} }
@ -351,7 +351,7 @@ namespace BizHawk.Client.Common
flags = SingleSpaces(flags.Substring(2)); flags = SingleSpaces(flags.Substring(2));
if (reset && ((flags.Length >= 2 && flags[1] != '0') || (flags.Length >= 4 && flags[3] != '0'))) if (reset && ((flags.Length >= 2 && flags[1] != '0') || (flags.Length >= 4 && flags[3] != '0')))
{ {
if (warningMsg == string.Empty) if (warningMsg == "")
{ {
warningMsg = "Unable to import delayed reset."; warningMsg = "Unable to import delayed reset.";
} }
@ -384,7 +384,7 @@ namespace BizHawk.Client.Common
// Gameboy doesn't currently have a prefix saying which player the input is for. // Gameboy doesn't currently have a prefix saying which player the input is for.
if (controllers.Definition.Name == "Gameboy Controller") if (controllers.Definition.Name == "Gameboy Controller")
{ {
prefix = string.Empty; prefix = "";
} }
// Only count lines with that have the right number of buttons and are for valid players. // Only count lines with that have the right number of buttons and are for valid players.
@ -418,7 +418,7 @@ namespace BizHawk.Client.Common
// Concatenate the frame and message with default values for the additional fields. // Concatenate the frame and message with default values for the additional fields.
string frame; string frame;
string length; string length;
string ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty; string ext = path != null ? Path.GetExtension(path).ToUpper() : "";
if (ext != ".LSMV") if (ext != ".LSMV")
{ {
@ -441,12 +441,12 @@ namespace BizHawk.Client.Common
// Import a text-based movie format. This works for .FM2, .MC2, and .YMV. // Import a text-based movie format. This works for .FM2, .MC2, and .YMV.
private static BkmMovie ImportText(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportText(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
var m = new BkmMovie(path); var m = new BkmMovie(path);
var file = new FileInfo(path); var file = new FileInfo(path);
var sr = file.OpenText(); var sr = file.OpenText();
var emulator = string.Empty; var emulator = "";
var platform = string.Empty; var platform = "";
switch (Path.GetExtension(path).ToUpper()) switch (Path.GetExtension(path).ToUpper())
{ {
case ".FM2": case ".FM2":
@ -468,14 +468,14 @@ namespace BizHawk.Client.Common
while ((line = sr.ReadLine()) != null) while ((line = sr.ReadLine()) != null)
{ {
lineNum++; lineNum++;
if (line == string.Empty) if (line == "")
{ {
continue; continue;
} }
else if (line[0] == '|') else if (line[0] == '|')
{ {
m = ImportTextFrame(line, lineNum, m, path, platform, ref warningMsg); m = ImportTextFrame(line, lineNum, m, path, platform, ref warningMsg);
if (errorMsg != string.Empty) if (errorMsg != "")
{ {
sr.Close(); sr.Close();
return null; return null;
@ -637,7 +637,7 @@ namespace BizHawk.Client.Common
// FCM file format: http://code.google.com/p/fceu/wiki/FCM // FCM file format: http://code.google.com/p/fceu/wiki/FCM
private static BkmMovie ImportFCM(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportFCM(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path); BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs); BinaryReader r = new BinaryReader(fs);
@ -805,7 +805,7 @@ namespace BizHawk.Client.Common
// bbbbb: // bbbbb:
controllers["Reset"] = command == 1; controllers["Reset"] = command == 1;
if (warningMsg == string.Empty) if (warningMsg == "")
{ {
switch (command) switch (command)
{ {
@ -845,7 +845,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (warningMsg != string.Empty) if (warningMsg != "")
{ {
warningMsg = "Unable to import " + warningMsg + " command at frame " + frame + "."; warningMsg = "Unable to import " + warningMsg + " command at frame " + frame + ".";
} }
@ -919,7 +919,7 @@ namespace BizHawk.Client.Common
// FMV file format: http://tasvideos.org/FMV.html // FMV file format: http://tasvideos.org/FMV.html
private static BkmMovie ImportFmv(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportFmv(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path); BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs); BinaryReader r = new BinaryReader(fs);
@ -1078,7 +1078,7 @@ namespace BizHawk.Client.Common
// GMV file format: http://code.google.com/p/gens-rerecording/wiki/GMV // GMV file format: http://code.google.com/p/gens-rerecording/wiki/GMV
private static BkmMovie ImportGMV(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportGMV(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
var m = new BkmMovie(path); var m = new BkmMovie(path);
var fs = new FileStream(path, FileMode.Open, FileAccess.Read); var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
var r = new BinaryReader(fs); var r = new BinaryReader(fs);
@ -1220,7 +1220,7 @@ namespace BizHawk.Client.Common
// LSMV file format: http://tasvideos.org/Lsnes/Movieformat.html // LSMV file format: http://tasvideos.org/Lsnes/Movieformat.html
private static BkmMovie ImportLSMV(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportLSMV(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
var m = new BkmMovie(path); var m = new BkmMovie(path);
var hf = new HawkFile(path); var hf = new HawkFile(path);
@ -1238,8 +1238,8 @@ namespace BizHawk.Client.Common
hf.BindArchiveMember(item.Index); hf.BindArchiveMember(item.Index);
var stream = hf.GetStream(); var stream = hf.GetStream();
string authors = Encoding.UTF8.GetString(stream.ReadAllBytes()); string authors = Encoding.UTF8.GetString(stream.ReadAllBytes());
string author_list = string.Empty; string author_list = "";
string author_last = string.Empty; string author_last = "";
using (var reader = new StringReader(authors)) using (var reader = new StringReader(authors))
{ {
string line; string line;
@ -1248,9 +1248,9 @@ namespace BizHawk.Client.Common
while ((line = reader.ReadLine()) != null) while ((line = reader.ReadLine()) != null)
{ {
string author = line.Trim(); string author = line.Trim();
if (author != string.Empty) if (author != "")
{ {
if (author_last != string.Empty) if (author_last != "")
{ {
author_list += author_last + ", "; author_list += author_last + ", ";
} }
@ -1260,12 +1260,12 @@ namespace BizHawk.Client.Common
} }
} }
if (author_list != string.Empty) if (author_list != "")
{ {
author_list += "and "; author_list += "and ";
} }
if (author_last != string.Empty) if (author_last != "")
{ {
author_list += author_last; author_list += author_last;
} }
@ -1329,7 +1329,7 @@ namespace BizHawk.Client.Common
string line; string line;
while ((line = reader.ReadLine()) != null) while ((line = reader.ReadLine()) != null)
{ {
if (line == string.Empty) if (line == "")
{ {
continue; continue;
} }
@ -1348,7 +1348,7 @@ namespace BizHawk.Client.Common
} }
m = ImportTextFrame(line, lineNum, m, path, platform, ref warningMsg); m = ImportTextFrame(line, lineNum, m, path, platform, ref warningMsg);
if (errorMsg != string.Empty) if (errorMsg != "")
{ {
hf.Unbind(); hf.Unbind();
return null; return null;
@ -1487,7 +1487,7 @@ namespace BizHawk.Client.Common
*/ */
private static BkmMovie ImportMCM(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportMCM(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path); BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs); BinaryReader r = new BinaryReader(fs);
@ -1609,12 +1609,12 @@ namespace BizHawk.Client.Common
ushort controllerState = r.ReadByte(); ushort controllerState = r.ReadByte();
for (int button = 0; button < buttons.Length; button++) for (int button = 0; button < buttons.Length; button++)
{ {
string prefix = platform == "lynx" ? string.Empty : "P" + player + " "; // hack string prefix = platform == "lynx" ? "" : "P" + player + " "; // hack
controllers[prefix + buttons[button]] = ((controllerState >> button) & 0x1) != 0; controllers[prefix + buttons[button]] = ((controllerState >> button) & 0x1) != 0;
} }
} }
r.ReadByte(); r.ReadByte();
if (platform == "nes" && warningMsg == string.Empty) if (platform == "nes" && warningMsg == "")
{ {
warningMsg = "Control commands are not properly supported."; warningMsg = "Control commands are not properly supported.";
} }
@ -1636,7 +1636,7 @@ namespace BizHawk.Client.Common
// MMV file format: http://tasvideos.org/MMV.html // MMV file format: http://tasvideos.org/MMV.html
private static BkmMovie ImportMMV(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportMMV(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path); BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs); BinaryReader r = new BinaryReader(fs);
@ -1769,7 +1769,7 @@ namespace BizHawk.Client.Common
// NMV file format: http://tasvideos.org/NMV.html // NMV file format: http://tasvideos.org/NMV.html
private static BkmMovie ImportNMV(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportNMV(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
var m = new BkmMovie(path); var m = new BkmMovie(path);
var fs = new FileStream(path, FileMode.Open, FileAccess.Read); var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
var r = new BinaryReader(fs); var r = new BinaryReader(fs);
@ -1866,7 +1866,7 @@ namespace BizHawk.Client.Common
masks[controller - 1] = types[controller - 1] == 1; masks[controller - 1] = types[controller - 1] == 1;
// Get the first unsupported controller warning message that arises. // Get the first unsupported controller warning message that arises.
if (warningMsg == string.Empty) if (warningMsg == "")
{ {
switch (types[controller - 1]) switch (types[controller - 1])
{ {
@ -1892,7 +1892,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (warningMsg != string.Empty) if (warningMsg != "")
{ {
warningMsg = warningMsg + " is not properly supported."; warningMsg = warningMsg + " is not properly supported.";
} }
@ -1919,7 +1919,7 @@ namespace BizHawk.Client.Common
"Unconnected", "Famicom 4-player adapter", "Famicom Arkanoid paddle", "Family Basic Keyboard", "Unconnected", "Famicom 4-player adapter", "Famicom Arkanoid paddle", "Family Basic Keyboard",
"Alternate keyboard layout", "Family Trainer", "Oeka Kids writing tablet" "Alternate keyboard layout", "Family Trainer", "Oeka Kids writing tablet"
}; };
if (expansion != 0 && warningMsg == string.Empty) if (expansion != 0 && warningMsg == "")
{ {
warningMsg = "Expansion port is not properly supported. This movie uses " + expansions[expansion] + "."; warningMsg = "Expansion port is not properly supported. This movie uses " + expansions[expansion] + ".";
} }
@ -2005,7 +2005,7 @@ namespace BizHawk.Client.Common
controllers["P" + player + " " + buttons[button]] = ((controllerState >> button) & 0x1) != 0; controllers["P" + player + " " + buttons[button]] = ((controllerState >> button) & 0x1) != 0;
} }
} }
else if (warningMsg == string.Empty) else if (warningMsg == "")
{ {
warningMsg = "Extra input is not properly supported."; warningMsg = "Extra input is not properly supported.";
} }
@ -2021,7 +2021,7 @@ namespace BizHawk.Client.Common
private static BkmMovie ImportSmv(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportSmv(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path); BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs); BinaryReader r = new BinaryReader(fs);
@ -2170,7 +2170,7 @@ namespace BizHawk.Client.Common
*/ */
byte[] metadata = r.ReadBytes((int)(savestateOffset - extraRomInfo - ((version != "1.43") ? 0x40 : 0x20))); byte[] metadata = r.ReadBytes((int)(savestateOffset - extraRomInfo - ((version != "1.43") ? 0x40 : 0x20)));
string author = NullTerminated(Encoding.Unicode.GetString(metadata).Trim()); string author = NullTerminated(Encoding.Unicode.GetString(metadata).Trim());
if (author != string.Empty) if (author != "")
{ {
m.Header[HeaderKeys.AUTHOR] = author; m.Header[HeaderKeys.AUTHOR] = author;
} }
@ -2244,7 +2244,7 @@ namespace BizHawk.Client.Common
*/ */
if (version != "1.43" && player <= controllerTypes.Length) if (version != "1.43" && player <= controllerTypes.Length)
{ {
var peripheral = string.Empty; var peripheral = "";
switch (controllerTypes[player - 1]) switch (controllerTypes[player - 1])
{ {
case 0: // NONE case 0: // NONE
@ -2272,7 +2272,7 @@ namespace BizHawk.Client.Common
break; break;
} }
if (peripheral != string.Empty && warningMsg == string.Empty) if (peripheral != "" && warningMsg == "")
{ {
warningMsg = "Unable to import " + peripheral + "."; warningMsg = "Unable to import " + peripheral + ".";
} }
@ -2287,7 +2287,7 @@ namespace BizHawk.Client.Common
((controllerState >> button) & 0x1) != 0; ((controllerState >> button) & 0x1) != 0;
} }
} }
else if (warningMsg == string.Empty) else if (warningMsg == "")
{ {
warningMsg = "Controller " + player + " not supported."; warningMsg = "Controller " + player + " not supported.";
} }
@ -2314,7 +2314,7 @@ namespace BizHawk.Client.Common
// VBM file format: http://code.google.com/p/vba-rerecording/wiki/VBM // VBM file format: http://code.google.com/p/vba-rerecording/wiki/VBM
private static BkmMovie ImportVbm(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportVbm(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
var m = new BkmMovie(path); var m = new BkmMovie(path);
var fs = new FileStream(path, FileMode.Open, FileAccess.Read); var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
var r = new BinaryReader(fs); var r = new BinaryReader(fs);
@ -2585,7 +2585,7 @@ namespace BizHawk.Client.Common
} }
// TODO: Handle the other buttons. // TODO: Handle the other buttons.
if (warningMsg == string.Empty) if (warningMsg == "")
{ {
for (int button = 0; button < other.Length; button++) for (int button = 0; button < other.Length; button++)
{ {
@ -2617,7 +2617,7 @@ namespace BizHawk.Client.Common
// VMV file format: http://tasvideos.org/VMV.html // VMV file format: http://tasvideos.org/VMV.html
private static BkmMovie ImportVmv(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportVmv(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path); BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs); BinaryReader r = new BinaryReader(fs);
@ -2768,7 +2768,7 @@ namespace BizHawk.Client.Common
if (controllerState == 0xF0) if (controllerState == 0xF0)
{ {
ushort command = r.ReadUInt16(); ushort command = r.ReadUInt16();
string commandName = string.Empty; string commandName = "";
if ((command & 0xFF00) == 0) if ((command & 0xFF00) == 0)
{ {
switch (command & 0x00FF) switch (command & 0x00FF)
@ -2815,7 +2815,7 @@ namespace BizHawk.Client.Common
commandName = "NESCMD_EXCONTROLLER, " + (command & 0xFF00); commandName = "NESCMD_EXCONTROLLER, " + (command & 0xFF00);
} }
if (commandName != string.Empty && warningMsg == string.Empty) if (commandName != "" && warningMsg == "")
{ {
warningMsg = "Unable to run command \"" + commandName + "\"."; warningMsg = "Unable to run command \"" + commandName + "\".";
} }
@ -2825,7 +2825,7 @@ namespace BizHawk.Client.Common
uint dwdata = r.ReadUInt32(); uint dwdata = r.ReadUInt32();
// TODO: Make a clearer warning message. // TODO: Make a clearer warning message.
if (warningMsg == string.Empty) if (warningMsg == "")
{ {
warningMsg = "Unable to run SetSyncExData(" + dwdata + ")."; warningMsg = "Unable to run SetSyncExData(" + dwdata + ").";
} }
@ -2857,7 +2857,7 @@ namespace BizHawk.Client.Common
// ZMV file format: http://tasvideos.org/ZMV.html // ZMV file format: http://tasvideos.org/ZMV.html
private static BkmMovie ImportZmv(string path, out string errorMsg, out string warningMsg) private static BkmMovie ImportZmv(string path, out string errorMsg, out string warningMsg)
{ {
errorMsg = warningMsg = string.Empty; errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path); BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs); BinaryReader r = new BinaryReader(fs);
@ -2925,7 +2925,7 @@ namespace BizHawk.Client.Common
bit 0: super scope in second port bit 0: super scope in second port
*/ */
byte controllerFlags = r.ReadByte(); byte controllerFlags = r.ReadByte();
string peripheral = string.Empty; string peripheral = "";
bool superScope = (controllerFlags & 0x1) != 0; bool superScope = (controllerFlags & 0x1) != 0;
if (superScope) if (superScope)
{ {
@ -2934,19 +2934,19 @@ namespace BizHawk.Client.Common
controllerFlags >>= 1; controllerFlags >>= 1;
bool secondMouse = (controllerFlags & 0x1) != 0; bool secondMouse = (controllerFlags & 0x1) != 0;
if (secondMouse && peripheral == string.Empty) if (secondMouse && peripheral == "")
{ {
peripheral = "Second Mouse"; peripheral = "Second Mouse";
} }
controllerFlags >>= 1; controllerFlags >>= 1;
bool firstMouse = (controllerFlags & 0x1) != 0; bool firstMouse = (controllerFlags & 0x1) != 0;
if (firstMouse && peripheral == string.Empty) if (firstMouse && peripheral == "")
{ {
peripheral = "First Mouse"; peripheral = "First Mouse";
} }
if (peripheral != string.Empty) if (peripheral != "")
{ {
warningMsg = "Unable to import " + peripheral + "."; warningMsg = "Unable to import " + peripheral + ".";
} }
@ -3159,7 +3159,7 @@ namespace BizHawk.Client.Common
} }
} }
} }
else if (warningMsg == string.Empty) else if (warningMsg == "")
{ {
warningMsg = "Controller " + player + " not supported."; warningMsg = "Controller " + player + " not supported.";
} }

View File

@ -160,7 +160,7 @@ namespace BizHawk.Client.Common
bl.GetLump(BinaryStateLump.Input, true, delegate(TextReader tr) // Note: ExtractInputLog will clear Lag and State data potentially, this must come before loading those bl.GetLump(BinaryStateLump.Input, true, delegate(TextReader tr) // Note: ExtractInputLog will clear Lag and State data potentially, this must come before loading those
{ {
var errorMessage = string.Empty; var errorMessage = "";
IsCountingRerecords = false; IsCountingRerecords = false;
ExtractInputLog(tr, out errorMessage); ExtractInputLog(tr, out errorMessage);
IsCountingRerecords = true; IsCountingRerecords = true;
@ -212,7 +212,7 @@ namespace BizHawk.Client.Common
if (GetClientSettingsOnLoad != null) if (GetClientSettingsOnLoad != null)
{ {
string clientSettings = string.Empty; string clientSettings = "";
bl.GetLump(BinaryStateLump.ClientSettings, false, delegate(TextReader tr) bl.GetLump(BinaryStateLump.ClientSettings, false, delegate(TextReader tr)
{ {
string line; string line;

View File

@ -18,7 +18,7 @@ namespace BizHawk.Client.Common
public const string DefaultProjectName = "default"; public const string DefaultProjectName = "default";
public BackgroundWorker _progressReportWorker = null; public BackgroundWorker _progressReportWorker = null;
public bool LastPositionStable = true; public bool LastPositionStable = true;
public string NewBranchText = string.Empty; public string NewBranchText = "";
public readonly IStringLog VerificationLog = StringLogUtil.MakeStringLog(); // For movies that do not begin with power-on, this is the input required to get into the initial state public readonly IStringLog VerificationLog = StringLogUtil.MakeStringLog(); // For movies that do not begin with power-on, this is the input required to get into the initial state
public readonly TasBranchCollection Branches = new TasBranchCollection(); public readonly TasBranchCollection Branches = new TasBranchCollection();
public readonly TasSession Session; public readonly TasSession Session;
@ -194,7 +194,7 @@ namespace BizHawk.Client.Common
{ {
return adapter.IsPressed(buttonName) ? return adapter.IsPressed(buttonName) ?
Mnemonics[buttonName].ToString() : Mnemonics[buttonName].ToString() :
string.Empty; "";
} }
if (adapter.Definition.FloatControls.Contains(buttonName)) if (adapter.Definition.FloatControls.Contains(buttonName))
@ -287,7 +287,7 @@ namespace BizHawk.Client.Common
// TODO: this is 99% copy pasting of bad code // TODO: this is 99% copy pasting of bad code
public override bool ExtractInputLog(TextReader reader, out string errorMessage) public override bool ExtractInputLog(TextReader reader, out string errorMessage)
{ {
errorMessage = string.Empty; errorMessage = "";
int? stateFrame = null; int? stateFrame = null;
var newLog = new List<string>(); var newLog = new List<string>();

View File

@ -85,7 +85,7 @@ namespace BizHawk.Client.Common
public char TypeAsChar => _watch.TypeAsChar; public char TypeAsChar => _watch.TypeAsChar;
public string Name => IsSeparator ? string.Empty : _watch.Notes; public string Name => IsSeparator ? "" : _watch.Notes;
public string AddressStr => _watch.AddressString; public string AddressStr => _watch.AddressString;
@ -97,7 +97,7 @@ namespace BizHawk.Client.Common
{ {
default: default:
case WatchSize.Separator: case WatchSize.Separator:
return string.Empty; return "";
case WatchSize.Byte: case WatchSize.Byte:
return (_watch as ByteWatch).FormatValue((byte)_val); return (_watch as ByteWatch).FormatValue((byte)_val);
case WatchSize.Word: case WatchSize.Word:
@ -118,7 +118,7 @@ namespace BizHawk.Client.Common
{ {
default: default:
case WatchSize.Separator: case WatchSize.Separator:
return string.Empty; return "";
case WatchSize.Byte: case WatchSize.Byte:
return (_watch as ByteWatch).FormatValue((byte)_compare.Value); return (_watch as ByteWatch).FormatValue((byte)_compare.Value);
case WatchSize.Word: case WatchSize.Word:
@ -128,7 +128,7 @@ namespace BizHawk.Client.Common
} }
} }
return string.Empty; return "";
} }
} }

View File

@ -14,8 +14,8 @@ namespace BizHawk.Client.Common
public class CheatCollection : ICollection<Cheat> public class CheatCollection : ICollection<Cheat>
{ {
private List<Cheat> _cheatList = new List<Cheat>(); private List<Cheat> _cheatList = new List<Cheat>();
private string _currentFileName = string.Empty; private string _currentFileName = "";
private string _defaultFileName = string.Empty; private string _defaultFileName = "";
private bool _changes; private bool _changes;
public delegate void CheatListEventHandler(object sender, CheatListEventArgs e); public delegate void CheatListEventHandler(object sender, CheatListEventArgs e);
@ -109,7 +109,7 @@ namespace BizHawk.Client.Common
} }
_cheatList.Clear(); _cheatList.Clear();
_currentFileName = string.Empty; _currentFileName = "";
Changes = false; Changes = false;
} }
@ -384,7 +384,7 @@ namespace BizHawk.Client.Common
.Append(cheat.AddressStr).Append('\t') .Append(cheat.AddressStr).Append('\t')
.Append(cheat.ValueStr).Append('\t') .Append(cheat.ValueStr).Append('\t')
.Append(cheat.Compare?.ToString() ?? "N").Append('\t') .Append(cheat.Compare?.ToString() ?? "N").Append('\t')
.Append(cheat.Domain != null ? cheat.Domain.Name : string.Empty).Append('\t') .Append(cheat.Domain != null ? cheat.Domain.Name : "").Append('\t')
.Append(cheat.Enabled ? '1' : '0').Append('\t') .Append(cheat.Enabled ? '1' : '0').Append('\t')
.Append(cheat.Name).Append('\t') .Append(cheat.Name).Append('\t')
.Append(cheat.SizeAsChar).Append('\t') .Append(cheat.SizeAsChar).Append('\t')

View File

@ -148,7 +148,7 @@ namespace BizHawk.Client.Common
_settings.Size, _settings.Size,
_settings.Type, _settings.Type,
_settings.BigEndian, _settings.BigEndian,
string.Empty, "",
0, 0,
_watchList[index].Previous, _watchList[index].Previous,
(_watchList[index] as IMiniWatchDetails).ChangeCount); (_watchList[index] as IMiniWatchDetails).ChangeCount);
@ -161,7 +161,7 @@ namespace BizHawk.Client.Common
_settings.Size, _settings.Size,
_settings.Type, _settings.Type,
_settings.BigEndian, _settings.BigEndian,
string.Empty, "",
0, 0,
_watchList[index].Previous, _watchList[index].Previous,
0); 0);

View File

@ -232,7 +232,7 @@ namespace BizHawk.Client.Common
{ {
get get
{ {
string diff = string.Empty; string diff = "";
int diffVal = _value - _previous; int diffVal = _value - _previous;
if (diffVal > 0) if (diffVal > 0)
{ {

View File

@ -12,7 +12,7 @@ namespace BizHawk.Client.Common
/// Initialize a new separator instance /// Initialize a new separator instance
/// </summary> /// </summary>
internal SeparatorWatch() internal SeparatorWatch()
: base(null, 0, WatchSize.Separator, DisplayType.Separator, true, string.Empty) : base(null, 0, WatchSize.Separator, DisplayType.Separator, true, "")
{ {
} }
@ -50,12 +50,12 @@ namespace BizHawk.Client.Common
/// <summary> /// <summary>
/// Ignore that stuff /// Ignore that stuff
/// </summary> /// </summary>
public override string ValueString => string.Empty; public override string ValueString => "";
/// <summary> /// <summary>
/// Ignore that stuff /// Ignore that stuff
/// </summary> /// </summary>
public override string PreviousStr => string.Empty; public override string PreviousStr => "";
/// <summary> /// <summary>
/// TTransform the current instance into a displayable (short representation) string /// TTransform the current instance into a displayable (short representation) string
@ -85,7 +85,7 @@ namespace BizHawk.Client.Common
/// <summary> /// <summary>
/// Ignore that stuff /// Ignore that stuff
/// </summary> /// </summary>
public override string Diff => string.Empty; public override string Diff => "";
/// <summary> /// <summary>
/// Ignore that stuff /// Ignore that stuff

View File

@ -197,7 +197,7 @@ namespace BizHawk.Client.Common
/// <returns>New <see cref="Watch"/> instance. True type is depending of size parameter</returns> /// <returns>New <see cref="Watch"/> instance. True type is depending of size parameter</returns>
public static Watch GenerateWatch(MemoryDomain domain, long address, WatchSize size, DisplayType type, bool bigEndian) public static Watch GenerateWatch(MemoryDomain domain, long address, WatchSize size, DisplayType type, bool bigEndian)
{ {
return GenerateWatch(domain, address, size, type, bigEndian, string.Empty, 0, 0, 0); return GenerateWatch(domain, address, size, type, bigEndian, "", 0, 0, 0);
} }
#region Operators #region Operators
@ -364,8 +364,8 @@ namespace BizHawk.Client.Common
{ {
// LIAR logic // LIAR logic
return (ushort)(Global.CheatList.GetCheatValue(_domain, _address, WatchSize.Word) ?? 0); return (ushort)(Global.CheatList.GetCheatValue(_domain, _address, WatchSize.Word) ?? 0);
} }
if (_domain.Size == 0) if (_domain.Size == 0)
{ {
return _domain.PeekUshort(_address, _bigEndian); return _domain.PeekUshort(_address, _bigEndian);
@ -404,24 +404,24 @@ namespace BizHawk.Client.Common
protected void PokeWord(ushort val) protected void PokeWord(ushort val)
{ {
if (_domain.Size == 0) if (_domain.Size == 0)
{ {
_domain.PokeUshort(_address, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain _domain.PokeUshort(_address, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain
} }
else else
{ {
_domain.PokeUshort(_address % _domain.Size, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain _domain.PokeUshort(_address % _domain.Size, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain
} }
} }
protected void PokeDWord(uint val) protected void PokeDWord(uint val)
{ {
if (_domain.Size == 0) if (_domain.Size == 0)
{ {
_domain.PokeUint(_address, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain _domain.PokeUint(_address, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain
} }
else else
{ {
_domain.PokeUint(_address % _domain.Size, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain _domain.PokeUint(_address % _domain.Size, val, _bigEndian); // TODO: % size stil lisn't correct since it could be the last byte of the domain
} }
} }
@ -642,7 +642,7 @@ namespace BizHawk.Client.Common
return "X" + (_domain.Size - 1).NumHexDigits(); return "X" + (_domain.Size - 1).NumHexDigits();
} }
return string.Empty; return "";
} }
} }
@ -731,7 +731,7 @@ namespace BizHawk.Client.Common
} }
else else
{ {
return string.Empty; return "";
} }
} }
} }

View File

@ -42,7 +42,7 @@ namespace BizHawk.Client.Common
private IMemoryDomains _memoryDomains; private IMemoryDomains _memoryDomains;
private List<Watch> _watchList = new List<Watch>(0); private List<Watch> _watchList = new List<Watch>(0);
private string _currentFilename = string.Empty; private string _currentFilename = "";
private string _systemid; private string _systemid;
#endregion #endregion
@ -86,7 +86,7 @@ namespace BizHawk.Client.Common
{ {
_watchList.Clear(); _watchList.Clear();
Changes = false; Changes = false;
_currentFilename = string.Empty; _currentFilename = "";
} }
/// <summary> /// <summary>

View File

@ -245,7 +245,7 @@ namespace BizHawk.Client.Common
{ {
get get
{ {
string diff = string.Empty; string diff = "";
int diffVal = _value - _previous; int diffVal = _value - _previous;
if (diffVal > 0) if (diffVal > 0)
{ {

View File

@ -46,7 +46,7 @@ namespace BizHawk.Client.EmuHawk
//---- this is pretty crappy: //---- this is pretty crappy:
var lines = File.ReadAllLines(mSynclessConfigFile); var lines = File.ReadAllLines(mSynclessConfigFile);
string framesdir = string.Empty; string framesdir = "";
foreach (var line in lines) foreach (var line in lines)
{ {
int idx = line.IndexOf('='); int idx = line.IndexOf('=');

View File

@ -51,7 +51,7 @@ namespace BizHawk.Client.EmuHawk
{ {
VideoWriterChooserForm dlg = new VideoWriterChooserForm VideoWriterChooserForm dlg = new VideoWriterChooserForm
{ {
labelDescriptionBody = { Text = string.Empty } labelDescriptionBody = { Text = "" }
}; };
int idx = 0; int idx = 0;
@ -113,7 +113,7 @@ namespace BizHawk.Client.EmuHawk
{ {
labelDescriptionBody.Text = listBox1.SelectedIndex != -1 labelDescriptionBody.Text = listBox1.SelectedIndex != -1
? ((VideoWriterInfo)listBox1.SelectedItem).Attribs.Description ? ((VideoWriterInfo)listBox1.SelectedItem).Attribs.Description
: string.Empty; : "";
} }
private void checkBoxResize_CheckedChanged(object sender, EventArgs e) private void checkBoxResize_CheckedChanged(object sender, EventArgs e)

View File

@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk
{ {
public partial class BizBoxInfoControl : UserControl public partial class BizBoxInfoControl : UserControl
{ {
private string url = string.Empty; private string url = "";
public BizBoxInfoControl(CoreAttributes attributes) public BizBoxInfoControl(CoreAttributes attributes)
{ {
@ -29,7 +29,7 @@ namespace BizHawk.Client.EmuHawk
CoreAuthorLabel.Visible = false; CoreAuthorLabel.Visible = false;
} }
CorePortedLabel.Text = attributes.Ported ? " (Ported)" : string.Empty; CorePortedLabel.Text = attributes.Ported ? " (Ported)" : "";
if (!attributes.Ported) if (!attributes.Ported)
{ {

View File

@ -135,7 +135,7 @@ namespace BizHawk.Client.EmuHawk
{ {
var ret = new TreeNode var ret = new TreeNode
{ {
Text = ci.CoreName + (ci.Released ? string.Empty : " (UNRELEASED)"), Text = ci.CoreName + (ci.Released ? "" : " (UNRELEASED)"),
ForeColor = ci.Released ? Color.Black : Color.DarkGray ForeColor = ci.Released ? Color.Black : Color.DarkGray
}; };
@ -255,7 +255,7 @@ namespace BizHawk.Client.EmuHawk
string img = "Unknown"; string img = "Unknown";
var coreNode = new TreeNode var coreNode = new TreeNode
{ {
Text = t.CoreAttributes.CoreName + (t.CoreAttributes.Released ? string.Empty : " (UNRELEASED)"), Text = t.CoreAttributes.CoreName + (t.CoreAttributes.Released ? "" : " (UNRELEASED)"),
ForeColor = t.CoreAttributes.Released ? Color.Black : Color.DarkGray, ForeColor = t.CoreAttributes.Released ? Color.Black : Color.DarkGray,
ImageKey = img, ImageKey = img,
SelectedImageKey = img, SelectedImageKey = img,

View File

@ -17,7 +17,7 @@ namespace BizHawk.Client.EmuHawk
public class HexTextBox : TextBox, INumberBox public class HexTextBox : TextBox, INumberBox
{ {
private string _addressFormatStr = string.Empty; private string _addressFormatStr = "";
private long? _maxSize; private long? _maxSize;
private bool _nullable = true; private bool _nullable = true;
@ -65,7 +65,7 @@ namespace BizHawk.Client.EmuHawk
public override void ResetText() public override void ResetText()
{ {
Text = _nullable ? string.Empty : string.Format(_addressFormatStr, 0); Text = _nullable ? "" : string.Format(_addressFormatStr, 0);
} }
protected override void OnKeyPress(KeyPressEventArgs e) protected override void OnKeyPress(KeyPressEventArgs e)
@ -153,7 +153,7 @@ namespace BizHawk.Client.EmuHawk
public void SetFromRawInt(int? val) public void SetFromRawInt(int? val)
{ {
Text = val.HasValue ? string.Format(_addressFormatStr, val) : string.Empty; Text = val.HasValue ? string.Format(_addressFormatStr, val) : "";
} }
public void SetFromLong(long val) public void SetFromLong(long val)
@ -203,7 +203,7 @@ namespace BizHawk.Client.EmuHawk
public override void ResetText() public override void ResetText()
{ {
Text = _nullable ? string.Empty : "0"; Text = _nullable ? "" : "0";
} }
protected override void OnKeyDown(KeyEventArgs e) protected override void OnKeyDown(KeyEventArgs e)
@ -278,7 +278,7 @@ namespace BizHawk.Client.EmuHawk
public void SetFromRawInt(int? val) public void SetFromRawInt(int? val)
{ {
Text = val.HasValue ? val.ToString() : string.Empty; Text = val.HasValue ? val.ToString() : "";
} }
} }
} }

View File

@ -59,7 +59,7 @@ namespace BizHawk.Client.EmuHawk
private void CalculatePointedCell(int x, int y) private void CalculatePointedCell(int x, int y)
{ {
int? newRow; int? newRow;
string newColumn = String.Empty; string newColumn = "";
var accumulator = 0; var accumulator = 0;
foreach (ColumnHeader column in Columns) foreach (ColumnHeader column in Columns)
@ -120,7 +120,7 @@ namespace BizHawk.Client.EmuHawk
protected override void OnMouseLeave(EventArgs e) protected override void OnMouseLeave(EventArgs e)
{ {
_currentPointedCell.Column = String.Empty; _currentPointedCell.Column = "";
_currentPointedCell.RowIndex = null; _currentPointedCell.RowIndex = null;
IsPaintDown = false; IsPaintDown = false;
base.OnMouseLeave(e); base.OnMouseLeave(e);

View File

@ -249,7 +249,7 @@ namespace BizHawk.Client.EmuHawk
} }
} }
return string.Empty; return "";
} }
public string InputStrOrAll() public string InputStrOrAll()
@ -293,7 +293,7 @@ namespace BizHawk.Client.EmuHawk
return lg.GenerateInputDisplay(); return lg.GenerateInputDisplay();
} }
return string.Empty; return "";
} }
public string MakeRerecordCount() public string MakeRerecordCount()
@ -303,7 +303,7 @@ namespace BizHawk.Client.EmuHawk
return Global.MovieSession.Movie.Rerecords.ToString(); return Global.MovieSession.Movie.Rerecords.ToString();
} }
return string.Empty; return "";
} }
private void DrawOsdMessage(IBlitter g, string message, Color color, float x, float y) private void DrawOsdMessage(IBlitter g, string message, Color color, float x, float y)

View File

@ -52,7 +52,7 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
var column = new ColumnHeader var column = new ColumnHeader
{ {
Name = columnName, Name = columnName,
Text = columnName.Replace("Column", string.Empty), Text = columnName.Replace("Column", ""),
Width = columnWidth, Width = columnWidth,
}; };
@ -70,7 +70,7 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
var lsstViewColumn = new ColumnHeader var lsstViewColumn = new ColumnHeader
{ {
Name = column.Name, Name = column.Name,
Text = column.Name.Replace("Column", string.Empty), Text = column.Name.Replace("Column", ""),
Width = column.Width, Width = column.Width,
DisplayIndex = column.Index DisplayIndex = column.Index
}; };
@ -95,7 +95,7 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
var menuItem = new ToolStripMenuItem var menuItem = new ToolStripMenuItem
{ {
Name = column.Name, Name = column.Name,
Text = column.Name.Replace("Column", string.Empty) Text = column.Name.Replace("Column", "")
}; };
menuItem.Click += (o, ev) => menuItem.Click += (o, ev) =>
@ -239,7 +239,7 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
var indexes = listViewControl.SelectedIndices; var indexes = listViewControl.SelectedIndices;
if (indexes.Count <= 0) if (indexes.Count <= 0)
{ {
return String.Empty; return "";
} }
var sb = new StringBuilder(); var sb = new StringBuilder();

View File

@ -74,7 +74,7 @@ namespace BizHawk.Client.EmuHawk.CoreExtensions
{ {
var attributes = core.Attributes(); var attributes = core.Attributes();
var str = (!attributes.Released ? "(Experimental) " : string.Empty) + var str = (!attributes.Released ? "(Experimental) " : "") +
attributes.CoreName; attributes.CoreName;
if (core is LibsnesCore) if (core is LibsnesCore)

View File

@ -171,7 +171,7 @@ namespace BizHawk.Client.EmuHawk
{ {
foreach (string file in fileList) foreach (string file in fileList)
{ {
var ext = Path.GetExtension(file).ToUpper() ?? String.Empty; var ext = Path.GetExtension(file).ToUpper() ?? "";
FileInformation fileInformation = new FileInformation(Path.GetDirectoryName(file), Path.GetFileName(file), archive); FileInformation fileInformation = new FileInformation(Path.GetDirectoryName(file), Path.GetFileName(file), archive);
switch (ext) switch (ext)

View File

@ -2905,7 +2905,7 @@ namespace BizHawk.Client.EmuHawk
return; return;
} }
var ext = Path.GetExtension(filePaths[0]) ?? string.Empty; var ext = Path.GetExtension(filePaths[0]) ?? "";
if (ext.ToUpper() == ".LUASES") if (ext.ToUpper() == ".LUASES")
{ {
OpenLuaConsole(); OpenLuaConsole();

View File

@ -1198,7 +1198,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
CheatStatusButton.ToolTipText = string.Empty; CheatStatusButton.ToolTipText = "";
CheatStatusButton.Image = Properties.Resources.Blank; CheatStatusButton.Image = Properties.Resources.Blank;
CheatStatusButton.Visible = false; CheatStatusButton.Visible = false;
} }
@ -1485,7 +1485,7 @@ namespace BizHawk.Client.EmuHawk
public void UpdateDumpIcon() public void UpdateDumpIcon()
{ {
DumpStatusButton.Image = Properties.Resources.Blank; DumpStatusButton.Image = Properties.Resources.Blank;
DumpStatusButton.ToolTipText = string.Empty; DumpStatusButton.ToolTipText = "";
if (Emulator.IsNull()) if (Emulator.IsNull())
{ {
@ -1641,7 +1641,7 @@ namespace BizHawk.Client.EmuHawk
private void HandlePlatformMenus() private void HandlePlatformMenus()
{ {
var system = string.Empty; var system = "";
if (!Global.Game.IsNullInstance) if (!Global.Game.IsNullInstance)
{ {
//New Code //New Code
@ -1835,7 +1835,7 @@ namespace BizHawk.Client.EmuHawk
{ {
PauseStatusButton.Image = Properties.Resources.Blank; PauseStatusButton.Image = Properties.Resources.Blank;
PauseStatusButton.Visible = false; PauseStatusButton.Visible = false;
PauseStatusButton.ToolTipText = string.Empty; PauseStatusButton.ToolTipText = "";
} }
} }
@ -2676,7 +2676,7 @@ namespace BizHawk.Client.EmuHawk
CoreNameStatusBarButton.Text = Emulator.DisplayName(); CoreNameStatusBarButton.Text = Emulator.DisplayName();
CoreNameStatusBarButton.Image = Emulator.Icon(); CoreNameStatusBarButton.Image = Emulator.Icon();
CoreNameStatusBarButton.ToolTipText = attributes.Ported ? "(ported) " : string.Empty; CoreNameStatusBarButton.ToolTipText = attributes.Ported ? "(ported) " : "";
} }
#endregion #endregion
@ -3170,7 +3170,7 @@ namespace BizHawk.Client.EmuHawk
_currAviWriter = null; _currAviWriter = null;
GlobalWin.OSD.AddMessage("A/V capture aborted"); GlobalWin.OSD.AddMessage("A/V capture aborted");
AVIStatusLabel.Image = Properties.Resources.Blank; AVIStatusLabel.Image = Properties.Resources.Blank;
AVIStatusLabel.ToolTipText = string.Empty; AVIStatusLabel.ToolTipText = "";
AVIStatusLabel.Visible = false; AVIStatusLabel.Visible = false;
_aviSoundInputAsync = null; _aviSoundInputAsync = null;
_dumpProxy = null; // return to normal sound output _dumpProxy = null; // return to normal sound output
@ -3191,7 +3191,7 @@ namespace BizHawk.Client.EmuHawk
_currAviWriter = null; _currAviWriter = null;
GlobalWin.OSD.AddMessage("A/V capture stopped"); GlobalWin.OSD.AddMessage("A/V capture stopped");
AVIStatusLabel.Image = Properties.Resources.Blank; AVIStatusLabel.Image = Properties.Resources.Blank;
AVIStatusLabel.ToolTipText = string.Empty; AVIStatusLabel.ToolTipText = "";
AVIStatusLabel.Visible = false; AVIStatusLabel.Visible = false;
_aviSoundInputAsync = null; _aviSoundInputAsync = null;
_dumpProxy = null; // return to normal sound output _dumpProxy = null; // return to normal sound output
@ -3702,7 +3702,7 @@ namespace BizHawk.Client.EmuHawk
GlobalWin.Tools.Restart(); GlobalWin.Tools.Restart();
RewireSound(); RewireSound();
Text = "BizHawk" + (VersionInfo.DeveloperBuild ? " (interim) " : string.Empty); Text = "BizHawk" + (VersionInfo.DeveloperBuild ? " (interim) " : "");
HandlePlatformMenus(); HandlePlatformMenus();
_stateSlots.Clear(); _stateSlots.Clear();
UpdateDumpIcon(); UpdateDumpIcon();

View File

@ -74,7 +74,7 @@ namespace BizHawk.Client.EmuHawk
private void OkBtn_Click(object sender, EventArgs e) private void OkBtn_Click(object sender, EventArgs e)
{ {
var selectedValue = SelectedRadio != null ? SelectedRadio.Text : string.Empty; var selectedValue = SelectedRadio != null ? SelectedRadio.Text : "";
PlatformChoice = AvailableSystems.FirstOrDefault(x => x.FullName == selectedValue).SystemId; PlatformChoice = AvailableSystems.FirstOrDefault(x => x.FullName == selectedValue).SystemId;
if (AlwaysCheckbox.Checked) if (AlwaysCheckbox.Checked)

View File

@ -201,9 +201,9 @@ namespace BizHawk.Client.EmuHawk
IDictionary<string, Dictionary<string, string>> autofire, IDictionary<string, Dictionary<string, string>> autofire,
IDictionary<string, Dictionary<string, Config.AnalogBind>> analog) IDictionary<string, Dictionary<string, Config.AnalogBind>> analog)
{ {
LoadToPanel(NormalControlsTab, _theDefinition.Name, _theDefinition.BoolButtons, _theDefinition.CategoryLabels, normal, string.Empty, CreateNormalPanel); LoadToPanel(NormalControlsTab, _theDefinition.Name, _theDefinition.BoolButtons, _theDefinition.CategoryLabels, normal, "", CreateNormalPanel);
LoadToPanel(AutofireControlsTab, _theDefinition.Name, _theDefinition.BoolButtons, _theDefinition.CategoryLabels, autofire, string.Empty, CreateNormalPanel); LoadToPanel(AutofireControlsTab, _theDefinition.Name, _theDefinition.BoolButtons, _theDefinition.CategoryLabels, autofire, "", CreateNormalPanel);
LoadToPanel(AnalogControlsTab, _theDefinition.Name, _theDefinition.FloatControls, _theDefinition.CategoryLabels, analog, new Config.AnalogBind(string.Empty, 1.0f, 0.1f), CreateAnalogPanel); LoadToPanel(AnalogControlsTab, _theDefinition.Name, _theDefinition.FloatControls, _theDefinition.CategoryLabels, analog, new Config.AnalogBind("", 1.0f, 0.1f), CreateAnalogPanel);
if (AnalogControlsTab.Controls.Count == 0) if (AnalogControlsTab.Controls.Count == 0)
{ {

View File

@ -35,7 +35,7 @@ namespace BizHawk.Client.EmuHawk
.FirstOrDefault(x => x.SystemId == PlatformDropdown.SelectedItem.ToString()).FullName; .FirstOrDefault(x => x.SystemId == PlatformDropdown.SelectedItem.ToString()).FullName;
} }
return string.Empty; return "";
} }
} }
@ -56,7 +56,7 @@ namespace BizHawk.Client.EmuHawk
foreach (var val in dispVals) foreach (var val in dispVals)
{ {
yield return AvailableSystems.FirstOrDefault(x => x.FullName == val).SystemId ?? string.Empty; yield return AvailableSystems.FirstOrDefault(x => x.FullName == val).SystemId ?? "";
} }
} }
} }
@ -72,7 +72,7 @@ namespace BizHawk.Client.EmuHawk
var selectedItem = PlatformDropdown.Items var selectedItem = PlatformDropdown.Items
.OfType<string>() .OfType<string>()
.FirstOrDefault(item => item == (selectedSystem != null ? selectedSystem.FullName : string.Empty)); .FirstOrDefault(item => item == (selectedSystem != null ? selectedSystem.FullName : ""));
if (selectedItem != null) if (selectedItem != null)
{ {

View File

@ -13,7 +13,7 @@ namespace BizHawk.Client.EmuHawk
private readonly Timer _timer = new Timer(); private readonly Timer _timer = new Timer();
private readonly List<string> _bindings = new List<string>(); private readonly List<string> _bindings = new List<string>();
private string _wasPressed = string.Empty; private string _wasPressed = "";
public InputCompositeWidget CompositeWidget; public InputCompositeWidget CompositeWidget;
@ -109,7 +109,7 @@ namespace BizHawk.Client.EmuHawk
public void EraseMappings() public void EraseMappings()
{ {
ClearBindings(); ClearBindings();
Text = string.Empty; Text = "";
} }
/// <summary> /// <summary>
@ -185,7 +185,7 @@ namespace BizHawk.Client.EmuHawk
base.OnKeyUp(e); base.OnKeyUp(e);
} }
_wasPressed = string.Empty; _wasPressed = "";
} }
protected override void OnKeyDown(KeyEventArgs e) protected override void OnKeyDown(KeyEventArgs e)

View File

@ -51,7 +51,7 @@ namespace BizHawk.Client.EmuHawk
"1380 x 768" "1380 x 768"
}; };
private string previousPluginSelection = string.Empty; private string previousPluginSelection = "";
private bool programmaticallyChangingPluginComboBox = false; private bool programmaticallyChangingPluginComboBox = false;
public N64VideoPluginconfig() public N64VideoPluginconfig()

View File

@ -134,7 +134,7 @@ namespace BizHawk.Client.EmuHawk
var btn = new Button var btn = new Button
{ {
Text = string.Empty, Text = "",
Image = Properties.Resources.OpenFile, Image = Properties.Resources.OpenFile,
Location = new Point(widgetOffset, _y + buttonOffsetY), Location = new Point(widgetOffset, _y + buttonOffsetY),
Size = new Size(buttonWidth, buttonHeight), Size = new Size(buttonWidth, buttonHeight),
@ -158,7 +158,7 @@ namespace BizHawk.Client.EmuHawk
var firmwareButton = new Button var firmwareButton = new Button
{ {
Name = "Global", Name = "Global",
Text = String.Empty, Text = "",
Image = Properties.Resources.Help, Image = Properties.Resources.Help,
Location = new Point(UIHelper.ScaleX(115), _y + buttonOffsetY), Location = new Point(UIHelper.ScaleX(115), _y + buttonOffsetY),
Size = new Size(buttonWidth, buttonHeight), Size = new Size(buttonWidth, buttonHeight),

View File

@ -16,7 +16,7 @@ namespace BizHawk.Client.EmuHawk
public EditCommentsForm() public EditCommentsForm()
{ {
InitializeComponent(); InitializeComponent();
_lastHeaderClicked = string.Empty; _lastHeaderClicked = "";
_sortReverse = false; _sortReverse = false;
} }

View File

@ -13,8 +13,8 @@ namespace BizHawk.Client.EmuHawk
public MovieDetails() public MovieDetails()
{ {
Keys = string.Empty; Keys = "";
Values = string.Empty; Values = "";
BackgroundColor = Color.White; BackgroundColor = Color.White;
} }
} }

View File

@ -30,10 +30,10 @@ namespace BizHawk.Client.EmuHawk
MovieView.QueryItemText += MovieView_QueryItemText; MovieView.QueryItemText += MovieView_QueryItemText;
MovieView.VirtualMode = true; MovieView.VirtualMode = true;
_sortReverse = false; _sortReverse = false;
_sortedCol = string.Empty; _sortedCol = "";
_sortDetailsReverse = false; _sortDetailsReverse = false;
_sortedDetailsCol = string.Empty; _sortedDetailsCol = "";
} }
private void PlayMovie_Load(object sender, EventArgs e) private void PlayMovie_Load(object sender, EventArgs e)
@ -47,7 +47,7 @@ namespace BizHawk.Client.EmuHawk
private void MovieView_QueryItemText(int index, int column, out string text) private void MovieView_QueryItemText(int index, int column, out string text)
{ {
text = string.Empty; text = "";
if (column == 0) // File if (column == 0) // File
{ {
text = Path.GetFileName(_movieList[index].Filename); text = Path.GetFileName(_movieList[index].Filename);
@ -108,7 +108,7 @@ namespace BizHawk.Client.EmuHawk
} }
_sortReverse = false; _sortReverse = false;
_sortedCol = string.Empty; _sortedCol = "";
return index; return index;
} }
@ -155,7 +155,7 @@ namespace BizHawk.Client.EmuHawk
{ {
MovieView.Refresh(); MovieView.Refresh();
MovieCount.Text = _movieList.Count + " movie" MovieCount.Text = _movieList.Count + " movie"
+ (_movieList.Count != 1 ? "s" : string.Empty); + (_movieList.Count != 1 ? "s" : "");
} }
private void PreHighlightMovie() private void PreHighlightMovie()
@ -443,7 +443,7 @@ namespace BizHawk.Client.EmuHawk
private void MovieView_SelectedIndexChanged(object sender, EventArgs e) private void MovieView_SelectedIndexChanged(object sender, EventArgs e)
{ {
toolTip1.SetToolTip(DetailsView, string.Empty); toolTip1.SetToolTip(DetailsView, "");
DetailsView.Items.Clear(); DetailsView.Items.Clear();
if (MovieView.SelectedIndices.Count < 1) if (MovieView.SelectedIndices.Count < 1)
{ {

View File

@ -16,7 +16,7 @@ namespace BizHawk.Client.EmuHawk
{ {
private const string DialogTitle = "Basic Bot"; private const string DialogTitle = "Basic Bot";
private string _currentFileName = string.Empty; private string _currentFileName = "";
private string CurrentFileName private string CurrentFileName
{ {
@ -47,7 +47,7 @@ namespace BizHawk.Client.EmuHawk
private BotAttempt _comparisonBotAttempt = null; private BotAttempt _comparisonBotAttempt = null;
private bool _replayMode = false; private bool _replayMode = false;
private int _startFrame = 0; private int _startFrame = 0;
private string _lastRom = string.Empty; private string _lastRom = "";
private bool _dontUpdateValues = false; private bool _dontUpdateValues = false;
@ -345,7 +345,7 @@ namespace BizHawk.Client.EmuHawk
{ {
return StartFromSlotBox.SelectedItem != null return StartFromSlotBox.SelectedItem != null
? StartFromSlotBox.SelectedItem.ToString() ? StartFromSlotBox.SelectedItem.ToString()
: string.Empty; : "";
} }
set set
@ -435,7 +435,7 @@ namespace BizHawk.Client.EmuHawk
private void NewMenuItem_Click(object sender, EventArgs e) private void NewMenuItem_Click(object sender, EventArgs e)
{ {
CurrentFileName = string.Empty; CurrentFileName = "";
_bestBotAttempt = null; _bestBotAttempt = null;
ControlProbabilityPanel.Controls ControlProbabilityPanel.Controls
@ -1021,12 +1021,12 @@ namespace BizHawk.Client.EmuHawk
else else
{ {
ClearBestButton.Enabled = false; ClearBestButton.Enabled = false;
BestAttemptNumberLabel.Text = string.Empty; BestAttemptNumberLabel.Text = "";
BestMaximizeBox.Text = string.Empty; BestMaximizeBox.Text = "";
BestTieBreak1Box.Text = string.Empty; BestTieBreak1Box.Text = "";
BestTieBreak2Box.Text = string.Empty; BestTieBreak2Box.Text = "";
BestTieBreak3Box.Text = string.Empty; BestTieBreak3Box.Text = "";
BestAttemptLogLabel.Text = string.Empty; BestAttemptLogLabel.Text = "";
PlayBestButton.Enabled = false; PlayBestButton.Enabled = false;
} }
} }

View File

@ -79,14 +79,14 @@ namespace BizHawk.Client.EmuHawk
ValueHexIndLabel.Text = ValueHexIndLabel.Text =
CompareHexIndLabel.Text = CompareHexIndLabel.Text =
_cheat.Type == DisplayType.Hex ? HexInd : string.Empty; _cheat.Type == DisplayType.Hex ? HexInd : "";
BigEndianCheckBox.Checked = _cheat.BigEndian.Value; BigEndianCheckBox.Checked = _cheat.BigEndian.Value;
NameBox.Text = _cheat.Name; NameBox.Text = _cheat.Name;
AddressBox.Text = _cheat.AddressStr; AddressBox.Text = _cheat.AddressStr;
ValueBox.Text = _cheat.ValueStr; ValueBox.Text = _cheat.ValueStr;
CompareBox.Text = _cheat.Compare.HasValue ? _cheat.CompareStr : String.Empty; CompareBox.Text = _cheat.Compare.HasValue ? _cheat.CompareStr : "";
if (_cheat.ComparisonType.Equals(Cheat.COMPARISONTYPE.NONE)) if (_cheat.ComparisonType.Equals(Cheat.COMPARISONTYPE.NONE))
{ {
@ -101,7 +101,7 @@ namespace BizHawk.Client.EmuHawk
CheckFormState(); CheckFormState();
if (!_cheat.Compare.HasValue) if (!_cheat.Compare.HasValue)
{ {
CompareBox.Text = String.Empty; // Necessary hack until WatchValueBox.ToRawInt() becomes nullable CompareBox.Text = ""; // Necessary hack until WatchValueBox.ToRawInt() becomes nullable
} }
_loading = false; _loading = false;
@ -113,7 +113,7 @@ namespace BizHawk.Client.EmuHawk
SetSizeSelected(WatchSize.Byte); SetSizeSelected(WatchSize.Byte);
PopulateTypeDropdown(); PopulateTypeDropdown();
NameBox.Text = string.Empty; NameBox.Text = "";
if (MemoryDomains != null) if (MemoryDomains != null)
{ {
@ -140,7 +140,7 @@ namespace BizHawk.Client.EmuHawk
SetTypeSelected(DisplayType.Hex); SetTypeSelected(DisplayType.Hex);
CheckFormState(); CheckFormState();
CompareBox.Text = string.Empty; // TODO: A needed hack until WatchValueBox.ToRawInt() becomes nullable CompareBox.Text = ""; // TODO: A needed hack until WatchValueBox.ToRawInt() becomes nullable
_loading = false; _loading = false;
} }

View File

@ -29,7 +29,7 @@ namespace BizHawk.Client.EmuHawk
private int _defaultWidth; private int _defaultWidth;
private int _defaultHeight; private int _defaultHeight;
private string _sortedColumn = string.Empty; private string _sortedColumn = "";
private bool _sortReverse; private bool _sortReverse;
public Cheats() public Cheats()
@ -46,7 +46,7 @@ namespace BizHawk.Client.EmuHawk
CheatListView.QueryItemBkColor += CheatListView_QueryItemBkColor; CheatListView.QueryItemBkColor += CheatListView_QueryItemBkColor;
CheatListView.VirtualMode = true; CheatListView.VirtualMode = true;
_sortedColumn = string.Empty; _sortedColumn = "";
_sortReverse = false; _sortReverse = false;
} }
@ -110,7 +110,7 @@ namespace BizHawk.Client.EmuHawk
{ {
MessageLabel.Text = saved MessageLabel.Text = saved
? Path.GetFileName(Global.CheatList.CurrentFileName) + " saved." ? Path.GetFileName(Global.CheatList.CurrentFileName) + " saved."
: Path.GetFileName(Global.CheatList.CurrentFileName) + (Global.CheatList.Changes ? " *" : string.Empty); : Path.GetFileName(Global.CheatList.CurrentFileName) + (Global.CheatList.Changes ? " *" : "");
} }
public bool AskSaveChanges() public bool AskSaveChanges()
@ -234,7 +234,7 @@ namespace BizHawk.Client.EmuHawk
private void CheatListView_QueryItemText(int index, int column, out string text) private void CheatListView_QueryItemText(int index, int column, out string text)
{ {
text = string.Empty; text = "";
if (index >= Global.CheatList.Count || Global.CheatList[index].IsSeparator) if (index >= Global.CheatList.Count || Global.CheatList[index].IsSeparator)
{ {
return; return;
@ -257,7 +257,7 @@ namespace BizHawk.Client.EmuHawk
text = Global.CheatList[index].CompareStr; text = Global.CheatList[index].CompareStr;
break; break;
case ON: case ON:
text = Global.CheatList[index].Enabled ? "*" : string.Empty; text = Global.CheatList[index].Enabled ? "*" : "";
break; break;
case DOMAIN: case DOMAIN:
text = Global.CheatList[index].Domain.Name; text = Global.CheatList[index].Domain.Name;

View File

@ -39,7 +39,7 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
private void BreakPointView_QueryItemText(int index, int column, out string text) private void BreakPointView_QueryItemText(int index, int column, out string text)
{ {
text = string.Empty; text = "";
switch (column) switch (column)
{ {
case 0: case 0:

View File

@ -122,7 +122,7 @@ namespace BizHawk.Client.EmuHawk
else else
{ {
SeekToBox.Nullable = true; SeekToBox.Nullable = true;
SeekToBox.Text = string.Empty; SeekToBox.Text = "";
} }
StepIntoMenuItem.Enabled = StepIntoBtn.Enabled = CanStepInto; StepIntoMenuItem.Enabled = StepIntoBtn.Enabled = CanStepInto;

View File

@ -181,7 +181,7 @@ namespace BizHawk.Client.EmuHawk
{ {
try try
{ {
if (t.Text != String.Empty) if (t.Text != "")
{ {
Core.SetCpuRegister(t.Name, int.Parse(t.Text, System.Globalization.NumberStyles.HexNumber)); Core.SetCpuRegister(t.Name, int.Parse(t.Text, System.Globalization.NumberStyles.HexNumber));
} }

View File

@ -143,7 +143,7 @@ namespace BizHawk.Client.EmuHawk
private string GBGGEncode(int val, int add, int cmp) private string GBGGEncode(int val, int add, int cmp)
{ {
char[] letters = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; char[] letters = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
string code = string.Empty; string code = "";
int[] num = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int[] num = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
num[0] = (val & 0xF0) >> 4; num[0] = (val & 0xF0) >> 4;
num[1] = val & 0x0F; num[1] = val & 0x0F;
@ -259,10 +259,10 @@ namespace BizHawk.Client.EmuHawk
private void ClearButton_Click(object sender, EventArgs e) private void ClearButton_Click(object sender, EventArgs e)
{ {
AddressBox.Text = string.Empty; AddressBox.Text = "";
ValueBox.Text = string.Empty; ValueBox.Text = "";
CompareBox.Text = string.Empty; CompareBox.Text = "";
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
@ -275,7 +275,7 @@ namespace BizHawk.Client.EmuHawk
// remove invalid character when pasted // remove invalid character when pasted
if (Regex.IsMatch(CompareBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(CompareBox.Text, @"[^a-fA-F0-9]"))
{ {
CompareBox.Text = Regex.Replace(CompareBox.Text, @"[^a-fA-F0-9]", string.Empty); CompareBox.Text = Regex.Replace(CompareBox.Text, @"[^a-fA-F0-9]", "");
} }
if ((CompareBox.Text.Length == 2) || (CompareBox.Text.Length == 0)) if ((CompareBox.Text.Length == 2) || (CompareBox.Text.Length == 0))
@ -305,7 +305,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
} }
@ -323,7 +323,7 @@ namespace BizHawk.Client.EmuHawk
// remove invalid character when pasted // remove invalid character when pasted
if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]"))
{ {
ValueBox.Text = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", string.Empty); ValueBox.Text = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", "");
} }
if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0))
@ -351,7 +351,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
@ -367,7 +367,7 @@ namespace BizHawk.Client.EmuHawk
_processing = true; _processing = true;
if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]"))
{ {
AddressBox.Text = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", string.Empty); AddressBox.Text = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", "");
} }
if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0))
@ -396,7 +396,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
@ -408,7 +408,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (GGCodeMaskBox.Text.Length < 9) if (GGCodeMaskBox.Text.Length < 9)
{ {
var code = string.Empty; var code = "";
if (sender == B0) { code = "0"; } if (sender == B0) { code = "0"; }
else if (sender == B1) { code = "1"; } else if (sender == B1) { code = "1"; }
@ -447,7 +447,7 @@ namespace BizHawk.Client.EmuHawk
// insert REGEX Remove non HEXA char // insert REGEX Remove non HEXA char
if (Regex.IsMatch(GGCodeMaskBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(GGCodeMaskBox.Text, @"[^a-fA-F0-9]"))
{ {
GGCodeMaskBox.Text = Regex.Replace(GGCodeMaskBox.Text, @"[^a-fA-F0-9]", string.Empty); GGCodeMaskBox.Text = Regex.Replace(GGCodeMaskBox.Text, @"[^a-fA-F0-9]", "");
} }
if (GGCodeMaskBox.Text.Length > 0) if (GGCodeMaskBox.Text.Length > 0)
@ -472,16 +472,16 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
CompareBox.Text = string.Empty; CompareBox.Text = "";
} }
addcheatbt.Enabled = true; addcheatbt.Enabled = true;
} }
else else
{ {
AddressBox.Text = string.Empty; AddressBox.Text = "";
ValueBox.Text = string.Empty; ValueBox.Text = "";
CompareBox.Text = string.Empty; CompareBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }

View File

@ -177,10 +177,10 @@ namespace BizHawk.Client.EmuHawk
_processing = true; _processing = true;
// remove Invalid I O Q P if pasted // remove Invalid I O Q P if pasted
GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("I", string.Empty); GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("I", "");
GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("O", string.Empty); GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("O", "");
GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("Q", string.Empty); GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("Q", "");
GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("U", string.Empty); GGCodeMaskBox.Text = GGCodeMaskBox.Text.Replace("U", "");
if (GGCodeMaskBox.Text.Length > 0) if (GGCodeMaskBox.Text.Length > 0)
{ {
@ -193,8 +193,8 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
AddressBox.Text = string.Empty; AddressBox.Text = "";
ValueBox.Text = string.Empty; ValueBox.Text = "";
AddCheatButton.Enabled = false; AddCheatButton.Enabled = false;
} }
@ -210,7 +210,7 @@ namespace BizHawk.Client.EmuHawk
_processing = true; _processing = true;
if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]"))
{ {
AddressBox.Text = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", string.Empty); AddressBox.Text = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", "");
} }
if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0))
@ -232,7 +232,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
AddCheatButton.Enabled = false; AddCheatButton.Enabled = false;
} }
@ -249,7 +249,7 @@ namespace BizHawk.Client.EmuHawk
// remove invalid character when pasted // remove invalid character when pasted
if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]"))
{ {
ValueBox.Text = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", string.Empty); ValueBox.Text = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", "");
} }
if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0))
@ -271,7 +271,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
AddCheatButton.Enabled = false; AddCheatButton.Enabled = false;
} }
@ -281,9 +281,9 @@ namespace BizHawk.Client.EmuHawk
private void ClearButton_Click(object sender, EventArgs e) private void ClearButton_Click(object sender, EventArgs e)
{ {
AddressBox.Text = string.Empty; AddressBox.Text = "";
ValueBox.Text = string.Empty; ValueBox.Text = "";
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
AddCheatButton.Enabled = false; AddCheatButton.Enabled = false;
} }

View File

@ -73,7 +73,7 @@ namespace BizHawk.Client.EmuHawk
private long _row; private long _row;
private long _addr; private long _addr;
private string _findStr = string.Empty; private string _findStr = "";
private bool _mouseIsDown; private bool _mouseIsDown;
private byte[] _rom; private byte[] _rom;
private MemoryDomain _romDomain; private MemoryDomain _romDomain;
@ -159,7 +159,7 @@ namespace BizHawk.Client.EmuHawk
// Do nothing // Do nothing
} }
private string _lastRom = string.Empty; private string _lastRom = "";
public void Restart() public void Restart()
{ {
@ -234,7 +234,7 @@ namespace BizHawk.Client.EmuHawk
{ {
long found = -1; long found = -1;
var search = value.Replace(" ", string.Empty).ToUpper(); var search = value.Replace(" ", "").ToUpper();
if (string.IsNullOrEmpty(search)) if (string.IsNullOrEmpty(search))
{ {
return; return;
@ -290,7 +290,7 @@ namespace BizHawk.Client.EmuHawk
{ {
long found = -1; long found = -1;
var search = value.Replace(" ", string.Empty).ToUpper(); var search = value.Replace(" ", "").ToUpper();
if (string.IsNullOrEmpty(search)) if (string.IsNullOrEmpty(search))
{ {
return; return;
@ -755,11 +755,11 @@ namespace BizHawk.Client.EmuHawk
{ {
default: default:
case 1: case 1:
return Watch.GenerateWatch(_domain, address, WatchSize.Byte, Client.Common.DisplayType.Hex, BigEndian, string.Empty); return Watch.GenerateWatch(_domain, address, WatchSize.Byte, Client.Common.DisplayType.Hex, BigEndian, "");
case 2: case 2:
return Watch.GenerateWatch(_domain, address, WatchSize.Word, Client.Common.DisplayType.Hex, BigEndian, string.Empty); return Watch.GenerateWatch(_domain, address, WatchSize.Word, Client.Common.DisplayType.Hex, BigEndian, "");
case 4: case 4:
return Watch.GenerateWatch(_domain, address, WatchSize.DWord, Client.Common.DisplayType.Hex, BigEndian, string.Empty); return Watch.GenerateWatch(_domain, address, WatchSize.DWord, Client.Common.DisplayType.Hex, BigEndian, "");
} }
} }
@ -910,7 +910,7 @@ namespace BizHawk.Client.EmuHawk
var result = sfd.ShowHawkDialog(); var result = sfd.ShowHawkDialog();
return result == DialogResult.OK ? sfd.FileName : string.Empty; return result == DialogResult.OK ? sfd.FileName : "";
} }
private string GetSaveFileFromUser() private string GetSaveFileFromUser()
@ -933,7 +933,7 @@ namespace BizHawk.Client.EmuHawk
var result = sfd.ShowHawkDialog(); var result = sfd.ShowHawkDialog();
return result == DialogResult.OK ? sfd.FileName : string.Empty; return result == DialogResult.OK ? sfd.FileName : "";
} }
private void ResetScrollBar() private void ResetScrollBar()
@ -1069,7 +1069,7 @@ namespace BizHawk.Client.EmuHawk
private string MakeNibbles() private string MakeNibbles()
{ {
var str = string.Empty; var str = "";
for (var x = 0; x < (DataSize * 2); x++) for (var x = 0; x < (DataSize * 2); x++)
{ {
if (_nibbles[x] != 'G') if (_nibbles[x] != 'G')
@ -1181,7 +1181,7 @@ namespace BizHawk.Client.EmuHawk
return string.Format(_digitFormatString, MakeValue(address)).Trim(); return string.Format(_digitFormatString, MakeValue(address)).Trim();
} }
return string.Empty; return "";
} }
private string GetFindValues() private string GetFindValues()
@ -1192,7 +1192,7 @@ namespace BizHawk.Client.EmuHawk
return _secondaryHighlightedAddresses.Aggregate(values, (current, x) => current + ValueString(x)); return _secondaryHighlightedAddresses.Aggregate(values, (current, x) => current + ValueString(x));
} }
return string.Empty; return "";
} }
private void HighlightSecondaries(string value, long found) private void HighlightSecondaries(string value, long found)
@ -2305,7 +2305,7 @@ namespace BizHawk.Client.EmuHawk
else else
{ {
_secondaryHighlightedAddresses.Clear(); _secondaryHighlightedAddresses.Clear();
_findStr = string.Empty; _findStr = "";
SetHighlighted(pointedAddress); SetHighlighted(pointedAddress);
} }

View File

@ -19,7 +19,7 @@ namespace BizHawk.Client.EmuHawk
public string InitialValue public string InitialValue
{ {
get { return FindBox.Text; } get { return FindBox.Text; }
set { FindBox.Text = value ?? string.Empty; } set { FindBox.Text = value ?? ""; }
} }
private void HexFind_Load(object sender, EventArgs e) private void HexFind_Load(object sender, EventArgs e)
@ -37,7 +37,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (string.IsNullOrWhiteSpace(FindBox.Text)) if (string.IsNullOrWhiteSpace(FindBox.Text))
{ {
return string.Empty; return "";
} }
if (HexRadio.Checked) if (HexRadio.Checked)

View File

@ -34,7 +34,7 @@ namespace BizHawk.Client.EmuHawk
set set
{ {
PromptLabel.Text = value ?? string.Empty; PromptLabel.Text = value ?? "";
Height += PromptLabel.Font.Height * Message.Count(x => x == '\n'); Height += PromptLabel.Font.Height * Message.Count(x => x == '\n');
} }
} }
@ -42,12 +42,12 @@ namespace BizHawk.Client.EmuHawk
public string InitialValue public string InitialValue
{ {
get { return PromptBox.Text; } get { return PromptBox.Text; }
set { PromptBox.Text = value ?? string.Empty; } set { PromptBox.Text = value ?? ""; }
} }
public string PromptText public string PromptText
{ {
get { return PromptBox.Text ?? string.Empty; } get { return PromptBox.Text ?? ""; }
} }
private void InputPrompt_Load(object sender, EventArgs e) private void InputPrompt_Load(object sender, EventArgs e)

View File

@ -72,7 +72,7 @@ namespace BizHawk.Client.EmuHawk
)] )]
public static void Write(params object[] outputs) public static void Write(params object[] outputs)
{ {
LogWithSeparator(string.Empty, string.Empty, outputs); LogWithSeparator("", "", outputs);
} }
// Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable // Outputs the given object to the output box on the Lua Console dialog. Note: Can accept a LuaTable

View File

@ -56,7 +56,7 @@ namespace BizHawk.Client.EmuHawk
private static void SetText(Control control, string caption) private static void SetText(Control control, string caption)
{ {
control.Text = caption ?? string.Empty; control.Text = caption ?? "";
} }
#endregion #endregion
@ -263,7 +263,7 @@ namespace BizHawk.Client.EmuHawk
ConsoleLuaLibrary.Log(ex.Message); ConsoleLuaLibrary.Log(ex.Message);
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(
@ -301,7 +301,7 @@ namespace BizHawk.Client.EmuHawk
ConsoleLuaLibrary.Log(ex.Message); ConsoleLuaLibrary.Log(ex.Message);
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(
@ -442,7 +442,7 @@ namespace BizHawk.Client.EmuHawk
return openFileDialog1.FileName; return openFileDialog1.FileName;
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(

View File

@ -96,7 +96,7 @@ namespace BizHawk.Client.EmuHawk
} }
} }
return string.Empty; return "";
} }
[LuaMethodAttributes( [LuaMethodAttributes(

View File

@ -51,7 +51,7 @@ namespace BizHawk.Client.EmuHawk
{ {
Settings = new LuaConsoleSettings(); Settings = new LuaConsoleSettings();
_sortReverse = false; _sortReverse = false;
_lastColumnSorted = string.Empty; _lastColumnSorted = "";
_luaList = new LuaFileList _luaList = new LuaFileList
{ {
ChangedCallback = SessionChangedCallback, ChangedCallback = SessionChangedCallback,
@ -243,7 +243,7 @@ namespace BizHawk.Client.EmuHawk
if (LuaAlreadyInSession(processedPath) == false) if (LuaAlreadyInSession(processedPath) == false)
{ {
var luaFile = new LuaFile(string.Empty, processedPath); var luaFile = new LuaFile("", processedPath);
_luaList.Add(luaFile); _luaList.Add(luaFile);
LuaListView.ItemCount = _luaList.Count; LuaListView.ItemCount = _luaList.Count;
@ -336,7 +336,7 @@ namespace BizHawk.Client.EmuHawk
private void SessionChangedCallback() private void SessionChangedCallback()
{ {
OutputMessages.Text = OutputMessages.Text =
(_luaList.Changes ? "* " : string.Empty) + (_luaList.Changes ? "* " : "") +
Path.GetFileName(_luaList.Filename); Path.GetFileName(_luaList.Filename);
} }
@ -378,7 +378,7 @@ namespace BizHawk.Client.EmuHawk
private void LuaListView_QueryItemText(int index, int column, out string text) private void LuaListView_QueryItemText(int index, int column, out string text)
{ {
text = string.Empty; text = "";
if (column == 0) if (column == 0)
{ {
text = Path.GetFileNameWithoutExtension(_luaList[index].Path); // TODO: how about allow the user to name scripts? text = Path.GetFileNameWithoutExtension(_luaList[index].Path); // TODO: how about allow the user to name scripts?
@ -393,7 +393,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (path.StartsWith(".\\")) if (path.StartsWith(".\\"))
{ {
return path.Replace(".\\", string.Empty); return path.Replace(".\\", "");
} }
return path; return path;
@ -427,7 +427,7 @@ namespace BizHawk.Client.EmuHawk
private void UpdateNumberOfScripts() private void UpdateNumberOfScripts()
{ {
var message = string.Empty; var message = "";
var total = SelectedFiles.Count(); var total = SelectedFiles.Count();
var active = _luaList.Count(file => file.Enabled); var active = _luaList.Count(file => file.Enabled);
var paused = _luaList.Count(file => file.Enabled && file.Paused); var paused = _luaList.Count(file => file.Enabled && file.Paused);
@ -482,7 +482,7 @@ namespace BizHawk.Client.EmuHawk
OutputBox.Invoke(() => OutputBox.Invoke(() =>
{ {
OutputBox.Text = string.Empty; OutputBox.Text = "";
OutputBox.Refresh(); OutputBox.Refresh();
}); });
} }
@ -1302,7 +1302,7 @@ namespace BizHawk.Client.EmuHawk
for (var i = 0; i < _luaList.Count; i++) for (var i = 0; i < _luaList.Count; i++)
{ {
_luaList[i] = luaListTemp[i]; _luaList[i] = luaListTemp[i];
_luaList[i].Name = string.Empty; _luaList[i].Name = "";
} }
UpdateDialog(); UpdateDialog();

View File

@ -57,7 +57,7 @@ namespace BizHawk.Client.EmuHawk
private void FunctionView_QueryItemText(int index, int column, out string text) private void FunctionView_QueryItemText(int index, int column, out string text)
{ {
text = string.Empty; text = "";
try try
{ {

View File

@ -236,7 +236,7 @@ namespace BizHawk.Client.EmuHawk
private static string ConvertToTag(string name) private static string ConvertToTag(string name)
{ {
return new Regex("[^A-Za-z0-9]").Replace(name, string.Empty); return new Regex("[^A-Za-z0-9]").Replace(name, "");
} }
private void NameBox_TextChanged(object sender, EventArgs e) private void NameBox_TextChanged(object sender, EventArgs e)
@ -246,7 +246,7 @@ namespace BizHawk.Client.EmuHawk
private void BrowseBtn_Click(object sender, EventArgs e) private void BrowseBtn_Click(object sender, EventArgs e)
{ {
string filename = string.Empty; string filename = "";
string initialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MultiDiskBundlesFragment, "Global_NULL"); string initialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MultiDiskBundlesFragment, "Global_NULL");
if (!Global.Game.IsNullInstance) if (!Global.Game.IsNullInstance)

View File

@ -129,7 +129,7 @@ namespace BizHawk.Client.EmuHawk
AddressBox.Text = AddressBox.Text =
CompareBox.Text = CompareBox.Text =
ValueBox.Text = ValueBox.Text =
string.Empty; "";
AddCheat.Enabled = false; AddCheat.Enabled = false;
} }
@ -174,7 +174,7 @@ namespace BizHawk.Client.EmuHawk
private void ClearButton_Click(object sender, EventArgs e) private void ClearButton_Click(object sender, EventArgs e)
{ {
ClearProperties(); ClearProperties();
GameGenieCode.Text = string.Empty; GameGenieCode.Text = "";
Encoding.Checked = false; Encoding.Checked = false;
} }
@ -231,7 +231,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (GameGenieCode.Text.Length < 8) if (GameGenieCode.Text.Length < 8)
{ {
var code = string.Empty; var code = "";
if (sender == A) code = "A"; if (sender == A) code = "A";
if (sender == P) code += "P"; if (sender == P) code += "P";
if (sender == Z) code += "Z"; if (sender == Z) code += "Z";

View File

@ -341,11 +341,11 @@ namespace BizHawk.Client.EmuHawk
private void NameTableView_MouseLeave(object sender, EventArgs e) private void NameTableView_MouseLeave(object sender, EventArgs e)
{ {
XYLabel.Text = string.Empty; XYLabel.Text = "";
PPUAddressLabel.Text = string.Empty; PPUAddressLabel.Text = "";
TileIDLabel.Text = string.Empty; TileIDLabel.Text = "";
TableLabel.Text = string.Empty; TableLabel.Text = "";
PaletteLabel.Text = string.Empty; PaletteLabel.Text = "";
} }
#endregion #endregion

View File

@ -282,12 +282,12 @@ namespace BizHawk.Client.EmuHawk
private void ClearDetails() private void ClearDetails()
{ {
DetailsBox.Text = "Details"; DetailsBox.Text = "Details";
AddressLabel.Text = string.Empty; AddressLabel.Text = "";
ValueLabel.Text = string.Empty; ValueLabel.Text = "";
Value2Label.Text = string.Empty; Value2Label.Text = "";
Value3Label.Text = string.Empty; Value3Label.Text = "";
Value4Label.Text = string.Empty; Value4Label.Text = "";
Value5Label.Text = string.Empty; Value5Label.Text = "";
ZoomBox.Image = _zoomBoxDefaultImage; ZoomBox.Image = _zoomBoxDefaultImage;
} }

View File

@ -152,7 +152,7 @@ namespace BizHawk.Client.EmuHawk
// maps to| Value |i|j|k|l|q|r|s|t|o|p|a|b|c|d|u|v|w|x|e|f|g|h|m|n| // maps to| Value |i|j|k|l|q|r|s|t|o|p|a|b|c|d|u|v|w|x|e|f|g|h|m|n|
// order | Value |a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x| // order | Value |a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|
char[] letters = { 'D', 'F', '4', '7', '0', '9', '1', '5', '6', 'B', 'C', '8', 'A', '2', '3', 'E' }; char[] letters = { 'D', 'F', '4', '7', '0', '9', '1', '5', '6', 'B', 'C', '8', 'A', '2', '3', 'E' };
var code = string.Empty; var code = "";
int[] num = { 0, 0, 0, 0, 0, 0, 0, 0 }; int[] num = { 0, 0, 0, 0, 0, 0, 0, 0 };
num[0] = (val & 0xF0) >> 4; num[0] = (val & 0xF0) >> 4;
num[1] = val & 0x0F; num[1] = val & 0x0F;
@ -176,9 +176,9 @@ namespace BizHawk.Client.EmuHawk
private void ClearButton_Click(object sender, EventArgs e) private void ClearButton_Click(object sender, EventArgs e)
{ {
AddressBox.Text = string.Empty; AddressBox.Text = "";
ValueBox.Text = string.Empty; ValueBox.Text = "";
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
@ -235,7 +235,7 @@ namespace BizHawk.Client.EmuHawk
_processing = true; _processing = true;
if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(AddressBox.Text, @"[^a-fA-F0-9]"))
{ {
AddressBox.Text = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", string.Empty); AddressBox.Text = Regex.Replace(AddressBox.Text, @"[^a-fA-F0-9]", "");
} }
if (!string.IsNullOrEmpty(AddressBox.Text) || !string.IsNullOrEmpty(ValueBox.Text)) if (!string.IsNullOrEmpty(AddressBox.Text) || !string.IsNullOrEmpty(ValueBox.Text))
@ -256,7 +256,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
@ -273,7 +273,7 @@ namespace BizHawk.Client.EmuHawk
// remove invalid character when pasted // remove invalid character when pasted
if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(ValueBox.Text, @"[^a-fA-F0-9]"))
{ {
ValueBox.Text = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", string.Empty); ValueBox.Text = Regex.Replace(ValueBox.Text, @"[^a-fA-F0-9]", "");
} }
if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0)) if ((AddressBox.Text.Length > 0) || (ValueBox.Text.Length > 0))
@ -294,7 +294,7 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
GGCodeMaskBox.Text = string.Empty; GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
@ -311,7 +311,7 @@ namespace BizHawk.Client.EmuHawk
// insert REGEX Remove non HEXA char // insert REGEX Remove non HEXA char
if (Regex.IsMatch(GGCodeMaskBox.Text, @"[^a-fA-F0-9]")) if (Regex.IsMatch(GGCodeMaskBox.Text, @"[^a-fA-F0-9]"))
{ {
GGCodeMaskBox.Text = Regex.Replace(GGCodeMaskBox.Text, @"[^a-fA-F0-9]", string.Empty); GGCodeMaskBox.Text = Regex.Replace(GGCodeMaskBox.Text, @"[^a-fA-F0-9]", "");
} }
if (GGCodeMaskBox.Text.Length > 0) if (GGCodeMaskBox.Text.Length > 0)
@ -324,8 +324,8 @@ namespace BizHawk.Client.EmuHawk
} }
else else
{ {
AddressBox.Text = string.Empty; AddressBox.Text = "";
ValueBox.Text = string.Empty; ValueBox.Text = "";
addcheatbt.Enabled = false; addcheatbt.Enabled = false;
} }
@ -337,7 +337,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (GGCodeMaskBox.Text.Length < 8) if (GGCodeMaskBox.Text.Length < 8)
{ {
var code = string.Empty; var code = "";
if (sender == B0) code = "0"; if (sender == B0) code = "0";
if (sender == B1) code = "1"; if (sender == B1) code = "1";
if (sender == B2) code = "2"; if (sender == B2) code = "2";

View File

@ -66,7 +66,7 @@ namespace BizHawk.Client.EmuHawk
private void QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY) private void QueryItemText(int index, InputRoll.RollColumn column, out string text, ref int offsetX, ref int offsetY)
{ {
text = string.Empty; text = "";
if (index >= Movie.BranchCount) if (index >= Movie.BranchCount)
{ {

View File

@ -13,8 +13,8 @@ namespace BizHawk.Client.EmuHawk
public partial class TAStudio public partial class TAStudio
{ {
// Input Painting // Input Painting
private string _startBoolDrawColumn = string.Empty; private string _startBoolDrawColumn = "";
private string _startFloatDrawColumn = string.Empty; private string _startFloatDrawColumn = "";
private bool _boolPaintState; private bool _boolPaintState;
private float _floatPaintState; private float _floatPaintState;
private float _floatBackupState; private float _floatBackupState;
@ -25,7 +25,7 @@ namespace BizHawk.Client.EmuHawk
private bool _supressContextMenu; private bool _supressContextMenu;
// Editing analog input // Editing analog input
private string _floatEditColumn = string.Empty; private string _floatEditColumn = "";
private int _floatEditRow = -1; private int _floatEditRow = -1;
private string _floatTypedValue; private string _floatTypedValue;
private int _floatEditYPos = -1; private int _floatEditYPos = -1;
@ -265,7 +265,7 @@ namespace BizHawk.Client.EmuHawk
try try
{ {
text = string.Empty; text = "";
var columnName = column.Name; var columnName = column.Name;
if (columnName == CursorColumnName) if (columnName == CursorColumnName)
@ -302,7 +302,7 @@ namespace BizHawk.Client.EmuHawk
} }
catch (Exception ex) catch (Exception ex)
{ {
text = string.Empty; text = "";
MessageBox.Show("oops\n" + ex); MessageBox.Show("oops\n" + ex);
} }
} }
@ -639,8 +639,8 @@ namespace BizHawk.Client.EmuHawk
{ {
_startCursorDrag = false; _startCursorDrag = false;
_startSelectionDrag = false; _startSelectionDrag = false;
_startBoolDrawColumn = string.Empty; _startBoolDrawColumn = "";
_startFloatDrawColumn = string.Empty; _startFloatDrawColumn = "";
TasView.ReleaseCurrentCell(); TasView.ReleaseCurrentCell();
// Exit float editing if value was changed with cursor // Exit float editing if value was changed with cursor
if (FloatEditingMode && _floatPaintState != CurrentTasMovie.GetFloatState(_floatEditRow, _floatEditColumn)) if (FloatEditingMode && _floatPaintState != CurrentTasMovie.GetFloatState(_floatEditRow, _floatEditColumn))
@ -756,7 +756,7 @@ namespace BizHawk.Client.EmuHawk
{ {
if (Settings.EmptyMarkers) if (Settings.EmptyMarkers)
{ {
CurrentTasMovie.Markers.Add(TasView.CurrentCell.RowIndex.Value, string.Empty); CurrentTasMovie.Markers.Add(TasView.CurrentCell.RowIndex.Value, "");
RefreshDialog(); RefreshDialog();
} }
else else

View File

@ -50,7 +50,7 @@ namespace BizHawk.Client.EmuHawk
var filename = CurrentTasMovie.Filename; var filename = CurrentTasMovie.Filename;
if (string.IsNullOrWhiteSpace(filename) || filename == DefaultTasProjName()) if (string.IsNullOrWhiteSpace(filename) || filename == DefaultTasProjName())
{ {
filename = string.Empty; filename = "";
} }
// need to be fancy here, so call the ofd constructor directly instead of helper // need to be fancy here, so call the ofd constructor directly instead of helper

View File

@ -380,7 +380,7 @@ namespace BizHawk.Client.EmuHawk
private void SetUpColumns() private void SetUpColumns()
{ {
TasView.AllColumns.Clear(); TasView.AllColumns.Clear();
AddColumn(CursorColumnName, string.Empty, 18); AddColumn(CursorColumnName, "", 18);
AddColumn(FrameColumnName, "Frame#", 68); AddColumn(FrameColumnName, "Frame#", 68);
var columnNames = GenerateColumnNames(); var columnNames = GenerateColumnNames();

View File

@ -72,7 +72,7 @@ namespace BizHawk.Client.EmuHawk
public T Load<T>(bool focus = true) public T Load<T>(bool focus = true)
where T : class, IToolForm where T : class, IToolForm
{ {
return Load<T>(string.Empty, focus); return Load<T>("", focus);
} }
/// <summary> /// <summary>

Some files were not shown because too many files have changed in this diff Show More