public void Run()
{
try
{
if ( _configure() )
{
Assembly demos = Assembly.LoadFrom("Axiom.Demos.dll");
_setDefaultNextGame();
Type type;
type = Assembly.GetExecutingAssembly().GetType("Axiom.Demos.Browser.Xna." + nextGame);
if (type == null)
{
type = demos.GetType("Axiom.Demos." + nextGame);
}
if (type != null)
{
using ( TechDemo demo = (TechDemo)Activator.CreateInstance( type ) )
{
demo.SetupInput = new TechDemo.ConfigureInput( _setupInput );
demo.Start();//show and start rendering
}//dispose of it when done
}
}
}
catch ( Exception caughtException )
{
LogManager.Instance.Write( BuildExceptionString( caughtException ) );
}
}