public void LoadDemos( string DemoAssembly )
{
AxiomSortedCollection<string, DemoItem> demoList = new AxiomSortedCollection<string, DemoItem>();
Assembly demos = Assembly.LoadFrom( DemoAssembly );
Type[] demoTypes = demos.GetTypes();
Type techDemo = demos.GetType( "Axiom.Demos.TechDemo" );
foreach ( Type demoType in demoTypes )
{
if ( demoType.IsSubclassOf( techDemo ) )
{
demoList.Add( demoType.Name, new DemoItem( demoType.Name, demoType ) );
}
}
foreach ( KeyValuePair<string, DemoItem> demoItem in demoList )
{
lstDemos.Items.Add( demoItem.Value );
}
this.lstDemos.SelectedIndexChanged += new EventHandler( lstDemos_SelectedIndexChanged );
this.lstDemos.DoubleClick += new EventHandler( cmdOk_Click );
if ( lstDemos.Items.Count > 0 )
lstDemos.SelectedIndex = 0;
this.tmrRotator.Start();
}
}