public ICommand CreateCommand() { ICommand ret = null; using (AddDirectionalLightDialog dlg = new AddDirectionalLightDialog(app.Config.DefaultBoundaryDirectionalLightSpecular, app.Config.DefaultBoundaryDirectionalLightDiffuse)) { DialogResult result; result = dlg.ShowDialog(); if (result == DialogResult.OK) { ret = new AddDirectionalLightCommand(app, (IWorldContainer)parent, String.Format("{0}-{1}",parent.Name, "DirectionalLight"),app.Assets.assetFromName(app.Config.PointLightMeshName).AssetName, dlg.Specular, dlg.Diffuse); } return ret; } }
public ICommand CreateCommand() { ICommand ret = null; using (AddDirectionalLightDialog dlg = new AddDirectionalLightDialog(app.Config.DefaultBoundaryDirectionalLightSpecular, app.Config.DefaultBoundaryDirectionalLightDiffuse)) { DialogResult result; result = dlg.ShowDialog(); if (result == DialogResult.OK) { ret = new AddDirectionalLightCommand(app, (IWorldContainer)parent, String.Format("{0}-{1}", parent.Name, "DirectionalLight"), app.Assets.assetFromName(app.Config.PointLightMeshName).AssetName, dlg.Specular, dlg.Diffuse); } return(ret); } }