public async Task <SelectEditor.ReturnValue> Create(IForm parentForm, string title)
        {
            var factoryWizard = new FactoryWizard(parentForm, title, _editor, null, null, null);

            (object result, MethodModel model, _) = await factoryWizard.RunMethod(_factory, _methodName);

            return(new SelectEditor.ReturnValue(model == null ? null : new ValueModel(result, model), model == null));
        }
示例#2
0
        private async void showWizard(string name, Target target, object factory, string methodName)
        {
            _topMenu.Visible = false;
            FactoryWizard wizard = new FactoryWizard(null, name.Humanize(), _editor, panel => addTargetUIForCreate(panel, target), validate, defaults => setDefaults(name, defaults));

            (object result, MethodModel model, MethodWizardAttribute methodAttribute) = await wizard.RunMethod(factory, methodName);

            if (model == null)
            {
                return;
            }
            List <object> entities = getEntities(factory, result, methodAttribute);

            addNewEntities(entities, model);
        }