Code Formating

Just more sexy
This commit is contained in:
Hathor86 2015-11-22 17:56:08 +01:00
parent 7d2e02b94b
commit 6f18e44fe7
2 changed files with 9 additions and 9 deletions

View File

@ -1263,7 +1263,7 @@ namespace BizHawk.Client.EmuHawk
DirectoryInfo dInfo = new DirectoryInfo(path);
Type[] assemblyTypes;
Assembly externalToolFile;
foreach (FileInfo fi in dInfo.GetFiles("*.dll"))
foreach (FileInfo fi in dInfo.GetFiles("*.dll"))
{
try
{
@ -1279,7 +1279,7 @@ namespace BizHawk.Client.EmuHawk
}
ToolStripMenuItem externalToolMenu = new ToolStripMenuItem(externalToolFile.GetName().Name);
/*
The reason of using this ugly try catch is due to the use of ReflectionOnlyLoadFrom methods
When the assembly is loaded this way, referenced assemblies are not loaded and so, as soon as a type
@ -1311,8 +1311,8 @@ namespace BizHawk.Client.EmuHawk
externalToolMenu.ForeColor = Color.Gray;
}
externalToolToolStripMenuItem.DropDownItems.Add(externalToolMenu);
}
}
}
}
if (externalToolToolStripMenuItem.DropDownItems.Count == 0)
{
externalToolToolStripMenuItem.DropDownItems.Add("None");

View File

@ -536,7 +536,7 @@ namespace BizHawk.Client.EmuHawk
{
_tools.ForEach(x => x.Close());
_tools.Clear();
}
}
/// <summary>
/// Create a new instance of an IToolForm and return it
@ -548,8 +548,8 @@ namespace BizHawk.Client.EmuHawk
where T : IToolForm
{
return CreateInstance(typeof(T), dllPath);
}
}
/// <summary>
/// Create a new instance of an IToolForm and return it
/// </summary>
@ -568,13 +568,13 @@ namespace BizHawk.Client.EmuHawk
, "Confirmm loading", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
try
{
{
tool = Activator.CreateInstanceFrom(dllPath, "BizHawk.Client.EmuHawk.CustomMainForm").Unwrap() as IExternalToolForm;
if (tool == null)
{
MessageBox.Show("It seems that the object CustomMainForm does not implement IExternalToolForm. Please review the code.", "No, no, no. Wrong Way !", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return null;
}
}
}
catch (MissingMethodException)
{