Use string interpolation
This commit is contained in:
parent
d54146791e
commit
4ec33bab1c
|
@ -14,7 +14,7 @@ namespace BizHawk.Client.DiscoHawk
|
|||
public About()
|
||||
{
|
||||
InitializeComponent();
|
||||
lblVersion.Text = "v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
lblVersion.Text = $"v{System.Reflection.Assembly.GetExecutingAssembly().GetName().Version}";
|
||||
}
|
||||
|
||||
private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e)
|
||||
|
|
|
@ -31,7 +31,7 @@ namespace BizHawk.Client.DiscoHawk
|
|||
for (int sector = 0; sector < trackLength; sector++)
|
||||
dsr.ReadLBA_2352(startLba + sector, waveData, sector * 2352);
|
||||
|
||||
string mp3Path = string.Format("{0} - Track {1:D2}.mp3", Path.Combine(path, filebase), track.Number);
|
||||
string mp3Path = $"{Path.Combine(path, filebase)} - Track {track.Number:D2}.mp3";
|
||||
if (File.Exists(mp3Path))
|
||||
{
|
||||
if (!confirmed)
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace BizHawk.Client.DiscoHawk
|
|||
return asm;
|
||||
|
||||
//load missing assemblies by trying to find them in the dll directory
|
||||
string dllname = new AssemblyName(args.Name).Name + ".dll";
|
||||
string dllname = $"{new AssemblyName(args.Name).Name}.dll";
|
||||
string directory = Path.Combine(GetExeDirectoryAbsolute(), "dll");
|
||||
string fname = Path.Combine(directory, dllname);
|
||||
if (!File.Exists(fname)) return null;
|
||||
|
@ -120,7 +120,7 @@ namespace BizHawk.Client.DiscoHawk
|
|||
static extern bool DeleteFileW([MarshalAs(UnmanagedType.LPWStr)]string lpFileName);
|
||||
static void RemoveMOTW(string path)
|
||||
{
|
||||
DeleteFileW(path + ":Zone.Identifier");
|
||||
DeleteFileW($"{path}:Zone.Identifier");
|
||||
}
|
||||
|
||||
static void WhackAllMOTW(string dllDir)
|
||||
|
@ -416,8 +416,8 @@ namespace BizHawk.Client.DiscoHawk
|
|||
sw.Write(" ");
|
||||
sw.Write(new string('-', count * 4));
|
||||
sw.WriteLine();
|
||||
sw_dump_chunk_one(string.Format("SRC #{0,6} ({1})", lba, new Timestamp(lba)), lba, src_databuf, addr, count);
|
||||
sw_dump_chunk_one(string.Format("DST #{0,6} ({1})", lba, new Timestamp(lba)), lba, dst_databuf, addr, count);
|
||||
sw_dump_chunk_one($"SRC #{lba,6} ({new Timestamp(lba)})", lba, src_databuf, addr, count);
|
||||
sw_dump_chunk_one($"DST #{lba,6} ({new Timestamp(lba)})", lba, dst_databuf, addr, count);
|
||||
};
|
||||
|
||||
//verify each sector contents
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace BizHawk.Client.DiscoHawk
|
|||
|
||||
string baseName = Path.GetFileNameWithoutExtension(file);
|
||||
baseName += "_hawked";
|
||||
string outfile = Path.Combine(Path.GetDirectoryName(file), baseName) + ".ccd";
|
||||
string outfile = $"{Path.Combine(Path.GetDirectoryName(file), baseName)}.ccd";
|
||||
CCD_Format.Dump(disc, outfile);
|
||||
}
|
||||
this.Cursor = Cursors.Default;
|
||||
|
|
Loading…
Reference in New Issue