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

View File

@ -31,7 +31,7 @@ namespace BizHawk.Client.ApiHawk
{
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");
}
@ -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="system"><see cref="CoreSystem"/> that your external tool is used for</param>
public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system)
:this(usage, system, string.Empty)
:this(usage, system, "")
{}
/// <summary>
/// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
/// </summary>
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];
item = new ToolStripMenuItem(attribute.Name);
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));
if (s != null)

View File

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

View File

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

View File

@ -4,7 +4,7 @@ namespace BizHawk.Client.Common
{
public class NESGameGenieDecoder
{
private readonly string _code = string.Empty;
private readonly string _code = "";
private readonly Dictionary<char, int> _gameGenieTable = new Dictionary<char, int>
{
@ -134,7 +134,7 @@ namespace BizHawk.Client.Common
_value = value;
_compare = compare;
GameGenieCode = string.Empty;
GameGenieCode = "";
}
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 string.Empty;
return "";
}
return path;
@ -248,7 +248,7 @@ namespace BizHawk.Client.Common
{
var newStr = name;
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)
@ -256,7 +256,7 @@ namespace BizHawk.Client.Common
var filesystemSafeName = game.Name
.Replace("|", "+")
.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.
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
var name = FilesystemSafeName(game);
name = Path.GetDirectoryName(name);
if (name == string.Empty)
if (name == "")
{
name = FilesystemSafeName(game);
}
@ -318,7 +318,7 @@ namespace BizHawk.Client.Common
// hijinx here to get the core name out of the game name
var name = FilesystemSafeName(game);
name = Path.GetDirectoryName(name);
if (name == string.Empty)
if (name == "")
{
name = FilesystemSafeName(game);
}

View File

@ -37,7 +37,7 @@ namespace BizHawk.Client.Common
public int Count => recentlist.Count;
[JsonIgnore]
public string MostRecent => recentlist.Any() ? recentlist[0] : string.Empty;
public string MostRecent => recentlist.Any() ? recentlist[0] : "";
public string this[int index]
{
@ -48,7 +48,7 @@ namespace BizHawk.Client.Common
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
{
DoLoadErrorCallback("Failed multiple attempts to load ROM.", string.Empty);
DoLoadErrorCallback("Failed multiple attempts to load ROM.", "");
return false;
}
@ -364,7 +364,7 @@ namespace BizHawk.Client.Common
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;
}
@ -432,7 +432,7 @@ namespace BizHawk.Client.Common
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;
}
@ -654,7 +654,7 @@ namespace BizHawk.Client.Common
{
// need to get rid of this hack at some point
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[] xmlData = rom.FileData;
@ -769,7 +769,7 @@ namespace BizHawk.Client.Common
else
{
// 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 xmlData = isXml ? rom.FileData : null;
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);
string userData = string.Empty;
string userData = "";
bl.GetLump(BinaryStateLump.UserData, false, delegate(TextReader tr)
{
string line;
@ -226,7 +226,7 @@ namespace BizHawk.Client.Common
break;
}
if (str.Trim() == string.Empty)
if (str.Trim() == "")
{
continue;
}

View File

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

View File

@ -47,7 +47,7 @@ namespace BizHawk.Client.Common
},
Xml = x
};
string fullpath = string.Empty;
string fullpath = "";
var n = y.SelectSingleNode("./LoadAssets");
if (n != null)
@ -82,7 +82,7 @@ namespace BizHawk.Client.Common
else
{
// 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());
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
public Dictionary<string, string> PreferredPlatformsForExtensions = new Dictionary<string, string>
{
{ ".bin", string.Empty },
{ ".rom", string.Empty },
{ ".iso", string.Empty },
{ ".img", string.Empty },
{ ".bin", "" },
{ ".rom", "" },
{ ".iso", "" },
{ ".img", "" },
};
// Path Settings ************************************/
@ -88,7 +88,7 @@ namespace BizHawk.Client.Common
public int TargetScanlineFilterIntensity = 128; // choose between 0 and 256
public int TargetDisplayFilter = 0;
public int DispFinalFilter = 0; // None
public string DispUserFilterPath = string.Empty;
public string DispUserFilterPath = "";
public RecentFiles RecentRoms = new RecentFiles(10);
public RecentFiles RecentRomSessions = new RecentFiles(8); // Only used for MultiHawk
public bool PauseWhenMenuActivated = true;
@ -129,8 +129,8 @@ namespace BizHawk.Client.Common
public bool FirstBoot = true;
public bool Update_AutoCheckEnabled = false;
public DateTime? Update_LastCheckTimeUTC = null;
public string Update_LatestVersion = string.Empty;
public string Update_IgnoreVersion = string.Empty;
public string Update_LatestVersion = "";
public string Update_IgnoreVersion = "";
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
@ -357,7 +357,7 @@ namespace BizHawk.Client.Common
public int SoundVolume = 100; // Range 0-100
public int SoundVolumeRWFF = 50; // Range 0-100
public bool SoundThrottle = false;
public string SoundDevice = string.Empty;
public string SoundDevice = "";
public int SoundBufferSizeMs = 100;
// Log Window
@ -390,12 +390,12 @@ namespace BizHawk.Client.Common
public Color HexHighlightFreezeColor = Color.Violet;
// Video dumping settings
public string VideoWriter = string.Empty;
public string VideoWriter = "";
public int JMDCompression = 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 AVICodecToken = string.Empty;
public string AVICodecToken = "";
public int GifWriterFrameskip = 3;
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 = "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 = "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 = "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 = "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 string.Empty;
return "";
}
}
}

View File

@ -27,10 +27,10 @@ namespace BizHawk.Client.Common
{
if (Global.Game != null)
{
return Global.Game.Name ?? string.Empty;
return Global.Game.Name ?? "";
}
return string.Empty;
return "";
}
[LuaMethodAttributes(
@ -39,10 +39,10 @@ namespace BizHawk.Client.Common
{
if (Global.Game != null)
{
return Global.Game.Hash ?? string.Empty;
return Global.Game.Hash ?? "";
}
return string.Empty;
return "";
}
[LuaMethodAttributes(
@ -66,7 +66,7 @@ namespace BizHawk.Client.Common
return Global.Game.Status.ToString();
}
return string.Empty;
return "";
}
[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")]
public string GetBoardType()
{
return BoardInfo?.BoardName ?? string.Empty;
return BoardInfo?.BoardName ?? "";
}
[LuaMethodAttributes(

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@ namespace BizHawk.Client.Common
{
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)
{
if (MovieExtensions.Contains(ext.ToLower().Replace(".", string.Empty)))
if (MovieExtensions.Contains(ext.ToLower().Replace(".", "")))
{
return true;
}

View File

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

View File

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

View File

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

View File

@ -38,7 +38,7 @@ namespace BizHawk.Client.Common
var subparts = subtitleStr.Split(' ');
// 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++)
{
message += subparts[i] + ' ';

View File

@ -9,7 +9,7 @@ namespace BizHawk.Client.Common
{
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, float> MyFloatControls = new WorkingDictionary<string, float>();
@ -161,7 +161,7 @@ namespace BizHawk.Client.Common
if (!string.IsNullOrWhiteSpace(mnemonic))
{
var def = Global.Emulator.ControllerDefinition;
var trimmed = mnemonic.Replace("|", string.Empty);
var trimmed = mnemonic.Replace("|", "");
var buttons = Definition.ControlsOrdered.SelectMany(x => x).ToList();
var iterator = 0;

View File

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

View File

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

View File

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

View File

@ -8,7 +8,7 @@ namespace BizHawk.Client.Common
{
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')
{
key = key.Substring(3);

View File

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

View File

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

View File

@ -9,7 +9,7 @@ namespace BizHawk.Client.Common
public partial class Bk2Movie
{
protected IStringLog _log;
protected string LogKey = string.Empty;
protected string LogKey = "";
public string GetInputLog()
{
@ -52,12 +52,12 @@ namespace BizHawk.Client.Common
return _log[getframe];
}
return string.Empty;
return "";
}
public virtual bool ExtractInputLog(TextReader reader, out string errorMessage)
{
errorMessage = string.Empty;
errorMessage = "";
int? stateFrame = null;
// 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)
{
// 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 stateFrame = 0;
while (true)
@ -212,7 +212,7 @@ namespace BizHawk.Client.Common
break;
}
if (line.Trim() == string.Empty)
if (line.Trim() == "")
{
continue;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -38,12 +38,12 @@ namespace BizHawk.Client.Common
return _log[frame];
}
return string.Empty;
return "";
}
public bool ExtractInputLog(TextReader reader, out string errorMessage)
{
errorMessage = string.Empty;
errorMessage = "";
int? stateFrame = null;
// 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;
}
if (line.Trim() == string.Empty || line == "[Input]")
if (line.Trim() == "" || line == "[Input]")
{
continue;
}
@ -117,7 +117,7 @@ namespace BizHawk.Client.Common
break;
}
if (line.Trim() == string.Empty || line == "[Input]")
if (line.Trim() == "" || line == "[Input]")
{
continue;
}
@ -196,7 +196,7 @@ namespace BizHawk.Client.Common
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
errorMessage = string.Empty;
errorMessage = "";
var log = new List<string>();
var stateFrame = 0;
while (true)
@ -207,7 +207,7 @@ namespace BizHawk.Client.Common
return false;
}
if (line.Trim() == string.Empty)
if (line.Trim() == "")
{
continue;
}

View File

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

View File

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

View File

@ -69,9 +69,9 @@ namespace BizHawk.Client.Common
// Attempt to import another type of movie file into a movie object.
public static Bk2Movie ImportFile(string path, out string errorMsg, out string warningMsg)
{
errorMsg = string.Empty;
warningMsg = string.Empty;
string ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty;
errorMsg = "";
warningMsg = "";
string ext = path != null ? Path.GetExtension(path).ToUpper() : "";
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)
{
errorMsg = string.Empty;
warningMsg = string.Empty;
errorMsg = "";
warningMsg = "";
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)
{
string[] buttons = { };
var controller = string.Empty;
var ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty;
var controller = "";
var ext = path != null ? Path.GetExtension(path).ToUpper() : "";
switch (ext)
{
case ".FM2":
@ -327,7 +327,7 @@ namespace BizHawk.Client.Common
break;
}
if (warningMsg != string.Empty)
if (warningMsg != "")
{
warningMsg = "Unable to import " + warningMsg + " command on line " + lineNum + ".";
}
@ -339,7 +339,7 @@ namespace BizHawk.Client.Common
char[] off = { '.', ' ', '\t', '\n', '\r' };
if (flags.Length == 0 || off.Contains(flags[0]))
{
if (warningMsg == string.Empty)
if (warningMsg == "")
{
warningMsg = "Unable to import subframe.";
}
@ -351,7 +351,7 @@ namespace BizHawk.Client.Common
flags = SingleSpaces(flags.Substring(2));
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.";
}
@ -384,7 +384,7 @@ namespace BizHawk.Client.Common
// Gameboy doesn't currently have a prefix saying which player the input is for.
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.
@ -418,7 +418,7 @@ namespace BizHawk.Client.Common
// Concatenate the frame and message with default values for the additional fields.
string frame;
string length;
string ext = path != null ? Path.GetExtension(path).ToUpper() : string.Empty;
string ext = path != null ? Path.GetExtension(path).ToUpper() : "";
if (ext != ".LSMV")
{
@ -441,12 +441,12 @@ namespace BizHawk.Client.Common
// 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)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
var m = new BkmMovie(path);
var file = new FileInfo(path);
var sr = file.OpenText();
var emulator = string.Empty;
var platform = string.Empty;
var emulator = "";
var platform = "";
switch (Path.GetExtension(path).ToUpper())
{
case ".FM2":
@ -468,14 +468,14 @@ namespace BizHawk.Client.Common
while ((line = sr.ReadLine()) != null)
{
lineNum++;
if (line == string.Empty)
if (line == "")
{
continue;
}
else if (line[0] == '|')
{
m = ImportTextFrame(line, lineNum, m, path, platform, ref warningMsg);
if (errorMsg != string.Empty)
if (errorMsg != "")
{
sr.Close();
return null;
@ -637,7 +637,7 @@ namespace BizHawk.Client.Common
// FCM file format: http://code.google.com/p/fceu/wiki/FCM
private static BkmMovie ImportFCM(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
@ -805,7 +805,7 @@ namespace BizHawk.Client.Common
// bbbbb:
controllers["Reset"] = command == 1;
if (warningMsg == string.Empty)
if (warningMsg == "")
{
switch (command)
{
@ -845,7 +845,7 @@ namespace BizHawk.Client.Common
break;
}
if (warningMsg != string.Empty)
if (warningMsg != "")
{
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
private static BkmMovie ImportFmv(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
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
private static BkmMovie ImportGMV(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
var m = new BkmMovie(path);
var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
var r = new BinaryReader(fs);
@ -1220,7 +1220,7 @@ namespace BizHawk.Client.Common
// LSMV file format: http://tasvideos.org/Lsnes/Movieformat.html
private static BkmMovie ImportLSMV(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
var m = new BkmMovie(path);
var hf = new HawkFile(path);
@ -1238,8 +1238,8 @@ namespace BizHawk.Client.Common
hf.BindArchiveMember(item.Index);
var stream = hf.GetStream();
string authors = Encoding.UTF8.GetString(stream.ReadAllBytes());
string author_list = string.Empty;
string author_last = string.Empty;
string author_list = "";
string author_last = "";
using (var reader = new StringReader(authors))
{
string line;
@ -1248,9 +1248,9 @@ namespace BizHawk.Client.Common
while ((line = reader.ReadLine()) != null)
{
string author = line.Trim();
if (author != string.Empty)
if (author != "")
{
if (author_last != string.Empty)
if (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 ";
}
if (author_last != string.Empty)
if (author_last != "")
{
author_list += author_last;
}
@ -1329,7 +1329,7 @@ namespace BizHawk.Client.Common
string line;
while ((line = reader.ReadLine()) != null)
{
if (line == string.Empty)
if (line == "")
{
continue;
}
@ -1348,7 +1348,7 @@ namespace BizHawk.Client.Common
}
m = ImportTextFrame(line, lineNum, m, path, platform, ref warningMsg);
if (errorMsg != string.Empty)
if (errorMsg != "")
{
hf.Unbind();
return null;
@ -1487,7 +1487,7 @@ namespace BizHawk.Client.Common
*/
private static BkmMovie ImportMCM(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
@ -1609,12 +1609,12 @@ namespace BizHawk.Client.Common
ushort controllerState = r.ReadByte();
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;
}
}
r.ReadByte();
if (platform == "nes" && warningMsg == string.Empty)
if (platform == "nes" && warningMsg == "")
{
warningMsg = "Control commands are not properly supported.";
}
@ -1636,7 +1636,7 @@ namespace BizHawk.Client.Common
// MMV file format: http://tasvideos.org/MMV.html
private static BkmMovie ImportMMV(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
@ -1769,7 +1769,7 @@ namespace BizHawk.Client.Common
// NMV file format: http://tasvideos.org/NMV.html
private static BkmMovie ImportNMV(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
var m = new BkmMovie(path);
var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
var r = new BinaryReader(fs);
@ -1866,7 +1866,7 @@ namespace BizHawk.Client.Common
masks[controller - 1] = types[controller - 1] == 1;
// Get the first unsupported controller warning message that arises.
if (warningMsg == string.Empty)
if (warningMsg == "")
{
switch (types[controller - 1])
{
@ -1892,7 +1892,7 @@ namespace BizHawk.Client.Common
break;
}
if (warningMsg != string.Empty)
if (warningMsg != "")
{
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",
"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] + ".";
}
@ -2005,7 +2005,7 @@ namespace BizHawk.Client.Common
controllers["P" + player + " " + buttons[button]] = ((controllerState >> button) & 0x1) != 0;
}
}
else if (warningMsg == string.Empty)
else if (warningMsg == "")
{
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)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
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)));
string author = NullTerminated(Encoding.Unicode.GetString(metadata).Trim());
if (author != string.Empty)
if (author != "")
{
m.Header[HeaderKeys.AUTHOR] = author;
}
@ -2244,7 +2244,7 @@ namespace BizHawk.Client.Common
*/
if (version != "1.43" && player <= controllerTypes.Length)
{
var peripheral = string.Empty;
var peripheral = "";
switch (controllerTypes[player - 1])
{
case 0: // NONE
@ -2272,7 +2272,7 @@ namespace BizHawk.Client.Common
break;
}
if (peripheral != string.Empty && warningMsg == string.Empty)
if (peripheral != "" && warningMsg == "")
{
warningMsg = "Unable to import " + peripheral + ".";
}
@ -2287,7 +2287,7 @@ namespace BizHawk.Client.Common
((controllerState >> button) & 0x1) != 0;
}
}
else if (warningMsg == string.Empty)
else if (warningMsg == "")
{
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
private static BkmMovie ImportVbm(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
var m = new BkmMovie(path);
var fs = new FileStream(path, FileMode.Open, FileAccess.Read);
var r = new BinaryReader(fs);
@ -2585,7 +2585,7 @@ namespace BizHawk.Client.Common
}
// TODO: Handle the other buttons.
if (warningMsg == string.Empty)
if (warningMsg == "")
{
for (int button = 0; button < other.Length; button++)
{
@ -2617,7 +2617,7 @@ namespace BizHawk.Client.Common
// VMV file format: http://tasvideos.org/VMV.html
private static BkmMovie ImportVmv(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
@ -2768,7 +2768,7 @@ namespace BizHawk.Client.Common
if (controllerState == 0xF0)
{
ushort command = r.ReadUInt16();
string commandName = string.Empty;
string commandName = "";
if ((command & 0xFF00) == 0)
{
switch (command & 0x00FF)
@ -2815,7 +2815,7 @@ namespace BizHawk.Client.Common
commandName = "NESCMD_EXCONTROLLER, " + (command & 0xFF00);
}
if (commandName != string.Empty && warningMsg == string.Empty)
if (commandName != "" && warningMsg == "")
{
warningMsg = "Unable to run command \"" + commandName + "\".";
}
@ -2825,7 +2825,7 @@ namespace BizHawk.Client.Common
uint dwdata = r.ReadUInt32();
// TODO: Make a clearer warning message.
if (warningMsg == string.Empty)
if (warningMsg == "")
{
warningMsg = "Unable to run SetSyncExData(" + dwdata + ").";
}
@ -2857,7 +2857,7 @@ namespace BizHawk.Client.Common
// ZMV file format: http://tasvideos.org/ZMV.html
private static BkmMovie ImportZmv(string path, out string errorMsg, out string warningMsg)
{
errorMsg = warningMsg = string.Empty;
errorMsg = warningMsg = "";
BkmMovie m = new BkmMovie(path);
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read);
BinaryReader r = new BinaryReader(fs);
@ -2925,7 +2925,7 @@ namespace BizHawk.Client.Common
bit 0: super scope in second port
*/
byte controllerFlags = r.ReadByte();
string peripheral = string.Empty;
string peripheral = "";
bool superScope = (controllerFlags & 0x1) != 0;
if (superScope)
{
@ -2934,19 +2934,19 @@ namespace BizHawk.Client.Common
controllerFlags >>= 1;
bool secondMouse = (controllerFlags & 0x1) != 0;
if (secondMouse && peripheral == string.Empty)
if (secondMouse && peripheral == "")
{
peripheral = "Second Mouse";
}
controllerFlags >>= 1;
bool firstMouse = (controllerFlags & 0x1) != 0;
if (firstMouse && peripheral == string.Empty)
if (firstMouse && peripheral == "")
{
peripheral = "First Mouse";
}
if (peripheral != string.Empty)
if (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.";
}

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
{
var errorMessage = string.Empty;
var errorMessage = "";
IsCountingRerecords = false;
ExtractInputLog(tr, out errorMessage);
IsCountingRerecords = true;
@ -212,7 +212,7 @@ namespace BizHawk.Client.Common
if (GetClientSettingsOnLoad != null)
{
string clientSettings = string.Empty;
string clientSettings = "";
bl.GetLump(BinaryStateLump.ClientSettings, false, delegate(TextReader tr)
{
string line;

View File

@ -18,7 +18,7 @@ namespace BizHawk.Client.Common
public const string DefaultProjectName = "default";
public BackgroundWorker _progressReportWorker = null;
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 TasBranchCollection Branches = new TasBranchCollection();
public readonly TasSession Session;
@ -194,7 +194,7 @@ namespace BizHawk.Client.Common
{
return adapter.IsPressed(buttonName) ?
Mnemonics[buttonName].ToString() :
string.Empty;
"";
}
if (adapter.Definition.FloatControls.Contains(buttonName))
@ -287,7 +287,7 @@ namespace BizHawk.Client.Common
// TODO: this is 99% copy pasting of bad code
public override bool ExtractInputLog(TextReader reader, out string errorMessage)
{
errorMessage = string.Empty;
errorMessage = "";
int? stateFrame = null;
var newLog = new List<string>();

View File

@ -85,7 +85,7 @@ namespace BizHawk.Client.Common
public char TypeAsChar => _watch.TypeAsChar;
public string Name => IsSeparator ? string.Empty : _watch.Notes;
public string Name => IsSeparator ? "" : _watch.Notes;
public string AddressStr => _watch.AddressString;
@ -97,7 +97,7 @@ namespace BizHawk.Client.Common
{
default:
case WatchSize.Separator:
return string.Empty;
return "";
case WatchSize.Byte:
return (_watch as ByteWatch).FormatValue((byte)_val);
case WatchSize.Word:
@ -118,7 +118,7 @@ namespace BizHawk.Client.Common
{
default:
case WatchSize.Separator:
return string.Empty;
return "";
case WatchSize.Byte:
return (_watch as ByteWatch).FormatValue((byte)_compare.Value);
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>
{
private List<Cheat> _cheatList = new List<Cheat>();
private string _currentFileName = string.Empty;
private string _defaultFileName = string.Empty;
private string _currentFileName = "";
private string _defaultFileName = "";
private bool _changes;
public delegate void CheatListEventHandler(object sender, CheatListEventArgs e);
@ -109,7 +109,7 @@ namespace BizHawk.Client.Common
}
_cheatList.Clear();
_currentFileName = string.Empty;
_currentFileName = "";
Changes = false;
}
@ -384,7 +384,7 @@ namespace BizHawk.Client.Common
.Append(cheat.AddressStr).Append('\t')
.Append(cheat.ValueStr).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.Name).Append('\t')
.Append(cheat.SizeAsChar).Append('\t')

View File

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

View File

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

View File

@ -12,7 +12,7 @@ namespace BizHawk.Client.Common
/// Initialize a new separator instance
/// </summary>
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>
/// Ignore that stuff
/// </summary>
public override string ValueString => string.Empty;
public override string ValueString => "";
/// <summary>
/// Ignore that stuff
/// </summary>
public override string PreviousStr => string.Empty;
public override string PreviousStr => "";
/// <summary>
/// TTransform the current instance into a displayable (short representation) string
@ -85,7 +85,7 @@ namespace BizHawk.Client.Common
/// <summary>
/// Ignore that stuff
/// </summary>
public override string Diff => string.Empty;
public override string Diff => "";
/// <summary>
/// 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>
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
@ -364,8 +364,8 @@ namespace BizHawk.Client.Common
{
// LIAR logic
return (ushort)(Global.CheatList.GetCheatValue(_domain, _address, WatchSize.Word) ?? 0);
}
}
if (_domain.Size == 0)
{
return _domain.PeekUshort(_address, _bigEndian);
@ -404,24 +404,24 @@ namespace BizHawk.Client.Common
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
}
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
}
}
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
}
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
}
}
@ -642,7 +642,7 @@ namespace BizHawk.Client.Common
return "X" + (_domain.Size - 1).NumHexDigits();
}
return string.Empty;
return "";
}
}
@ -731,7 +731,7 @@ namespace BizHawk.Client.Common
}
else
{
return string.Empty;
return "";
}
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -135,7 +135,7 @@ namespace BizHawk.Client.EmuHawk
{
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
};
@ -255,7 +255,7 @@ namespace BizHawk.Client.EmuHawk
string img = "Unknown";
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,
ImageKey = img,
SelectedImageKey = img,

View File

@ -17,7 +17,7 @@ namespace BizHawk.Client.EmuHawk
public class HexTextBox : TextBox, INumberBox
{
private string _addressFormatStr = string.Empty;
private string _addressFormatStr = "";
private long? _maxSize;
private bool _nullable = true;
@ -65,7 +65,7 @@ namespace BizHawk.Client.EmuHawk
public override void ResetText()
{
Text = _nullable ? string.Empty : string.Format(_addressFormatStr, 0);
Text = _nullable ? "" : string.Format(_addressFormatStr, 0);
}
protected override void OnKeyPress(KeyPressEventArgs e)
@ -153,7 +153,7 @@ namespace BizHawk.Client.EmuHawk
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)
@ -203,7 +203,7 @@ namespace BizHawk.Client.EmuHawk
public override void ResetText()
{
Text = _nullable ? string.Empty : "0";
Text = _nullable ? "" : "0";
}
protected override void OnKeyDown(KeyEventArgs e)
@ -278,7 +278,7 @@ namespace BizHawk.Client.EmuHawk
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)
{
int? newRow;
string newColumn = String.Empty;
string newColumn = "";
var accumulator = 0;
foreach (ColumnHeader column in Columns)
@ -120,7 +120,7 @@ namespace BizHawk.Client.EmuHawk
protected override void OnMouseLeave(EventArgs e)
{
_currentPointedCell.Column = String.Empty;
_currentPointedCell.Column = "";
_currentPointedCell.RowIndex = null;
IsPaintDown = false;
base.OnMouseLeave(e);

View File

@ -249,7 +249,7 @@ namespace BizHawk.Client.EmuHawk
}
}
return string.Empty;
return "";
}
public string InputStrOrAll()
@ -293,7 +293,7 @@ namespace BizHawk.Client.EmuHawk
return lg.GenerateInputDisplay();
}
return string.Empty;
return "";
}
public string MakeRerecordCount()
@ -303,7 +303,7 @@ namespace BizHawk.Client.EmuHawk
return Global.MovieSession.Movie.Rerecords.ToString();
}
return string.Empty;
return "";
}
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
{
Name = columnName,
Text = columnName.Replace("Column", string.Empty),
Text = columnName.Replace("Column", ""),
Width = columnWidth,
};
@ -70,7 +70,7 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
var lsstViewColumn = new ColumnHeader
{
Name = column.Name,
Text = column.Name.Replace("Column", string.Empty),
Text = column.Name.Replace("Column", ""),
Width = column.Width,
DisplayIndex = column.Index
};
@ -95,7 +95,7 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
var menuItem = new ToolStripMenuItem
{
Name = column.Name,
Text = column.Name.Replace("Column", string.Empty)
Text = column.Name.Replace("Column", "")
};
menuItem.Click += (o, ev) =>
@ -239,7 +239,7 @@ namespace BizHawk.Client.EmuHawk.WinFormExtensions
var indexes = listViewControl.SelectedIndices;
if (indexes.Count <= 0)
{
return String.Empty;
return "";
}
var sb = new StringBuilder();

View File

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

View File

@ -171,7 +171,7 @@ namespace BizHawk.Client.EmuHawk
{
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);
switch (ext)

View File

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

View File

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

View File

@ -74,7 +74,7 @@ namespace BizHawk.Client.EmuHawk
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;
if (AlwaysCheckbox.Checked)

View File

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

View File

@ -35,7 +35,7 @@ namespace BizHawk.Client.EmuHawk
.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)
{
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
.OfType<string>()
.FirstOrDefault(item => item == (selectedSystem != null ? selectedSystem.FullName : string.Empty));
.FirstOrDefault(item => item == (selectedSystem != null ? selectedSystem.FullName : ""));
if (selectedItem != null)
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -79,14 +79,14 @@ namespace BizHawk.Client.EmuHawk
ValueHexIndLabel.Text =
CompareHexIndLabel.Text =
_cheat.Type == DisplayType.Hex ? HexInd : string.Empty;
_cheat.Type == DisplayType.Hex ? HexInd : "";
BigEndianCheckBox.Checked = _cheat.BigEndian.Value;
NameBox.Text = _cheat.Name;
AddressBox.Text = _cheat.AddressStr;
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))
{
@ -101,7 +101,7 @@ namespace BizHawk.Client.EmuHawk
CheckFormState();
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;
@ -113,7 +113,7 @@ namespace BizHawk.Client.EmuHawk
SetSizeSelected(WatchSize.Byte);
PopulateTypeDropdown();
NameBox.Text = string.Empty;
NameBox.Text = "";
if (MemoryDomains != null)
{
@ -140,7 +140,7 @@ namespace BizHawk.Client.EmuHawk
SetTypeSelected(DisplayType.Hex);
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;
}

View File

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

View File

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

View File

@ -181,7 +181,7 @@ namespace BizHawk.Client.EmuHawk
{
try
{
if (t.Text != String.Empty)
if (t.Text != "")
{
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)
{
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 };
num[0] = (val & 0xF0) >> 4;
num[1] = val & 0x0F;
@ -259,10 +259,10 @@ namespace BizHawk.Client.EmuHawk
private void ClearButton_Click(object sender, EventArgs e)
{
AddressBox.Text = string.Empty;
ValueBox.Text = string.Empty;
CompareBox.Text = string.Empty;
GGCodeMaskBox.Text = string.Empty;
AddressBox.Text = "";
ValueBox.Text = "";
CompareBox.Text = "";
GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false;
}
@ -275,7 +275,7 @@ namespace BizHawk.Client.EmuHawk
// remove invalid character when pasted
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))
@ -305,7 +305,7 @@ namespace BizHawk.Client.EmuHawk
}
else
{
GGCodeMaskBox.Text = string.Empty;
GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false;
}
}
@ -323,7 +323,7 @@ namespace BizHawk.Client.EmuHawk
// remove invalid character when pasted
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))
@ -351,7 +351,7 @@ namespace BizHawk.Client.EmuHawk
}
else
{
GGCodeMaskBox.Text = string.Empty;
GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false;
}
@ -367,7 +367,7 @@ namespace BizHawk.Client.EmuHawk
_processing = true;
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))
@ -396,7 +396,7 @@ namespace BizHawk.Client.EmuHawk
}
else
{
GGCodeMaskBox.Text = string.Empty;
GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false;
}
@ -408,7 +408,7 @@ namespace BizHawk.Client.EmuHawk
{
if (GGCodeMaskBox.Text.Length < 9)
{
var code = string.Empty;
var code = "";
if (sender == B0) { code = "0"; }
else if (sender == B1) { code = "1"; }
@ -447,7 +447,7 @@ namespace BizHawk.Client.EmuHawk
// insert REGEX Remove non HEXA char
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)
@ -472,16 +472,16 @@ namespace BizHawk.Client.EmuHawk
}
else
{
CompareBox.Text = string.Empty;
CompareBox.Text = "";
}
addcheatbt.Enabled = true;
}
else
{
AddressBox.Text = string.Empty;
ValueBox.Text = string.Empty;
CompareBox.Text = string.Empty;
AddressBox.Text = "";
ValueBox.Text = "";
CompareBox.Text = "";
addcheatbt.Enabled = false;
}

View File

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

View File

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

View File

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

View File

@ -34,7 +34,7 @@ namespace BizHawk.Client.EmuHawk
set
{
PromptLabel.Text = value ?? string.Empty;
PromptLabel.Text = value ?? "";
Height += PromptLabel.Font.Height * Message.Count(x => x == '\n');
}
}
@ -42,12 +42,12 @@ namespace BizHawk.Client.EmuHawk
public string InitialValue
{
get { return PromptBox.Text; }
set { PromptBox.Text = value ?? string.Empty; }
set { PromptBox.Text = value ?? ""; }
}
public string PromptText
{
get { return PromptBox.Text ?? string.Empty; }
get { return PromptBox.Text ?? ""; }
}
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)
{
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

View File

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

View File

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

View File

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

View File

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

View File

@ -236,7 +236,7 @@ namespace BizHawk.Client.EmuHawk
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)
@ -246,7 +246,7 @@ namespace BizHawk.Client.EmuHawk
private void BrowseBtn_Click(object sender, EventArgs e)
{
string filename = string.Empty;
string filename = "";
string initialDirectory = PathManager.MakeAbsolutePath(Global.Config.PathEntries.MultiDiskBundlesFragment, "Global_NULL");
if (!Global.Game.IsNullInstance)

View File

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

View File

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

View File

@ -282,12 +282,12 @@ namespace BizHawk.Client.EmuHawk
private void ClearDetails()
{
DetailsBox.Text = "Details";
AddressLabel.Text = string.Empty;
ValueLabel.Text = string.Empty;
Value2Label.Text = string.Empty;
Value3Label.Text = string.Empty;
Value4Label.Text = string.Empty;
Value5Label.Text = string.Empty;
AddressLabel.Text = "";
ValueLabel.Text = "";
Value2Label.Text = "";
Value3Label.Text = "";
Value4Label.Text = "";
Value5Label.Text = "";
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|
// 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' };
var code = string.Empty;
var code = "";
int[] num = { 0, 0, 0, 0, 0, 0, 0, 0 };
num[0] = (val & 0xF0) >> 4;
num[1] = val & 0x0F;
@ -176,9 +176,9 @@ namespace BizHawk.Client.EmuHawk
private void ClearButton_Click(object sender, EventArgs e)
{
AddressBox.Text = string.Empty;
ValueBox.Text = string.Empty;
GGCodeMaskBox.Text = string.Empty;
AddressBox.Text = "";
ValueBox.Text = "";
GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false;
}
@ -235,7 +235,7 @@ namespace BizHawk.Client.EmuHawk
_processing = true;
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))
@ -256,7 +256,7 @@ namespace BizHawk.Client.EmuHawk
}
else
{
GGCodeMaskBox.Text = string.Empty;
GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false;
}
@ -273,7 +273,7 @@ namespace BizHawk.Client.EmuHawk
// remove invalid character when pasted
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))
@ -294,7 +294,7 @@ namespace BizHawk.Client.EmuHawk
}
else
{
GGCodeMaskBox.Text = string.Empty;
GGCodeMaskBox.Text = "";
addcheatbt.Enabled = false;
}
@ -311,7 +311,7 @@ namespace BizHawk.Client.EmuHawk
// insert REGEX Remove non HEXA char
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)
@ -324,8 +324,8 @@ namespace BizHawk.Client.EmuHawk
}
else
{
AddressBox.Text = string.Empty;
ValueBox.Text = string.Empty;
AddressBox.Text = "";
ValueBox.Text = "";
addcheatbt.Enabled = false;
}
@ -337,7 +337,7 @@ namespace BizHawk.Client.EmuHawk
{
if (GGCodeMaskBox.Text.Length < 8)
{
var code = string.Empty;
var code = "";
if (sender == B0) code = "0";
if (sender == B1) code = "1";
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)
{
text = string.Empty;
text = "";
if (index >= Movie.BranchCount)
{

View File

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

View File

@ -50,7 +50,7 @@ namespace BizHawk.Client.EmuHawk
var filename = CurrentTasMovie.Filename;
if (string.IsNullOrWhiteSpace(filename) || filename == DefaultTasProjName())
{
filename = string.Empty;
filename = "";
}
// 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()
{
TasView.AllColumns.Clear();
AddColumn(CursorColumnName, string.Empty, 18);
AddColumn(CursorColumnName, "", 18);
AddColumn(FrameColumnName, "Frame#", 68);
var columnNames = GenerateColumnNames();

View File

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

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