protected void cmdOk_Click( object sender, EventArgs e )
{
if ( cboRenderSystems.SelectedItem == null )
{
SWF.MessageBox.Show( "Please select a rendering system.", "Axiom", SWF.MessageBoxButtons.OK, SWF.MessageBoxIcon.Exclamation );
this.DialogResult = SWF.DialogResult.Cancel;
return;
}
Axiom.Graphics.RenderSystem system = (Axiom.Graphics.RenderSystem)cboRenderSystems.SelectedItem;
string errorMsg = system.ValidateConfigOptions();
if ( !String.IsNullOrEmpty( errorMsg ) )
{
SWF.MessageBox.Show( errorMsg, "Axiom", SWF.MessageBoxButtons.OK, SWF.MessageBoxIcon.Exclamation );
this.DialogResult = SWF.DialogResult.Cancel;
return;
}
Engine.RenderSystem = system;
this.DialogResult = SWF.DialogResult.OK;
this.Close();
}