Exemplo n.º 1
0
        // Shows the Visual Studio dialog that collects scaffolding options
        // from the user.
        // Passing the dialog to this method so that all scaffolder UIs
        // are modal is still an open question and tracked by bug 578173.
        public override bool ShowUIAndValidate()
        {
            _codeGeneratorViewModel = new MvcCodeGeneratorViewModel(Context);

            MvcScaffolderDialog window = new MvcScaffolderDialog(_codeGeneratorViewModel);
            bool?isOk = window.ShowModal();

            if (isOk == true)
            {
                Validate();

                if (_codeGeneratorViewModel.GenerateViews)
                {
                    isOk = ShowColumnSetting();
                }
            }
            return(isOk == true);
        }
Exemplo n.º 2
0
        //public override IEnumerable<string> TemplateFolders
        //{
        //    get
        //    {
        //        var baseTemplatePath = Path.Combine(Path.GetDirectoryName(path: GetType().Assembly.Location),
        //            "baseTemplatePath");
        //        var projectTemplatePath =
        //            Path.Combine(path1: Context.ActiveProject.GetFullPath(), "projectTemplatePath");
        //        return new[] { projectTemplatePath, baseTemplatePath };
        //    }
        //}

        // Shows the Visual Studio dialog that collects scaffolding options
        // from the user.
        // Passing the dialog to this method so that all scaffolder UIs
        // are modal is still an open question and tracked by bug 578173.
        public override bool ShowUIAndValidate()
        {
            _codeGeneratorViewModel = new MvcCodeGeneratorViewModel(context: Context);

            MvcScaffolderDialog window = new MvcScaffolderDialog(viewModel: _codeGeneratorViewModel);
            bool?isOk = window.ShowModal();

            if (isOk == true)
            {
                //Alert.Trace("Validate");
                Validate();

                if (_codeGeneratorViewModel.GenerateViews)
                {
                    isOk = ShowColumnSetting();
                }
            }

            //Alert.Trace("ShowUIAndValidate" + isOk);
            return(isOk == true);
        }