MessageBox.Show(this,"Please select a valid WAD File resource.",Application.ProductName,MessageBoxButtons.OK,MessageBoxIcon.Warning);
}
else
{
// Apply settings
res.type=ResourceLocation.RESOURCE_WAD;
res.location=wadlocation.Text;
res.textures=false;
res.flats=false;
// Done
this.DialogResult=DialogResult.OK;
this.Hide();
}
break;
// Setup Directory
caseResourceLocation.RESOURCE_DIRECTORY:
// Check if directory is specified
if((dirlocation.Text.Length==0)||
(!Directory.Exists(dirlocation.Text)))
{
// No valid directory specified
MessageBox.Show(this,"Please select a valid directory resource.",Application.ProductName,MessageBoxButtons.OK,MessageBoxIcon.Warning);
}
// At least one of the checkboxes must be checked
elseif(!dir_flats.Checked&&!dir_textures.Checked)
{
// Must select one of the checkboxes
MessageBox.Show(this,"Please choose to load the images as texture or flats, or both.",Application.ProductName,MessageBoxButtons.OK,MessageBoxIcon.Warning);