public ICommand CreateCommand()
        {
            ICommand ret = null;
            // bool add = false;

            // add = true;

            using (AddPointLightDialog dlg = new AddPointLightDialog(app.Config.DefaultPointLightSpecular, app.Config.DefaultPointLightDiffuse))
            {
                DialogResult result;

                result = dlg.ShowDialog();
                if (result == DialogResult.OK)
                {
                    ret = new AddPointLightCommand(app, parentObject, dlg.NameTextBoxText, app.Assets.assetFromName(app.Config.PointLightMeshName).AssetName, dlg.Specular, dlg.Diffuse);
                }
                return ret;
            }
        }
Exemplo n.º 2
0
        public ICommand CreateCommand()
        {
            ICommand ret = null;

            // bool add = false;

            // add = true;

            using (AddPointLightDialog dlg = new AddPointLightDialog(app.Config.DefaultPointLightSpecular, app.Config.DefaultPointLightDiffuse))
            {
                DialogResult result;

                result = dlg.ShowDialog();
                if (result == DialogResult.OK)
                {
                    ret = new AddPointLightCommand(app, parentObject, dlg.NameTextBoxText, app.Assets.assetFromName(app.Config.PointLightMeshName).AssetName, dlg.Specular, dlg.Diffuse);
                }
                return(ret);
            }
        }