public ICommand CreateCommand()
        {
            ICommand         ret       = null;
            List <AssetDesc> assetList = app.Assets.Select("ParticleFX");
            DialogResult     result;

            using (AddParticleFXDialog dlg = new AddParticleFXDialog(assetList, parent.AttachmentPoints))
            {
                dlg.PositionScale = app.Config.ParticleFXPositionScaleDefault;
                dlg.VelocityScale = app.Config.ParticleFXVelocityScaleDefault;
                bool showAgain = false;
                do
                {
                    result    = dlg.ShowDialog();
                    showAgain = false;
                    if (result == DialogResult.OK)
                    {
                        // do validation here
                        // if validation fails, set showAgain to true
                        showAgain = ((result == DialogResult.OK) && (!dlg.okButton_validating()));
                    }
                } while (showAgain);
                if (result == DialogResult.OK)
                {
                    string particleEffectName = app.Assets.assetFromName(dlg.ParticleEffectSelectedItem).AssetName;

                    ret = new AddObjectParticleEffectCommand(parent, app, particleEffectName, dlg.PositionScale, dlg.VelocityScale, dlg.AttachmentPointName, parent.Orientation);
                }
            }
            return(ret);
        }
        public ICommand CreateCommand()
        {
            ICommand ret = null;
            List<AssetDesc> assetList = app.Assets.Select("ParticleFX");
            DialogResult result;

            using (AddParticleFXDialog dlg = new AddParticleFXDialog(assetList, parent.AttachmentPoints))
            {
                dlg.PositionScale = app.Config.ParticleFXPositionScaleDefault;
                dlg.VelocityScale = app.Config.ParticleFXVelocityScaleDefault;
                bool showAgain = false;
                do {
                    result = dlg.ShowDialog();
                    showAgain = false;
                    if ( result == DialogResult.OK) {
                        // do validation here
                        // if validation fails, set showAgain to true
                        showAgain = ((result == DialogResult.OK) && (!dlg.okButton_validating()));
                    }
                } while (showAgain);
                if (result == DialogResult.OK)
                {
                    string particleEffectName = app.Assets.assetFromName(dlg.ParticleEffectSelectedItem).AssetName;

                    ret = new AddObjectParticleEffectCommand(parent, app, particleEffectName, dlg.PositionScale, dlg.VelocityScale, dlg.AttachmentPointName, parent.Orientation);
                }
            }
            return ret;
        }